Trains.com

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

LEDs on AC Accessories circuit

3231 views
43 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    December 2004
  • From: Rimrock, Arizona
  • 11,251 posts
LEDs on AC Accessories circuit
Posted by SpaceMouse on Wednesday, October 7, 2020 1:07 PM

1) Okay, I get that it will blink on and off 60 times a second. But can you tell? Will it send an autistic person into seizures? 

2) Can you run LEDs and grain of rice bulbs in parallel off the same circuit. (Without the resistors.) Here's the LED part.

Chip

Building the Rock Ridge Railroad with the slowest construction crew west of the Pecos.

  • Member since
    July 2009
  • From: lavale, md
  • 4,678 posts
Posted by gregc on Wednesday, October 7, 2020 1:14 PM

the intensity of LEDs is often controlled using a PWM signal, turning it on an off quickly.     you would use half the resistor value for the same intensity if only driven half the time.    if you have multiple LEDs to drive, connect two to the same resistor but with one with opposite polarity

you should be able to use the same AC source for LEDS wired above and incandescent bulbs with the appropriate voltage rating

greg - Philadelphia & Reading / Reading

  • Member since
    December 2004
  • From: Rimrock, Arizona
  • 11,251 posts
Posted by SpaceMouse on Wednesday, October 7, 2020 1:57 PM

Greg
you would use half the resistor value for the same intensity if only driven half the time.    if you have multiple LEDs to drive, connect two to the same resistor but with one with opposite polarity

Granted you are talking to someone who gets the heebee-geebees when you start talking Ohm's Law, but this doesn't make sense to me. 

The current is either going the right way or it isn't. It seems the resistance would still be the same.

On the otherhand, using the same resistor for two LEDs and cross wiring them does make sense, because one will be getting juice while the other isn't.  

Chip

Building the Rock Ridge Railroad with the slowest construction crew west of the Pecos.

  • Member since
    December 2004
  • From: Rimrock, Arizona
  • 11,251 posts
Posted by SpaceMouse on Wednesday, October 7, 2020 2:01 PM

On the other hand, and it might be slightly overkill, I have an 800W  computer power supply that delivers 12V DC.

Chip

Building the Rock Ridge Railroad with the slowest construction crew west of the Pecos.

  • Member since
    December 2004
  • From: Bedford, MA, USA
  • 21,483 posts
Posted by MisterBeasley on Wednesday, October 7, 2020 2:01 PM

You could use a single bridge rectifier for a single LED bus with multiple LEDs.  The LEDs will now pulse at 120 Hz, since you are giving them full wave rectification, not half.

It takes an iron man to play with a toy iron horse. 

  • Member since
    December 2004
  • From: Rimrock, Arizona
  • 11,251 posts
Posted by SpaceMouse on Wednesday, October 7, 2020 2:19 PM

MisterBeasley

You could use a single bridge rectifier for a single LED bus with multiple LEDs.  The LEDs will now pulse at 120 Hz, since you are giving them full wave rectification, not half.

Okay, I guess I'm getting an education. If I understand Professor Google correctly, a single bridge rectifier effectively converts AC to DC.

If I had one, that would be great, but for the cost of 5 with free shipping, or one if I pay shipping, I can get two 12V DC power supplies from Amazon.

Chip

Building the Rock Ridge Railroad with the slowest construction crew west of the Pecos.

  • Member since
    July 2007
  • From: Yorkton, Sk, Cnd
  • 441 posts
Posted by wvg_ca on Wednesday, October 7, 2020 2:38 PM

you can also use a diode, either single or in two, to convert AC to DC, it's easier on the LED I think ... plus a dropping resistor in line ... from 12 volt to the two to three that your LED will use ..

a diode or resistor is only a few cents

  • Member since
    December 2004
  • From: Rimrock, Arizona
  • 11,251 posts
Posted by SpaceMouse on Wednesday, October 7, 2020 2:49 PM

wvg_ca

you can also use a diode, either single or in two, to convert AC to DC, it's easier on the LED I think ... plus a dropping resistor in line ... from 12 volt to the two to three that your LED will use ..

a diode or resistor is only a few cents 

I already have a bus with 30 LEDs pre-wired in parallel.

Chip

Building the Rock Ridge Railroad with the slowest construction crew west of the Pecos.

  • Member since
    October 2006
  • From: Western, MA
  • 8,571 posts
Posted by richg1998 on Wednesday, October 7, 2020 5:37 PM

I guess that is why everyone seems to use 12vdc for accessories. Much easier to deal with.

My NCE Power Cab has a 3mm red LED and 1k resistor tied to the output to indivate DCC, a form of AC and does not blink.

Make sure you have fuses with that much power from a computer power supply. I know what those are capable of.

There are online companies that are much cheaper than Amazon for parts.

Rich

If you ever fall over in public, pick yourself up and say “sorry it’s been a while since I inhabited a body.” And just walk away.

  • Member since
    September 2003
  • 21,669 posts
Posted by Overmod on Wednesday, October 7, 2020 5:43 PM

SpaceMouse
Granted you are talking to someone who gets the heebee-geebees when you start talking Ohm's Law, but this doesn't make sense to me.  The current is either going the right way or it isn't. It seems the resistance would still be the same.

What he means is this:  imagine there are two LEDs in parallel, hooked up so they are opposite in polarity.  They share a common resistor.  Since a LED is a diode, when one conducts, the other doesn't, so they can happily share that one resustor.

Now feed it 60-cycle AC.  First one diode lights, then 1/120 of a second later it goes off and the other lights up, and they go on alternating 60 times a second each.  But the only electricity going through the resistor is that which is going through whichever diode is on at the moment.

  • Member since
    September 2003
  • 21,669 posts
Posted by Overmod on Wednesday, October 7, 2020 5:59 PM

wvg_ca
you can also use a diode, either single or in two, to convert AC to DC, it's easier on the LED I think ...

I don't quite get this.  All a diode will do is turn AC into half-wave DC ... but your LED does exactly the same thing anyway; that's what the D in LED is there for.  If the half-wave DC has correct polarity for the LED it will light exactly as it does on AC; if it is opposed, the LED will never light up.  No matter how 'cheap' you get a diode, that doesn't add anything.

Diodes in a bridge rectifier have the effect of reversing the polarity of every half-wave of the AC, so it turns into DC with ripple at 120Hz.  You can smooth this with a proper LC circuit (where the cap evens the voltage and the inductor evens the current) to get rid of any visible on-off flickering, but you may still notice 120hz brightening or dimming -- most people don't find that objectionable.

One fun thing you can do is see the effect of persistence of vision with an LED running on AC (or better yet an LED digital clock with matrix drive) -- light it up in the dark and then quickly wave it or move your head...

  • Member since
    December 2004
  • From: Rimrock, Arizona
  • 11,251 posts
Posted by SpaceMouse on Wednesday, October 7, 2020 5:59 PM

Overmod
What he means is this:  imagine there are two LEDs in parallel, hooked up so they are opposite in polarity.  They share a common resistor.

That's not the part I had trouble with. 

The part I had trouble with is that Greg said since with AC, the current switches the LED on only when it is flowing in the right direction, it is only on half the time, so it only needs half the resistance.

It seems to me, the LED is either on or off even if it's only for 1/60th of a second. It would still need full resistance.

He's probably right. I just can see how.

Chip

Building the Rock Ridge Railroad with the slowest construction crew west of the Pecos.

  • Member since
    October 2006
  • From: Western, MA
  • 8,571 posts
Posted by richg1998 on Wednesday, October 7, 2020 5:59 PM

I guess my point would be, since I have worked with LED's since 1972, I would never try that. Always used DC. What I was taught.

Rich

If you ever fall over in public, pick yourself up and say “sorry it’s been a while since I inhabited a body.” And just walk away.

  • Member since
    November 2005
  • From: Phoenix, AZ
  • 693 posts
Posted by woodone on Wednesday, October 7, 2020 6:01 PM

Well all the LED's need a resistor for its self. I have used LED's on DCC using just the rail power with a resistor to the LED On one leg. I can't see any flicker of the LED. USED on loco's all the time with DCC for H/L.

 

  • Member since
    September 2003
  • 21,669 posts
Posted by Overmod on Wednesday, October 7, 2020 6:02 PM

richg1998
My NCE Power Cab has a 3mm red LED and 1k resistor tied to the output to indivate DCC, a form of AC and does not blink.

Rich, SURELY you do not think that nearly 30V rail-to-rail DCC power is going out to your track in series with that single 3mm LED, do you? LaughLaughLaugh

  • Member since
    December 2004
  • From: Rimrock, Arizona
  • 11,251 posts
Posted by SpaceMouse on Wednesday, October 7, 2020 6:14 PM

richg1998
Make sure you have fuses with that much power from a computer power supply. I know what those are capable of.

I was semi-joking. There are better ways to handle it.

richg1998
There are online companies that are much cheaper than Amazon for parts.

I usually get most of the stuff on eBay, and it's dirt cheap if you can wait for the Chinese junk to sail here. I tried a few online dealers, but with shipping the price was comparable to Amazon. 

What sealed the deal for me is that I am in the process of getting the layout ready for track. I wanted to prewire the Atlas turntable when I cut the plywood to drop it in, even though I won't convert to a wooden bridge turntable for a while. That's when I noticed that the LEDs were hooked up to AC. I wired them for 12V DC. 

I want to close up the top of the layout so I can get the roadbed down. Amazon will get me parts in one day.

Chip

Building the Rock Ridge Railroad with the slowest construction crew west of the Pecos.

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Wednesday, October 7, 2020 6:24 PM

 The LED on the panel is wired across Rail A and Rail B, with a resistor - so it 'sees' the track voltage. Half the time, anyway - in the opposite half of the DCC wave, it doesn;t allow any current flow.

 Rail to rail isn't 30V - it's typically around 15V. One way to measure track voltage without a special meter is to measure Rail A to common, and Rail B to common, then add them. 

 A red LED is ok, as long as it has a resistor - but LEDs in general have fairly low reverse voltage limits. Whereas many regular silicon diodes can withstand 50, 100, 200, 400, or even more volts in the reverse direction before breaking down, LEDs are typically much lower. Typical red LEDs are generally OK, but a lot of white LEDs can be damaged by a reverse voltage no more than their actual forward voltage.

Chip - it's like this. If running the LED on DC, the power is always in the direction that lights the LED. 100% of the time. So the LED is whatever brightness it is based on the amount of current - controlled by the resistor. If instead of being on 100% of the time, you feed it AC, the LED now is only lit up half the time. All else being equal, it will appear half as bright. You cna compensate by using a lower value resistor, so when the LED is on, it's a brighter 'on', raising the average brightness. 

                                   --Randy

 

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    December 2004
  • From: Rimrock, Arizona
  • 11,251 posts
Posted by SpaceMouse on Wednesday, October 7, 2020 6:37 PM

Randy
Chip - it's like this. If running the LED on DC, the power is always in the direction that lights the LED. 100% of the time. So the LED is whatever brightness it is based on the amount of current - controlled by the resistor. If instead of being on 100% of the time, you feed it AC, the LED now is only lit up half the time. All else being equal, it will appear half as bright. You cna compensate by using a lower value resistor, so when the LED is on, it's a brighter 'on', raising the average brightness. 

BowBowBow

Chip

Building the Rock Ridge Railroad with the slowest construction crew west of the Pecos.

  • Member since
    September 2003
  • 21,669 posts
Posted by Overmod on Wednesday, October 7, 2020 6:43 PM

rrinker
 Rail to rail isn't 30V - it's typically around 15V. One way to measure track voltage without a special meter is to measure Rail A to common, and Rail B to common, then add them.

I thought DCC spec was at least 14V either plus or minus (measured from the respective rail to common) with the modulation arranged as on old modems to keep the net electron charge transfer equalized.  That by definition would give you not less than 28V rail-to-rail of the power supply, were you able to get inside and measure it.  If the actual modulation of the 'square wave' signal is only ~7V, which as I recall is around where some sound chips become active, I'd be MUCH less surprised why even small booboos in track lead to functional dropouts...

  • Member since
    July 2009
  • From: lavale, md
  • 4,678 posts
Posted by gregc on Wednesday, October 7, 2020 6:44 PM

SpaceMouse
The part I had trouble with is that Greg said since with AC, the current switches the LED on only when it is flowing in the right direction, it is only on half the time, so it only needs half the resistance.

half the resistance means twice the current.  but if it's only on half the time, the power (Watts) and intensity are halved.   in other words, ~same intensity as with DC when using half the resistance and AC

SpaceMouse
I already have a bus with 30 LEDs pre-wired in parallel.

that's too bad.

i had suggested that you could wire 2 LEDs in parallel with reversed polarity.   this would cut the number of resistors in half, as well address some peoples concern that you should wire a reversed biased diode to limit the reverse voltage across the LED.

but if you're using 12V, you could also wire 2 or more LEDs in series, further cutting the number of resistors.    this may be helpful if you need to replace the resistors.

greg - Philadelphia & Reading / Reading

  • Member since
    December 2015
  • From: Shenandoah Valley
  • 9,094 posts
Posted by BigDaddy on Wednesday, October 7, 2020 6:52 PM

LED "binking" can be seen on some of the Youtube video reviews.  In real life the Terminator can see it, you and I cannot.

Henry

COB Potomac & Northern

Shenandoah Valley

  • Member since
    September 2003
  • 21,669 posts
Posted by Overmod on Wednesday, October 7, 2020 6:52 PM

SpaceMouse
The part I had trouble with is that Greg said since with AC, the current switches the LED on only when it is flowing in the right direction, it is only on half the time, so it only needs half the resistance.

But that is not quite what he said.  Remember that is the LED that 'switches the current on', not the other way around.  You have picked the resistor to get one LED (or the string of them with the same polarity) to the right point.  A resistor knows no polarity; it doesn't care which way the electrons in the I are moving, it only makes heat out of I^2R.  So it 'ballasts' the LED or string that conducts on a given AC half-wave, then does the same thing for the 'opposite' LED or string when it comes up out of 'dioding' and starts to light on the following half-wave.

  • Member since
    September 2003
  • 21,669 posts
Posted by Overmod on Wednesday, October 7, 2020 7:03 PM

BigDaddy
LED "binking" can be seen on some of the Youtube video reviews.  In real life the Terminator can see it, you and I cannot.

Where you see it is if you have sensitivity to motion or change in your peripheral vision, for example if a high myope (badly nearsighted) and the LED is in your peripheral vision.  Normal action of the ocular muscles moves the eyeball enough that perception picks up the jitter.

Interestingly enough, with respect to CRT monitors with short phosphors, 60Hz flicker can be very annoying, but 72Hz is usually better and 75Hz better still -- that small a frequency difference can 'make all the difference'

There is a similar issue with 'digital cinema' where the source is at the same 24Hz presentation as 'film'.  Even with motion-vector steering of a quality 'cost-effective' for home devices, just frame-doubling (to 48Hz) will not get rid of motion effects, particularly at dark/bright edges. It takes frame-tripling to present fast enough to overcome the issue.

  • Member since
    September 2003
  • 21,669 posts
Posted by Overmod on Wednesday, October 7, 2020 7:28 PM

richg1998
My NCE Power Cab has a 3mm red LED and 1k resistor tied to the output to indicate DCC, a form of AC and does not blink.

You are almost certainly not reading any form of "AC" with that LED, you are likely reading very quickly-modulated unipolar DC.  I would suspect there is some physical "blinking" going on, at a somewhat irregular rate corresponding to the modulation, and there is likely an easy way to visualize some of it by using a typical "high-speed" CCD or other staring imager set to 60Hz with very short acquisition and then slow down the 'playback' of the resulting file and see if in some frames the LED appears to be off.

Of course, casually observing the LED, or even moving it in a dark room, shouldn't show flicker at all when the modulation is at data rates...

  • Member since
    December 2004
  • From: Rimrock, Arizona
  • 11,251 posts
Posted by SpaceMouse on Wednesday, October 7, 2020 8:59 PM

gregc
had suggested that you could wire 2 LEDs in parallel with reversed polarity.   this would cut the number of resistors in half, as well address some peoples concern that you should wire a reversed biased diode to limit the reverse voltage across the LED. but if you're using 12V, you could also wire 2 or more LEDs in series, further cutting the number of resistors.    this may be helpful if you need to replace the resistors.

I ordered a bunch of LEDs from China--you know the packs that offer 500 LEDs of various colors, etc. for like $4. They they each came comped with 500 1K resistors. I only use the clear bulbs. 

Is there a reason why I shouldn't run them in parallel each with their own resistor off a dedicated 12V 2 amp power supply?  

By the way, I thought cross-wiring the LEDs to the resistors was brilliant.

Chip

Building the Rock Ridge Railroad with the slowest construction crew west of the Pecos.

  • Member since
    December 2004
  • From: Rimrock, Arizona
  • 11,251 posts
Posted by SpaceMouse on Wednesday, October 7, 2020 9:03 PM

Overmod
But that is not quite what he said.  Remember that is the LED that 'switches the current on', not the other way around.  You have picked the resistor to get one LED (or the string of them with the same polarity) to the right point.  A resistor knows no polarity; it doesn't care which way the electrons in the I are moving, it only makes heat out of I^2R.  So it 'ballasts' the LED or string that conducts on a given AC half-wave, then does the same thing for the 'opposite' LED or string when it comes up out of 'dioding' and starts to light on the following half-wave.

I have neither the schema nor lexicon, but I got you.

Chip

Building the Rock Ridge Railroad with the slowest construction crew west of the Pecos.

  • Member since
    December 2004
  • From: Rimrock, Arizona
  • 11,251 posts
Posted by SpaceMouse on Wednesday, October 7, 2020 9:09 PM

Overmod
You are almost certainly not reading any form of "AC" with that LED, you are likely reading very quickly-modulated unipolar DC.  I would suspect there is some physical "blinking" going on, at a somewhat irregular rate corresponding to the modulation, and there is likely an easy way to visualize some of it by using a typical "high-speed" CCD or other staring imager set to 60Hz with very short acquisition and then slow down the 'playback' of the resulting file and see if in some frames the LED appears to be off.

Of course, casually observing the LED, or even moving it in a dark room, shouldn't show flicker at all when the modulation is at data rates...

LOL! I don't know what a CCD imager is but I gotta get me one of those.

Chip

Building the Rock Ridge Railroad with the slowest construction crew west of the Pecos.

  • Member since
    September 2003
  • 21,669 posts
Posted by Overmod on Thursday, October 8, 2020 4:08 AM

SpaceMouse
LOL! I don't know what a CCD imager is but I gotta get me one of those.

Stripped of the highfalutin' verbiage: a modern digital camera with CMOS imager and global shutter would likely do the job of a CCD, even one with interline transfer, for the required purpose (there is no problem with low light, only timing.)

I am quite sure that any reports of 'blinking' coming from YouTube are artifacts of a digital camera set to a high shutter speed, perhaps with a rolling shutter (which also produces the sort of image distortion early focal-plane shutters capturing fast-moving objects did!) that is imaging lines or areas 'away' from the LED the whole time that it is on.  There are similar problems shooting the LED headlights on ACS-64s in many early videos of them I've seen.  

I'm looking for good normal-language discussions of electronic shutter operation but so far the only ones that actually tell you much use cinematographer-speak ... or worse!

  • Member since
    July 2009
  • From: lavale, md
  • 4,678 posts
Posted by gregc on Thursday, October 8, 2020 5:49 AM

SpaceMouse
I ordered a bunch of LEDs from China--you know the packs that offer 500 LEDs of various colors, etc. for like $4. They they each came comped with 500 1K resistors. I only use the clear bulbs. 

Is there a reason why I shouldn't run them in parallel each with their own resistor off a dedicated 12V 2 amp power supply? 

have you connected an LED and 1k resistor to your supply to check the intensity of the light?     you may want to use a different size resistor

if the LED operates at ~3V, they will draw ~9ma ((12 - 3) / 1k).  (max is typically 20ma)   30 will require 270 ma.    so you could get by with a smaller power supply.

another approach is to wire 3 LEDs in series and another 3 with reverse polarity wired in parrallel to a single 330 Ohm resistor ((12V - (3*3V)) / 9ma).    30 LEDs would need just 5 resistors and they would only draw 45 ma.   an even smaller supply

5 resistors would be easier to change if you wanted different intensity.

 

what are you planning to use these LEDs for in what looks like a sheet of balsa?

greg - Philadelphia & Reading / Reading

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Thursday, October 8, 2020 6:19 AM

SpaceMouse

1) Okay, I get that it will blink on and off 60 times a second. But can you tell? Will it send an autistic person into seizures? 

2) Can you run LEDs and grain of rice bulbs in parallel off the same circuit. (Without the resistors.) Here's the LED part.

 

I guess I missed the point.  The board in your picture has what appears to be 60 1KΩ resistors fed by a bus and 60 holes for LEDs.  A simple 12 volt DC power source should work fine once the LEDs are installed, the resistors look ready to go for 12 volts DC.

60 LEDs running at max 20ma each would be 1.2 amps.  If you want to power them with AC simply use a 2 amp bridge rectifier.  I stock 1amp, 2amp and 4amp bridges that I buy off eBay.

I rarely run my LEDs more then 10ma but even at 15ma 60 would be under 1 amp.  I don't think the LEDs will draw even close to 20ma with 1KΩ resistors at 12 volts so the DB107 rectifier could work fine.

DB107   1amp eBay cost 50 for $4
2W10    2amp eBay cost 10 for $1.75
KBP310 4amp eBay cost 10 for $1

You could parallel the LED source with 12 volt GOR bulbs, lower voltage bulbs would need resistors to operate off 12 volts.



Mel



 
My Model Railroad   
http://melvineperry.blogspot.com/
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Users Online

There are no community member online

Search the Community

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
Model Railroader Newsletter See all
Sign up for our FREE e-newsletter and get model railroad news in your inbox!