Go Down

### Topic: Which resistor to use for blue led (Read 2808 times)previous topic - next topic

#### Krupski

#30
##### Jan 28, 2015, 07:57 pm
I bought the arduino starter pack, and found that the blue led requires more resistors than the green led does or it blows fairly quickly. The starter pack didn't give any heads up about this. All it says on the Kit Contents paper is that the led's are 3mm which is misleading because it gives the impression that they are all the same.

I've been using multiple resistors for the blue led, but to simplify my breadboard i want to just use one. The problem is, I don't know which one to use or purchase. I went to Radio shack and asked the people there. They didn't know, and they tried a Google search but were unable to tell me which resistor is needed.

I'd like to get all these resistors in one trip.
Green led appears to work well with a 220k
Which resistor is needed for the red led? 220k is my guess but I want to make sure, these leds cost \$2 a piece
Which resistor is needed for a yellow led?
Which resistor is needed for a blue led?

All these led's that I have are the ones that come in the standard Arduino starter packs. I also have a clear one but it doesn't have three prongs like the 5mm, tricolor RGB... It only has two prongs. I haven't messed with it yet, but it must have come in the other starter pack. I do have some plastic strips that I think were designed to wrap around the led so you can make it whatever color you want. If that requires a different resistor please let me know as well.
A typical LED has about a 2.1 volt drop across it and runs at 20 milliamps current. Depending on the color of the LED, the voltage drop will be less (red ones) or more (true green and blue ones). But 2.1 volts and 20 milliamps is a good "catch-all" that will safely work with any LED.

So, you need a resistor in series with the LED and the voltage source. Using Ohms law, R = E / I, you figure out the resistor you need.

Say you want to run the LED from a 9 volt battery. The voltage you need to drop across the resistor is 9.0 - 2.1 = 6.9 volts.

The current is 20 milliamps or 0.02 amperes. So, R = 6.9 / 0.02 = 345. The nearest common value is 330 ohms - good enough.

Now make sure the power rating of the resistor is sufficient. The power the resistor will dissipate is R = E * I,

We need to figure out what the current is because we used a 330 instead of the calculated 345 ohm.

I = E / R, I = 6.9 / 330 = 0.021 amps. Therefore the power is 6.9 * 0.021 = 0.144 watts.

You need a 1/4 watt (0.250 watt) resistor or larger (a 1/2 watt or 1 watt is OK, a 1/8 watt is too small).

So, LED in series with a 330 ohm, 1/4 watt resistor connected to a 9 volt battery = happy glowing LED.

Hope this helps.
Gentlemen may prefer Blondes, but Real Men prefer Redheads!

#### Grumpy_Mike

#31
##### Jan 28, 2015, 09:48 pm
If you want a fail safe indicator system like you say you need a double pole relay. Use one pole to switch your load and the other to switch the LED.

Do you know that an LED can fail short circuit as well as open so putting it in seriese is no garenteed that no indication equals no relay activation.

#### raschemmel

#32
##### Jan 28, 2015, 09:48 pm
The forward current for the 14V led is 7.5 mA (typical, max 10 mA, NOT 20) . Also, a 14 V led will not turn on at 5V. That's physics. The one you are running on 5v cannot be the 14v led.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

#### Thomas499

#33
##### Jan 29, 2015, 05:48 pm
Quote
Do you know that an LED can fail short circuit as well as open so putting it in seriese is no garenteed that no indication equals no relay activation
1. Are you saying if a led burns out, it will not break the circuit? Or are you saying a led is a type of relay? And if it burns out in the on or off mode that's the way it stays? This is what I was trying to find out when I asked
Quote
Are leds like Christmas lights by the way? The theory is, if the led goes out, the relay will not turn on.
Quote
If you want a fail safe indicator system like you say you need a double pole relay. Use one pole to switch your load and the other to switch the LED.
2.Can you explain the difference in using a double pole, and putting the led in parallel with the relay? To my understanding a double pole would have two gates. They would both "energize" at the same time, but one pole would connect the circuit to the dangerous tinkering objective that I want to know if is hot, the other pole would connect the circuit to the led, but the led could still burn out and I would never know until I met the bad news bears.

It isn't clear to me how that is any more reliable than if I put the led in parallel with the relay?

3. If leds are not ideal for this, is there a type of old school light bulb that I can get (preferably colored) that will work well with arduino? I'm thinking like a single Christmas tree light? Can something like that be powered with 5 volts? I know if that burns out it will break the circuit.

4.
Quote
Also, a 14 V led will not turn on at 5V. That's physics. The one you are running on 5v cannot be the 14v led.
I never took a physics class. I'm going to consider putting that on my list of things to do.

#### raschemmel

#34
##### Jan 29, 2015, 06:24 pm
Quote
I never took a physics class. I'm going to consider putting that on my list of things to do.

We can help you but you need to help yourself by doing some research. There' s literally thousands of links explaining relays and leds. You could at least Google the subject see what a DPDT relay is.

Quote
Can you explain the difference in using a double pole, and putting the led in parallel with the relay? To my understanding a double pole would have two gates. They would both "energize" at the same time, but one pole would connect the circuit to the dangerous tinkering objective that I want to know if is hot, the other pole would connect the circuit to the led, but the led could still burn out and I would never know until I met the bad news bears
Relays don't have gates, and a Double Pole Double Throw relay only has one coil. Relays have
contacts and the two sets (three each) are not connected to each other. If you want to know if the relay is energized, just put a low resistance resistor in series with the coil and measure the
time it took me to type this post.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

#35
##### Jan 29, 2015, 07:13 pm
Looking at page 3 of the datasheet, chart titled "Forward Voltage vs Forward Current",
it seems the blue LED will be fairly dim with supply voltage of 5V - allowing ~2mA of current to flow.  We can use that to estimate the internal resistor.
Assume 5V source and Vf of 3.2 for a blue LED:
(5V - 3.2)/.002A = 900 ohm

Using 12V source
(12V - 3.2V)/900 = 9.7mA, which is a little more than the 7.5mA expected from the chart.

You could put the relay in parallel with the coil. The coil will not work in series with the coil, most coils on relays need more than 7.5mA to turn on.

If the diode fails open, not a problem, relay still works.
If the diode fails closed, not a problem, transistor just has to sink 12V/900ohm = 13mA more, relay still works.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### Thomas499

#36
##### Jan 29, 2015, 07:51 pm
Quote
We can help you but you need to help yourself by doing some research. There' s literally thousands of links explaining relays and leds. You could at least Google the subject see what a DPDT relay is.
Of course, I read the entire Getting Started in Electronics byt Forrest M. Mims III book, and page 25 explains what SPDT (Single-pole, double-throw) DPST (Double-Pole, Single Throw) and DPDT (Double-Pole, Double Throw) is. It even shows pictures which are extremely helpful for me to understand.

Now I admit, the book didn't label the parts of the pictures, therefor the thing with the arrow, that obviously changes position when the coil is energized, I just referred to as a gate, because the book didn't tell me otherwise, and I think of a gate as something that can open, and close. Forgive my lack of proper engineering terms. I am trying to learn though! And I did know the DPDT only has one coil. I never meant to imply anything about the coil. I said it had two "gates" which thanks to you I now know for future reference are "contacts".

But that still doesn't give me a way to understand how a DPDT is hooked up like this would be more reliable than if I put the led in parallel with the relay?

Quote
If you want to know if the relay is energized, just put a low resistance resistor in series with the coil and measure the
Yes, there are a lot of ways I could figure out if the relay is energized. But for the same reason new ovens have that Hot light to warn curious kids, I would like to have a visual indication, that even a special needs child can understand.

#37
##### Jan 29, 2015, 08:12 pm
Quote
I would like to have a visual indication
LED in parallel like I showed is the simplest.
Could even use an LED/resistor driven by the Arduino output, will turn on even if things are screwed up somehow from the transistor onwards.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### Grumpy_Mike

#38
##### Jan 29, 2015, 11:01 pm
Quote
1. Are you saying if a led burns out, it will not break the circuit?
I am saying that it could fail open or closed there is no way of knowing which, so you are gambling safety on one outcome, not a wise thing to do.

Quote
o my understanding a double pole would have two gates.
No not gates switches.

Quote
but one pole would connect the circuit to the dangerous tinkering objective that I want to know if is hot, the other pole would connect the circuit to the led, but the led could still burn out and I would never know until I met the bad news bears.
The LED is much less likely to burn out when switched this way because you can control the current and under cook it to give it a longer life. The belt and braces approach is to have this and another LED in parallel with the coil. Then if one indicator fails the other will show the state of the relay. This is called dual redundancy.

Go Up

Please enter a valid email to subscribe