# DIY LED Driver



## thomast77 (Jul 9, 2013)

So I just got some 1w leds mounted on a starbase. This is my first time messing with these. I have been looking around for an led driver design. I will be driving these from a 12v dc source (Wall Wart). Anyone know where I can find any schematics? Any advice? A little more info these are ebay cheapies. I bought cheapies to learn. If I burn them up they are really cheap so who cares. I honestly don't know how they can sell them so cheap including shipping? The listing states: Forward voltage 3.2-3.4V Forward current 350mA. I will need a driver to power a single led and a driver to power several in series. But I want to build the driver myself because all the drivers I have seen online are expensive. I have soldering skills. Thank You in advance for any input Tom


----------



## jason 77 (Jul 9, 2013)

I have used the circuit that is explained in the link below numerious times, just some simple math and you can drive LED/s at what ever current you want....

http://www.instructables.com/id/Power-LED-s---simplest-light-with-constant-current/


----------



## thomast77 (Jul 9, 2013)

Thank You I will take a look at this


----------



## Steve K (Jul 9, 2013)

if you are using a 12v supply to drive a single LED, you could safely use a simple resistor to set the current level. The two-transistor current regulator is a good circuit, but overkill in this instance. You'll just need to calculate the correct resistance .. R = (12v - 3v)/0.350, and pick one rated for the correct power .. P = I^2 x R


----------



## DIWdiver (Jul 9, 2013)

The link provided by Jason 77 looks great. It should work very well as long as the battery voltage is greater than the LED (string) forward voltage. Efficiency and power dissipation in Q2 could be a problem; in other words, Q2 could overheat if you don't take adequate precautions. If you want specific advice, you'll have to post specific info.


----------



## thomast77 (Jul 9, 2013)

Steve K said:


> if you are using a 12v supply to drive a single LED, you could safely use a simple resistor to set the current level. The two-transistor current regulator is a good circuit, but overkill in this instance. You'll just need to calculate the correct resistance .. R = (12v - 3v)/0.350, and pick one rated for the correct power .. P = I^2 x R


 I had thought about this. I have a ton of 1/4 watt resistors I was using with some regular 5mm leds. I suspect I will need a larger value. What watt value resistor will I need? 1 watt per led? If I wire them in series 1 watt per led in series? Tom


----------



## znomit (Jul 10, 2013)

LM317 is a good option too

http://users.telenet.be/davshomepage/current-source.htm


----------



## DIWdiver (Jul 10, 2013)

Steve K is right. If you have a regulated 12V supply, a simple resistor is very nearly as good a driver as anything else. A buck driver would improve the efficiency (a lot), but that's all. 

To calculate the resistance value, you want the voltage across the resistor, divided by the current through it. Assuming an average LED voltage of 3.3V, that comes out (12V-3.3V)/0.35A = 24.9 ohms. Call it 25. 

The power in a resistor is the current squared, times the resistance. That's 0.35A*0.35A * 25 ohms = 3.06 Watts. I don't like to push the power ratings on resistors to the max, so I would suggest at least 4W resistor. 

Conveniently, 25 ohm, 5W resistors are widely available and inexpensive. The CB5JB25R0 from digikey.com is a good example, at $0.50 each. If you are in the US, they'll ship small packages for under $3.00 (First Class Mail). You won't find many drivers available cheaper. 

A driver can be better for many reasons, but you may not care about any of them: 

- Input voltage varies, or is close to LED voltage
- Input voltage is less than LED voltage
- High efficiency is important
- Dimming is needed


There are others, but these are the main ones.


----------



## Illum (Jul 10, 2013)

CAT4101 anyone?


----------



## jeffosborne (Jul 11, 2013)

Hey Illum, nice find on the On Semi regulator!
I had not seen this one.
Looks good 

$3.06 at DigiKey in smal quantity.
My favorite On-Semi distributor, Future Electronics, does not have this part!

Cheers,
Jeff


----------



## Steve K (Jul 11, 2013)

Illum said:


> CAT4101 anyone?



I've got a couple of CAT4101's in the parts box, just waiting for me to find a good application for them. The low dropout voltage, 0.5v, is very attractive. However, you have to pay attention to the fact that they aren't rated for input voltages above 5.5v. In my mind, it is perfect for applications where you are driving a 3 watt LED with 4 AA nimh cells (or something similar). 
Probably not a great solution when the power supply is 12vdc.

edit: the datasheet does show that you can add a simple linear regulator at the input to the CAT4101 in order to work with voltages above 5.5v, but that does take away from the compact and simple aspects of the CAT4101.


----------



## thomast77 (Jul 11, 2013)

The specs on this chip look really good. I do have some 5v Wall Warts. I might get a few of these and mess around with it.


----------



## DIWdiver (Jul 11, 2013)

Nice part. Has some distinct advantages over the ubiquitous AMC7135. However, in this application it would amount to a complex and expensive resistor.


----------



## thomast77 (Jul 12, 2013)

DIWdiver said:


> Nice part. Has some distinct advantages over the ubiquitous AMC7135. However, in this application it would amount to a complex and expensive resistor.


 I really like this AMC7135 chip too. In fact I have even found some starbase mounts that include this chip mounted on the starbase. It only requires one other component. A Cap I believe. I really like this setup. Does anyone have any other chips they recommend for lets say anywhere between 3-12vdc input. And the capability of powering between 1-3 1w 350ma leds. It would be nice if it could run 3w leds as well. I am learning a lot by hearing what chip others on here recommend.


----------



## thomast77 (Jul 12, 2013)

DIWdiver said:


> To calculate the resistance value, you want the voltage across the resistor, divided by the current through it. Assuming an average LED voltage of 3.3V, that comes out (12V-3.3V)/0.35A = 24.9 ohms. Call it 25. The power in a resistor is the current squared, times the resistance. That's 0.35A*0.35A * 25 ohms = 3.06 Watts. I don't like to push the power ratings on resistors to the max, so I would suggest at least 4W resistor.


 kinda new to this. So I want to be sure I am doing this right. If I was to run 3 1w 350ma leds in series. Would it then be (12v-9.9v)/1.05A = 2 ohms? then 1.05 x 1.05 x 2 = 2.205 watts ____ Edited to add Also I am thinking it would probably be best to step up to the next highest value resistor 2.2 ohm for led longevity? And does it matter whether I use a ceramic or a Metal oxide film resistor? Is one better than the other?


----------



## MikeAusC (Jul 13, 2013)

thomast77 said:


> . . . I will need a driver to power a single led and a driver to power several in series. But I want to build the driver myself because all the drivers I have seen online are expensive. I have soldering skills. Thank You in advance for any input Tom



Driving a single white LED using a Linear driver is very inefficient - you'll be wasting 3/4 of your power in the Driver/resistor. Switchmode drivers are are usually over 80% efficent and cost about $5 from dealextreme.

Driving 3 white LEDs in series with just a resistor from 12 is verty effcient and there's not much advantage in using a driver.


----------



## SemiMan (Jul 13, 2013)

Except the forward voltage from three LEDs in series can vary quite a bit and hence the current as well. You really need to fine tune the resistor to ensure you get what you want. Better with a linear reg at least.

Sent from my Nexus 4 using Tapatalk 4 Beta


----------



## jtr1962 (Jul 13, 2013)

MikeAusC said:


> Driving 3 white LEDs in series with just a resistor from 12 is verty effcient and there's not much advantage in using a driver.


I would still go with the simple two-transistor driver circuit linked to in post #2 simple because Vf can vary quite a bit. Incidentally, Vf of many power LEDs is getting low enough that you can sometimes put 4 in series on a 12V supply if your regulating circuit has a low dropout voltage (i.e. something using an op-amp to control a pass transistor). If the Vf is 2.9V, the driver is close to 97% efficient off a 12V supply. If I'm using a typical 13.8V automotive supply, I would go with 4 LEDs all the time. Nowadays quality white LEDs seldom have a Vf of more than 3.3V, even at 1 amp. 4 in series still gives you a margin of 0.6V for the regulator off a 13.8V supply.


----------



## Steve K (Jul 13, 2013)

At work, I sometimes get grief from friends who ask me technical questions. They come to me looking for a quick, simple answer. Instead, I give them an answer with all sorts of details, covering all of the possible scenarios or configurations. This thread is sort of turning into one of my answers. 

To try to give a quick answer, let me identify the different scenarios:
1. for the original question with one 3 watt LED driven by 12v, the simplest solution is a power resistor. It provides a fairly steady current and is relatively insensitive to LED variations.

2. for the case of a 12v supply and three 3 watt LEDs in series, then a resistor is not a great solution. The current will vary "a lot" with changes in LED parameters, etc. Something like the two transistor regulator would be my preferred solution, or maybe a tweak of the CAT4101 regulator. 

3. a switching power supply can be a better solution, or it might not be as good. A lot of it depends on the value of the power supply and the voltage across the LEDs. If the power supply voltage is close to the voltage across the LEDs, the linear regulator can be more efficient... especially if the switching power supply requires a couple of volts of headroom.

4. a cautionary note: if you are going to use 12v battery power from a car, be aware that the voltage can vary quite a bit depending on whether the engine is running, what sort of electrical loads are placed on the battery, etc. In my job, the assumption is that a 12v battery can be anywhere between 9v and 18v. And then there's the issue of the voltage transients that can be on the battery bus! It's just horrible, honestly. As standard practice, I recommend a series diode rated for a couple hundred volts, just to stop negative transient voltages. After that, I'd recommend a good heft TVS (transient voltage suppressor) diode to clamp the positive transient voltages. Then add some capacitance to attenuate the assorted noise that is on the bus. 

okay.... that's my quick answer. You probably don't want the long answer.


----------



## DIWdiver (Jul 14, 2013)

OP said 12V wall wart, not automotive, so I won't add to the automotive conversation. 
1 LED with resistor, current will be well regulated, efficiency will be poor.



3 LEDs in series with resistor, current will vary a lot with different LEDs, but once the LEDs are chosen, the current will vary a little with LED die temperature. 

The 2-transistor method shown will also have variation in current with transistor die temperature, due to the Vbe of the bipolar transistor being highly temperature dependent. My experience is that contrary to theory, it will also vary with supply voltage, though that's not an issue in the OP's question.


----------

