Which resistor to use for blue led

I decided I wanted to upgrade my experience and understanding.

I want to use this blue led and hook it up in series with a relay. I want to do this so that the power must first go through the led, then it will go to relay. Are leds like Christmas lights by the way? The theory is, if the led goes out, the relay will not turn on.

You need to know 3 things - the rated current for the LED, I, the forward voltage, Vf, and your
supply voltage, Vs

R = (Vs - Vf) / I

I am having a hard time understanding what relay I need. The formula above tells me how to figure out what resistor I need for the led, but after you consider the led with the added resistor factored in, how do you find out how much... What is the energy unit called that is responsible for flipping a relay? Power, current, amps?

Can anyone help me?

You seriously need to learn OHM'S LAW.

My guess is that you didn't "blow" any leds and that the "k" in "220 k" was either not there or if it was it was typo and with 9 uA the led was not illuminated leading you to think that it was blown.
If I saw a circuit example showing "220 k" for a current limiting resistor where I have seen "220"
like a thousand times, I would automatically think it was a typo and it is possible my brain would
edit out the "k" and I wouldn't even notice it.

All of your questions are the result of not understanding Ohm' Law. Learn it.

What is the energy unit called that is responsible for flipping a relay? Power, current, amps?

AGAIN, read the datasheet for the relay. (or specs on the vendor website, or look it up with Google) It tells you relay current.

Let Vcc = 12V
Let Irelay = 30 mA (0.030 A)
RCLrelay = 12V/0.030 A =400 ohms

The resistor goes in series with the relay coil.
If it is a 5V relay you don't need the resistor.

And BTW,
The word is "ENERGIZE" not "FLIP". At least make an effort to learn the proper nomenclature for
the technology you are "trying" to learn.

My guess is that you didn't "blow" any leds

I am still learning, but looking back on it, the GreenLed Datasheet on page 5 (or see attachment) says not to bend the wires on the led. The Blue led datasheet doesn't really mention the no-bending warning, but is it possible that maybe the bending is what caused the short? I threw the non-working led away, but I am starting to wish I had kept it laying around.

In the attachment, you'll see a picture of a led in a red box. That is what the led looked like when it quit working. Keep in mind, i'm new to this stuff, so i'm not an expert in troubleshooting. What may be common sense to someone that understands this stuff, isn't obvious to someone who is trying to learn.

All of your questions are the result of not understanding Ohm' Law. Learn it.

I'm trying to. I'm trying to learn Ohm's Law, how to read datasheets, and a few other things. I haven't been able to find any good self testing tutorials to make sure i'm on the right track, so i'm reaching out to ask people to check to see if i'm on the right track.

I'll tell you what's going through my head right now and maybe you can lead me in the right direction so I can figure it out myself. Looking at the blue led datasheet, i see the Forward Voltage is 14 V. Now the arduino only puts out five, but as alnath mentioned, you can use a transistor or a fet (included in the kit) to drive 5V to 12V, so maybe the led works in a similar way. Truth is, I don't know.

So using one of Ohms many laws, R = (Vs - Vf) /I at this point the formula looks like R =(Vs-14)/I. Now I also think that Vs is 5V. So the formula now looks like R = (5 - 14)/I. I am getting the gut feeling that I may be way off, but then again, the datasheet says the led has a Reverse voltage of 5V so maybe I subtract 5 from 14. Maybe that goes somewhere else. Right now I understand Ohms triangle law, (see attachment) but that's about my limit to what i'm confident in saying I truly understand. That's why I am asking for help.

So as the equation in my head goes(as of now) R = -9/I
I know a 220 ohm resistor is safe. so I think the equation looks something like this. -9/220 = 0.0409 A.

So if i understand correctly (which I'm really iffy of) the resistor I purchase needs to be able to "ENERGIZE" using .0409 Amps. But then again, as you mentioned which I understood prior to asking for help, the relay itself adds resistance. So theirs even more complexity of which I don't know how to approach the issue. You said I don't need the resistor now, so I'm wondering do I take out the 220 ohm resistor, and substitute the relays resistance in it's place? If so, that would change the .049Amp requirements, which is a factor in choosing the relay.

And BTW,
The word is "ENERGIZE" not "FLIP". At least make an effort to learn the proper nomenclature for
the technology you are "trying" to learn.

I will make an effort to try to remember and cite the "proper term" from now on. Between you and me, in my mind, i'm still having to translate Voltage is water level, resistance is the tap, the stream is the current, and power is the rotating turbine. Please bare with me.

AGAIN, read the datasheet for the relay.

The relay I will use, depends on the output from the led though. I'm trying to figure out which relay to get.

Omhs triangle.png

So if i understand correctly (which I'm really iffy of) the resistor I purchase needs to be able to "ENERGIZE" using .0409 Amps.

Your right you are really iffy.

The resistor does not energize anything it limits the current flow.

You energize a relay coil by putting a voltage across it.

This is why you need them with LEDs.
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

FYI,
If you really do have a led with a forward voltage of 14 V like this one then you need to find
a power supply that supplies 16 to 24V and use a current limiting resistor in series with the led. It says the
forward current is (Typically) 7.5 mA, so for example :

Let Vcc = 18V (two 9V batteries in series)
Let Vf = 14 V
Let If = 7.5 mA
Then,
Rcl(Vcc - Vf)/If = (18V-14V)/0.0075 A = 533 ohms
R = 520 ohms.
4V/520 ohms = 7.69 mA

Get two 9V batteries and get some 9V battery clips at RadioShack (or wherever you get those where you live)
FORGET about trying to convert 5V to 14 V or higher. If you insist on doing that , get one of these

FYI,
If you really do have a led with a forward voltage of 14 V like this one then you need to find
a power supply that supplies 16 to 24V and use a current limiting resistor in series with the led. It says the
forward current is (Typically) 7.5 mA, so for example :

I'm getting the impression that you think it is unlikely that I have that led, which is really making me wonder if I have the correct information. As alnath mentioned on post #13 That Blue led is suppositively the one that comes in the arduino starter kit Now personally, I'm having a hard time believing it is, solely because I have it hooked up with a brown, black, orange, gold resistor (10k resistor) and it's only being powered by the 5V arduino (and the datasheet says it is suppose to run off of much more power) and that blue led appears to still be much brighter than the red or green ones that are hooked up to a 220ohm resister running off of 5V. Now I get it might be I'm going to quote DraZzy here

Also, be careful when comparing LED mcd ratings. mcd depends not only on brightness, but how widely or narrowly the light is focused (review definition of mcd, vs the lumen).

that the light may be narrowly focused, but still. This thing is super bright.

Now they didn't give me a datasheet of all the component specs with the starter pack. But the fact that you said If you really do have a led with a forward voltage of 14 V like this one gives me the impression that maybe the led I have is a different model. I'm so confused.

All I want to figure out, is I want a relay to work in series with a led. The bottom line is If the led isn't on (burned out or whatever), I don't want there to be any chance the relay is on. I just don't know what information I need to search for to find the relay that I need. I'd also like to bi-pass the need for multiple batteries, and only use the arduino power supply. I'm only fond of the blue led because that's my favorite color. I'm very well considering using a green one now just to eliminate the confusion in my head regarding the specs of the blue led.

To have the relay work in seriese with the LEDs is a rearly bad idea. It requires that you know a lot more about your components that you do. I am not sure it is even possible because relay tripping voltages and currents are often totally different from LED ones.

Don,t put them in series You CAN use a relay to turn on the led or put them in parallel with independent
current limiting resistors. The question about the led was just that. A led is not suuposed to conduct
BELOW it's forward voltage. I asked the question because you said it was ON at 5V. The led you threw
away was probably the 14 V led and the one you have running on 5 V is a diffferent one.vThere is more
than one kind of blue led.

To have the relay work in series with the LEDs is a rearly bad idea. It requires that you know a lot more about your components that you do. I am not sure it is even possible because relay tripping voltages and currents are often totally different from LED ones.

The only components that will be used are a led, and a relay. Possibly a resistor or two if needed. I'm not sure what you mean by voltages and currents being totally different from LED ones. I was under the impression relays are like resistors, you can buy all kinds suited for your needs.

Don,t put them in series You CAN use a relay to turn on the led or put them in parallel with independent
current limiting resistors.

Lets say in theory I had an interest in tinkering with something that very well could hurt me. When the relay is on, the device of interest is hot and tinkering with it at that time is very...... dangerous. I would like to have a way to know for certain if that relay is on. If the led is on, I know the relay is on. If I put it in parallel then in this scenario, the led could burn out, yet the relay would still be on. I unknowingly assuming its safe to tinker when it isn't, and I meet the bad news bears. I don't want this.

So by putting the relay in series with the led, the power must first go through the led, which would insure the led is on. If the led is burnt out, power will not go through the led, similar to old Christmas tree lights, and in turn that relay can not be on.

You are STILL not understanding Ohm's Law. If you put two different devices ( a led and a relay,
EACH with DIFFERENT current requirements ONE of them will NOT get the correct current because the current is the SAME through BOTH devices ! That should be OBVIOUS. There is no way the
led (which , by the way, CANNOT be the one with a 14V forward voltage if it is lit at 5V) and the relay have the same current requirements. That's why they should NOT be put in series. They can be put in parallel but you have to calculate the current limiting resistor for each device because they are not the same. You will need two resistors, one for the led, one for the relay.
Are we clear now ? As I stated, you CAN use the relay to turn on the led or have two relays, one
just for the led. Either way they should NOT be in series. If you put the current limiting resistor
for the led with one end connected to GND, you can use an analog input to measure the voltage
across the resistor. If it is not what it should be, you can shut down the relay.

Thomas499:
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.

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.

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.

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

Are leds like Christmas lights by the way? The theory is, if the led goes out, the relay will not turn on.

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?

  1. 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.

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.

I never took a physics class. I'm going to consider putting that on my list of things to do.

:smiley:

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.

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
voltage drop across the resistor using analog inputs. Please make a little effort to research your topic before asking questions. You could have learned all of this with one Google search in the
time it took me to type this post.

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.

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?

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.

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.

  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.

o my understanding a double pole would have two gates.

No not gates switches.

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.