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.

Complete newb, trying to understand Lm317 w/resistor! :-(

Status
Not open for further replies.

wy2sl0

New Member
Hi everyone, thanks for taking some time and helping me out

Im trying to make a new trunk light for my car. I read using 1W LED's with resistors is A) not very smart because of a vehicles voltage fluctuations, and B) the resistors for 1W LED's would create alot of heat and wasted energy.

So I have spent a couple hours reading on how to wire an LM317T with 1, 2 or more 1W LED's off a car system.

I understand you have to wire a resistor somewhere between pins to adjust current regulation. What I dont understand is 1) where to wire this and b) how a resistor to adjust CURRENT output, will somehow also get the lm317 to output 3.3V from 12-14v?

Lets say I used a 3.9ohm resistor, to make 321ma output ( which is close to the 300 required for my 1W LED's ) however although it is now putting out 321ma, at what voltage and how does it magically match the LED's requirement?

And of course one more thing, how would I wire 3 of these onto 1 LM317 so I do not need 3 voltage regulators and heatsinks?

Thanks very much in advance your really helping me! I want to understand.
 

MikeMl

Well-Known Member
Most Helpful Member
Hi everyone, thanks for taking some time and helping me out

Im trying to make a new trunk light for my car. I read using 1W LED's with resistors is A) not very smart because of a vehicles voltage fluctuations, and B) the resistors for 1W LED's would create alot of heat and wasted energy.

So I have spent a couple hours reading on how to wire an LM317T with 1, 2 or more 1W LED's off a car system.

I understand you have to wire a resistor somewhere between pins to adjust current regulation. What I dont understand is 1) where to wire this and b) how a resistor to adjust CURRENT output, will somehow also get the lm317 to output 3.3V from 12-14v?

Lets say I used a 3.9ohm resistor, to make 321ma output ( which is close to the 300 required for my 1W LED's ) however although it is now putting out 321ma, at what voltage and how does it magically match the LED's requirement?

And of course one more thing, how would I wire 3 of these onto 1 LM317 so I do not need 3 voltage regulators and heatsinks?

Thanks very much in advance your really helping me! I want to understand.

The circuit below is right off the LM317 data sheet Basically, the resistor shown programs the current. If you want exactly 0.3A, the resistor should be 1.25/0.3=4.166Ω. A 3.9Ω resistor would make the output current 1.25/3.9=0.32A. If you wire three of your 3.3V 300ma LEDs in series with the cathode pointing to ground, the drop across all three will be 9.9V. 1.25V is lost across the resistor, and ~1.7V is required for the regulator to work (Drop Out Voltage), meaning that it will regulate properly if the input voltage is 9.9+1.25+1.7=12.85V or higher, which is the case if your engine is running (alternator voltage is set to 14.2-14.6V) but not if the engine is stopped (resting battery voltage is 12.65V).

As a practical matter, it will work with the engine stopped, but the Leds will be a little dimmer.

The worst-case power dissipation in the LM317 with the engine running will be [14.6-(1.25+9.9)]*0.3 = 1W, which if you use the TO220 package you can get by without heatsinking it. (Not true if you only use one or two leds).
 

Attachments

  • LM317Ireg.jpg
    LM317Ireg.jpg
    12.1 KB · Views: 518
Last edited:

wy2sl0

New Member
Thank you very much for your help.

I have a few questions though :)

First thing is, the regulator works but check what the voltage drop is and then regulates that exactly? I ask this because I always thought an LED would take more voltage if given more?

Second thing is, what is C1 0.1uF in that diagram/also voltage dropout pointed to the ground? What does that mean sorry for my ignorance

Third is, the resistor MUST be mounted in one way only, because polarity matters correct?

Finally, it says LOAD after the resistor. For the negative of the LED's and the positives, where do I connect? I ask this because these diagrams only show one line going to the Load of the circuit. Thank you!

P.S Sorry one more thing! On digikey they have this
 
Last edited:

Chippie

Member
The C1 thingy is a capacitor and is needed by the regulator for it to work correctly..Dont omit it. It can go in any way round as long as it is not an electrolytic...polyester or similar is ok

The resistor is non polarised..it can go in any way round...

The load is your led(s)...

Connect the led -ve to ground and the +ve to the junction of the resistor and Adj..
 
Last edited:

wy2sl0

New Member
The C1 thingy is a capacitor and is needed by the regulator for it to work correctly..Dont omit it. It can go in any way round as long as it is not an electrolytic...polyester or similar is ok

The resistor is non polarised..it can go in any way round...

The load is your led(s)...

Connect the led -ve to ground and the +ve to the junction of the resistor and Adj..

Ok so I am thinking best bet is a 4.3ohm 1W resistor, to run each at 290ma, just to be safe ( 10ma difference in brightness probably nil ).

Some of the LED's though, say forward voltage of 3.2-3.6v. How do I set the voltage output of this regulator, and what to?

Also the C1 comes with an LM317? Or what do I need for it.

HS104-2-ND HEATSINK TO-220 PWR CLR 1.45"10W
4.3W-1-ND RES 4.3 OHM 1W 5% METAL OXIDE
LM317TGOS-ND

These are the parts I have ready to order, does this seem right?
 
Last edited:

Chippie

Member
You need to buy C1....Where ever you are buying your parts from, look for a 0.1mfd capacitor(the working voltage needs to be around 25v or more)..

Go for the 4.3 Ohm resistor, everything else looks good...

You dont need to worry about the voltage, see the post above..number 2 by MikeMI...This is a current regulator you are building...Re-reading Mike's post will make this come clear..
 

wy2sl0

New Member
You need to buy C1....Where ever you are buying your parts from, look for a 0.1mfd capacitor(the working voltage needs to be around 25v or more)..

Go for the 4.3 Ohm resistor, everything else looks good...

You dont need to worry about the voltage, see the post above..number 2 by MikeMI...This is a current regulator you are building...Re-reading Mike's post will make this come clear..

Ok, but what exactly does this capacitor do?
 

Chippie

Member
It is a decoupling capacitor on the input to the regulator...It 'shorts out' any ac interference on the supply line put simplisticly...
 

wy2sl0

New Member
It is a decoupling capacitor on the input to the regulator...It 'shorts out' any ac interference on the supply line put simplisticly...

Thank you very much. Do you tihnk with the heatsink im getting that I listed, I could run single 1W LED's off this setup? or would there still be too much heat dissipated?
 

Chippie

Member
I think for what cost is involved, its not worth leaving the heatsink off...If there's a chance that the reg may overheat, then I'd put one on...Saves frying the reg and mebbe the led(s) too....

5 cents provided...

More than the usual 2 cents due to the current economic climate
 

audioguru

Well-Known Member
Most Helpful Member
The regulator does not fry. It simply turns itself off when it gets too hot. It has "thermal shutdown" to protect itself.

But don't let it heat then cool then turn on and heat again then turn off and cool again too many times because the thermal stress might break it.
 

Chippie

Member
ok...fry perhaps isnt the appropriate techie term....destroyed by thermal cycling
 

wy2sl0

New Member
Oh I didnt mean running without the heatsink! I meant ( since I thought it is harder on the regulator to run 1 than 3, because voltage drop must be larger ) with that heatsink can I run setups of 1 also? Or is it only good for 2-3
 

audioguru

Well-Known Member
Most Helpful Member
When the voltage drop of the regulator is larger then its heat output is also larger.
With a pretty big heatsink and free air around it an LM317 can dissipate about 18W.
 

wy2sl0

New Member
When the voltage drop of the regulator is larger then its heat output is also larger.
With a pretty big heatsink and free air around it an LM317 can dissipate about 18W.

Ok thats what I thought.

The largest drop from just 1 LED on a 12v system, lets say at 14.5v (max) would be about 4W of heat, so with that heatsink im clearly fine.

Saying that however, if I did it this way instead

14.5v Source -----> 39 ohm resistor (4 watt capable) ------> 3.3v@320ma

Would this resistor fry in a car out in the open? Or would it work?

Also, how would I connect my LED to a heatsink? I.E the metal on my car chassis/body? Just home depot silicone?
 
Last edited:

audioguru

Well-Known Member
Most Helpful Member
Your LEDs are "typically" 3.3V. They might be 3.0V (then will have too much current if you use your 39 ohm current-limiting resistor) or they might be 3.6V and be dim with your resistor. That is why a current source circuit is used.

I don't know your LEDs. Their mounting base might need to be electrically insulated but still must pass heat which cannot be done with silicone.
A heatsink is usually aluminum which conducts heat much better than steel.
 

MikeMl

Well-Known Member
Most Helpful Member
Ok so I am thinking best bet is a 4.3ohm 1W resistor, to run each at 290ma, just to be safe ( 10ma difference in brightness probably nil ).

Some of the LED's though, say forward voltage of 3.2-3.6v. How do I set the voltage output of this regulator, and what to?

Also the C1 comes with an LM317? Or what do I need for it.

HS104-2-ND HEATSINK TO-220 PWR CLR 1.45"10W
4.3W-1-ND RES 4.3 OHM 1W 5% METAL OXIDE
LM317TGOS-ND

These are the parts I have ready to order, does this seem right?

The resistor is dissipating E^2/R=1.25*1.25/4.3=0.39W so a 1/2W resistor is more common and cheaper.

C1 has to be purchased (look here).

When mounting the LM317 (TO220 package), it cannot short to the car frame. I would screw it to the car body using a nylon screw, with an insulating mica washer between it and the car metal. That way, no heatsink is required.
btw- reading some of the previous posts, only the heat produced by the regulator itself and the power dissipated in the resistor is conducted to the "heatsink". That power is ~1W in the regulator and ~0.4W in the resistor for a total of 1.4W.
OTOH, each LED is mounted someplace else, and it dissipates 3.3*0.3 or about 1W, so Carl is right, you will need to devise a mounting for each LED which mounts it mechanically, but conducts heat out of it to the car body.

The resistor can go either way around and be soldered directly between the Vout and Vadj pins.

The capacitor I show above is not polarized, and one lead should be soldered to Vin and the other grounded to the car body near the regulator.

The LEDs are polarized; one lead is called anode, and the other is cathode. The string of three LEDs is wired anode of 1 to Vadj;
cathode of 1 to anode of 2;
cathode of 2 to anode of 3;
cathode of 3 to car body. If you are mounting the three LEDs in different locations, you will have to daisy-chain a wire as needed.

Power feed wire to Vin. Connect other end to fused connection in the car's fuse block. 1A fuse is sufficient.
 

Attachments

  • LM317Ireg.jpg
    LM317Ireg.jpg
    143.5 KB · Views: 298
Last edited:

wy2sl0

New Member
The resistor is dissipating E^2/R=1.25*1.25/4.3=0.39W so a 1/2W resistor is more common and cheaper.

C1 has to be purchased (look here).

When mounting the LM317 (TO220 package), it cannot short to the car frame. I would screw it to the car body using a nylon screw, with an insulating mica washer between it and the car metal. That way, no heatsink is required.
btw- reading some of the previous posts, only the heat produced by the regulator itself and the power dissipated in the resistor is conducted to the "heatsink". That power is ~1W in the regulator and ~0.4W in the resistor for a total of 1.4W.
OTOH, each LED is mounted someplace else, and it dissipates 3.3*0.3 or about 1W, so Carl is right, you will need to devise a mounting for each LED which mounts it mechanically, but conducts heat out of it to the car body.

The resistor can go either way around and be soldered directly between the Vout and Vadj pins.

The capacitor I show above is not polarized, and one lead should be soldered to Vin and the other grounded to the car body near the regulator.

The LEDs are polarized; one lead is called anode, and the other is cathode. The string of three LEDs is wired anode of 1 to Vadj;
cathode of 1 to anode of 2;
cathode of 2 to anode of 3;
cathode of 3 to car body. If you are mounting the three LEDs in different locations, you will have to daisy-chain a wire as needed.

Power feed wire to Vin. Connect other end to fused connection in the car's fuse block. 1A fuse is sufficient.

This is extremely helpful, I appreciate you took the time to draw a diagram I completely understand.

A nylon washer as you are saying, will conduct heat connected to the car chassis, however it obviously will not conduct electricity the resistance is far too high right?

As for the LED's, I dont think they come with the star base, so I realize I cant just mount them to the chassis then either that would ground them, but I can use some sort of thermal silicone or compound to put onto the chassis? Or is that resistance low enough to short the LED out also?

Thanks again you are all very helpful

Edit: Now that I looked back, could I just use this for the LED to mount to the chassis? https://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=4651K-ND

And then epoxy it around the outside to hold it on?
 
Last edited:

MikeMl

Well-Known Member
Most Helpful Member
The LED mounting has to hold it mechanically, isolate it electrically, but conduct heat to the underlying car body metal. For 1W of dissipation, bonding it to painted car metal with a thin layer of 5min epoxy may be sufficient, as long as you test each one for a short to ground after the epoxy sets up.
 

wy2sl0

New Member
The LED mounting has to hold it mechanically, isolate it electrically, but conduct heat to the underlying car body metal. For 1W of dissipation, bonding it to painted car metal with a thin layer of 5min epoxy may be sufficient, as long as you test each one for a short to ground after the epoxy sets up.

How would I test this, without damaging the LED's?
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top