Electronic – Ringing on the OSD project

high frequencyringingvideo

I'm developing a fully graphical on screen display (OSD) for RC aircraft and other RC things. The project is almost complete, with a working prototype and PCBs made. The OSD is based around a dsPIC33F clocked at 36.85 MHz and works with PAL and NTSC video sources. The video sync is sliced by an LM1881 sync separator. On the CSYNC rising edge, an interrupt fires, checks VSYNC, checks ODDEVEN, and then outputs a scan line if required. The output stage is assembler code, and it works by controlling an IO port. Making a black pixel is accomplished by setting the output low, making a white pixel is accomplished by setting the output high, and no pixel is handled by tristating the pin. Everything about this is open sourced here: http://code.google.com/p/super-osd/

Now, as it stands, there is one minor problem with this. The image has ringing on it. The resolution of the OSD is 208 pixels horizontally and the ringing can sometimes extend to two or three pixels, which is quite a lot! It doesn't make the OSD look as good as it should and reduces visibility. (Which is very important on an RC aircraft. If you are miles from home, you need to know exactly where you are, in case your plane goes down or you get lost.)

Below is an image capture of the OSD. Look near the edges of the test lines, and near the text. Ignore the chroma noise, that is an unavoidable effect of composite video. (The OSD firmware still has some bugs, and I'm still squashing them, like the horizontal lines being one pixel too long and wrapping to the next line. Ignore them for now…)

OSD

Now, I have few ideas why the image has so much ringing on it. I suspect it might be due to poorly terminated video signals but I have no idea on how to terminate them correctly, as my video card has already got a built in 75 ohm termination and my camera has matching termination (I hope.)

You can see how much ringing the video has in the scope trace below (bottom trace, 70mV/div):

enter image description here

I suspect the ringing comes down to the capacitance of the IO pin, the termination resistance, and reflections in my… uh… transmission line which is currently a small piece of wire.

The ringing matches the image – about 2-3 pixel clocks. (One pixel clock is 40µs / 208 = 192 ns.)

So, any ideas?

Best Answer

If you're just trying to overpower a video signal without gating it, your effective source impedance is going to vary every time your video is switched on and off. Not good. You need to ensure that both sides of your video connection see a uniform 75-ohm impedance whether you are passing through the signal or supplying your own. The easiest way to do that would be to use a pair of video amplifiers and put your circuit in the middle. The input amplifier should probably have 1:1 gain and a low-impedance output; use something like a 4066 to switch that and a white signal. The output amplifier should have a 2:1 gain and a 75 ohm resistor in series. BTW, are you doing anything for DC restoration? That could be an issue as well.