LM317 Voltage Regulator, help

Ron H

Joined Apr 14, 2005
7,063
Each led takes 1.8 volts so 5*1.8=9v the lowest the supply voltage gets is about 11.3v so with the 1.25v that would be 10.05v left for the leds and stuff. So I am good to go on the circuit in regard to enough voltage. Thanks
The LM317 needs about 1.7 - 1.8V (3V guaranteed). Add 1.25V for the current set resistor, 9V for the LEDs, and your minimum supply voltage is 12V. This doesn't mean you won't get current, but it does mean the current may drop slightly when the supply is below 12V. It may not be objectionable.
 

Thread Starter

live4soccer7

Joined Jun 7, 2008
88
You are saying the LM317 requires 1.7-1.8v itself and the resistor 1.25 itself also? How did you come up with the value the resistor requires? I think it will be fine. Atleast I hope so because these light clusters I am constructing definitely are pretty time consuming. I have two done and two left until I can do test and see how they will look!
 

Thread Starter

live4soccer7

Joined Jun 7, 2008
88
I am done with the four sets that go in the back of my dash. I am now wiring up the common grounds and power. Once this is done I just have to put it into my car and solder a couple more things and cross my fingers. lol... Pictures should be up in the next half hour hopefully.
 

Ron H

Joined Apr 14, 2005
7,063
You are saying the LM317 requires 1.7-1.8v itself and the resistor 1.25 itself also? How did you come up with the value the resistor requires? I think it will be fine. Atleast I hope so because these light clusters I am constructing definitely are pretty time consuming. I have two done and two left until I can do test and see how they will look!
You can believe anything you want, but it won't change reality. And you are probably right - it will be fine. I doubt you will see the small difference in intensity between 11.3V and 12V. But it will be there.
1.25V is the reference voltage of the LM317. This constant voltage across the current set resistor is what causes the current to be constant.
EDIT: After running a simulation, I think you might notice the dimming at low voltage. Let us know. I'm curious to know if the sim is accurate.
 
Last edited:

Thread Starter

live4soccer7

Joined Jun 7, 2008
88
I will let you know... I am hooking them up still. I do believe you when you said that. That was never a question. What do you mean you ran a simulation?
 

Thread Starter

live4soccer7

Joined Jun 7, 2008
88
They are hooked up and running. I am assembling the main part of my dash right now. They are great. They work and do not seem to be burning out or anything. I will be taking a 20 min drive pretty soon. That will be a good test for it and when I get there I will take a pic and post it up. Sorry to make you guys wait longer. I wanna get a good pic in the dark. They will not show up too will in a pic right now. Thanks for all your help. Couldn't have done it without ya.
 

SgtWookie

Joined Jul 17, 2007
22,230
The "F" reading on the fuel gauge looks good to me. That's about all that matters nowadays ;)

What kind of car? Must have a pretty short-stroke engine with a redline that goes up to 9k RPM.

If it's less than 6 cyls, the 160 on the big dial is rather optimistic.
 

Thread Starter

live4soccer7

Joined Jun 7, 2008
88
It is a 1993 Nissan 300zx... I am going to be adding more leds to the gauge cluster. There are some hotspots in it. You can not see them in the picture because the camera exaggerates the color. Thanks for the help though. I will be able to find lots of uses for this circuit you have helped me learn. Thanks again!! And yes gas gauge is good. lol... Damn thing is a small fortune to fill up!
 

Ron H

Joined Apr 14, 2005
7,063
So, do the LEDs get noticeably dimmer when the voltage is 11.3V? Inquiring minds want to know.:D
To answer your question, you (and I) can simulate the operation of electronic circuits using software, generally based on SPICE. The program I used is LTspice from Linear Technology.
Here is the Spice model I used for the LM317.
Rich (BB code):
*LM317 TI voltage regulator - pin order: In, Adj, Out
*TI adjustable voltage regulator pkg:TO-3
.SUBCKT LM317 1 2 3  **Changes my be required on this line**
J1 1 3 4 JN
Q2 5 5 6 QPL .1
Q3 5 8 9 QNL  .2
Q4 8 5 7 QPL .1
Q5 81 8 3 QNL .2
Q6 3 81 10 QPL .2
Q7 12 81 13 QNL  .2
Q8 10 5 11 QPL  .2
Q9 14 12 10 QPL .2
Q10 16 5 17 QPL  .2
Q11 16 14 15 QNL .2
Q12 3 20 16 QPL .2
Q13 1 19 20 QNL .2
Q14 19 5 18 QPL .2
Q15 3 21 19 QPL .2
Q16 21 22 16 QPL .2
Q17 21 3 24 QNL   .2
Q18 22 22 16 QPL .2
Q19 22 3 241 QNL 2
Q20 3 25 16 QPL .2
Q21 25 26 3 QNL .2
Q22A 35 35 1 QPL 2
Q22B 16 35 1 QPL 2
Q23 35 16 30 QNL  2
Q24A 27 40 29 QNL .2
Q24B 27 40 28 QNL .2
Q25 1 31 41 QNL 5
Q26 1 41 32 QNL 50
D1 3 4 DZ
D2 33 1 DZ
D3 29 34 DZ
R1 1 6 310
R2 1 7 310
R3 1 11 190
R4 1 17 82
R5 1 18 5.6K
R6 4 8 100K
R7 8 81 130
R8 10 12 12.4K
R9 9 3 180
R10 13 3 4.1K
R11 14 3 5.8K
R12 15 3 72
R13 20 3 5.1K
R14 2 24 12K
R15 24 241 2.4K
R16 16 25 6.7K
R17 16 40 12K
R18 30 41 130
R19 16 31 370
R20 26 27 13K
R21 27 40 400
R22 3 41 160
R23 33 34 18K
R24 28 29 160
R25 28 32 3
R26 32 3 .1
C1 21 3 30PF
C2 21 2 30PF
C3 25 26 5PF
CBS1 5 3 2PF
CBS2 35 3 1PF
CBS3 22 3 1PF
.MODEL JN NJF(BETA=1E-4 VTO=-7)
.MODEL DZ D(BV=6.3)
.MODEL QNL NPN(EG=1.22 BF=80 RB=100 CCS=1.5PF TF=.3NS TR=6NS CJE=2PF
+ CJC=1PF VAF=100)
.MODEL QPL PNP(BF=40 RB=20 TF=.6NS TR=10NS CJE=1.5PF CJC=1PF VAF=50)
.ENDS LM317   **changes may be required on this line**
Below are the results of the sim I ran. You can see that the simulation says the current will be only12mA when the supply is 11.3V. It could be wrong, since the sim is only as good as the models.
The .asc file will run on LTspice.
 

Attachments

hgmjr

Joined Jan 28, 2005
9,027
That's pretty cool, I'll have to take a deeper look at it some time. You can not notice a drop in the brightness of the lights.
That is terrific to hear. The circuit you have used strikes a comfortable balance between cost, component count, and performance.

Great Job,
hgmjr

PS. Longing for a clear photo of the finished product.
 

Thread Starter

live4soccer7

Joined Jun 7, 2008
88
yeah that is perfect. I will be using this little circuit to regulate the current a lot. I have am installing more lights in the car in various places. Such as the as tray part, cigarette lighter, dome, etc... and this will make it possible. I am going to be doing the pods (where the ac and all the buttons are) inside my car and the ignition and I will be able to post a pic when it's all done. I don't know if I have enough of the LM317's though. I order a bunch more though. I will try and get a good clear pic later when I finish of the whole front of the car and post them for those of you interested in seeing the finished product.
 

Ron H

Joined Apr 14, 2005
7,063
That's pretty cool, I'll have to take a deeper look at it some time. You can not notice a drop in the brightness of the lights.
For your sake, I'm glad to hear that, but for the simulaton, it's bad news.:( Did you actually measure the battery voltage this time? It takes quite a while for a car battery to drop to 11.3V, even under moderate load.
 

hgmjr

Joined Jan 28, 2005
9,027
That's pretty cool, I'll have to take a deeper look at it some time. You can not notice a drop in the brightness of the lights.
In the LM317T datasheet from ST Microelectronics, I believe you can see why the device is exhibiting an unnoticeable variation in intensity. I call you attention to the graph in Figure 4 in Section 5 of the datasheet. In the graph, it is readily apparent that the magnitude of Vdrop plotted against the device's junction temperature for currents less than 200 milliamps and junction temps greater than 25 degrees C is comfortably less than 1.7 volts.

It would be interesting to measure the total voltage drop across the 4 LEDs, though I don't expect you to yank the dash panel back out

hgmjr
 
Top