Tuesday, 29 March 2011

LED Dimmer Circuit

Find out how to put together a simple but efficient PWM dimmer circuit for LEDs

In this news story they you will see at how a simple circuit can be built to act as a dimmer for individual LED bulbs. In the event you arrived at this page desirous to know how to dim LED spotlights (sealed bulbs containing multiple LED bulbs), you will be better served visiting this news story 240V LED Bulbs & Dimmer Switches, Dimmable Energy Saving Lightbulbs, Lamina Sol MR16 LED Spotlight Review (dimmable), or this Review of Megaman Energy Saving Lightbulbs (CFL than LED, but currently the better type of low energy bulb for dimming).

LEDs (light emitting diodes) are sensitive parts - exceed their rated current or voltage and their lifespan can be slashed from 50,000+ hours to a microsecond. LEDs are current-driven * which means that the intensity of the light they generate depends on the amount of electrical current flowing them.
* The voltage drop across an LED depends entirely on the current flowing through it and ranges from 2-4 Volts for most LEDs.
 Typically current is controlled using a resistor in series with the LED, or a current regulator circuit. Supplying more current to an LED increases its intensity, and reducing the current decreases its intensity. One way of dimming an LED is to make use of a variable resistor (potentiometer) to dynamically adjust the current getting to the LED and therefore increasing or decreasing its intensity. This works very well when one LED bulb is involved.

Regrettably, all LEDs are not made equal - even those of nominally identical specifications from the same batch from the same manufacturer. Although this won't be apparent when strings of LEDs are being driven with the recommended forward current (e.g. 25mA for ultrabright LEDs), as the current is reduced some LEDs will turn off before others, and some will be dim when others are still bright etc.

Pulse Width Modulation
A far superior method of dimming LEDs is to use Pulse Width Modulation (PWM). With PWM strings of LED bulbs can all be driven with the recommended forward current, with the dimming achieved by turning the LEDs on and off at high frequency - so fast the human eye cannot see the strobing effect. The longer the on periods are relative to the off periods, the brighter the LEDs will appear to the observer.
On/off PWM duty cycle schematic

Duty Cycle is a percentage measure of the time that the LED is physically on. If, for example, the LED cycles ON for 9/1000 of a second, and then OFF for 1/1000 of a second, the duty cycle is 90%: 90% of the time it is ON, and 10% of the time it is OFF. Therefore, the intensity of the light will be approximately 90% of its undimmed level.

The simplest way to accomplish this high frequency switching is to make use of a 555 timer integrated circuit (IC) - one of the commonest & most versatile ICs ever created. The circuit shown below (from the following editorial: Pulse Width Modulator with NE555 Timer Oscillator) is designed to be used as a dimmer for 12V DC light bulbs or a speed controller for a 12V DC motor.
PWM dimmer circuit using 555 timer chip

This circuit can easily be modified for use as dimmer circuit for LED bulbs powered from a 12V DC supply as shown below:
NE555 controlled PWM LED dimmer circuit
The NPN transistor selected must have an Ic rating in excess of the sum of the peak currents flowing through the strings of LEDs.

In our check circuit, the resistors in the LED strings were selected to provide a forward current of 25mA to the LEDs. With four equal strings, the total current was 75mA & so they selected a transistor (BC547) with an Ic rating of 200mA - better safe than sorry.

This dimmer circuit cannot be used to turn the LEDs all the way off or to full brightness. In fact it operates within a duty cycle range of 5%-95% as the potentiometer (labelled P1) is turned from minimum to maximum. (By using germanium diodes in place of the two IN4148 signal diodes this dimming range can be extended to go from 1%-99%.)

PWM with a Microcontroller
There are now a few different microcontrollers on the market which are simple to programme, cheap to buy, and can be built in to circuits with only only a few outside parts necessary.
Picaxe-08M Microcontroller using for PWM of LEDs
The advantage of using a microcontroller than building a circuit like the one introduced above is that the complexity of the method is in the program (instructions) you put onto the microcontroller. This means that changes can be made without needing to alter the circuit design, & prototyping can be very speedy. They recommend the PICAXE range of microcontrollers which have excellent PWM capabilities - ideal for controlling LEDs & motors etc.

Using the Dimmer with MR16 LED Spotlights
The circuit described above cannot be used with 12V MR16 LED spotlights. While individual LED bulbs are unhurt by being turned on & off quickly, the internal circuitry of the spotlight unit does not appear to like it at all.

We connected one of our 12V LED spotlights to the dimmer circuit and found that a quantity of the 20 LEDs in the unit flashed on and off, others turned off altogether, and others alternated between being bright and dim.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...