ATTiny84 Based 3A Step-Down LED Driver
by hanlin_y in Circuits > LEDs
3391 Views, 36 Favorites, 0 Comments
ATTiny84 Based 3A Step-Down LED Driver
If you want to power 10W LEDs, you can use this 3A LED driver. With 3 Cree XPL LEDs, you can achieve 3000 lumens!
PCB
I upgraded the circuit with:
- An IRF9540N transistor
- Two SS36 diodes in parallel for a higher current rating
Please feel free to make changes to the circuit!
Completed Circuit Board
Microcontroller Code
In the program, I've set the maximum drive current to 2.5A. You can experiment with higher values, such as 2.9A. It seemed to trigger the battery monitor at 3A. Using an inductor with a higher current rating should solve the problem.
If you're adjusting the feedback voltage, make sure that your calculations are correct for the current sense resistor value.
I set the battery monitor's trip voltage for 12V SLA batteries.
For a higher switching frequency, I used a 20 MHz crystal oscillator.
Downloads
Possible Use for the Replaced LED Driver
I used the previous LED driver for driving 4 - 700mA red LEDs powered by a 12V 1.3Ah SLA battery. I reduced its drive current to 650mA.
Here are the pictures of the new unit with the lower current driver.
Downloads
Other Possible Uses for the New Driver
- LED lamps
- Flashlights
- Bike Lights
- Headlamps
- Grow lights
- Constant current source
- Driving 10W, 20W, 50W, 100W LED chips from eBay
Code Updated on (April 17, 2017)
This code was updated to have a soft start when turning on or adjusting its drive current. This can reduce its inrush current and reduce the risk of brown-outs although you can turn on brown-out detection..
Downloads
Code Updated on (April 18, 2017)
This code was updated with:
- Gradual decrease in drive current when shutting down or when the brightness counter overflows to avoid inrush current.
- 5% increase in the battery cut-off voltage to account for the components' tolerance. It's better for the battery when you avoid overdischarging
- Low battery warning removed to prevent crashing.
It was updated because the microcontroller crashed when the low battery warning was triggered.