Saturday, July 13, 2019

High Power LED Driver

I've been wanting to create a some drivers for high power, high CRI LEDs to use as lamps, and last month I designed and made a few that work fairly well. Made a few blunders and the original design had to undergo a few bodges but the base idea works.

I originally wanted to create a boost converter from scratch to drive the LEDs, as the LEDs require about 34V to run a full brightness. It would have been a good learning experience to setup basic control for the switching and the circuit topology isn't that complex. However, since I really wanted to use these day to day and the power being delivered was around 50W, I decided to just go ahead with a boost converter chip.

I considered a few: the AL3353 looked nearly perfect for the job, as it offered current sensing and was designed specifically for LED boost applications. However, the switching frequency was rather low and a large inductor would have been needed. I looked a few others, and eventually settled on the LM3478. This chip was designed to be a general purpose constant voltage boost converter. I wanted to modify the feedback path to be constant current: a small current sense resistor with a current sense amplifier to reach the high feedback reference voltage of 1.26V:

Seems like a good idea at the time. Schematic could also be better formatted.
The microcontroller would create an offset voltage that was added to the amplified current sense voltage so that the current could be regulated. I would quickly realize my implementation was flawed.

For the microcontroller (to control the brightness levels and regulate temperatures) I used the ATtiny1616. This was really nice to use as it was relatively cheap compared to older ATtinys, had a DAC (which I needed for the offset voltage), and had a one-wire programming/debug interface (woo!).
Programming with
ATtiny dev board
The LEDs I used were high CRI Cree LEDs: the CMA1825 series in 2700K and 5700K. I also ordered a few cheap 50W and 100W LEDs for testing.

Cheap LEDs
Cree LEDs
I did the board layout following the TI WebBench design, soldered up the boards, wrote a little code and voila:
Light!
I was a little surprised this worked this well. Almost immediately after sending out the board I was a little concerned the boost converter driver would not like the new feedback setup, especially at the high frequencies it was running at. I looked at the datasheet for the INA199 current sense amplifier I was using and uh-oh:
Not high enough.
Should have looked a little more closely before I chose this part. The LED did light up and I could control the brightness. But, there was some coil whine at low brightness, and at high brightness the switching MOSFET and inductor quickly became very hot. Over 80C hot. 

I had some time today to take out my feedback path and just setup a voltage divider from the output to the feedback pin as intended, and the whine disappeared and the temperatures didn't rise much over room temperature.
Potentiometer from output to feedback pin.
Light! Again!
Guess I'll have to setup a couple of potentiometers for dimming (the functionality of the board doesn't change, just the brightness can no longer be programmatically controlled) to prevent over and undervoltage for the LED.

I bought a new heatsink and lens combo and tested it with the cheaper LEDs:

The yellow edge on the beam is a little gross and may just not use the lens reflector combo and use a larger diffuser.

7.21.2019 Update:

I bought a bowl from IKEA to act as a reflector and got rid of the lens to get a wider beam that was more even:

For some reason the board I was using developed a short across the input power terminals but I can't find where it is for now. I tested the input capacitor and that was okay. Will have to investigate more later. For now I just swapped over to one of the spare boards I had put together and flashed over the firmware:

Works very well!
Let there be light!
Since I don't want to get a new board made, I'll probably find some sort of digital potentiometer to use for brightness control and hack it in for the feedback.

No comments:

Post a Comment