Author Topic: A few questions regarding AC/DC and what size resistor for multiple LED's  (Read 1160 times)

0 Members and 1 Guest are viewing this topic.

dangerboy81

  • Crew
  • *
  • Posts: 78
  • Respect: +78
    • Youtube
I am adding about 16 402 LED's to a building, and I thought I had better check with those in the know before I melt anything down.
In my reading, it seems you can't use AC power for LED's, but I have been, and it has worked fine on other parts of my layout. It is just the AC terminals of an old Bachmann power pack, but with resistors on the LED's it has been fine for a year or more. Why does this work?
Another question. When I was testing the LED's for light bleed through, I wired about 4 LED's to a resistor, and it got hot quick. I am wondering if I don't put a resistor on each wire, and just use 1 big resistor for the whole building, how would I figure out what resistor I would need so it won't get too hot? Is this a bad idea?
If it is recommended to get a different power source, what should I look for? Links would help.
If it isn't apparent by now, I have forgotten so much of the electrical knowledge I once had. Took a few classes in High School, but that was a lo0ng time ago!

mmagliaro

  • Crew
  • *
  • Posts: 6368
  • Gender: Male
  • Respect: +1871
    • Maxcow Online
Re: A few questions regarding AC/DC and what size resistor for multiple LED's
« Reply #1 on: February 17, 2023, 12:47:53 AM »
0
You can power LEDs with AC.  LEDs are just diodes.  They permit the flow of current in only one direction.
So if you hook them to AC, then every half cycle of AC, the LED turns on.  Since it's effectively ramping up and down
60 times per second, it is doubtful you'd notice that with your eye.  The catch is that with white LEDs, you might be in trouble because they are more sensitive to reverse voltage and may or may not get blown by the reverse cycles of AC.   In general,
I just wouldn't do it because who needs the risk?  DC power sources are dirt cheap these days.  You can get a 1 amp 12v DC wall wart for 5 bucks.  And at a nominal 10 mA per LED, you can light 100 LEDs on that.

It's usually best to wire a separate resistor with each LED, just so you can completely control the current that passes through
the LED.   If you start ganging multiple LEDs off one resistor, or stringing them in series off one resistor, they may or may not
light up the same, or even how you like them, and then you can't control the brightness of any individual one by changing its
resistor.

Wiring 4 LEDs to a single resistor should not make it hot.
Can you draw a diagram of how you wired this?


wvgca

  • Crew
  • *
  • Posts: 320
  • Respect: +44
Re: A few questions regarding AC/DC and what size resistor for multiple LED's
« Reply #2 on: February 17, 2023, 07:54:54 AM »
+1
AC can be used, but a bridge and capacitor gives you DC, which LEDs like  much better, they don't tolerate much in the way of reverse voltage ...
and one resistor per LED is the ideal way to go, that way it's easier to adjust individual brightness

peteski

  • Crew
  • *
  • Posts: 32939
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5336
    • Coming (not so) soon...
Re: A few questions regarding AC/DC and what size resistor for multiple LED's
« Reply #3 on: February 17, 2023, 09:46:03 AM »
0
Using a single resistor with several LEDs connected in parallel is  not the recommended practice. 

But if several LEDs are connected  in series, then they will be fine with  a single (also series connected) resistor.  Another advantage is that most of the power will be utilized by the LEDs, so resistor will not get very hot.  But to do this your power source needs to have voltage higher by coupler volts over the total forward voltage of the LEDs.

So  if you have a 12V supply and each (white) LED has a 3V forward voltage, you can wire up 3 LEDs in series (that is 9V) and then only 3 V would  be across the resistor (but still only 5mA or less would be passing through the circuit).

I'm also surprised that the resistors gets so hot.  We usually operate the LEDs at 20 mA or less, and that is fairly low current.  For tiny 0402 LEDs the recommended current is 5mA! But if you connected 4 LEDs in parallel, if you were passing  20mA per LED, then that single resistor would have to pass 80mA of current and I can see it getting hot.

As mentioned using AC power is permissible, but the duty cycle of the LED (the time it is illuminated) will be 50%, so you will need to sent more current through it to get the same brightness as with the same LED powered by DC power.

Bangorboy. show us some examples of the LED circuits you are experimenting with, and we can tell you if those are bad  or good ideas.  As I showed earlier in https://www.therailwire.net/forum/index.php?topic=55469.0, properly calculating resistor's resistance value and power dissipation is simple grade-school math.

If you have problem with hiding the bulk of the resistors, you could use SMD  resistors which are not much larger than the 0402 LEDs. If the circuit is designed properly, there will not much heat generated.

For example that 0402 4-LED circuit with a resistor that got hot: how is everything hooked up, what is the resistance and power rating of that resistor?  Is it running from 12V AC?
« Last Edit: February 17, 2023, 09:49:22 AM by peteski »
. . . 42 . . .

John

  • Administrator
  • Crew
  • *****
  • Posts: 13389
  • Respect: +3248
Re: A few questions regarding AC/DC and what size resistor for multiple LED's
« Reply #4 on: February 17, 2023, 11:34:29 AM »
0
I have several reels of those LED strip lights -- they can be cut appart in regular sections. Solder the power wire to it and hook it up.  The nice thing about those is they have all the capacitors and resistors already onboard, you don't need to solder anything .. I use them in my buildings all the time.

signalmaintainer

  • Crew
  • *
  • Posts: 421
  • Respect: +234
Re: A few questions regarding AC/DC and what size resistor for multiple LED's
« Reply #5 on: February 17, 2023, 12:28:39 PM »
0
In my reading, it seems you can't use AC power for LED's
Sure you can. But LEDs over time really don't care much for the reverse voltage banging on them as the polarity shifts with alternating current. The solution? A regular diode in series with the LED(s) biased the same way as the LED(s) that has a high Peak Inverse Voltage rating, like 100 PIV. A low-voltage AC source can bang away on that diode for a very long time and not faze it, but that diode will allow the forward voltage to pass through so the LEDs work. Be aware that this diode will drop about 0.7 volts.
NSMR #1975, RMR #4

dangerboy81

  • Crew
  • *
  • Posts: 78
  • Respect: +78
    • Youtube
Re: A few questions regarding AC/DC and what size resistor for multiple LED's
« Reply #6 on: February 17, 2023, 03:01:20 PM »
0
Ok, I'm on break at work but let me try to update this. I have no circuit diagram. I am just putting LED's here and there to simulate the lighting you would get in a shop. I was just going to have all the wires join  together at the power source which was an old Bachmann controller. I used the AC terminals. I would have liked to put 1 big resistor to do all the LED's, but I can add resistors to each wire. I have a roll of SMD resistors that I use when I add lights to my decoders. I was just trying to avoid soldering all those little resistors, but I can, no biggie. The LED's I ordered came with the bigger resistors with long leads coming off of them. I didn't know they would come in the package. Not sure what the rating is for them. I can look at the colour bands when I get home and read them. That was what I used when I had 4 hooked up to 1 resistor. It was just a test so I twisted the LED wires together, twisted them to 1 leg of the resistor and it got hot. Like Peteski said, probably 80miliamps going through that resistor.
I ordered a  DC power source off that jungle website, should be here tomorrow so I won't have AC going to the LED's anymore.

peteski

  • Crew
  • *
  • Posts: 32939
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5336
    • Coming (not so) soon...
Re: A few questions regarding AC/DC and what size resistor for multiple LED's
« Reply #7 on: February 17, 2023, 04:30:32 PM »
0
If resistors were included then they are probably 1/4W 1k ohm.  The color stripes would be brown, black, red, gold.

But why the resistor got hot? How hot was it?

What I'm saying is that with a 12VAC a 1k resistor would limit the current of white LED to about 9mA.  If more than 1 LED was connected in parallel to tat resistor then the 9mA would have gotten divided up between the LEDs.  So if there were 2 identical LEDs in parallel, each LED would conduct around 4.5mA, 4 LEDs, each would conduct 2.25mA, etc.  The number of LEDs would not matter - the total current would through the resistor would still be around 9mA. A 1/4W resistor would get slightly warm, but nowhere being hot.  Maybe the included resistors are only 1/8W or they have smaller resistance value?

Things don't add up. We have a lot of unknowns.  While LEDs are not difficult to use, they are not quite as simple to deal with as light bulbs.
« Last Edit: February 17, 2023, 04:42:34 PM by peteski »
. . . 42 . . .

dangerboy81

  • Crew
  • *
  • Posts: 78
  • Respect: +78
    • Youtube
Re: A few questions regarding AC/DC and what size resistor for multiple LED's
« Reply #8 on: February 17, 2023, 09:45:30 PM »
0
I guess a picture is worth 1000 words, and a video is 30 pictures a second... LOL...maybe a video will explain it better.

« Last Edit: February 17, 2023, 11:27:25 PM by dangerboy81 »

peteski

  • Crew
  • *
  • Posts: 32939
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5336
    • Coming (not so) soon...
Re: A few questions regarding AC/DC and what size resistor for multiple LED's
« Reply #9 on: February 17, 2023, 11:31:52 PM »
0
The video was an excellent idea! 

First the resistors:
The SMD resistor is easy:  it is a 1000 ohm (1k ohm) resistor I would have expected to be included with LEDs from eBay.
The other resistor is a conundrum. Red, black, black, brown? Here is a good website for decoding the color codes: https://resistorcolorcodecalc.com/

Depending on which way the colors are read, it is either a 30 ohm 1% resistor or a 10 ohm 0.05% resistor (that one is highly doubtful as those are high precision expensive resistors).  But either way, 10 or 30 ohms would be way too low to operate LEDs frm a 12V supply.

Do you have a multimeter handy?  Just measure that resistors resistance.  That would leave give us concrete info.  If you don't have a multimeter,  every model railroader (especially ones dabbling in electronics should own one)!  :) You can get a perfectly serviceable digital one for less than $20.

As for the actual LED installation, I would likely install 9SMD) resistors close to the LEDs, and ran a 2-wire 12Vbus connecting the LED/resistor combos to the bus.  Since it would be difficult to solder inside the building, I would have taken some measurements in the building to figure out how to place the LEDs and route the bus, then build and soldered the bus on my workbench, then formed and glued the bus into the building.  The other option John mentioned of using those thin flexible strips of LEDs would also work (my bus is basically a custom home-made version of the LED strip).

But if you just want to bundle all the long wires from the LEDs together, you can do  that and still install the resistors on the outside of the building.  Just instead of one "big one", just install separate resistors for each LED. Or with 12V supply, you could connect wires from 3 LEDs in series and use a single resistor for each group of 3 LEDs. Kind of like Christmas tree light strings of 3.  That would cut down on the resistor count.

Also, since you are using an old throttle for power, you could have used the track voltage output, instead of accessories.  Just crank up the throttle knob to full speed, and you have a nifty source of DC voltage. It is not a filtered DC, but that is not required.  I also suspect that either output from the throttle is more than 12V (if you have a multimeter, you could measure them).  The voltage will affect the resistor values. Actually the resistor values should really be chosen to provide the amount of light you want.
. . . 42 . . .

mmagliaro

  • Crew
  • *
  • Posts: 6368
  • Gender: Male
  • Respect: +1871
    • Maxcow Online
Re: A few questions regarding AC/DC and what size resistor for multiple LED's
« Reply #10 on: February 19, 2023, 12:45:29 AM »
0
That's the 5-band resistor code, not the old 4-band.
And since there is no orange for a tolerance value, the orange band is the first one.

So we have
3  0  0   (orange black black)   x  10^0 (which is 1) black = 300 ohm, with a tolerance (brown) of 1%

300 ohm is way too low to be used for an LED.  They sent you bogus resistors for that.  Well, actually, they
look like very NICE resistors (1/4 watt, metal film, 1%), just a bad value for LEDs.

So with 12v from your supply, and assuming the LED's dropped about 2v, you have 10/300 = 33 mA.  .033 x 10 = .33 watt
about 1/3 of a watt.  So you are overloading the resistor, which is why it got so hot.  Something like  1k would have worked
fine.



peteski

  • Crew
  • *
  • Posts: 32939
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5336
    • Coming (not so) soon...
Re: A few questions regarding AC/DC and what size resistor for multiple LED's
« Reply #11 on: February 19, 2023, 12:57:46 AM »
0
That's the 5-band resistor code, not the old 4-band.
And since there is no orange for a tolerance value, the orange band is the first one.

That's what I thought too, but according to https://resistorcolorcodecalc.com/ there is an orange band tolerance.  But since not all you see in the Internet is accurate, this might not be accurate.  I questioned that in my post - that is why I recommended using a multimeter to actually measure the resistance.

I arrived at 30 ohms (or 10 ohms read the other way). either 300, 30 or 10 would be way too low for those tiny 0402 LEDs at 12V. I'm surprised they did not get damaged.  The saving grace might have been that the ancient toy throttle probably does not supply a lot of current and all those LEDs in parallel were able to deal with that current for a brief period  of time.

BTW, white (true-green, and blue) LEDs drop around 3V across them.  2V is  for red, yellow, and standard green.
« Last Edit: February 19, 2023, 01:00:48 AM by peteski »
. . . 42 . . .

dangerboy81

  • Crew
  • *
  • Posts: 78
  • Respect: +78
    • Youtube
Re: A few questions regarding AC/DC and what size resistor for multiple LED's
« Reply #12 on: February 19, 2023, 07:49:41 PM »
+1
Just to update this, even 2 LED's made that resistor get hot, I have not been using them. I have been soldering my 1k resistors...1 resistor per LED. Man! Why did I think I needed so many lights in this building! LOL
My DC power source came in yesterday. It works fine. I was worried the other part of my layout might have some LED's wired backwards, but nope, they all light up.
When I bought that roll of smd resistors, I didn't think I would ever use them, thats a lot of ditch lights, but a lit town would sure go through them!
Adding LED's by Leon Richard, on Flickr

peteski

  • Crew
  • *
  • Posts: 32939
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5336
    • Coming (not so) soon...
Re: A few questions regarding AC/DC and what size resistor for multiple LED's
« Reply #13 on: February 19, 2023, 11:57:16 PM »
0
Looking good Leon!
. . . 42 . . .

mmagliaro

  • Crew
  • *
  • Posts: 6368
  • Gender: Male
  • Respect: +1871
    • Maxcow Online
Re: A few questions regarding AC/DC and what size resistor for multiple LED's
« Reply #14 on: February 20, 2023, 10:43:15 AM »
0
Since you are using 1k's and it's working, problem solved! 
But I am really curious about what value those other resistors are.  Can you measure one with an ohmmeter?