I wrote this Instructable because I really wanted an LED driver that is efficient and simple to construct. This LED driver can be used for high powered LEDs such as 0.5W, 1W, 3W, 5W, and 10W LEDs. It can drive up to six LED strings and includes open and short circuit protections and brightness adjust buttons. For extra power, you can use ATX power supplies or car batteries. Each channel allows 24 W boost mode when using 12 V.
Step 1: Materials
Buck LED driver (per channel)
*For Vin larger than 20V, refer to the circuit diagram
Boost LED driver (per channel)
LED driver (other components)
When designing the circuits, please wear goggles! Capacitors can explode when overcharged or installed incorrectly.
Step 2: Buck LED Driver
The buck LED driver is used if the supply voltage is higher than the LEDs' combined forward voltages. For example, you may want to use a 12V source to power a single LED which requires 3.5V. This circuit is similar to that of the constant voltage source's except that this is constant current.
On the right side of the diagram, the voltage divider formed by R3 and R4 is used to prevent the power MOSFETs' Vgs from exceeding -20V which is usually the absolute maximum rating. If the supply voltage is 20 or less, omit R4 and use 4.7k for R3.
For supply voltages greater than 20V, use the following formula to calculate R3:
The boost LED driver is used when the power supply's voltage is lower than that of the LEDs' combined forward voltages. For example, you want to use a 12V power supply to power a string of 6 LEDs which require around 20V. I have improved the efficiency by including an amplifier before the power MOSFET instead of using the Arduino's 5V. When the MOSFET's gate voltage is higher, less power is wasted when it is on and it runs. The drawback is that the PWM signal needs to be inverted but that's easily solved by modifying the code.
This circuit has an over-voltage detection. Disconnected LEDs or too many LEDs in a string causes overvoltage which can destroy the LED driver channel. When the voltage on any of the outputs exceed the zener voltage, Q5 turns on and pulls pin 0 low. This dims all of the LEDs until the condition is resolved.
Step 4: Sketches
The Arduino is used to monitor the LED current, maintain the LED current for each channel, read the momentary switches for brightness control, and detect overvoltage. When the LED current flows through Rsense, there is a voltage drop. The Arduino maintains it between 0 and 1095 mV depending on the feedback voltage setting. The LED current is equal to Vfeedback/Rsense. There is one brightness control switch for each channel. The channels have 10 levels of brightness and each press increments the brightness by 10% of the maximum current you have set it to. When one of the boost channels have overvoltage, Q5 turns on and the D0 input is pulled low. This sets the channels' duty cycles to the lowest.
In the sketches, you can modify the maximum duty cycle, operating frequencies, and feedback voltages, and select boost or buck mode. The higher the duty cycle, the higher the current. The operating frequency is the frequency of the Arduino's PWM output. It has nothing do with PWM dimming. If it's higher, you can use smaller inductors. If it's lower, you have have a smaller duty cycle because resolution increases. The LED current is equal to the feedback voltage divided by the Rsense value. Refer to the table for the feedback voltages and the sketch for more instructions. If boost mode is selected for a given output, the waveform will be inverted.
There are two sketches for the LED driver:
Step 5: Applications
I can think of many applications for this LED driver. For example: