DIY Home Automation

   

TCTEC HOME

 06-July-2008

PC Controlled RGB LED light

Using 1 Watt power LEDs, the following example shows a PC controlled RGB light. It can light up a room, strobe, dim, change colour, anything you can think of programming it to do.

The 1 Watt LEDs are expensive (only use quality), (around $8 dollars each), so a full array of 14 LEDs isn't cheap, a smaller version could be constructed using 6 leds. (2 red, 2 green, 2 blue).


About this circuit:

PWM is used to control the brightness of each LED pair, all 8 outputs of the Top16 module are individually controllable.
Rather than use an inductor and current control, resistors have been used to limit the current, this is less efficient. however...efficiency has been greatly improved by placing the LEDs in pairs (2 in series).Because each LED drops around 3.4 volts across it (varies with LED type), 2 in series will drop around 6.8 volts, this means the resistor has less voltage drop across it, and wastes less of the power as heat. i.e, A 12 volt power supply is used; 6.8 volts across the two LEDs and 5.2 volts across the resistor,..the less voltage across the resistors, the less power (volts X current) they are dissipating.
So why not use 3 or 4 LEDs in series ?, Because the voltage drop across each LED is not exactly known, it varies between LEDs and also during operating life, more LEDs in series will give less control of the voltage (across each LED and Resistor), giving less control of the current, brightness and power dissipation.
2 LEDs maintains reasonable control of current, whilst doubling the power efficiency of the circuit.

The resistors should be 1 Watt each and chosen using the following formula:

(Supply voltage) - (voltage dropped across the LEDs) = (voltage across the resistors)

(Total resistance value to choose) = (voltage across the resistors) / (max desired current through LEDs)

(Individual resistor value in each pair) = (Total resistance value to choose) X 2


* Larger 2 or 5 watt resistors could be used to provide (Total resistance value to choose), and use just one resistor instead of two in parallel.


Expect the power LEDs to have a voltage drop of 2.5 to 4.5 volts, with a max current of around 300mA, 
*Aim for a  maximum current of less than the maximum rated for the LEDs, this way they are operating well within thief capabilities and will reward you with long trouble-free service. 

 

Programming.

This is a matter of controlling the PWM periods of the Top16 outputs, by using the Top16 API (dlls available for linux or PC), and is up to you.
PWM frequency = 7.8 kHz.
Resolution 0 to 255 (8 bit)

 

 

 

 

 

 

 

Enquiries ?, please contact: sales @ emx.net.au

 

 

 

 

 

 

 

All rights reserved 2008 tctec Pty Ltd