Trains.com

LED lighting using variable AC

7515 views
27 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    January 2012
  • 301 posts
LED lighting using variable AC
Posted by rrswede on Saturday, January 3, 2015 9:48 PM

For some time I have considered incorporating LED lighting in my layout. I have seen after market offerings for LEDs operating between 5 -19 VDC, prewired universally for AC or DC power sources,  (http://www.modeltrainsoftware.com/bl-212.html). The circuitry includes bridge rectifier, capacitor, resistor and lamp and I have been tempted to make a purchase. However, I would rather learn something in the process as opposed to simply hooking up a finished product. I am no electronics or electrical craftsman but can reason and follow instructions. I have 50 ea. 3.3 volt 0.066 watt LED lamps from an extra Christmas string rated at 3.2 watts and 0.027 amps that I would love to play with. Is there a generic schematic that shows the correct placement of the various components necessary to wire an LED using variable AC and how do I determine the proper specifications for the components?

Thanks for your input,

swede

   

  • Member since
    December 2001
  • From: Austin, TX
  • 10,096 posts
Posted by lionelsoni on Monday, January 5, 2015 8:44 AM

Hej, Swede.  This is a more complicated problem than you may realize.  If you can find it, an article I wrote for the September, 2008, CTT may get you started.

Bob Nelson

  • Member since
    January 2012
  • 301 posts
Posted by rrswede on Monday, January 5, 2015 11:38 AM

Hej Bob och tack så mycket! I see that it is possible to purchase the 2008 magazine from CTT and I will do that.

Bästa hälsningar, swede

 

  • Member since
    March 2002
  • From: Tucson
  • 336 posts
Posted by webenda on Monday, January 5, 2015 11:47 PM
Hej rrswede,
 
Bob är och förstår Svenska?

Här är en krets som du kan använda med din jul sträng lysdioderRitningen visar AC input, men DC fungerar lika bra

 

LED Driver

 
 
 
 

 ..........Wayne..........

  • Member since
    December 2001
  • From: Austin, TX
  • 10,096 posts
Posted by lionelsoni on Tuesday, January 6, 2015 8:43 AM

Wayne, I'm Swedish on my father's side.  My immigrant great-grandfather, one Anders Svenson, contracted his patronym to a middle initial, adopted his father's surname, "Nilsson", and anglicized the whole thing, to become Andrew S. Nelson.  My Swedish is very rudimentary but improving--my son lives in Sweden with his Swedish sambo.

Bob Nelson

  • Member since
    March 2002
  • From: Tucson
  • 336 posts
Posted by webenda on Tuesday, January 6, 2015 10:42 AM

God mórgon Bob. I thought you were Texan. That is wonderful that you can converse in Swedish. My ancestors were from Czechoslovakia, but only my grandparents could speak Czech. I wouldn't even recognize it if I heard it.

 ..........Wayne..........

  • Member since
    January 2012
  • 301 posts
Posted by rrswede on Tuesday, January 6, 2015 12:00 PM

God morgon till er båda, Bob och Wayne. My parents were born in Sweden but met in the US and married in the 20's. Except when other Swedes were visiting, or my parents didn't want us kids to know what was said, English was the only language used in the household. My siblings and I picked up words and phrases but none of us, sadly, are proficient in the language. 

Wayne, thank you for attaching the circuit diagram. I have ordered the reprint suggested by Bob and will study it before I commit to an approach or, probably, different approaches depending on the lighting requirements I want to satisfy (car lighting versus static lighting, single lamp versus string).

Will repost after I wade in.

Thanks, swede

 

  • Member since
    April 2011
  • From: Southport, Indiana
  • 86 posts
Posted by Mononflyer on Tuesday, January 6, 2015 3:13 PM

I have used these to re-light two of my flyer locomotives and they have been great.  Haven't used them on any passenger cars or other components though.

  • Member since
    January 2012
  • 301 posts
Posted by rrswede on Sunday, January 11, 2015 1:17 PM

Hi Bob, I received, reviewed your article in the 2008 CTT September issue, and have wired several successful LED circuits using a DC wall wort with resistor as well as an AC train transformer, with resistor. I'm sure you or others have also wired AC powered LED circuits that included a bridge rectifier and capacitor. There was no mention of these components in your article and I was hoping there would be. Have you seen any good postings referencing their use and have you seen any good posting outlining a flashing circuit for LED use?

Thanks, swede

 

  • Member since
    July 2009
  • From: lavale, md
  • 4,678 posts
Posted by gregc on Sunday, January 11, 2015 3:08 PM

not sure what may have been said in I assume swedish

leds, like all diodes are current devices and operate over a very narrow range of voltages.  They are dark if too litle and burn out if too much.   (I often use an LM317 as a current regulator, shown above, but not needed in this case).

a common way to control brightness is to toggle the voltage rapidly such as using a 555 timer to output a PWM signal.   That signal can control an LM317 to provide sufficient voltage/current to an LED circuit.   LED brightness depends on the percentage of time the PWM output is high.

an LM317 configured as a voltage regulator can be used to provide voltage to one or more LED circuits using series resistors.   A 555 timer open-collector output can be used to ground the LM317 adjust terminal to lower the LM317 output to 1.25 volts, which is low enough to turn off the LEDs.

greg - Philadelphia & Reading / Reading

  • Member since
    December 2001
  • From: Austin, TX
  • 10,096 posts
Posted by lionelsoni on Sunday, January 11, 2015 6:14 PM

Greg, you didn't miss much--the Swedish was mostly greetings and such.

Swede, I think the simplest answer to your question is that storing energy in capacitors pretty much means that you will be dealing with a DC source to power the LEDs.  That is, the problem falls naturally into two parts:  making a DC supply and then powering your LEDs from that DC supply.

Since my article already covers LED operation from DC, I will just say a little more about making the DC supply.  About all you need for a simple supply is a capacitor and a diode.  For example, connect the capacitor and the diode in series.  Put the series combination across the AC input voltage and use the DC voltage across the capacitor as the output.  Connect the diode's cathode to the positive capacitor terminal; or connect the diode's anode to the negative capacitor terminal.  The capacitor's voltage rating should be at least 1.4 times the highest RMS AC voltage that you plan to use.  The diode's voltage rating should be at least 2.8 times the highest RMS voltage.  The capacitor is going to be charged through the diode once every cycle of the AC voltage and then discharge for 1/60 second until the same point in the next cycle.  So the peak-to-peak ripple voltage on the output will be 1/60 * 1/C * I * V, where C is the capacitance in farads, I the load current in amperes, and V the DC voltage.  For example, a ripple of 10 percent with a load current of 20 milliamperes implies

1/60 * 1/C * .02 = .1

C = 1/300 ~= 3333 microfarads

If, instead of a single diode, you use a bridge rectifier, the capacitor is recharged twice as often, so you need only half as much capacitance.

On a lighted toy-train car, you can use a polyphase bridge rectifier with pickups on both trucks to greatly decrease the flicker and dropouts over dirty track or turnouts, without resorting to connecting the pickups together.  A polyphase bridge has multiple AC input terminals.  Each input terminal connects to the cathode of one diode and the anode of another.  The anode of the first diode connects to the negative output terminal and the cathode of the second diode connects to the positive output terminal.  (Note that the usual bridge rectifier is just a simple two-input-terminal version of this idea.)  You connect one bridge AC terminal to each pickup and the third AC terminal to the frame or wheels.

Notice that when you use any bridge rectifier, the AC input circuit and the DC output circuit can not share a common connection.

I have noticed that, when using LEDs on trains, that the brightness variation with track voltage is not easy to notice.  The brightness does vary, but far less than with incandescent lamps.  The color of the light, which changes greatly with incandescents, does not change at all with LEDs, and specifically white ones.  This also helps to hide the brightness variation.  I have never bothered to try to regulate the LEDs on my trains.

Bob Nelson

  • Member since
    January 2012
  • 301 posts
Posted by rrswede on Sunday, January 11, 2015 6:34 PM

Thanks for your responses, Mononflyer and gregc. I am aware of the LM317 and the 555 timer from scanning posts at another forum, but have felt their use was beyond me until now. I can duplicate what was done in Waynes photo and understand what you stated. I think more experimentation on my part is warranted.

Best regards, swede 

  • Member since
    January 2012
  • 301 posts
Posted by rrswede on Sunday, January 11, 2015 6:42 PM

Thank you, Bob. Your response was coming in at the same time I was responding to Monoflyer and gregc. Let me digest what you stated. I'll be away for the next 10 days but will be back in touch after that.

Regards, swede

 

  • Member since
    March 2002
  • From: Tucson
  • 336 posts
Posted by webenda on Tuesday, January 13, 2015 4:09 AM

Swede, I tried the LM317 current driver with and without a 1000 uF, 35 VDC capacitor. Here are the results in picture form. If anyone needs words, just ask.

LED ouput with and without capacitor.

  

Schematic with capacitor.

 ..........Wayne..........

  • Member since
    January 2012
  • 301 posts
Posted by rrswede on Saturday, January 24, 2015 11:26 AM

I am now back and will have a few days to fiddle with various methods of powering LEDs. Bob, in your post of 12 days ago, you indicated the formula for Ripple Voltage was 1/60 * 1/C * I * V, where C is the capacitance in farads, I the load current in amperes, and V the DC voltage. You used 0.1 as its value to solve for C (3333 microfarads) but I don't see where you inserted a value for V. What am I missing?

Also, could you provide me with a polyphase bridge rectifier part number suitable for use lighting a car? I'm not sure I will resort to using one except to satisfy my curiosity since it appears that track power to two LEDs hooked up as oulined in your 2008 write up, with resistor in series and with pick ups connected together, work just fine.

Wayne, if you happen to read this, I have not forgotten your post and will dig into it, also.

Thanks, swede

  • Member since
    December 2001
  • From: Austin, TX
  • 10,096 posts
Posted by lionelsoni on Sunday, January 25, 2015 8:37 PM
I can't get this thing to let me make a reply that takes more than a few seconds.

Bob Nelson

  • Member since
    January 2012
  • 301 posts
Posted by rrswede on Tuesday, January 27, 2015 11:41 AM

[quote user="lionelsoni"]I can't get this thing to let me make a reply that takes more than a few seconds.

 Bob sent the following information to my email account and asked that I post it here.
 
swede
 
Thanks for your e-mail, Fred.  I am visiting friends in Fairbanks, where I once lived; and I think that the combination of a slow Internet connection, an old browser, and the new forum software have done me in.  I hope that I will be back to normal in a week.  In the meantime, I'll answer you this way and ask you to post for me, if you don't mind doing that.
 
You didn't miss anything--I messed up.  The text should have read something like:
 
...So the peak-to-peak ripple voltage on the output will be 1/60 * 1/C * I, where C is the capacitance in farads, and I the load current in amperes.  For example, a load current of 20 milliamperes and a ripple voltage of 1 volt imply
 
1/60 * 1/C * .02 = 1
 
C = 1/3000 ~= 333 microfarads...
 
I think I started thinking about relative ripple voltage about halfway through writing the post and got it hopelessly confused.

As for polyphase or three-phase rectifiers, I don't know where you would find these ready-made.  But you can easily make your own by using two ordinary bridge modules with their + and - terminals connected together (which will provide for 3 pickups, but can be used with 2 of course), or by adding 2 external diodes to a single module (cathode of one to +, anode of that one to the cathode of the second, and anode of the second to -), or by building one from scratch from 6 diodes (cathodes of 3 to +, anodes of the other 3 to -, and the other cathodes and anodes connected together in pairs).
 
The reason for not connecting the pickups together is to avoid the situation where a lighted car tries to power an unpowered block through the wire connecting the pickups.  This would mean that the locomotive current might be supplied through that wire.  It's not a big deal; but it's not hard to do either as long as you're putting rectifiers in anyway.
 
Thanks for helping me get this out.
 
Bob
  • Member since
    January 2012
  • 301 posts
Posted by rrswede on Sunday, February 1, 2015 1:19 PM

rrswede
...So the peak-to-peak ripple voltage on the output will be 1/60 * 1/C * I, where C is the capacitance in farads, and I the load current in amperes.  For example, a load current of 20 milliamperes and a ripple voltage of 1 volt imply   1/60 * 1/C * .02 = 1   C = 1/3000 ~= 333 microfarads...

Welcome back, Bob. In your post prior to the above quote, you mentioned a ripple factor of 10 percent and in the above quote, a ripple voltage of 1. I understand the correction. V (ripple voltage) equals I (load current) times 1/60, all divided by C (capacitance). Assuming the use of a variable AC transformer with maximum voltage of 20 VAC, would you use something other than 1 for the ripple voltage? Would it be more like 10% of 20 volts? I only pick 10% because you used it and I have read elsewhere that ripple voltage is pretty small.

Thanks, swede

  • Member since
    December 2001
  • From: Austin, TX
  • 10,096 posts
Posted by lionelsoni on Monday, February 2, 2015 12:12 AM

Keeping in mind that 20 volts RMS will result in a peak rectified voltage of 28 volts, 2 volts peak-to-peak ripple should be just fine.  However, you would not want the capacitance to be so low that you would miss the benefit of riding through gaps in the third rail.  The discharge time will be about C/I.  So, with a 20 milliampere load current, 330 microfarads will give you 16.5 milliseconds, which is not a lot.  I would put in as much capacitance as there is room for, perhaps 5000 microfarads, which is about the size of a D cell, and get .25 seconds.  The ripple will be much smaller than needed; but that's okay.

Bob Nelson

  • Member since
    January 2012
  • 301 posts
Posted by rrswede on Monday, February 2, 2015 10:03 AM

Thank you for the response, Bob. Although I didn't mention it in a earlier post, one of the reasons I reviewed your information closer was the fact that the answer to your early example was 3000 microfarads and when I found out its size and cost, I couldn't believe it. Looking up the size of a 5000 microfarad capacitor, I see it is more like 3" diameter by 4" length. Pretty hard to hide and not inexpensive, either. I have some 1000 microfarad capacitors left over from other projects and, for fun, will cobble something together starting small and see what the difference is as I increase the capacitance.

swede

  • Member since
    December 2001
  • From: Austin, TX
  • 10,096 posts
Posted by lionelsoni on Monday, February 2, 2015 10:39 AM

I should have waited before making the last post, because I got it wrong again.  The expression I gave you, C/I should have been V*C/I, which implies a rather smaller capacitor.  However, you may have been looking at a capacitor with a high voltage rating, which would increase its size.  Electrolytic capacitors are particularly forgiving of over-voltage, so there is not much reason to use any safety margin at all.  In fact, they are frequently specified with a "working voltage" rather than the "maximum voltage" of other kinds of components.

I've got to catch a plane now; but I'll take this up again when I've had a chance to recuperate from this trip.

Bob Nelson

  • Member since
    January 2012
  • 301 posts
Posted by rrswede on Monday, February 2, 2015 11:19 AM

Thanks. Have a good flight. I'll wait to hear from you.

I'll be making the trip to Alaska in July. Need some halibut and salmon.

swede

  • Member since
    March 2002
  • From: Tucson
  • 336 posts
Posted by webenda on Saturday, February 7, 2015 12:52 PM

+

rrswede
...when I found out its size and cost, I couldn't believe it.

Photo to add to what Bob said about size and voltage of capacitors.

 

 

 ..........Wayne..........

  • Member since
    January 2012
  • 301 posts
Posted by rrswede on Sunday, February 8, 2015 1:54 PM

Thanks Wayne. Certainly smaller than the dimensions I spotted on the web. 

swede

  • Member since
    December 2001
  • From: Austin, TX
  • 10,096 posts
Posted by lionelsoni on Sunday, February 8, 2015 2:40 PM

Thanks for posting that picture, Wayne.  Yes, that is a reasonable size for an electrolytic for continuous-lighting purposes.

I just looked at the rewiring I recently did in some 2500-type streamliners.  I used a 3-phase bridge, comprising a 1.5-ampere bridge module and a pair of 1N4001 diodes, about 5000 microfarads, and 2 number 53 lamps (120 milliamperes each at 14.4 volts).  Assuming constant lamp current, just to get a rough idea of how long a voltage gap the circuit can fill in, gives 14.5 * .005 / .24 = .3, or about 1/3 second, which looks to me to be satisfactory when the train is moving.

With the much lower current that LEDs would draw, I think that much capacitance would be plenty--and not too large.

Bob Nelson

  • Member since
    January 2012
  • 301 posts
Posted by rrswede on Sunday, February 8, 2015 9:17 PM

In an earlier post, I indicated that I had several 1000 microfarad capacitors on hand and would do some experimenting with them, starting small and working my way up. I started at 470, then added 1000 and then another 1000. At each step up, after removing power, I observed an increase in time before the LEDs were totally dark. The experimenting was on a bench not on a car but, right now, I'm not sure more than 2000 is necessary. I'll find out down the road.

Thanks, swede 

  • Member since
    April 2008
  • From: Ft. Lauderdale, Fla.
  • 682 posts
Posted by balidas on Monday, August 10, 2015 3:16 PM

[quote user="rrswede"]

lionelsoni

As for polyphase or three-phase rectifiers, I don't know where you would find these ready-made.  But you can easily make your own by using two ordinary bridge modules with their + and - terminals connected together (which will provide for 3 pickups, but can be used with 2 of course), or by adding 2 external diodes to a single module (cathode of one to +, anode of that one to the cathode of the second, and anode of the second to -), or by building one from scratch from 6 diodes (cathodes of 3 to +, anodes of the other 3 to -, and the other cathodes and anodes connected together in pairs).
 
The reason for not connecting the pickups together is to avoid the situation where a lighted car tries to power an unpowered block through the wire connecting the pickups.  This would mean that the locomotive current might be supplied through that wire.  It's not a big deal; but it's not hard to do either as long as you're putting rectifiers in anyway.
 
Thanks for helping me get this out.
 
Bob
 

Would this be what you're talking about?

 

http://www.ebay.com/bhp/3-phase-rectifier

  • Member since
    December 2001
  • From: Austin, TX
  • 10,096 posts
Posted by lionelsoni on Monday, August 10, 2015 4:13 PM

Yes.  But purpose-built 3-phase rectifiers tend to be meant for high-power applications.  So they're not usually found in small or inexpensive versions.  Since you can make your own from two much smaller single-phase bridge rectifiers (or one bridge and 2 diodes), that's what I do for toy-train applications. 

Bob Nelson

Join our Community!

Our community is FREE to join. To participate you must either login or register for an account.

Search the Community

FREE EMAIL NEWSLETTER

Get the Classic Toy Trains newsletter delivered to your inbox twice a month