5

A continuation of this project, that I hoped would be done and working by now.

The problem this time appears to be that the circuit is too slow. The desaturation/grayscale and attenuation seem to work as expected, but the picture is blurred to the right of where it's supposed to be by a few pixels, and looks about as I would expect from an exponential decay. So something clearly isn't fast enough.

(I haven't tried to invert the colors yet, since that involves a lot of coding, testing, debugging, etc. to get the timing right, so that it only inverts during the visible part and not the porches. I'd rather not do that until I get a clear non-inverted picture. Otherwise, the microcontroller is just a glorified shift register that produces DC control signals.)

Here's the current schematic:

enter image description here

And the board:

Top:
enter image description here
without silkscreen:
enter image description here

HiMid:
enter image description here

LoMid:
enter image description here

Bottom:
enter image description here
with silkscreen:
enter image description here

And the datasheets:
OpAmp (U2,3)
Video Switch (U4)
Analog Switch (U1,5,6,7)
Microcontroller (U8)

I thought that everything had enough bandwidth for 1920 x 1080 x 60Hz (~62MHz), but I'm still getting the smearing.

Also, switching the LumMode signal (input to U1B towards the top left of the schematic) affects the output too, when the video switch (U4) is using that signal. Selecting pin 9 of U1B results in more smearing than pin 7 does. Am I dealing with some parasitic capacitance here?


Update:

In response to @JonathanS.'s comment on May 14, '21, here's a tentative solution. I would make it a comment, but I can't put the new schematic in it.

Changes:

  • Reduced the desaturation resistors (R10,11,12,27,28,29,44,45,46) to give the grayscale buffer (U2D) only a small but present margin of output current in the theoretical worst case.
  • Reduced the luminance mixing resistors (R1,2,3,5,6,7) to use most of the remaining margin of the input buffers (U2B,A,C), and balanced the two selections for roughly the same impedance looking upstream from the switch (U1B).
  • Reduced the inversion resistors (R8,9,18,25,26,35,42,43,52) and increased the ballast resistors (R20,37,54) considering both the desaturation buffer's (U4A,B,C) and the inversion switch's (U1D,A,C) maximum current.
    The desaturation buffer now sees 470R when not inverting, and ~41.5R when inverting, which is a bit lower than the 150R - 500R that it's meant for but still within the maximum output current of 50mA.
  • Reduced the sync pull-up resistors (R60,61), considering the NFETs' (Q1,2 - datasheet) saturation current at 3.3Vgs.
    Originally intended for 5V sync's, but my 'scope measured 3.3V from an HDMI->VGA converter??? Anyway, it still works.

enter image description here

The silkscreen is of course updated for the new values, but it's not worth spinning another prototype board if these are the only changes - just swap out a bunch of 0603's on this one. Any other omissions?

AaronD
  • 5,596
  • 10
  • 36
  • 7
    My first suspicion would be the incredibly large 1.6kOhm resistors (and the 4.7kOhm ones even more, of course). You just need 2pF of stray capacitance to get a -3dB rolloff frequency of 60MHz with a 1.6k resistor. If you want to go to such high frequencies, all resistors in the signal path should be on the order of at most 100 - 200 Ohms. – Jonathan S. May 14 '21 at 23:13
  • @JonathanS. Oh yeah! Good catch! I'm more of an audio guy, with much slower signals and higher voltage swings. (+/-15V and <20kHz) It's normal in that world to use higher-valued resistors to keep the currents reasonable, and a few extra pF doesn't really make much difference there. So I just copied that mindset over to this project without thinking much of it... – AaronD May 15 '21 at 00:20
  • 2
    _"I thought that everything had enough bandwidth for 1920 x 1080 x 60Hz (~62MHz)"_ - [Calculating Video Bandwidth for VGA Systems](https://www.electronicdesign.com/technologies/displays/article/21787359/calculating-video-bandwidth-for-vga-systems) "Thus, a reasonable rule of thumb for determining the video bandwidth of any amplifier or switch in the system is **2x to 3x** the fundamental frequency." – Bruce Abbott May 15 '21 at 00:23
  • @JonathanS. Fixed that on paper (see edit), haven't reworked the board yet. Anything else before I do? – AaronD May 17 '21 at 17:46
  • R60 and R61 seem a bit too small to me now (I'd have made them 220 Ohms or so) but the rest of the circuit looks fine now. If you run into issues with your buffers' output current, you can double or triple the resistor values - they'll still be much, much less than the kOhms you had originally. – Jonathan S. May 17 '21 at 17:59
  • @JonathanS. I finally got the parts in (cheap, slow shipping) and swapped. MUCH BETTER!!! If I look for it, I can still see a little bit of fuzziness around fine text with 1px lines, but even that is easily usable. If you'd like to make your original comment into an answer, I'll probably accept it. – AaronD May 27 '21 at 23:10
  • (Also increased R60,61 to 91 ohms. Still smaller than the 220 you recommended, but I had them handy, and I did want something smaller that the 470 that gave a significant curve on my 'scope.) – AaronD May 27 '21 at 23:19

1 Answers1

2

To not leave this question without an answer, here's the solution that I commented earlier:

My first suspicion would be the incredibly large 1.6kOhm resistors (and the 4.7kOhm ones even more, of course). You just need 2pF of stray capacitance to get a -3dB rolloff frequency of 60MHz with a 1.6k resistor. If you want to go to such high frequencies, all resistors in the signal path should be on the order of at most 100 - 200 Ohms.

Of course, you have to be careful to not go too low with the resistance, otherwise power dissipation will get out of hand and/or your buffers won't be able to drive the low resistances properly.

Really nice to see that this solved your problem!

Jonathan S.
  • 14,865
  • 28
  • 50