Full colour LED lamp back to projects
|A LED lamp is made with three 3 Watt LEDs; red, green and blue. The system is based on a AT90PWM3 microcontroller, which has a built in PSC (power stage controller). A radio receiver in the lamp is used to receive the signals from a remote control unit.|
||Two types of mounting the LEDs and PCB.|
A short descriptive schematic of the driving circuit. Of importance is that the LED's are driven by a PWM signal and that energy is stored in a coil. This design enables a high efficiency and non-flickering lighting.
I have wondered why not all types of LED lighting do use such a design, probably because of two reasons: the price (the design is slightly more expensive) and the possible non linearity of the LED efficiency. The latter will result in a not perfectly linear current-intensity relation and possibly color change when changing the intensity only (which is unwanted). I take this error rather than a flickering light.
(I do still wonder why in cars though such a design is not used for the rear lighting. I do find the flickering of the red rear lights quite annoying.)
The inside of the remote controller unit. All is based on a ATMEGA 16 controller unit. On top a NOKIA LiIon battery is shown, taking care for the powering of the unit. This battery is tremendously over dimensioned but that makes sure that the unit barely has to be recharged.
In time a lot of extra options were added, that is why the pcb became such a mess.
The controller takes care of controlling the touchpad(other side), displaying data on the LCD screen (other side also) adjusting the contrast of the LCD, powering the touchpad (requires 5 Volt instead of the available 3..4.2 Volts from the battery and taking care of transmitting the command data. Furthermore the controller goes to a sleep state after being unattended for a while in which almost all pheriperals are shut down and only 0.1 uA is drawn. When lifting the controller a movement detector is used to wake up the device, (the long rod on the right).
|Front side of the control unit. Controlling the lamps is done by moving a finger in three lanes over the toucpad, each of the representing the lichtness, saturation and hue. On display the battery status and the command performed is shown.|
|The remote control unit can be charged in a docking station. Shame that this is necessary only twice a year ;)|
|Here two versions of the lamp are shown together with the remote control unit.|
|Lamp on the wall.|
Source code LAMP and REMOTE (no schematics at the moment)
A very nice and extremely simple Li-ion charger was used, the MCP73812. It requires two capacitors and a resistor and costs about 60 cents.
To be able to use a wide range of input voltages an SI-8050SD reulator was used, this can handle input voltages between 7 and 40 volts and makes a nice 5 V (max 3A) of it with an efficiency of about 90%.
Some measurements on the output stage
|Measurement of the output circuit. Measurement of the voltage over the resistor at the source of the FET. The resistor is 0.2 Ohm.|
For low PWM levels the current increases for every cycle due to the coil. During the off time the coil feeds its energy to the LED. This current will be something similar to the graph, shown but mirrored horizontal.
|For higher levels the current increases some more.|
|Incerasing the on time further results finally in too less time for the coil to completely discharge and thereby raising the average current even more.|
|at a certain point (defined as the current limit) the output blocks. This is function of the AT90PWM3 chip and the analog compare limit is set to 140 mv in this case.|
|Increasing the on time more will result in an repetitive output off and on state due to the current limit function. The current limit function is not terribly fast and therefore very well suited.|
|Finally the current is limited only by the current limit circuit since the PWM can be considered constantly on. This results in an average DC current trough the LED of about 0.7 Ampere (remember that during the 'zero' times still the coil discharges in the LED). Maximum of 1 Amp is admissible, but better be a bit on the safe side.|