VERY basic math resistor question.

Well, I am trying to learn some of the real math and what it does etc. for practical use as my Arduino won't be here for a week or two so I figure hey! lets design the worlds simplest circuit.

So I decide to light an LED.

This leads me too the datasheet on an LED.
On the sheet I THINK I understood that their were two requirements.

  1. Forward voltage should not exceed 3 Volts.
  2. Forward current should be 20mA
  3. lets use a 9v power supply.

So my next thought IS that this should be easy. Ohms law.
9v/20mA = 4.5kOhm(I think, my decimals need reviewed) BUT, this doesn't account for voltage. How does the resistor play into the voltage etc.

In terms of Voltage, components in series add up. So if your LED drops 3v, how much of the 9v is left for the resistor to drop?

Forward voltage is how much the voltage drop is across the diode when it is on.
So if you hooked it up the anode to a 5v power source (such as an arduino output pin) there would be 2V at cathode.
To control the current, that 2V/20mA would need a 100 ohm resistor.
3V sounds kind of high for forward voltage, I would check that.

The other thing listed is the reverse voltage, such as shown here:
http://www.mpja.com/prodinfo.asp?number=11017+OP
If the Max reverse voltage is 5v such as this one, then 9V is too high to drive it with.

Okay. Thanks.

The numbers are mostly hypothetical so they may not be realistic.

Okay, my LED drops 3v, and I got a 9v supply. So I need to remove 6 volts with the resistor and provide 30 mA of current...

Soooo

6/.030 = 200 ohm resistor?

And what is this REVERSE voltage? Surely people can hook up leds to 9v with proper resistors etc.? (I have no idea what I'm saying, I want more information though.

Your math is correct.

Reverse voltage is how much voltage can be held off before the LED may be damaged when it should be off.
A diode conducts current when a forward voltage is applied, but will not conduct if a reverse voltage is applied, up to a point. Reverse voltages in excess of the maximum can cause the diode to fail.
http://led.linear1.org/what-are-the-electrical-characteristics-of-leds/

If the max reverse voltage is 5v and you using a 9V source, pay attention when hooking things up.

YAY!!! My math is correct.

In regards to "reverse voltage".

What I am confused with is IF my resistor drops the voltage down to the proper level and bleeds the right current, how could the led get burnt out? When it mentions "reverse voltage" I immediately think of what would happen if I wired it backwards etc. (Thanks again so far.)

Well, I had a 12V source with 2 LEDs and a NPN transistor to turn them on/off.
(I also had strings of 5 LEDs from 12V for another indicator, so 12v was conveniently available for these 2.)
What I found was that when off, with the base of the transistor grounded even, the LEDs looked like they were on. If I had 3 LEDs they would turn off okay (but my design called for 2). I ended up using 2 LEDs from a 5v source instead to get them to turn off.
Maybe my transistor had a lot of leakage.
I don't know if your LED will have a similar issue from 9V.

Here's a picture of them on, with the base (middle pin) connected to the emitter (bottom pin) which was connected to arduino ground.
The wallwart power supply was marked 12v, but when measured was actually more like 14.

Sounds like you have had some interesting LED issues. Sounds like a grounding issue and the NPN circuit IMHO...but I have no idea what I am talking about.

As I am a TOTAL noob at this moment I'm more of in the what does these numbers mean...how do I get it to do what it wants phase. Thanks for the guidance so far, I'm sure I will have a BILLION more questions.

One more question.

Trying to apply my new knowledge.

Just supposing, and NO I'm not going to do this, power outlet...

120V to LED(30mA, 3v).
120V-3V = 117V
117V/.030 = 3900Ohm

I was thinking about WHY this might not work and then I asked, How many Watts can the Resistor handle?
Watts = Current x Volts.
.03Amps * 120 = 3.6 Watts.

SOOOO... could I 4 watt 3.9KOhm resistor run this LED from the wall?

You will have 1 lead of the LED at ground yes? While the other leg swings up & down from -60V to +60V effectively?
What is the max reverse voltage of your LED?
I'm thinking it would go POOF! pretty quick :slight_smile:

On the LED/transistor issue, I am not quite sure what it was. The LEDs were not on very bright, not as compared to their on state which was blindingly bright (10000mCD white LEDs, hurt the eyes to look at it), but they were clearly not all the way off either. If I had 3-4-5 LEDs in series it was fine. But 1 or 2, and they would be on some.

Okay, I think I am figuring out how I am confused, I think.

If I am running DIRECT CURRENT is reverse voltage a factor? Cause with AC it would make sense that the whole circuit would blow up from the alternating, but if I had a mythical 120V DC source, would it work?

I'm still confused as hell about this reverse voltage stuff. Is it AC related as my 9V etc. is all DC...I think.

Jaykey:
One more question.

Trying to apply my new knowledge.

Just supposing, and NO I'm not going to do this, power outlet...

120V to LED(30mA, 3v).
120V-3V = 117V
117V/.030 = 3900Ohm

I was thinking about WHY this might not work and then I asked, How many Watts can the Resistor handle?
Watts = Current x Volts.
.03Amps * 120 = 3.6 Watts.

SOOOO... could I 4 watt 3.9KOhm resistor run this LED from the wall?

Not without an addition component. You wall output power is AC, so it offers both positive and negative voltages, swapping back and forth 60 times a second. All is good in your circuit when the AC voltage polarity is such that the led is being forward biased, i.e. cathode terminal negative relative to anode. However when the AC flips polarity the led becomes reversed biased and you run up against the leds maximum reversed bias voltage before breakdown specification. This results in flames, screaming disaster, magic smoke raising in the air. As no current can flow when reversed biased there is no voltage drop across the series resistor so the led 'feels' the full AC voltage and that is much higher then the led's max reverse voltage rating.

So what additional component will save your day in your circuit? Just wire a series diode that will only allow current to flow in one direction, so the led never 'feels' the high reversed bias voltage. A 1N4004 will work fine. This new diode acts like a switch or check-valve, only allowing forward current to flow.

Make sense?

So your LED will be turning on/off eventually, yes? What plans do you have for controlling it?
Here are some simple connections you can make that an arduino output pin can control.

Thanks for the clarification.

To clarify, I'm looking at a data sheet (hypothetical, not real) on LEDs and am trying to design a most basic circuit.

Am I correct in that REVERSE VOLTAGE errr... is only a concern when working with AC?

It is the post below that confuses me.

I see simple example circuits with LEDs, one resistor, an LED, and a power source. Why do these not have reverse voltage issues? What IS reverse voltage. Does it apply to a DC circuit *note, I have not gotten to AC circuits yet, so I know nothing of them. ARGH!!! Tears hair out

Your math is correct.

Reverse voltage is how much voltage can be held off before the LED may be damaged when it should be off.
A diode conducts current when a forward voltage is applied, but will not conduct if a reverse voltage is applied, up to a point. Reverse voltages in excess of the maximum can cause the diode to fail.
http://led.linear1.org/what-are-the-electrical-characteristics-of-leds/

If the max reverse voltage is 5v and you using a 9V source, pay attention when hooking things up.

Reading a little more.
Was this entire extended discussion due to "don't wire it backwards?"

I see simple example circuits with LEDs, one resistor, an LED, and a power source. Why do these not have reverse voltage issues? What IS reverse voltage. Does it apply to a DC circuit *note, I have not gotten to AC circuits yet, so I know nothing of them. ARGH!!! Tears hair out

As long as you have the led wired in the correct direction (anode terminal towards voltage negative terminal), you will never have a reverse voltage problem with a DC voltage series circuit. However if you reverse the polarity of the voltage source (swap + and - terminals), or turn the led terminals around in the circuit, then the led is subjected to a reverse biased condition (turned off) and it's reverse voltage breakdown specification comes into play.

That make sense?

Lefty

How about this then - forget I brought it up, and just make sure your anodes are connected to the high voltage side of your circiuit and the cathodes to the low voltage side as in the example circuits I posted.

If you have a single LED, the +5v can be an arduino output pin, the transistor is not needed, and the 'bottom' of the series LED/resistor can be ground. High output turns on LED.

Or the +5v can be +5v, and arduino connection can be made at the bottom of the LED/resistor. Low output turns on LED.

I would limit current to 20mA thru the arduino tho.

I'm off to bed....

Thank you both for your help etc.

CrossRoads: Will be taking your advice on the Arduino outputs when it arrives. I still have much to learn.

Retro: Thanks for the clear explanation at the end.

I NOW understand. As I learn more I'm sure it will all make better sense.

I'm off to bed. Rest well.

Simple LED resistor calculation:

(Vsupply - Vled) / Iled = R

So for a normal red/yellow/green LED, the forward voltage drop of 1.8V results in:

(6V - 1.8V) / .02 = 210 ohms. Nearest "stock" 5% resistor would be 220 ohms.

For a White or Blue LED with a higher drop, limiting the current more, and using a higher voltage, you would get:

(9V - 3V) / .015 = 400 ohms. You could go with a 390 ohm 5% resistor.

At 5V, 220 ohms will let 20mA through a monochrome LED; 470 limits it to roughly 10mA, and 1K gets it down to approximately 5 mA. Limiting the current saves battery power, but makes the LED proportionally dimmer. If you can remember those 3 resistor/current values, then adjusting upwards for higher voltages is pretty easy.

Remember? Engineers don't need to remember - we just derive it as needed! And then approximate a solution using the parts on hand.