VGA RGB to TTL-mono converter

I needed to convert VGA’s separate RGB lines into one signal. I wanted to feed it into a CPLD for my monitor project, so it also needed to be 3.3V instead of the 0.7V VGA uses. I bought a DB-15 female socket normally found on a monitor, and designed a PCB that does the trick.

I found a nice schematic on the web for a RGB to mono converter using some resistors. I fed it’s output into a high-speed comparator (AD8561) with the reference being a voltage drop on a silicone diode. The drop is scaled by a SMD potentiometer to obtain a selectable 0 – ~0.7V for the comparator. The VGA’s horizontal and vertical sync signals are wired straight through. I googled a bit for how the PC tells what kind of monitor is connected, and found out it asks it over DDC2 (an I²C-compliant interface). So I wired the the pins through just in case I would like to play with it (and I did sooner than I expected, for more info see Building a VGA monitor – DDC2 interface tests). The finished board looks like this:

VGA RGB to TTL-mono converter PCB

The output signal is not actually TTL – the hight state of the comparator’s output is actually 3.5V max, but that’s more than enough for the next stage, a 3.3V CPLD with 5V-tolerant inputs. Next stage can be seen here: Simple CPLD test board.

I also write about this board in: Interfacing I2c the easy way and VGA RGB to TTL-mono converter.


update: as requested in the comments, here is the schematic:

Compapator schematic