When I was installing automotive switches with LEDs in my RV (voltages from 12.0 to 14.4), I was amazed that I had to go to 47K or even 100K to prevent the switch from acting like a night light and interrupting my sleep.
After that experience, I gave up on LEDs in the switches, and used strictly switch position.
Fred W
I bought one of these and find it helpful. Connect power & LED then add more resistance until you get the glow you want.
Terry
I have never used math. I took a 2.5 k pot and my multimeter and did current checks noting current values for different standard value resistors many years ago.
1k seemed to be the best with about 4 to 5 ma at 12.vdc
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.
Well you DO need the voltage, otherwise you can't calculate the resistor - you need any two: volts, amps, or ohms. From which you cna get the missing value.
Now, the trick here is that the rating given for an LED, typically 20ma, is an absolute maximum - do not go above this unless you are modeling a railfan taking a flash photo. So, OP, your calculation is correct - however, that leaves zero wiggle room - if the power supply is a little higher, even half a volt, you will be well over 20ma. Just one of the things that can happen. Rule of thumb on many things is never exceed 75-80% of maximum. But LEDs tend to be extremely bright, so even less - like 50% of the rated maximum, is a good place to start with an LED - hence the 1K common recommendation. Most LEDs tend to be plenty bright at half current. If the power supply voltage rises - the LED is still safe. If it drops a bit, the LED still lights - so a good compromise.
A little trickier, for something like signals, the human eye perceives different colors differently, plus the different colors of LEDs have different efficiencies. So instead of red, yellow, and green all having the same value resistor, you may need to adjust the values (while always remaining under the 20ma limit) to give an equally bright appearance to all 3 LEDs. If that means one gets a 4.7K resistor, another gets 2.2K, and the third 1K, so be it.
Once you have this figured out, through mostly just trial and error (you can theorectically review the charts in the data sheets for the LEDs for the light output vs current, and then also remember to factor in the eye's varying sensitivity, to determine the precise current and thus the resistor needed, but that's too much math when you cna just start with 1K for each, and then use larger and larger resistors for the brightest color so it matches the one that is the dimmest with 1K.
--Randy
Modeling the Reading Railroad in the 1950's
Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.
My passenger cars have 5 to 10 LEDs per car operating at 1ma or less. Most of my cars total current is under 4ma at 5 volts.
This is a typical heavyweight passenger car, the meter (2ma) is the total current for 6 LEDs, plus five table lamps.
My Model Railroad
http://melvineperry.blogspot.com/
The final conclusion of the last tread is that I decided to build my own signal. That why I puchased the 3mm LED's
Harold
Bayfield Transfer RailwayAlso, resistors cost a few pennies. Get several values and some alligator clip leads, and try various ones out and decide for yourself.
I lost track of your other thread, but one of your goals was for signals. To match the brightness, it's probably subjective, and more trial and error than plugging numbers into a formula.A bread board allows you to insert various components into a board where the holes are connected in a manner where you could compare a red a green LED with several different resistors, at the same time. No soldering needed.
There is also something called a seven decade programmable resistor board. You don't have to buy any resistors, to try a huge number of values, but it would be a one at a time comparison.
My recollection of Mel's experiments on bicolor red/green led's is that the red uses twice the resisitance as the green to get similar brightness.
Henry
COB Potomac & Northern
Shenandoah Valley
a larger resistor or lower supply voltage will make an LED less bright, but probably not as much as you might think.
greg - Philadelphia & Reading / Reading
LEDs are much brighter than they used to be. I don't use anything smaller than 1k, and for things like class lights and numberboards I usually use about 4K to 5K.
Also, resistors cost a few pennies. Get several values and some alligator clip leads, and try various ones out and decide for yourself.
Disclaimer: This post may contain humor, sarcasm, and/or flatulence.
Michael Mornard
Bringing the North Woods to South Dakota!
I just got a box of LED's in 3mm and 5mm sizes with different colors.
Red shows volts of of 2-2.2v Max current 20mA
Green 3-3.4v Max Current 20mA
I am using a 12vdc regulated power supply. Using OHMS Law it look like a need resistors of approx 500 ohms. The circuits I was looking at showed a 1k resistor.
Will this work and what is the effect on the brightness of the LED?