2
\$\begingroup\$

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?

\$\endgroup\$

4 Answers 4

3
\$\begingroup\$

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.

\$\endgroup\$
0
\$\begingroup\$

Perhaps you can try buffering the IO pin and move the buffer as close to the video input as possible. You would still get the ringing on the input of the buffer, but hopefully the buffer will restore the signal and isolate the ringing.

You would need a tristate buffer for the high-impedance state.

\$\endgroup\$
0
\$\begingroup\$

From the look of it, you have an analog buffer for the composite video, and are overriding the composite video signal in some way, probably a summing network and an IO pin, or a pull-up transistor, etc... to produce the white text sections, correct?

Afterwards, I presume there is another buffer before the video output to the capture card you are using.

It looks like the recovery from the white-signal override is messy. You either need a faster output buffer, or need to stop driving the output buffer as far into clipping. If you clip the output buffer hard, many op-amps have nasty recovery.

Another thing you could try is putting a 75 ohm resistor as close to the output pin as possible on the OSD pcb. This will serve to properly impedance-match the driven end of the video transmission line.

\$\endgroup\$
10
  • \$\begingroup\$ Actually, I have no buffer. The signal from the camera is being manipulated directly. Although I can presume the camera and TV card both have built in 75 ohm amplifiers. \$\endgroup\$
    – Thomas O
    Commented Apr 19, 2011 at 11:32
  • \$\begingroup\$ @Thomas O: I tried making an OSD circuit with no buffer once, using a Cypress PSOC. It kinda-sorta worked, but the output was pretty mungy--much like yours. Adding a couple of video buffers improved things immensely. \$\endgroup\$
    – supercat
    Commented Apr 19, 2011 at 20:54
  • 1
    \$\begingroup\$ Well, No-Buffer = your problem. If you're generating white lettering by simply forcing the video signal high, you are going to get all sorts of refections from both ends of the video cable. \$\endgroup\$ Commented Apr 20, 2011 at 4:26
  • \$\begingroup\$ Ok, looking at your schematic, you're switching a 2:1 multiplexer between a 3.3v signal (It's an IO line, don't think PICs have internal DACs, do they?) and the input video signal to generate white text, correct? I am pretty sure you are massively overdriving the input to the video display. Composite signals "reference-white" according to wikipedia is 1.000 Volt. You need to divide the "level bit" signal down by at least three, and then it needs to be buffered to allow it to drive the video line with a high speed buffer before it's fed into the multiplexer. \$\endgroup\$ Commented Apr 20, 2011 at 4:33
  • \$\begingroup\$ Frankly, if I am understand the circuit correctly, you may actually damage some video displays by overdriving the input with the setup you have. Be careful. \$\endgroup\$ Commented Apr 20, 2011 at 4:34
0
\$\begingroup\$

A schematic would be helpful. I suspect that when you are driving the video line, you're causing your camera's output stage to be quite unhappy. Supercat has already pointed that out...

EDIT after seeing schematic:

Whooo, yeah - if I read that correctly, you're just pulling the video signal straight down via an 18 ohm resistor. That would make the output buffer on your camera unhappy, and puts an 18 ohm stub in the video signal line that would cause ringing.

\$\endgroup\$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.