Maker Pro
Maker Pro

Interference in video switching circuitry

xTamx420

Feb 16, 2015
20
Joined
Feb 16, 2015
Messages
20
Hi,

I'm working on a audio/video switch project with a lot of SPST chips in the circuit. It's supposed to route 16 analog RCA inputs to 2 outputs.

I rigged it up on a breadboard and for the most part it works really well BUT sometimes a bit of one signal will go backwards through the switch chip and find its way into the wrong display. This only seems to happen when one is particularly bright, a white screen for example.

Is there a way to block electricity from going in certain directions? I was reading about diodes which seems like the way to go but when I tried them it made the picture terrible. Barely there actually. I dont think the forward voltage of the analog signal is strong enough to get through the diode. I'm very new to electronics design so any help would be appreciated.



Alternatively I could try different chips but I'm having a hard time finding ones that will work for me. Right now I have chips with 4 SPST switches which are connected in pairs on one end. This essentially gives me two SPDT switches. But that is why the signal leaks into other lines.

I would prefer to have a chip that is either an SP3T switch with one going to output A, one to B and one not connected for an OFF state, or to have an SPDT switch with a third state where neither is connected.

I found these: http://www.digikey.ca/product-detail/en/TS5A3357DCUR/296-17404-1-ND/695802

Which are great except for the fact there there is only a single switch in each IC. I need to route 102 signals so 102 IC's is too much. Does anyone know of a similar chip with more than one switch per chip? The package is too small on that as well as I need to hand solder these chips and US8 is just too small. It would also be great if it were a single supply
 

davenn

Moderator
Sep 5, 2009
14,251
Joined
Sep 5, 2009
Messages
14,251
the only multi switch chip I know of is the CD 4066 4 x SPST switches


you cannot put diodes in your audio signal path, they would cause lots of distortion

cheers
Dave
 

xTamx420

Feb 16, 2015
20
Joined
Feb 16, 2015
Messages
20
the only multi switch chip I know of is the CD 4066 4 x SPST switches


you cannot put diodes in your audio signal path, they would cause lots of distortion

cheers
Dave

Those are the chips I'm currently using. Is there anything else that can prevent signals from going in one direction? Or a resistor is some kind of pull down configuration? Or a way to increase the on state resistance so its more encouraged to go to the output RCA jacks?
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Hi there and welcome to Electronics Point :)

Diodes are not the answer as Dave said. My guess is that the white level of your signals is exceeding some limit - possibly, exceeding the power supply rails of the switches - and this is interfering with other parts of the circuit.

Post a schematic with part numbers and details of the power supply, and information on your video signals, if you want more specific advice.
 

xTamx420

Feb 16, 2015
20
Joined
Feb 16, 2015
Messages
20
Here's what I have on the breadboard. Its a scaled down version of the full schematic, which is essentially this repeated 8 times with an arduino.

ICs 1 to 6 are switches (4xSPST), 7 and 8 are decoders. The decoders aren't causing any problems, they're just to interface it to the arduino. All resistors are 1k, and are just for voltage dividers.

R1, W1, Y1, R2, W2 and Y2 are two RCA inputs (left audio, right audio and video)

RO1, WO1, YO1, RO2, WO2 and YO2 are two RCA outputs.

This circuit switches the two inputs to the two outputs.

Digikey part numbers:
ICs 1 to 6: 296-33677-5-ND
ICs 7 to 8: 296-16702-1-ND


I'm pretty sure the problem is that part of a signal from IC6 for example is going through 4B on IC4, then through 4A, back into 3A and 3B into the wrong output connector.

So the problem is the way that I've turned 4 SPSTs into 2 SPDTs. I'd love to change to chips with SPDT switches but I cant find any with an "all off" state.
 

Attachments

  • videotest.png
    videotest.png
    216.6 KB · Views: 103

davenn

Moderator
Sep 5, 2009
14,251
Joined
Sep 5, 2009
Messages
14,251
can you please post a black lined drawing on a white background
the green and red on black is just too difficult to read
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
OK, that's a good start. Although I agree a white background would be better.

For the video signals, what are the DC voltages of sync, black, and 100% white, relative to GND?

What is your VCC rail voltage?

Do you have an oscilloscope? If so, please upload a capture of a line of video from a source that is currently causing the problem, with DC voltage levels shown.

Are you also getting interference from the video into the audio paths?

Please answer all of the questions above.
 

xTamx420

Feb 16, 2015
20
Joined
Feb 16, 2015
Messages
20
I've attached a white background version but I couldnt find an option to change the line colors. I'm using Eagle.

I'm not sure how to measure sync, black or white. Or what sync is. Could you elaborate on that a little?

VCC is +5V

I do have an oscilloscope, but I havent used it yet. I'll read up on how to use them and post that screen cap of what you need as soon as I figure out how. Like I said, I'm new to this stuff. This project is turning out to be a lot more ambitious for a beginner than I originally thought...

I dont think the audio has any issues. None that I can hear anyway. There was a bit of buzzing/humming but I seem to have just fixed that with some caps on the outputs. The voltage dividers on the inputs are to ensure that their signals stay within +/- 0.5V as the chips are only rated for -0.5 to 5 V. There was some weird distortion or bleeding effects before but the dividers fixed that. I tried that with the video but it got very distorted. All it did to the audio was make it quieter.


if this helps I've attached a screen shot of what seems to be causing the problem. As soon as the sega logo screen appears on one output, the other is gets a little fuzzy. As soon as the logo screen goes away the other output is fine again. From what I've tested so far this is the only time that there are video issues. As you can see the screen is almost completely white.
 

Attachments

  • problem screen.png
    problem screen.png
    6 KB · Views: 101
  • videotest2.png
    videotest2.png
    445 KB · Views: 97

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
A composite video signal has a specific form. Here's a good example I found at web.onetel.net.uk:

video-signal.gif

This is how a typical video signal looks on an oscilloscope. The section in the middle is one "line" of video, which corresponds to a line of the raster on the screen, as it is scanned from left to right. The height of the signal at each point corresponds to the brightness of that part of the line - more height means brighter, as you can see from the labels on the left.

Each line is formed in a specific way, with a sync pulse and a colour burst as shown. The sync pulse is the lowest voltage in the signal, and full white level is the highest voltage.

In some cases though, the video signal may be upside down, and 100% white may correspond to the lowest voltage. If that means that 100% white is actually a negative voltage, i.e. below 0V, then it will be outside the allowable limits for the 4066 switch ICs and will cause problems.

So I need to see an oscilloscope capture of one line of the problematic video signal, and I need to know the actual voltage of each voltage level in the signal - the sync level, the black level, and the 100% white level.

These voltages can be determined from the oscilloscope capture because there is a fixed number of volts or millivolts per vertical division, and there should be some indication of the 0V DC reference level on the display (if it's a digital oscilloscope).
 

xTamx420

Feb 16, 2015
20
Joined
Feb 16, 2015
Messages
20
Ok thanks, I'm trying to get this signal for you now. Complete noob question here:

Do I plug the leads into the signal positive and signal negative or into the signal positive and the common ground?
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
You mean the scope leads? Connect the tip of the probe to the video signal at the RCA connector, and clip the earth clip to the 0V rail of the circuit. The "signal negative" (the outer connection of the RCA socket) is already connected to the 0V rail of the circuit.

No it's not! Are you switching the outer connections of the RCA connectors as well? You don't need to do that! All of the outers (the 0V references of the video signals) should be connected together, and probably to the circuit's 0V rail. You don't need to pass them through the 4066es!
 

xTamx420

Feb 16, 2015
20
Joined
Feb 16, 2015
Messages
20
I am switching them right now, I used to have the video grounds all wired to a common ground but then reconfigured it to see if that eliminated my video problem (which it obviously didnt). I'll definitely change it back in the next rebuild.

Audio grounds should be switched though right?
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
No. If you're concerned about earth loops, insert a low value resistor (e.g. 10~33Ω) in series with the ground connection on all but one cable between your box and each device, and make sure the devices aren't earthed independently, just through your box.
 

xTamx420

Feb 16, 2015
20
Joined
Feb 16, 2015
Messages
20
Ok thanks, I should be able to reduce the number of chips if I do that.

I got a few video signals for you. I got two that are typical of the title screen which causes problems and two that are typical of gameplay which does not cause problems. I added two lines for 0 and -0.5 V which are pointed out on the fifth image I have attached. It looks like the problematic screen is always going below -0.5 V. That is what you were suspecting was causing the problems right? The datasheet for those chips says -0.5 to Vcc + 0.5 for the analog signal input range.
 

Attachments

  • IMG_010 - TITLE SCREEN, ISSUES.png
    IMG_010 - TITLE SCREEN, ISSUES.png
    5.9 KB · Views: 128
  • IMG_011 - GAMEPLAY, NO ISSUES.png
    IMG_011 - GAMEPLAY, NO ISSUES.png
    6.7 KB · Views: 104
  • IMG_012 - GAMEPLAY, NO ISSUES.png
    IMG_012 - GAMEPLAY, NO ISSUES.png
    6.8 KB · Views: 99
  • IMG_013 - TITLE SCREEN, ISSUES.png
    IMG_013 - TITLE SCREEN, ISSUES.png
    7.1 KB · Views: 111
  • LABELLED GRAPH.png
    LABELLED GRAPH.png
    10.4 KB · Views: 104

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
OK, that first trace is good. I can see the 100% white for most of the line, and the sync pulses.

Are these captures all from the same source device?

I think you have AC coupling enabled on your scope. You need to use DC coupling, and with nothing connected to the scope input, adjust the vertical offset so the line is on top of one of the dotted lines. That dotted line will be the 0V DC reference. Then capture the first waveform again.
 

xTamx420

Feb 16, 2015
20
Joined
Feb 16, 2015
Messages
20
It is using DC decoupling. I have a DSO Nano v3 which is only capable of DC coupling.

I've attached new captures, one where the screen is all white, one where it is all black and one where it is varied colors.

They are all from the same device, a sega genesis playing sonic 2.

I've also attached screen shots that approximately correspond to what was on my screen during each capture. Theyre not exactly what was there since I just grabbed screen shots off google but they are very similar.
 

Attachments

  • IMG_020 - BKACK.png
    IMG_020 - BKACK.png
    5.4 KB · Views: 113
  • IMG_021 - WHITE.png
    IMG_021 - WHITE.png
    5.9 KB · Views: 117
  • IMG_022 - VARIED.png
    IMG_022 - VARIED.png
    7 KB · Views: 134
  • TYPICAL SCREEN.png
    TYPICAL SCREEN.png
    369 bytes · Views: 96
  • VARIED SCREEN.jpg
    VARIED SCREEN.jpg
    252.4 KB · Views: 122
  • WHITE SCREEN.png
    WHITE SCREEN.png
    6 KB · Views: 103

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
OK, let's just worry about the screen with the white background, which is causing the problem.

The trace looks fine, but it's not clear where the 0V DC level is. Can you do the following.

1. Disconnect the scope input and connect it to the earth clip so there is no input to the scope.
2. Adjust the vertical position so the scope shows a straight horizontal line that lies directly on top of the bottom-most line of the static grid made from dotted lines.
3. Connect the scope input to the Sega output signal.
4. While the Sega is displaying the white background, capture one line of video on the scope and upload it here.
 

xTamx420

Feb 16, 2015
20
Joined
Feb 16, 2015
Messages
20
I've attached two images, one of 0V and one with the white screen.

The white looks like it goes up to about 0.22V.

The screens from before seem to show the sync pulse going down to about -0.62V, which could be the problem? Since the chips are rated for -0.5 to 5.5 V?

I've ordered some dual supply chips to try out with a range of +/- 5.5V. I hope to have that assembled tomorrow and I'll post the results.
 

Attachments

  • IMG_030.png
    IMG_030.png
    5 KB · Views: 103
  • IMG_031.png
    IMG_031.png
    5.4 KB · Views: 94

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Yes those voltages are wrong and that could be what's causing the problem.

It looks like there is some AC coupling occurring somewhere. Can you repeat the test with an extra step:

1. Disconnect the scope input and connect it to the earth clip so there is no input to the scope.
2. Adjust the vertical position so the scope shows a straight horizontal line that lies directly on top of the centre line of the static grid made from dotted lines.
3. Connect the scope input to the Sega output signal.
4. While the Sega is displaying the white background, capture one line of video on the scope. Repeat with a black or nearly black screen. Upload the captures here.
 

xTamx420

Feb 16, 2015
20
Joined
Feb 16, 2015
Messages
20
Ok, That is what I did earlier for IMG_020 and IMG_021. I forgot to mention this when I posted those but the little blue triangle on the left side of the grid is 0V.
 
Top