LEDs are taking over conventional lighting every day. High-power LEDs over 1W are becoming more and more affordable, and I wanted to start using them to replace the lighting fixtures around me. However I realize that finding and configuring the power supply was a bit of a pain, since I wanted to use different LEDs in different configurations depending on what the lighting was for. Power supply needs to regulate the current that goes though the LEDs. With higher current that high-power LEDs require, active constant current circuit is the only practical option. Commercially available buck regulators are easy to use, however, they are usually made for a specific current and voltage range. For me that means having to purchase variety of buck drivers.
Also, most of LED drivers lack dimming function, or have poorly functioning dimmers. I think dimming is essential for modern lighting, and I want smooth control of brightness.
So I decided to develop a universal, dimmerable high-power LED controller. It has taken me four months to develop this controller. Although it's still in development, I think it's quite useful to all DYI'ers with LED lighting projects.
I made this an Open Source project. Both hardware and software are open - please use, and extend this project and share the knowledge. A 3D printable enclosure as well as couple of LED mounting hardware is also available as Open Source, download-able at Thingverse. Together you can really kick start LED conversion of your household lighting!
Remove these ads by
Signing UpStep 1: Features
- Inductor "switch mode" controller for high energy efficiency.
- Wide supply voltage range of 5 to 18V (can go higher, but not tested). Great with batteries as well as AC adapters.
- Up to 20W maximum output power (can go higher with active cooling). (at supply voltage 12V or above)
- Constant current (pulsed) - configurable up to 3A peak current.
- Selectable between buck-boost and boost mode.
- Analog style dimmer control (smooth, flicker-free continuous adjustment)
- IR remote receiver - controllable via Sony IR remote control
- Digitally controlled dimming - via external microcontroller including Arduino.
- Master/slave gang dimming - connect multiple units together and control the dimming from any one of the units.
- High frequency pulse drive - 32kHz to 175kHz - no flicker even in video!













































Visit Our Store »
Go Pro Today »




Can You help me:
If i use your original firmware the light not absolutely dimming off (the LED does not go to the end(OFF)). Wich parametrs i can change to set dimming to lowest(off-min) and increase brightnes level(set max)?
Thank You for answer.Error is the same. I want sent to You log file. How i can do it?
Thanks!
I make some changes in driver firmware. But if i build your own original or the modified project i get the error message : Build Filed!
I use: MP LAB IDE 8.90
Thank You for answer!
Please try that version. (Microchip changed the header file a bit around ver 8.70 that created the error, but I fixed that one.)
Aki
i wanna order some PCB´s, but first i want to know if i can strobe the PWM Signal without causing any problems.
Means i wanna build a dimmable LED Strobo.
I want a Frequency up to 1kHz with 0-100% brightness.
Thats why i can´t use normal PWM drivers...
Is it possible with your PCB?
I guess with some editing of your code and connecting another potentiometer it should be even possible without an external uC - right?
http://www.ebay.com/itm/5M-5630-NON-Waterproof-Cool-White-SMD-Flexible-LED-Strip-Light-300-Leds-12V-/111000486427?pt=US_Car_Lighting&hash=item19d825021b
Thank you for great led driver!
Can you provide any information about PCB size. If i use provided ("Universal-driver-rev2-gb.zip") PCB in result i I get such a size 102 mm x x25 mm by default. 102 mm x 25 mm is correct? Seems too small......
Thank You!
Aki
You have helped me learn, and I appreciate your generosity.
Cheers Aki
Awesome work ...I love this design.
Just one question (for a die-hard DIY'er), does the 10k ohm Potentiometer (VR1) need to be linear or logarithmic?
Many thanks friend.
Thanks!
I see on the schematic that there's an ICSP header, and the pins match my Pickit3 so I'm good with that....but in the images of the PCB it looks like the ICSP header is used for connecting GND/+12V/BOOST-/LED+/BUCK-. Is this header also used to program the chip in circuit or is it programmed out of the circuit and put in?
I'm sure that the information is in the instructable somewhere, and I've read it through and through, but my novice eyes just aren't finding it. I just don't understand how the same header could be used for both functions.
Also if the header does indeed serve both functions, then does MCLR match up to GND or BUCK- when connecting the power supply & LED strings?
Thanks!
Charlie
ICSP port on the PCB are just 5 holes. No headers are soldered. I just stick a 5 pin header into those holes and hold it to program the PIC, because it only takes less than 30 seconds to program. Hope this makes sense.
I understand it now. Like I said before, the info was there...I just wasn't seeing it.
Thanks again!
Charlie
Thanks!
Charlie
By controlling the output so that current sense voltage matches the reference voltage, this driver keeps the output current constant.
Using diode (more often zener diode) to create reference voltage is very common practice.
Aki
I intend to start experimenting recreating part of this with an AVR and this is why I am trying to understand some of the logic before starting to prototype.
I just noticed that you use 7805 to provide stable 5v to the microcontroller. This way you already have somewhat stable voltage in your system. Unless the leds draw so much power that the power supply dips drastically and the voltage from the regulator falls, but in that case the current over the leds cannot be increased anyways.
I wanted to allow 5V operation, and 7805 drops 1V or so - which is ok, but the reference needs to be steady.
My "Poorman's Buck" PCB is single layer design. You might want to try that one.
Aki
i have seen your Poorman's Buck that one is also great. Thank for you great work. Keep it up.
I do not think the first component NTD5867NL N-ch MOSFET on my parents would be possible to replace it would have some similar example of this component.
segunto and did not quite understand how it would link several modules together to control pwm from just one.
thank you in advance for the immense contribution in providing the project.
Drain-Source voltage: 60V or higher
Maximum Drain current: 5A or higher
Other specs are not that important. Form factor should be TO-251AA(I-Pak) or TO-220.
I know those should work;
- IRLI520NPbF
- IRLU120NPbF
- HUF75637P3
Good luck!Thank your very to share your projects. It really brings a lot of fun to my life. I made your universal High-Power LED Driver and it is working great. I bought a PICKIT3 from Microchip and tried to add some code for the IR remote control function. Now I could use '0-9' button to adjust the brightness to the pre-set value and turning on the light by cliking the 'Power' button.
I am a novice for the PIC micro-controller, I am not quite clear about how the A/D and comparator usage. I want to use 2 or 3 18650 lithium battery to provide the power. I want to add the low voltage shutdown function to prevent battery overdischage. Could help to give some code example about this function? Say I want to shutdown the light when the supply voltage is under 6V(2 18650) or 9V(3 18650).
I saw the 'shutdown_vol2 equ 24' in your code, but I did not figure out how to check the supply voltage and make action to turndown the light when the supply voltage is too high.
Just check this variable at the end of the main loop (note that it takes some time for the first conversion to be done), and shut down accordingly.
Now the tricky part. A/D conversion uses PIC's supply voltage as a reference. So if it goes under 5V (happens when you give lower than about 6.5V to the circuit, because the 5V regulator needs some voltage) the A/D value changes. For us to know the exact voltage on S-SENSE, we need to have a known voltage supplied to the PIC.
PIC has an internal reference voltage you can use to determine the supply voltage (by calculation). You might want to check into that.
I am a novice for the PIC micro-controller, I am not quite clear about how the A/D and comparator usage. I want to use 2 or 3 18650 lithium battery to provide the power. I want to add the low voltage shutdown function to prevent battery overdischage. Could help to give some code example about this function? Say I want to shutdown the light when the supply voltage is under 6V(2 18650) or 9V(3 18650).
I saw the 'shutdown_vol2 equ 24' in your code, but I did not figure out how to check the supply voltage and make action to turndown the light when the supply voltage is too high.
The only additional thing that would be nice to see is you do a follow up project for converting mains to either 12V (for this) or do a mains powered version of this. Obviously, it would b significantly bigger but it would have a bit more application for this. Either that or since this is OpenSource I may build off your design. I guess its based on what time/funds will allow.
I'd imagine that voltage that high would be hard to do as a boost converter, since finding MOSFETs with breakdown voltage higher than 100V seems to be hard. Are you using a transformer?
Anyway, 12 - 24V DC power supply is easy to find. Most people have a few wall warts laying around I think. Battery operation is nice too. Add to that as long as I've been playing with electronics, and I even have a electrician license, developing high voltage circuits still makes me nervous...
Please do use my design partially or as whole, to build your projects. Do not forget to share that here on instructables!
Yeah, if I do modify your design to work on household voltages I def will post it on here.
No this circuit doesn't support such a system, but very easy mod to connect 0-10V dimming voltage to where the pot is. All you need is a resistor voltage divider to reduce the voltage within 5V.
What software did you use for that schematic?
I'm searching for a publication quality schematic editor and that seems to suit my needs!
Thankyou
Eagle is cross platform, TinyCad is only for winblows but it runs fine under wine.