Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LM317 Constant Current questions

Status
Not open for further replies.

HarveyH42

Banned
Attached is a circuit from the National data sheet. I want to drive a super-flux LED (well, 2 or 3) with a 317 wired for constant current. The data sheet was a little light on material, so hoping to see if I'm on the right track here.

The LEDs are 2.2 volts 70mA Max, amber (if anybody cares), power from NiCd battery pack, 4.8v, but can add more if needed.

They gave an equation for output current as: Iout=Vref/R1
I took Vref to mean 1.25 volts, from the beginning of the data sheet.
.07=1.25/R1 R1= about 18 ohms

Now, does mean I'll get 4.8v @ 70mA max output?
Since 2 LEDs in series will use 4.4 volts, will the remaining .4 volts be a concern?
Or do I loose 1.25 volts in the LM317, and only get 3.55 volts out?
 

Attachments

  • 317cc.jpg
    317cc.jpg
    29.7 KB · Views: 2,426
HarveyH42 said:
Attached is a circuit from the National data sheet. I want to drive a super-flux LED (well, 2 or 3) with a 317 wired for constant current. The data sheet was a little light on material, so hoping to see if I'm on the right track here.

The LEDs are 2.2 volts 70mA Max, amber (if anybody cares), power from NiCd battery pack, 4.8v, but can add more if needed.

They gave an equation for output current as: Iout=Vref/R1
I took Vref to mean 1.25 volts, from the beginning of the data sheet.
.07=1.25/R1 R1= about 18 ohms

Now, does mean I'll get 4.8v @ 70mA max output?
Since 2 LEDs in series will use 4.4 volts, will the remaining .4 volts be a concern?
Or do I loose 1.25 volts in the LM317, and only get 3.55 volts out?

The 317 won't give you 4.8V out if you put in 4.8V, it will drop a certain amount of voltage across the device - check the datasheet. As far as the series voltages of the LEDs are concerned, I'm not sure I understand why you are concerned aout the extra 0.4V. A constant current source's voltage is variable, but the current is constant.
 
If you want 4v out, give 7v in ... of course, the actual numbers vary a bit on things like current draw, but just off the cuff, I see the lm317 as "costing" 3v to operate ... since your source and load are very close in voltage, I don't see much need for an active regulator ... especially since batteries aren't known to suddenly change? a simple series resistor can eat those extra 400mV as heat, and will be more efficinet than the 317 in that case.
 
Yeah, I don't understand it either, that's why I posted it. I've burnt up a bunch of these LEDs using the standard series resistor method of limiting current. Not sure if its just cheap LEDs, or they need something different. These are the square, 4 lead super-flux LEDs. I've got some running on PWM (555 circuit), and get good brightness, and haven't smoked them yet. Just a lot of circuitry for driving 4 LEDs.

Best I can figure, the 317 uses 1.25 volts, the reference.

Oh, almost forgot... Should I expect needing a heatsink? I've gotten burned before, really.
 
The datasheet for the LM317 says its input voltage needs to be 2V more than its output voltage at your low current.
Its 18 ohm resistor needs an additional 1.25V.
Your LEDs might be 2.2V at 20mA or who knows what voltage at their max current of 70mA. Maybe 3V each.
You want to operate them at their max? Do they have proper cooling?

Therefore the input to the LM317 must be a minimum of 9.25V. The circuit is constant current so additional input voltage won't change the current, it will just create more heat in the LM317.

The heat is the voltage across it times the current in it. The datasheet says that the TO-220 package will get too hot with a dissipation of only 2W without a heatsink. If your input voltage is 9.6V then the LEDs will have about 6V across them, the 18 ohms will have 1.25V across it and the LM317 will have the remainder of 2.35V. At 70mA it will dissipate only 165mW of heat.
 
I wouldn't worry about the constant current source, I'd just use a resistor to drop the 0.4V. This in't very reliable though as the LEDs Vf can vary significantly and it will dim pretty quickly as the battery voltage drops (though this isn't going to bt too bad with Nicads/NiMH batteries as the voltage stays the same through most of the discharge). Your best bet is to use a flyback transfromer switching regulator, this can give output voltages both higher and lower than the input voltage and can be converted into a constant current source, there also are ICs around that can do this.
 
Last edited:
Okay, I think I have enough to build something to test. Will go with the 6v Nicd battery pack (should charge okay from a 9v solar panel), and drive 2 LEDs.

I chose the LM317 mostly because I have atleast 20 of them sitting around, and have wondered about the constant current thing with driving LEDs. The driver modules they sell for the 3 watt LEDs are kind of expensive, and these LEDs aren't even close. If this works out okay, I'll make some 12 volt light strips.

I would like to learn more about buck/boost converters sometime, but it's a little more than I want to take on right now.
 
Check the data sheet with your LED's. 70 mA for a normal LED is a lot.
Normally 20 mA DC continuous.
You may possibly peak it to 70 mA as long there is a off period to cool the LED chip down.

If you drive it in a ratio 1 ON to 5 OFF at 50 Hz or more you probably get away with it.

FACTS :
2.2 Volts per LED each, so two in series is 4.4 volts.
4.8 Volts battery.
0.4 Volts at 20 mA to dissipate.

from U = I * R
0.4 = 0.02 * 20 therefore R = 20 Ohms.

from P = I²R then 0.02² * 20 = 8 miliWatt.

A 22 Ohms ¼ Watt resistor will suffice and the LED runs at 18 mA.
 
Note that, that method will give you 91.2% efficiency which is better than most switching regulator ICs.
 
Rodalco beat me to it. The best way to use the 4.8 battery is to do what he said. The 22 ohm number is a standard value however, you could also use a trim pot to coax the max brightness out of your LEDs. I suspect you would be hard pressed to see much difference between 18 and 20 mA, though. The higher the resistor, value the longer the life of your battery.

If you use a constant current supply, I believe you don't need a resistor but considering the application, the single resistor is a far better solution - cheaper and better battery life. Even the switch mode solution would be hard pressed to beat the single resistor solution with a 4.8V battery (though not so for a 6V one).
 
Nobody guarantees the voltage of an LED. The voltage is a range of voltages because they can't make LEDs exactly the same. The voltage could be anywhere from about 2.0V to about 2.6V for a green LED. The voltage range is on the datasheet, but frequently it lists only the expected max voltage which is only for a few of them.

A 4-cell Ni-Cad or Ni-MH battery is not 4.8V. It is 5.6V right from the charger, 5.0V to 5.2V with only a small load current and 4.0V when it needs charging.

The range of voltages is so great that a higher voltage should be used across the current-limiting resistor to even it out.
 
These LEDs aren't the normal 5mm bullet shaped parts!

They are the square, 4 lead, super-flux, Pirahna/Spider types.

Using a series resistor, I have a high failure rate, even at 40 mA. I did a light strip PCB for them, so heatsink for the LEDs should be okay (left a lot of copper for them). I'm experimenting with fewer LEDs right now, and just using a wire jumper to bypass the unused holes.

These types of LEDs come with the warning of being more sensitive, so I'm exploring other options beyond the typical series resistor. The LM317... I saw the circuit in the data sheet, have plenty of them on hand, and constant current supplies for higher brightness LEDs seems a must.

Just seems like a simplistic current controller, a little more effective than the series resistor. If the LEDs continue to burn, will try something else. Would like to get these cheaper LEDs under control before moving up to the more expensive 1 watt+ LEDs ($2.00 -$15.00 a pop). Paid 10 cent each for these, so not too upset over all the smoke, its a learning thing.
 
audioguru said:
Nobody guarantees the voltage of an LED. The voltage is a range of voltages because they can't make LEDs exactly the same. The voltage could be anywhere from about 2.0V to about 2.6V for a green LED. The voltage range is on the datasheet, but frequently it lists only the expected max voltage which is only for a few of them.

A 4-cell Ni-Cad or Ni-MH battery is not 4.8V. It is 5.6V right from the charger, 5.0V to 5.2V with only a small load current and 4.0V when it needs charging.

The range of voltages is so great that a higher voltage should be used across the current-limiting resistor to even it out.


Thanks, could have sworn NiCds were 1.2 volts. Will make the adjustments. The batteries still have a couple hours left on the charger.
 
HarveyH42 said:
Thanks, could have sworn NiCds were 1.2 volts. Will make the adjustments. The batteries still have a couple hours left on the charger.

The nominal voltage is 1.2V, check my discharge graphs at to see what they actually perform like! - they are from two AA's in series feeding a small torch bulb, which is a fairly representative use.
 
HarveyH42 said:
Thanks, could have sworn NiCds were 1.2 volts.
I go to www.energizer.com for battery datasheets.
Battery cells have an internal resistance so their voltage drops as their load current is increased. At the low current for your LEDs then the average voltage is 1.3V or more per cell.

The cheap price you paid for your LEDs indicates a "copy-cat" manufacturer with poor reliability.
 

Attachments

  • AA Ni-Cad.PNG
    AA Ni-Cad.PNG
    19.5 KB · Views: 227
Yeah, I've kept the copy-cat thing in mind. I got some of these same style LEDs from China, and replaced 6 in less than a month on the light bars I made for growlights, but they have been working for couple months now at 40 mA. Oh, there is no noticiable difference in the cactus under the LEDs and the ones about 5 feet away, both get the same daylight.
 
Compared to daylight, the tiny amount of light from LEDs is nothing.
 
Oh, important saftey tip: Don't test these supe-flux LEDs with an old (thought it was the mostly dead one anyway...) 9 volt battery, they actually explode. The lens hit the ceiling (5 - 6 feet). The battery turned out to be fairly good, 8.73 volts. The old one was hiding under a schematic.
I usually pop the tops of and use them for battery clips, cheap ******* that I am... Actually, I solder them to PCBs, easier than tearing apart one with leads. Guess that makes me more lazy, than cheap.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top