Skip to main content

Hello Fellow Hi-Railer!

I need your help! I am finally at a point where I can begin purchasing electronic components for wiring Lionel 072 switches to a control panel.

I plan on controlling all my switches from the control panel by using SPDT (ON)-OFF-(ON) Momentary toggle switches and Red/Green LED indicator bulbs. I want to stay away from having to provide diodes for every LED. As a result, I came up with the following approach that I think will work (see image below).

As you can see, I would like to power the switches through a single bridge rectifier using an 18V AC source from one my ZW transformers. The rectifier converts/reduces the 18V AC to approx. 16V DC; which is perfect for the switches and their bulbs.

DC-Powered Switch

I'm guessing that the positive side of the DC current is connected to the switches external power plug. But.....where do I connect the negative side of the DC current (refer to the RED question mark below)? Do I connect it to the AC ground? Can the negative side of DC current coexist with an AC ground? Or maybe I don't connect it all? But wouldn't that leave an open DC circuit?

I sincerely hope someone can help!

 

Attachments

Images (1)
  • DC-Powered Switch
Last edited by Junior
Original Post

Replies sorted oldest to newest

One more step you may want to take if you have many switches - power half from your "+" terminal on that rectifier, and the other half from the "-" terminal to keep the load balanced on the ZW and avoid sporadic whistle/horn operation on the tracks. If you switch to a separate transformer for switch power, this isn't as critical.

This will require you to switch the common legs of your LEDs(& resistor) powered by the "-" too, as the polarity they will see is reversed. If you are using a single bi-color LED, this won't work, so a separate power supply is recommended.

Last edited by ADCX Rob

I was always planning on using a ZW dedicated to powering the switches and all the accessories; seperate from the other ZWs (I was however, planning to phase all ZW's and connect them together via the Common terminals......should Inot do that and keep the accessory ZW completely seperate??). 

But you've peaked my interest. If I understand what you're saying, DC current can "sneak in" to the center rail through the switches external power tap? Is that correct? 

Dedicated is fine, common ground is fine too, but DC won't "sneak" in, it will present as a bias/offset in the secondary winding if one of the phases, + or - , is loaded heavily and the other is not rather close to equal. The return will always be to the originating transformer unless it's a MASSIVE short, so the Acc transformer load should have no effect on the train transformers.

Im curious what the purpose is of using a bridge rectifier here?  you're only using one diode in the bridge, and a single diode usually costs about 10-20 times less than a comparable bridge, Ex. 10A rectifier diodes are about 10 cents each, 1A ones are a penny or less.

bridge flow

Also note that your LEDs are not really seeing a lower voltage here.  Sure the RMS value of the voltage is about 7/10 of the input voltage with half wave rectification, but you still have a full wave peak-to-peak voltage being shoved through your LED 60 times a second.  Not a big deal if you know it going in, but likely to kill your LED's in pretty short order if you set them up for 16 volts when in reality you have as much as 28 volts running through them. 

JGL

Attachments

Images (1)
  • bridge flow

Hello John.....glad to meet you. To answer your questions about why I'm using a bridge rectifier....
1. I'd like to minimize the soldering work I'd have to do per LED,
2. I have the bridge rectifiers from other projects, so I thought I'd put them to good use.

I used 16V output based upon the voltmeter reading. But I think I see my error. The voltmeter is giving me a false reading?

I can use resistors based up on a 28V peak. But for me to undestand what you're saying, I should not plan circuits using the average voltage, but use peak voltage? I did some research and found the following formulas.....
     PeakV = RMSV * 1.414         26.2V = 18.5V * 1.414 ....... which is the value I should use?
     AverageV = PeakV * .637     16.7V = 26.2V * .637 ......... which is the value I DID use (matching what the voltmeter showed).

Am I on the right track here?

JohnGaltLine posted:

...

Also note that your LEDs are not really seeing a lower voltage here...

With half-wave rectification  or using just 1 diode of the bridge, the average voltage thru the LED load is about 1/2 that of using all 4 diodes of the bridge.

Also, in your diagram, it's not clear whether your red-arrows are meant to indicate actual current flow.  In the Reverse Phase Flow, there is 0 current flowing from the power source on the left.  Hence all the red arrows are "0" and there is no "circuit" path.  The LED load gets nothing.  I agree that the LEDs are pulsing on and off 60 times per seconds...but they are unpowered half the time.

bridge%20flow

Attachments

Images (1)
  • bridge%20flow
Junior posted:
...

     AverageV = PeakV * .637     16.7V = 26.2V * .637 ......... which is the value I DID use (matching what the voltmeter showed).

Am I on the right track here?

To be clear, are you measuring the DC voltage at the output of the bridge rectifier (i.e., between "+" and "-" terminals)?  That is NOT the relevant voltage to measure.  That voltage will be essentially double the voltage available to the actual switch motor and switch LEDs.  Take you DC voltmeter and measure the voltage between the "+" terminal of your bridge and the outer-rail or "ground" voltage.  I believe you'll see about 8V DC (instead of 16V DC).  A DC meter reads the average voltage. 

This may make you wonder how the switch machine can be working if there's only 8V DC.  But that's 8V average and there are peaks of near 25V DC as you calculate.  For the most part, switch machines are very quick to respond and the peaks are enough to make them work.

Rtr and Junior, That .637 ought to be .707 first off.  As to what it means, it is a conversion based on average voltage of a sine wave.  AC voltage is typically measured in RMS.  Root-Mean-Square is calculated by measuring the voltage many times as it rises and falls through the sine wave, then squaring the values (ex: 3x3=9), the squared values are then averaged, and finally the square root of the average is is reported as the reading.  The point of all the math is that this RMS value shows the amount of actual work the AC power can do.  Many early true RMS meters used a heating element rather than do all the math.  Essentially an AC voltage in RMS will produce the same amount of heat as that same voltage in DC.  The 1.4141/.707 figures are only accurate on a pure sine wave, however, and as these are used on many cheap meters you can get screwy results if measuring the voltage on other waveforms, including track powered by modern transformers.  

Stan, sorry for the crude drawing.  It was only meant to show the possible path for electricity to flow. When the phase is going one way it has a path, in the other direction it does not.  The point is that a bridge does nothing when used in the method used above in the post, only one of its diodes is being used.  

Junior, Already having them is a good enough reason to use the bridges, I suppose, but it may be worth ordering a dozen diodes for a buck instead, and saving the bridges for something where they are needed.  

On the last point, The switch machines won't care if they get half-wave power or what the peak voltage is.  They only care about the average, or RMS voltage.  The LED's on the other hand do care about peak voltage.  Typical LEDs are intended to operate on a current of around 20mA, and most will fail in short order with currents much higher.  Looking at a random LED data sheet shows a 30mA max forward current.  That figure isn't an average, it's a maximum peak, and every time it is exceeded it does damage to the LED until the LED fails. if one optimized for 20mA at 16VDC, at the true peak to peak of the wave form from an 18VAC supply they would be pushing about 32mA through the LED.  it's just for an instant, but all those instants 60 times a second do add up, and after some time, much less than it should last, the LED will fail.  

JGL

Hello Stan2004.....glad to meet you. I measured DC output voltage right on the + and - terminals of the rectifier.

My concern is about the LEDs and pairing them with the appropriate resistor so I don't blow them up (I've not order any electronic components for my control panel and will hold off until this discussion thread has ended so I know what to get).

Thanks for chiming in :-) ........

JohnGaltLine posted:

Rtr and Junior, That .637 ought to be .707 first off. 

I disagree.  The 0.637 is indeed 0.637, or more precisely 2/pi.   Pi being the mathematical pi 3.1415...

sinewave

The math is somewhat nerdy but is exactly calculated by using integrals as shown above.  What you are calculating in closed-form (in that there is an exact mathematical solution), is the average value of a half-cycle of a sine wave.  So this is done by integrating the sine function for a half-cycle (or 0 to pi), then taking the average by dividing by pi.  Pretty geeky but that's what it is.

If junior is/was measuring the DC voltage at the output of the bridge rectifier he will indeed measure about 0.637 x the peak voltage.  But I'm pointing out this is not the relevant DC voltage to measure since the switch machine and LEDs see only half of that average voltage in the method it is hooked up (using only 1 diode of the 4 available diodes).

Attachments

Images (1)
  • sinewave
Last edited by stan2004

JGL,

Thanks for the explanation. I knew what the 1.41 and .707 were, but the .637 threw me. Then Stan didn't say anything about it in his post so I thought it was something I hadn't seen before. Probably didn't want to over complicate things there. Anyway, I didn't know some of the details you explained, so I know more than I did. And that is what usually what happens when you ask questions around here! Lots to learn and this is the place to learn it. Thanks again.

Edit:

Woops! Guess I was too slow in composing my post. Now I see why Stan didn't say anything above! Thanks Stan, now I have learned even more and this is all new for me, never heard of this before. I better save this one.  Thank you for explaining it to us!

Last edited by rtr12
gunrunnerjohn posted:

Stan, shouldn't you consider the voltage drop of the diodes as well?

GRJ is of course correct.  I was careful to insert the term "IDEAL" bridge rectifier for the purposes of discussion and to work through the "math".  But, yes, a diode drops about 0.7V DC when it turns on so any DC measurement output will be a tad lower.

I haven't seen it in model train electronics, but what amount to "IDEAL" bridge rectifiers are now routinely used in electronic devices.  They go by the name synchronous bridge rectifiers where 4 transistors are used instead of 4 diodes.  Transistors turn on with essentially zero voltage drop whereas the conventional diode eats 0.7V or so.  There are tiny little men hiding behind the curtain that tell the 4 transistors when to turn-on (diodes know when to turn on with no external assistance).

JohnGaltLine posted:
...

On the last point, The switch machines won't care if they get half-wave power or what the peak voltage is.  They only care about the average, or RMS voltage. 

I need to disagree here too.  I assume we're talking about those solenoid-coils that push/pull a steel pin to throw the switch?

The current flowing in the coil generates a magnetic force proportional to the instantaneous current.  A solenoid can do its thing in a fraction of a second.   Consider the example values shown above for the one-diode method.  The average voltage applied to the solenoid would be 7.2V DC.  If this were a steady (non-varying) 7.2V then the coil will have a fixed (non-varying) current of some number of Amps generating a steady magnetic push/pull on the pin. 

But this 7.2V DC is really a pulsed half-sine wave that peaks at about 22V DC.  So for brief instances the Voltage jumps up to some 3 times the average voltage.  And at the peak the force generated by the solenoid also jumps up to 3 times whatever force was generated by that steady (non-varying) 7.2V.  It is during this peak pulse when the job gets done by the solenoid.

So bottom line, the solenoid does indeed care that the 7.2V DC has a peak voltage several times that.   I suppose one could experiment but I don't think a fixed 7.2V DC will reliably fire the typical solenoid-coil switch machine.  Maybe someone knows.

Stan, I think this is the same reason that many claim that chopped waveform transformers do a better job with smoke for conventional operators than pure sine wave transformers.  Only in this case we're heating a resistor.  If you double the voltage, the power goes up four times so there's not a 1:1 relationship.

Last edited by gunrunnerjohn

Well, I sometimes think the triac was the the worst invention EVER for train electronics!    If only we could have bypassed the 60's (60 Hz that is) and jumped right to the modern switching frequencies of 100's of kHz or MHz.  I marvel at how you now buy a home-theater amplifier that puts out over 1 kW of clean AC waveforms at about 10 cents per Watt or less.  By using the class-D and related modulation methods we could easily have "pure" sine variable train transformers and none of this chopped-sine vs. pure-sine, peak vs. rms, and all that nonsense.

Last edited by stan2004

On the coils, I agree that the instantaneous current is what gets the work done, but in practical application they only need to dissipate the average current.  In the application of a switch machine coil there is no need to worry about the peak current here, though one could go into the the details all day, but what it comes down to is that the coils can handle being over-driven much better than the LEDs can, and likely the coils are designed to support a 18VAC input anyway.  

On the .707 vs. .637 subject, I've seen both numbers used for the same thing.  I prefer .707 for a couple reasons.  There seems not to be any debate over using 1.414 to convert the RMS voltage of a sinusoidal wave to its peak to peak voltage.  At least I can't recall any other other number but the square root of 2 being used anywhere.  As such, it makes more sense to me to use the reciprocal of SqRt 2 (1.4141) when reversing the calculation.  That is .707 times peak equals RMS of the sine wave.  

Take for example a pure sine wave AC voltage of 18.000 VAC RMS.  One can easily discover the peak to peak voltage of this source by multiplying by 1.4141 (sqrt 2 rounded off).  That equals 25.4538 volts peak to peak.  Now when one has the peak to peak voltage and wants to determine the RMS voltage there should be some similar simple conversion.  That is where .707 or .637 comes in.  

Say you know you have a peak to peak voltage of 25.4538 volts and you want to know what the RMS value is.  Now from the previous example we know that this is 18 VRMS but what do we use if we did not know?  Well some folks like .637.  So, 25.4538 * .637 gives us about 16.214 volts RMS.  On the other hand, 25.4538 * .707 gives us 17.996 volts RMS   One of these is clearly much closer to the actual value.  

Now I am open to the idea that the square root of 2 may be the number that is wrong here, but I've never seen anything to suggest that before.  


All the theory aside, Junior, use a 1.5k Ohm resistor in series with your LEDs and they should work well at voltages of 10-20 VAC on the input side.  Assuming a typical LED designed for maximum output at 20mA of current.  

JGL

JohnGaltLine posted:

All the theory aside, Junior, use a 1.5k Ohm resistor in series with your LEDs and they should work well at voltages of 10-20 VAC on the input side.  Assuming a typical LED designed for maximum output at 20mA of current.  

JGL

Actually John, you can use a whole lot lower resistor than that as long as you have reverse voltage protection using a diode or you've connected two LED's in reverse polarity to protect each other.  Let's just assume you have .707 of the RMS voltage to consider since the LED only see half of the cycle.  I get around 14 volts, and I'm dropping at least two across the LED.  So, we're talking about 12 volts or less, at 20ma, that's a 600 ohm or larger resistor.  LED's will tolerate peak currents of multiple times their continuous rating, so this is a pretty safe number.

gunrunnerjohn posted:
JohnGaltLine posted:

All the theory aside, Junior, use a 1.5k Ohm resistor in series with your LEDs and they should work well at voltages of 10-20 VAC on the input side.  Assuming a typical LED designed for maximum output at 20mA of current.  

JGL

Actually John, you can use a whole lot lower resistor than that as long as you have reverse voltage protection using a diode or you've connected two LED's in reverse polarity to protect each other.  Let's just assume you have .707 of the RMS voltage to consider since the LED only see half of the cycle.  I get around 14 volts, and I'm dropping at least two across the LED.  So, we're talking about 12 volts or less, at 20ma, that's a 600 ohm or larger resistor.  LED's will tolerate peak currents of multiple times their continuous rating, so this is a pretty safe number.

Perhaps I see the confusion now.  in this example you are multiplying the RMS of the input to get the RMS of the output.  It is entirely possible that .637 is the correct number to obtain the desired value.  Unfortunately, to my way of thinking, anyway, this RMS value to the LED is a useless number.  Now it may be that I am off base here and that there will be no harm done in repeatedly overdriving an LED, but it has been my understanding that even brief surges over current will damage LEDs over time.  GRJ seems to suggest this is not the case, but I can't confirm it looking at the data sheets of various LEDs.  

The figures I'm using instead of showing 14 volts passing through the LED show 25.5 volts  on each peak though it is only about 13 volts RMS.  If the LED will remain undamaged by being driven over current on each cycle than it's all academic and doesn't matter for a practical application. 

JGL

JohnGaltLine posted:

...

On the .707 vs. .637 subject, I've seen both numbers used for the same thing.  I prefer .707 for a couple reasons.  There seems not to be any debate over using 1.414 to convert the RMS voltage of a sinusoidal wave to its peak to peak voltage.  At least I can't recall any other other number but the square root of 2 being used anywhere.  As such, it makes more sense to me to use the reciprocal of SqRt 2 (1.4141) when reversing the calculation.  That is .707 times peak equals RMS of the sine wave.  

.

What junior researched and posted earlier is correct.  Just as there is an exact calculation for the average DC voltage, there's a separate but also an exact calculation for the RMS voltage.  By definition RMS is the square-root of the mean squared voltage.  So you take the sine wave, square it, integrate it over one cycle (2 pi radians), take the mean (by dividing by 2 pi), then take the square root.  A miracle occurs and it all washes out to the square-root of 1/2 (0.707) times the peak value of the sine wave A.

where does rms come from

I want to leave no doubt in any OGR reader (not that any are actually slogging through these math bogs...) that average voltage and RMS voltage are two precisely defined but separate values.  The relevance of each depends on the application...for example incandescent bulb brightness or smoke heater power are indeed governed by RMS voltage.

In my opinion it is sloppy to use 0.637 and 0.707 interchangeably but to each his own.  I prefer the correct number used for the correct purpose. 

Attachments

Images (1)
  • where does rms come from

Thank you all for the amazing discussion! Speaking with you all has yet again shown what an amazing, valuable source of information this forum is. And as always.....this forum is only as good as all of it's varied, well informed and experienced participants.

As for me, I will move forward with using the single bridge rectifier and 1.5K ohm resistors in series with my LEDs.

Thank you all again! And who says trains are "just" toys!! :-)

Note that there are a multitude of applications where an LED is driven many times its average or nominal current.  Probably the most familiar example might be the flash LED in a smartphone camera.  Here it might be driven, say, 10 or more times the nominal current for a very brief instant.  But if you activate the smartphone's flashlight mode, that same LED would not be driven at the same current as the momentary flash or else that LED would smoke in short order.  As with most electronic devices, there are ways to build an LED to better handle an application where the peak current is many times the average current.  But for a general purpose, hobby-grade red/green LED for a model train control panel I can't imagine any manufacturer would bother with the extra engineering effort and documentation.  In other words you get an it-is-what-it-is behavior.

Frankly, what I'm thinking is how to chuck all this peak, rms, average, half-wave, full-wave stuff and go direct DC.  I realize you already have the ZW but it kind of bothers me that it is being drafted for fixed-voltage DC service.  Yes, I get the story about using only 1 diode of the 4 in a bridge-rectifier but an entire ZW.  Plus, there's Rob's observation that you are only using "half" of the AC signal as currently configured.  Not sure what your direction is there.

Anyway, I see that you can get a DC wall-wart adapter/brick for about $10 on eBay that would put out regulated (fixed/smoothed) DC.  These so-called universal laptop chargers are compact 90 Watt bricks with a switch to select the DC output voltage (15V, 16V, 18.5V, 19V, 19.5V, 20V DC for example shown below) and they put out 4.5 Amps or more.  Note the size relative to that of a ZW!  Plenty of power for your switches/LEDs.  

universal 90w dc output brick

 

 

 

 

Attachments

Images (1)
  • universal 90w dc output brick
Last edited by stan2004

BTW, one other thing I don't think was mentioned yet.  If you stay with AC and the diode, the LEDs are pulsing on and off 60 times per second.  It's kind of an age thing with most guys claiming they can't see this flicker but then again the average OGR reader is bit older than a teenager!   Anyway, you probably don't have that many LEDs and you're using the LEDs for indication rather than illumination (room lighting) so maybe it's no big deal.  But if you happen turn your head looking at your control panel you will indeed see a sort-of strobing pattern which of course you'll get used to.  OTOH if you start with regulated-fixed DC voltage the LEDs will be solid-on, no pulsing.

This has been a very interesting thread but often got above my head.  Can you recommend an LED  solution for those of us who don't want  to "build" our own controller?  I am using O22 switches using a separate transformer for constant voltage.  For now I am planning to use original controllers which means three bulbs (1 clear, 1 red, 1 green) for each switch or about 15 watts per switch.  I found direct replacement LED bulbs for $2.00 each or $6.00 per switch plus shipping at Town and Country Hobbies.  Has someone found another less expensive solution?  With 15+ switches, the cost of LEDs vs. power required for incandesants needs to be evaluated.

In the original post, JUNIOR stated "I plan on controlling all my switches from the control panel by using SPDT (ON)-OFF-(ON) Momentary toggle switches and Red/Green LED indicator bulbs. I want to stay away from having to provide diodes for every LED."

What toggle switches and LED bulbs can be used with the AC adapter suggested above?  Source?   If this has been addressed in a separate discussion, can comeone provide a link?  Thanks

Hey Stan......

I will have 29 Red/Green LEDs as switch indicators and another 10 or so Blue LEDs as block power indicators. So I will have quite a few. And I did see where several of the diode wiring diagrams for LED lighting included a capacitor to even out the the constant voltage peaks; eliminating the flicker.

But....as discussed earlier....a DC wall wart removes all those complexities :-). 

Last edited by Junior
Junior posted:

 

I will have 29 Red/Green LEDs as switch indicators and another 10 or so Blue LEDs as block power indicators. So I will have quite a few.

...

29   

Presumably you're still using the incandescent switch lanterns.  Say ~1 Watt each so 30 Watts.  Then control-panel LEDs at 20 mA from 18V DC is ~10 Watts (=29 x 18V x 20 mA).  So 40 Watts just for lighting...or almost half the power of a typical 90W laptop charger.

My concern is the ability of the DC charger to put out the brief pulse needed to drive the solenoid coil.  Previously discussed was peak vs. average power handling of semiconductors (LED) vs. coils (solenoids).  The flip side is peak vs. average power sourcing of semiconductor power supplies (like a laptop charger) vs. iron/steel coils (AC transformer).  While it depends on specific components involved, there's an argument that a "bare-fisted" transformer ought to be able to handle a short-term surge better than an electronic DC charger circuit.

A compromise alternative might be a fixed AC output adapter/wall-wart going into your bridge-rectifier (using the full-bridge). 

I suppose some experimentation is in order with a DC output charger.   Sustaining the short pulse to drive a switch machine may be all in a day's work.

 

Hi Stan;

One last bit of info....I'm planning on replacing the switch lantern bulbs with 24VDC BA9S (bayonet) white LED bulbs (I chose 24V because I can get 20 of them at a really decent price). The remainder of the switch bulbs are E10 screw base bulbs but the LED supplier is out of stock on those right now.

With that in mind, I'm thinking (hoping) the DC charger would be able to handle all the switches and their associated LED bulbs.

But I can always go back to the bridge rectifier approach.......

Last edited by Junior

For what it's worth you could also use an off the shelf switching power supply like these:

s-l300

which range in price from $3-$35 from various sellers on the auction site in voltages or 5 to 24 VDC and current ratings of 1 Amp to 50 Amps.  

You could also pull a power supply form any old desk top computer made in the last 30 years for a nice 15-30 amp 3.3,5, and 12 VDC power supply.  

JGL

Attachments

Images (1)
  • s-l300

Add Reply

Post

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
Link copied to your clipboard.
×
×