Constant Current drivers

tay

Enlightened
Joined
Oct 28, 2008
Messages
295
Location
Hoboken, NJ
Hi guys,

I'm trying to design a constant current driver for a project I'm working on.

I have a single SSC P7 and a couple 700mA rebel tri-stars.

I'd like to be able to PWM it from an Arduino microcontroller.

A few schematics I looked at had a LM317 running with a resistor between two of the pins. I guess the idea is that the voltage between those two pins is constant, so a resistor is specced out to give the desired current, and it's just grounded to the LED.

Then, a transistor is used to PWM it.

Is this method feasible? Are there any inexpensive DIY CC drivers that are better?
 
What voltage 'headroom' are you looking at having, given your power supply and LED Vfs?

It's not hard to have a homebuild CC driver with an op-amp driving a FET, with the op-amp comparing voltages from a reference and a current-sense resistor.
That'd be easy to control from a microcontroller, using a FET to pull the appropriate op-amp input low/high, and would also give options for non-PWM power control if you wanted that (switching FETS across various resistors in a resistor network generating the reference voltage).
 
voltage regulation on lm317 is done a bit differently than just a resistor between two of the pins. it s actually 2 resistors, and 2 capacitors.
lm 317 is only good for 1-1.5 amps max. p7 will blow it, stars will work. for 3 amps you need lm350
lm is voltage regulator, not current regulator.

now don't get offended :
why reinvent the wheel?? to turn lmxxx into voltage\current regulator and also include pwm, you'll spend more money\time that if you would just buying already made driver.
i too tried that but it ain't worth it, dx sells it for $7. there others of better quality but at $20 or so. don't waste your time and money, if you only need 3 drivers, buy them. i'm talking from experience. sometimes it worth making your own stuff, sometimes it is not.
 
Yeah, I think I will just buy a pre-made one.

I should still be able to PWM them by just putting a transistor across the ground and use it to switch it on and off quickly, correct?

I have a lot of headroom on the power supply... I am using a big benchtop one that is adjustable from 0 to about 25 volts.

The Vfs seem to be in the 2-3v range for the stars. I'm using tri-stars wired in series, so it should only take 6-9v to drive them.
 
Some of the budget drivers I see have ATMEL TINY13 chips on board. I haven't heard of anyone doing it, but it seems like those could be re-programmed. You might have to get the chip off the board to do that and the light levels may be set by other components on the board, but it seems like there are possibilities there.
 
cheapest constant current driver I know of.. I use this circuit a lot in my projects...
fhyyutrrcqewp86jfymediu.jpg


link to website that explains it....
http://www.instructables.com/id/Circuits-for-using-High-Power-LED_s/
 
now don't get offended :
why reinvent the wheel?? to turn lmxxx into voltage\current regulator and also include pwm, you'll spend more money\time that if you would just buying already made driver.
i too tried that but it ain't worth it, dx sells it for $7. there others of better quality but at $20 or so. don't waste your time and money, if you only need 3 drivers, buy them. i'm talking from experience. sometimes it worth making your own stuff, sometimes it is not.
I gave up making my own drivers when the very inexpensive AMC7135 drivers appeared, and since then the off-the-shelf driver situation has greatly improved, so there's even less reason for me to make my own.
 
An Update -

I am driving the Rebel Tri-Stars fine with 700mA off the shelf drivers from deal extreme.

My bootleg MOSFET PWM controllers are actually working, which kinda shocked me, because I'm so used to having to troubleshoot goofy problems.

I have the ground of the CC driver into the drain, and the power supply ground into the source. The PWM positive is into the gate, and the PWM negative is into the source, and there is a ~150 ohm resistor between the source and the gate. Works like a charm.

I also got a nice 2.8A CC driver designed for the SSC P7. Wired it up, and bam! capacitor "C1" exploded into flaming chunks. Any idea on why that might happen?

I bought a 5-mode one by accident - http://www.dealextreme.com/details.dx/sku.20329

instead of the vanilla one
http://www.dealextreme.com/details.dx/sku.20330
 
I also got a nice 2.8A CC driver designed for the SSC P7. Wired it up, and bam! capacitor "C1" exploded into flaming chunks. Any idea on why that might happen?

Reversing the input + - on an electrolytic will blow it up quick, inputting to much voltage into a cap will blow them up too. some boost drivers have very high output voltages when they are unloaded. When/If you actually get a spec sheet on the things, they say dont run them unloaded (without led).
Many of the unprotected drivers dont have any ability for reverse protection, or voltage protection, which can be good, because all that stuff wastes some power, just buy 2 so you have a spare :)

just do it again :) and be more carefull about polarity and that the output device is connected (and correct direction) before powering. Measure twice , blow it up once :)
mabey even read the max voltage on the cap, and dont make assembelies that would go over that voltage. Look for the polarity on the cap (if there is one) and see if someone put it in backwards.
 
Last edited:
Well, I think it may have been that I went over the "8.4v max input".

I'm using an adjustable lab power supply, and I had it cranked to probably like 12v, because the voltage on it really sags due to the load because it's an old POS.

I had the SSC P7 on it, correct polarity. The base was two rings, and I assumed the center one was +, and the outer one is - (since every flashlight I've ever seen is wired like that)

I will probably end up ordering another one (not the 5-mode, the plain one)and trying a different power supply on it
 
Many of the unprotected drivers dont have any ability for reverse protection, or voltage protection, which can be good, because all that stuff wastes some power, just buy 2 so you have a spare.
It is possible to do reverse-voltage protection for very little power loss, using a MOSFET the wrong way round - eg an N-channel MOSFET, drain to input -ve, source to load -ve, gate to input +ve via resistor.
The FET can still conduct pretty well with source and drain switched from the correct way round, but flipping it ensures the inherent diode in the FET doesn't connect when you don't want it to, when power is reversed.

On a recent project, where reverse polarity to driver boards was an unaviodable possibility, I used single PMV31XN MOSFETs in this way, and got a 10mV voltage drop at ~280mA current draw, and a reverse-connection current so low it was unmeasurable on a 20uA meter range.
 
Top