Arduino-based High Powered Switching LED Drivers
by hanlin_y in Circuits > LEDs
24167 Views, 68 Favorites, 0 Comments
Arduino-based High Powered Switching LED Drivers
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.
Features
- Topology options: Boost, buck
- Operating frequency: 62.5 kHz (adjustable)
- Feedback voltage range: 0 to 1095 mV
- Input voltage range: 5 to 40V
- Maximum string voltage: 50V
- Efficiency: 80 to 90%
Materials
Buck LED driver (per channel)
- Rsense resistor (see table)
- 1 - 10 ohm resistor
- 1 - 150 ohm resistor
- 3 - 1k resistor
- 2 - 10M resistors
- 1 - 220 uF capacitor
- 1 - 470 uF capacitor
- 1 - tactile switch
- 1 - 100 uH 2A inductor
- NPN transistor
- PNP transistor
- 2N7000 MOSFET
- IRFZ44N power MOSFET
*For Vin larger than 20V, refer to the circuit diagram
Boost LED driver (per channel)
- Rsense resistor (see table)
- 1 - 4.7k resistor
- 1 - 10 ohm resistor
- 1 - 150 ohm resistor
- 3 - 1k resistor
- 2 - 10M resistors
- 1 - 1 nF capacitor
- 1 - 220 uF capacitor
- 1 - 470 uF capacitor
- 1 - tactile switch
- 1 - 1N4001 diode
- 1 - schottky diode
- 1 - 100 uH 2A inductor
- NPN transistor
- PNP transistor
- 2N7000 MOSFET
- IRFZ44N power MOSFET
LED driver (other components)
- 1 - Arduino
- 5 to 40V Power supply
- 1 - 48 V zener diode
- 1 - NPN transistor
When designing the circuits, please wear goggles! Capacitors can explode when overcharged or installed incorrectly.
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:
- R3<20*R4/(Vcc-20)
Boost LED Driver
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.
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:
- Six output sketch - use when more than four channels are required
- Four output sketch - use when you need more than two channels with smaller inductors
Applications
I can think of many applications for this LED driver. For example:
- Arduino projects
- Bike lights
- Automotive lighting
- High powered flashlights
- Grow lights
- Aquariums
- LED lamps