Tuesday, November 4, 2014

VGA Background Lighting

More and more people are using a PC (conventional or notebook) to view films. The VGA output can be used to provide a matching ‘Ambilight’ effect for this. If you restrict your-self to a single RGB LED, you can also draw the power for this circuit from the VGA connector, along with the RGB signals.

The following pins of the 15-way VGA connector (three rows of five pins) are used for  this circuit:

  • Pin 1:  Red video signal 
  • Pin 2:  Green video signal 
  • Pin 3:  Blue video signal 
  • Pin 5:  GND 
  • Pin 9:  +5 V

The video signals for the red, green and  blue channels are available at the RGB out-puts. These signals have an amplitude of 1 to 1.35 V, and they output the screen imagery at the rate of dozens of frames per second. This produces the visible image on the screen. The circuit described here drives an RGB LED according to the average values of each of these three signals. Of course, this is not a full-fledged ‘Ambilight’ system, but the RGB LED will produce a nice green light during a  football match or an orange hue if a sunset is shown on the screen.

VGA Background Lighting Circuit Diagram

VGA

A sawtooth generator is built around IC1 and T1. It supplies a nice sawtooth signal to opamp IC2a via R6. The frequency of the sawtooth signal is approximately 850 Hz, and its amplitude ranges from 1.6 to 3.4 V. IC2A subtracts approximately 1.6 V from this due to voltage divider R4/R5. After this, voltage  divider R10/R11 reduces the peak value of the sawtooth to around 1.35 V. The resulting sawtooth signal is buffered by IC2b and  used to drive the three comparators in IC3. The level of the red video signal is averaged  by the R12/C2 network. IC3a constantly com-pares the previously generated sawtooth signal with the average value of the red video  signal. If the image has a high red content, the output of IC3a will be logic Low a good deal of the time, while with a low red content  it will be Low less often. This comparator circuit thus implements a PWM driver for the red LED. The same arrangement is used for the green and blue channels.
Note that with a notebook computer you always have to enable the VGA first, usually by pressing Fn-F5. If you use a desktop or tower PC, you can tap off the video signals from an adapter connected between the video cable and the monitor.

You can also use several LEDs or a LED strip (available from Ikea and other sources) in place of a single RGB LED. In this case you will need an external power supply for the LEDs, but the control circuit can still be powered from the PC. If you use multiple LEDs or a LED strip, connect the cathodes (negative leads) of the LEDs to the comparator outputs of IC3 as shown on the schematic diagram, and connect all the anodes (positive leads) to the external power supply. Resistors R15–R17 are often already integrated in the LED strip. There’s no harm in using an external supply with a higher working voltage, such as 12 V. Remember to connect the ground terminal of the external supply to the ground of the control circuit.

IC3 can handle a current of 15 mA on each  output. If this is not enough, swap the connections to the inverting and non-inverting inputs of the three comparators in IC3 and  connect their outputs to the bases of three  BC547 transistors. Connect a 10-kΩ resistor between each base and the positive supply  line (+5 V). Connect the emitter of each transistor to ground, and connect the collector  to the LED strip. A BC547 can switch up to  100 mA with this arrangement, and a BC517  can handle up to 500 mA.


No comments:

Post a Comment