# Need help analyzing simple lighting circuit



## Florida RR (Oct 8, 2015)

Hi folks, I hope this is the right forum to find someone who can help me analyze a simple passenger car lighting circuit that I built years ago. I have forgotten how it works, and I need to modify it.

It is in an N scale passenger car with a truck that picks up power from the track on a DC layout. It powers two LEDs in series on the back of the last car. It works great, except that it requires a locomotive that really sucks up power to get it to work. It does not light up until about half throttle. That's OK with old locomotives that ran at about half power on my DC throttle. New locomotives only work well at about 1/3 of my throttle, and the LEDs won't light up.

I assume that this has something to do with the resistors? I don't know what to change to get these LEDs to light up and be steady at 1/4 throttle and above? 

The schematic (as best I can tell) is attached.

-Florida RR-


----------



## gregc (Apr 25, 2015)

Florida RR said:


> I assume that this has something to do with the resistors? I don't know what to change to get these LEDs to light up and be steady at 1/4 throttle and above?


for a more efficient locomotive requiring less voltage, there is less track voltage and not enough voltage to exceed the minimum required for the LEDs. The bridge rectifier reduces the track voltage by ~1.4V. Since the LEDs are in series, the minimum voltage required is at least the minimum voltage of 2 LEDs.

the lm317 is used as a current regulator which maintains a constant current through and a constant voltage across the LEDs even though the track voltage varies. But it will only pass a current once the track voltage exceeds the minimum voltages across the LEDs.

here's a simpler version of your circuit that uses a single LED. It also shows that there no need for the resistor in parallel across the LEDs. I don't know why your circuit has 2 capacitors. You can can try putting 2 LEDs in parallel, which requires twice as much current which requires the 470 ohm resistor value be cut in half. or you can have a separate circuit for each LED.


----------



## gunrunnerjohn (Nov 10, 2010)

Yikes! With a DC system, you have reverse voltage coming from the track when you reverse! That will do really bad things to either of these circuits! Here's a circuit that will light the two LED's for any track polarity, I suggest wiring them in parallel as it'll take less track voltage to light them.


----------



## gregc (Apr 25, 2015)

gunrunnerjohn said:


> Yikes! With a DC system, you have reverse voltage coming from the track when you reverse!


i believe the circle at the top of his drawing is a bridge rectifier. Otherwise it would only work in one direction


----------



## gunrunnerjohn (Nov 10, 2010)

I was looking at the second drawing that you posted, there is no rectifier.


----------



## gregc (Apr 25, 2015)

gunrunnerjohn said:


> I was looking at the second drawing that you posted, there is no rectifier.


yes, you're right. the circuit I showed would need to be after the bridge.


----------



## gunrunnerjohn (Nov 10, 2010)

The CL2 eliminates all the extra parts, one part with two wires.


----------



## gregc (Apr 25, 2015)

gunrunnerjohn said:


> The CL2 eliminates all the extra parts, one part with two wires.


yes, it's simpler than an lm-317 which is a very versatile chip. but the CL2N3 is designed to pass only 20 ma which is fine for one or more LEDs in series, bit not in parallel.


----------



## gunrunnerjohn (Nov 10, 2010)

Au contraire, it will work fine. 10ma for each LED is plenty of current to light them. I rarely push LED's to the limit, no real need. You can also put them in parallel if you want 40ma, but I don't think that would be necessary in this instance.


----------



## gregc (Apr 25, 2015)

won't the current requirement depend on the LEDs? Older LEDs may not be as efficient as more modern ones. 

and now that you mention it, the 470 ohm resistor seems too large. A 47 (yellow purple black) ohm resistor results in 27 ma based on this calculator

so maybe he should consider a the circuit you suggest with different components.


----------



## Lemonhawk (Sep 24, 2013)

I like your version GRJ, it would work on both DC and DCC, although I might put a resistor off the + side of the bridge to limit inrush current. A distinct advantage of the parallel LED's is that they would turn on sooner on a DC layout.


----------



## gunrunnerjohn (Nov 10, 2010)

A small resistor to limit inrush is not a bad idea, I typically have a choke there for DCS compatibility. Of course, being in the O-gauge world, I also have amps of power available.  I'd consider something like a 22 ohm resistor so as not to drop too much power.

The parallel LED's were exactly for that purpose, to light at a lower voltage for DC operation.

Greg, 99.9% of common consumer grade LED operate at a 20ma maximum current. There are specialty types and high-power types that operate on less or more current, but assuming 20ma is pretty safe as a rule. I use hundreds of LEDs here, both thru-hole and SMT, virtually everything I use has a 20ma rating. I have some really tiny chips that are less, and some really high power models that require a heatsink that run as much as 100ma, but that's not the norm.


----------



## gregc (Apr 25, 2015)

gunrunnerjohn said:


> Greg, 99.9% of common consumer grade LED operate at a 20ma maximum current.


i don't disagree that 20 ma is the typical max. I have a boat load of LEDs from work from about 20 years ago. One batch was much brighter that the rest and the circuit that used them had to be changed to dim them. My point is that older LEDs may not be that bright even at 20 ma. while modern ones may be more than bright enough even at 10 ma.


----------



## DonR (Oct 18, 2012)

GRJ

I'm confused with your circuit in post #3 showing the track as AC with a rectifier.
He has an N scale DC layout.

Don


----------



## gunrunnerjohn (Nov 10, 2010)

Greg, since the two LED's he has are obviously the same vintage, I'm thinking the intensity isn't going to be an issue here, they should be pretty closely matched.

Don, I'm showing the bridge rectifier, it has two AC labeled pins and then the + and - pins for the DC output. For use with DC, the bridge rectifier flips the polarity so that the load only sees a single polarity.

The circuit works equally well on AC or DC of either polarity.


----------



## Florida RR (Oct 8, 2015)

Thanks for the responses. The LEDs are about 20 years old. They are old ones that have a flat rectangular base and a tube-shaped lens that sticks out of it to make a very small point of red light. That LED design was perfect for N scale back then. They are permanently installed in the car and wired in series because the circuit I had at that time required it. It is one that I found somewhere about 15 years ago. I have no idea where I got it, but I know that I didn't create it myself.

While fiddling with it last night, I found what I believe to be the circuit along with a table showing what happens with various values of R1 and R2. Go down to the section for LM317T Variable Voltage Regulator.

Current determines brightness, right? Whatever current I have, they are plenty bright once they turn on. I tried them with an old and decrepit LifeLike locomotive with no flywheels, and it works great because that locomotive doesn't even want to move until half throttle. Attach it to a newer Atlas and you are out of luck because it runs at about 1/3 throttle.

There actually are four capacitors in there but I got lazy and only drew two. They are there to prevent flickering. I remember adding three more in the largest values I could fit inside the car. As the single power pickup truck doesn't always have the best contact, those caps store just enough to keep the lights from flickering. It takes about 2 seconds for the LEDs to go out after the power is cut off.

So what I have is a circuit that works great with old locomotives that run above half throttle but not new more efficient ones that run well below half throttle. I was hoping to be able to just unsolder R1 and R2 and not change anything else. I swapped the 470 ohm for a 330 ohm that I found in my project box last night. According to the chart, that changes the voltage from 3.91 to 5.04. It had a little effect but not much. It got the LEDs to turn on just below half throttle but still nowhere near as low as is needed.

Is it the fact that the bridge rectifier is dropping so much voltage that below half throttle I am never going to get enough voltage from the track to get the LEDs to light? I haven't put a volt meter on the track to find out what the voltage is at 1/3 throttle, but I'll bet it is pretty low. The bridge rectifier is there so the LEDs will work regardless of direction, and it does work in both directions. If anyone is curious what it looks like inside the car, a pic is attached.

-Florida RR-


----------



## gunrunnerjohn (Nov 10, 2010)

The biggest issue is you have them in series, so it takes twice the voltage to light them. As far as the bridge, a Schottky bridge rectifier would reduce the voltage drop across the bridge. Here's a 200ma SMT Schottky Bridge Rectifier that's pretty small.

If you use my circuit, the Schottky bridge, you should cut several volts off the track voltage necessary to light the LED's.


----------

