Over the weekend, I tracked down the problem with poor saturation. This was due to an incorrect connection to ground in my clamp circuit. After doing this I had the opposite problem: the strong overlay signal was causing the monitor’s AGC to dim the rest of the picture. I compensated for this by increasing the series resistance after the AD724 from 75 ohms to 150 ohms. This didn’t alter the brightness of the overlay but the source video is now less dim.
I also used an RC circuit to shift the phase of the subcarrier clock, in an attempt to correct the colours. I experimented with different capacitor values and discovered that 1nF and above caused the clock to disappear completely. 20pF caused a barely perceptible shift in colour, but a 10K resistor with a 470pF capacitor gave correct red, green and blue colour bars. Subjectively they appear exactly as they should, however I will experiment further to see if there is any more scope for improvement. The colours now appear solid where before there was banding, I’m not sure why this has disappeared unless it was clock jitter that the RC network somehow mitigated.
Here is the result.
I have to say it’s looking a lot better than last week. The only issue still remaining is a switch artefact. Notice that there is a black vertical line before the red bar appears. This shows on the scope as a small bright spot just above sync level. Since there is no artefact when switching from overlay back to source video, I suspect it is the switch responding more quickly than the AD724, switching in a blank image before the colour signal has been generated. If so, I should be able to mitigate it by introducing a delay to the switch.
4 thoughts on “Overlay, Take 2”
Good work, not sure what is causing the delay on the ad724 output in relation to the switch, but surely complicates the use of DMA. I read about your idea to select between a pal and a ntsc crystal, you could use two pins of the microcontroller that work as an output low, sinking current (crystal running) or as an input, with high impedance(stopping the crystal), the problem with pal is the 180 phase shift each line, read somewhere that timing from sync tip to the first positive cycle of the colorburst gives you the phase, i will try to find the article.
Just noticed this comment sitting in the spam folder. Both are good ideas.
Really awesome work!!
Would be a true breakthrough to have a color graphics OSD for MAVlink.
Thanks Andreas! I’ve always thought it’s a pity we’re limited to black and white (unless you buy one of the commercial flight controllers).