newbie led question
Tracy Brown
Posts: 3
I think this is pretty simple for people experienced in electronics, but hey, you gotta start somewhere.
I was wondering if someone could show me the math required to calculate the resistor required to light a single led from a bs2 pin.
The led is a typical red radio shack model with 2.4V (max), ·20mA (max).
This is what I have so far:
Guessing I need a 470ohm resitor, I calculate the current like so:
I=V/R
I=5v/470
I=10.6ma
Using only one resistor, the best I can figure from the info I've found so far,·I calculate the voltage drop like so:
V=I*R
V=.0106*470
V=4.98
If the voltage drop calculation is correct, then there is no voltage left to light the led.
My theory is that the led does have some resistance (what it is I don't know), and therefore you would look at the circuit as though you have two resistors in series and calculate the voltage drop as such.· I am guessing that if you plug-in the resistance of the led into the equation, the voltage drop would be +-3V.
Could someone tell me how close I am,·or better yet, show me how they would calculate the required resistance?
Thanks,
Tracy
I was wondering if someone could show me the math required to calculate the resistor required to light a single led from a bs2 pin.
The led is a typical red radio shack model with 2.4V (max), ·20mA (max).
This is what I have so far:
Guessing I need a 470ohm resitor, I calculate the current like so:
I=V/R
I=5v/470
I=10.6ma
Using only one resistor, the best I can figure from the info I've found so far,·I calculate the voltage drop like so:
V=I*R
V=.0106*470
V=4.98
If the voltage drop calculation is correct, then there is no voltage left to light the led.
My theory is that the led does have some resistance (what it is I don't know), and therefore you would look at the circuit as though you have two resistors in series and calculate the voltage drop as such.· I am guessing that if you plug-in the resistance of the led into the equation, the voltage drop would be +-3V.
Could someone tell me how close I am,·or better yet, show me how they would calculate the required resistance?
Thanks,
Tracy
Comments
LED_current = (5V - 2V) / series_resistor
LED_current = 3V / series_resistor
LED_current = 3V / 470Ω
LED_current = 6mA
you need to drop 2.6v with a resistor
v = I * R
2.6v = 0.02A * R
2.6v / 0.02A = R
130 ohms = R
hope this helps.
Stayed tuned.....I am sure more interesting questions will follow!
Thanks again,
Tracy
The 2.4 Volts is a consistent voltage drop across the LED when it's "On" and conducting, and is true for a range of currents (10 mA to 20 mA or so).
So, the equation becomes:
V = I * R. Now we subtract out the voltage the LED will be dropping. This means the voltage/current equation across the resistor will be:
(5 - 2.4)/ I == R. Or 2.6/I == R, or if I == 12 mA, 2.6/0.012 == 216 Ohms. 220 ohms is a typical value to use, making 2.6/220 ohms == 11.8 mA, which is still plenty.
I had noticed that problem with Computer Geek's response, but the "process" that is used is what I was looking for. Thanks for your response as well, as it does explain to me exactly what I need.
It's kinda funny that you can find numerous examples of more complicated circuits on the internet and in other documentation, but it seems that everyone has forgot to explain how to take the first step. I am positive there is an example somewhere that shows how to light an led and how to select the proper components, but I couldn't find it.
The parallax board that I have already has the leds and resistors built-in. This is great for experimenting with code, but it doesn't explain how to select components "off the shelf". That said, I know that is not it's purpose.
Sorry, I got a little off topic.
Thanks again guys!
Don't be. There are plenty of us newbies lurking here who learn a lot from questions like this. Great answers too.