I'm having an issue in a simple (n00b) LED circuite – ended up burning out a couple of LEDs due to some mistake I'm making, but can't figure out what the error is.
I've got a 9v battery, trying to drive two blue LEDs (3.4-3.8v rated, 20mA) in parallel. I calculated necessary resistor as R = (9 – 3.4) / 0.04 = 140 ohms. To be on the safe side, I used a single 180 ohm resistor (brown/gray/brown/gold) in series (battery + to resistor; resistor – to + pole/anode of both LEDs; – pole/cathode of both LEDs back to battery) on a breadboard. Upon briefly connecting the 9V battery the first time, circuit lit; on 2nd connect, it stopped and I smelled distinct LED burnout smell – after which both LEDs would no longer light, even when connected individually to a 3v (2x AA) source.
Would appreciate any advise re: what I'm doing wrong. Thank you!
Thank you for the assistance – so in the circuit I'm considering with 9V battery powering three LEDs (details in my comment above), would the following be the way to go?
What you have suffered from is what I term (I don't know if it's the real name for it) a cascade failure. From your description your circuit is like this:
simulate this circuit – Schematic created using CircuitLab
You have sized your resistor assuming a total of 40mA through a pair of 20mA LEDs. You have also assumed a forward voltage of precisely 3.4V.
If both your LEDs were absolutely exactly 3.4V forward voltage, then you would have a chance of that working, since the current would split evenly between them. However, that will most probably not be the case. Imagine what would happen in that circuit if one LED had just a 0.1V difference in the forward voltage drop? How much current would flow through each one?
Well, most of your 40mA would go through the one with the lower forward voltage. That would get far more than the 20mA limit it's designed for, and the other one would get next to nothing. Yes, they may both light up, but one would be much brighter, at least for a moment, before it burned out.
Now, LEDs normally initially burn out in a dead short. But that short soon overheats and fuses, so becomes an open circuit. So it's like not having that LED there at all. So now all your 40mA is getting pumped through the second LED. That's way too much for it to handle, so it then blows as well.
A cascade: one blowing causes the next to blow. If you had lots of LEDs in parallel like this and could slow down time (maybe with a very high speed camera) you'd see a distinct sequence of them blowing one by one in the order of their forward voltages (at least for the first few - as the currents got too high they'd just all go at once).
So what do you do? Simple - you treat each individual LED as a separate entity - calculate a resistor for each by itself. For this it'd simply be double the resistance, but twice over:
simulate this circuit
So now each branch of the circuit gets its own share of the current, and each branch decides for itself what current it needs - ~20mA each in this case. If one LED should blow the other branch is still, as an individual circuit, getting just the 20mA it needs.
To better illustrate what happens, I have drawn a pretty graph of LED current (note - this isn't a real LED diode graph, just some numbers I made up for illustrative purposes. A real LED graph would have much sharper curves, but it serves to demonstrate my point):
When you have a single resistor limiting to 40mA you're limiting the yellow line (I(tot)). At the point that's at 40mA, ~3.3V, the two LED currents I1 and I2 are very imbalanced - you can see one gets ~18mA, and the other ~24mA. The one with 24mA then blows. Now there's no blue and red lines, only the yellow line. I1 becomes 0, and I2 becomes I(tot).