Arduino Forum

Using Arduino => General Electronics => Topic started by: Thomas499 on Jan 06, 2015, 05:30 pm

Title: Which resistor to use for blue led
Post by: Thomas499 on Jan 06, 2015, 05:30 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.
Title: Re: Which resistor to use for blue led
Post by: DVDdoug on Jan 06, 2015, 05:54 pm
....With 5V and 220K, none of these LEDs should be "blowing".

Is there a manufacture's part number?   If you are going to spend $2 for an LED, I'd buy from a supplier that either gives you the specs or the part number so you can look-up the datasheet.

Blue LEDs typically have a higher voltage drop, which means a lower resistor value.

If you assume 5 volts applied and 3V across the LED, that leaves 2V across the resistor.  

If you want 20mA, that's 2V/0.02A = 100 Ohms.


Title: Re: Which resistor to use for blue led
Post by: Thomas499 on Jan 06, 2015, 06:05 pm
I bought two starter packs so I have plenty of led's. I'm not going to purchase any for $2. At most i'd probably pay 40 cents for one, but even that seems like a premium price. For some reason I only have 3 or 4 blue ones, where I have upwards of a dozen each of the green and red ones. I noticed the first blue led I used worked well for a while, but after a while it died. I also noticed that it was much much brighter than the green and red leds so I figured what likely happened is the same thing that will happen to a light bulb if you use one that is rated for less wattage than the device you are attaching it to. It is much brighter than the other bulb, but doesn't last very long.

Because I don't have many blue led's I figured to play it safe and use multiple resistors. I did notice with the amount of resistors that I used to get it to appear to be a similar brightness as the red, and green led's, if I hooked a red or green led to the same resistor set up, they were so dim that you could barley tell they were on at all.

So are you saying a 100 Ohm resistor should be enough that the 220k used in the examples is just to play it safe?
Title: Re: Which resistor to use for blue led
Post by: MarkT on Jan 06, 2015, 06:33 pm
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
Title: Re: Which resistor to use for blue led
Post by: alnath on Jan 06, 2015, 06:45 pm
220k ???  :o

with a LED Vf of 2V, it means 3/220000 = 0.000013 A = 0.01 mA
vith a LED Vf of 3V you get 2/220000 = 0.000009 A = 9µA

pretty sure you won't be able to see any light
but you probably meant 220 Ohm ;)

Anyway, you could just use a 220 Ohm resistor , and use a multimeter to mesure the voltage across the LED, you'll then know the Vf for each LED, and you'll be able to chose the resistor which will allow a ... say 10mA current through the LED
Title: Re: Which resistor to use for blue led
Post by: DVDdoug on Jan 06, 2015, 06:47 pm
Quote
So are you saying a 100 Ohm resistor should be enough that the 220k used in the examples is just to play it safe?
Yes.   Higher resistance means less current (Ohm's Law (http://en.wikipedia.org/wiki/Ohm%27s_law)).   Resistance means "resistance" to current flow.

Quote
Because I don't have many blue led's I figured to play it safe and use multiple resistors.
It depends on how you connect multiple resistors...

Resistors in series sum-up and the current will be reduced....  i.e. Two 100 Ohm resistors in series makes 200 Ohms. 

Resistors in parallel reduce the total resistance and increase current.    Two equal value resistors in parallel are half the resistance.    There is a formula for unequal resistors, but the total resistance will always be less than the lowest-value resistor.

Quote
I also noticed that it was much much brighter than the green and red leds
There are a couple of factors at work... 

LEDs vary a LOT in efficiency.   There are "super bright" LEDs that are much brighter with the same milliwatts.  The specs will usually show brightness as mcd at the rated current....  Just looking at my Jameco catalog I see LEDs from less than 10 mcd to over 5000 mcd.

Our eyes have more sensitivity at different colors/wavelengths.   (IIRC, our eyes are most sensitive to green).

Power (Watts or milliwatts) is calculated Voltage X Current.   So a blue LED at 3V and 20mA is consuming 50% more power than a red LED at 2V and 20mA.
Title: Re: Which resistor to use for blue led
Post by: Thomas499 on Jan 06, 2015, 07:05 pm
Quote
LEDs vary a LOT in efficiency.   There are "super bright" LEDs that are much brighter with the same milliwatts.  The specs will usually show brightness as mcd at the rated current....  Just looking at my Jameco catalog I see LEDs from less than 10 mcd to over 5000 mcd.
Quote
Power is (Watts or milliwatts) is calculated Voltage X Current.   So a blue LED at 3V and 20mA is consuming 50% more power than a red LED at 2V and 20mA.
So do resistors limit power used? For example, if I wanted to be very power efficient could I purchase a high efficiency led 5000 mcd, and put in a large resistor to limit the power supplied, therefore I could get the same brightness as a low efficient 10mcd led with using only a fraction of the power?
Title: Re: Which resistor to use for blue led
Post by: jackrae on Jan 06, 2015, 07:35 pm
As has already been said, you need the data sheet for the LEDs you are using to ensure they are being operated within their parameters.  However, it's generally accepted that most LEDs will be quite happy passing 10mA through them. 

Note that LEDs are current based devices so specifying forward voltage to calculate series resistor is fairly iffy.

As Alnath suggested there is a test you can do to assess a reasonable value of resistor. 

Connect your current meter in series with your LED.  Say the nominal forward voltage (Vn) across the LED is 2v (Vn this is only a guess for the purpose of setting up the test)  Vs is the supply voltage.
Pick a series resistor (Rn) to give a nominal current (In) of 10mA 
where Rn = (Vs - Vn)/0.01  ie  Rn = (Vs-2)/0.01
Measure the value of In, say it shows as 12mA. 
By transformation of the formula 0.01Rn = Vs - Vn and hence 0.01Rn + Vn = Vs  and Vn = Vs - 0.01Rn
But since In is actually 0.012A then actual Vf = Vs - 0.012Rn (which is about 20% lower than our guessed 2v)
Hence Rs the actual series resistor required to give 10mA is Rs = (Vs - Vf)/0.01

Whilst the above is not strictly true because LEDs are non-linear devices, it does get you into a reasonable range of resistor value.   

Having said all that, it's unlikely that using a 270ohm resistor will cause run-of-the-mill LED failures when working on a 5v supply.

If you want to work within optimum parameters then it is essential that you get hold of manufacturers data sheets for the LEDs being used.
Title: Re: Which resistor to use for blue led
Post by: DrAzzy on Jan 06, 2015, 09:46 pm
$2 per LED? Did you really mean a $, not a ¢? Basic LEDs (from half-assed ebay sellers) should be around $2 for 100 - ex: http://www.ebay.com/itm/261540613243 



I'm amazed if you burned out a blue LED while simply applying 5v to it through a 220 ohm resistor. That should give you probably around 10 mA (assuming ~3v voltage drop across the LED - blue LEDs generally seem to be pretty close to this) - most modern indicator LEDs are spec'ed for 20mA, if you can scare up a spec sheet at all.


@Thomas499 Within limits, you can get more efficiency by running LEDs at a lower current than they're spec'ed at - it's well known that LED efficiency decreases as current increases; this is speculated to be due to recombination of electrons and holes as the density of such charge carriers increases. This is why most high power LEDs consist of several LEDs connected in series or parallel. I don't know if you'll still reap efficiency benefits if you try to dim it to 1/100th of it's normal brightness. 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).
Title: Re: Which resistor to use for blue led
Post by: Thomas499 on Jan 06, 2015, 10:12 pm
Quote
If you want to work within optimum parameters then it is essential that you get hold of manufacturers data sheets for the LEDs being used.
The Led's that I have came in an arduino starter kit. They didn't come with data sheets, I guess the makers of the kits figured newbs wouldn't know what to do with a data sheet anyway. Given that I myself am still trying to figure out how to read a datasheet (http://forum.arduino.cc/index.php?topic=290509.0)

DrAzzy:
Well, there's a good reason Radio Shack will probably go bankrupt in the next year or so 1 led $2 Radio Shack (http://www.radioshack.com/5mm-red-led/2760041.html#start=11) Everything there is way overpriced. But it is nice to be able to walk around and take a look at what they have, don't expect the employees to know though. Now they did have a "Special" where you could buy a pack of 5 led's for $4.68 if I remember correctly. I take it you haven't been in a Radio Shack lately? To save you gas money they sell their cheap breadboards for $10  (http://www.radioshack.com/modular-ic-breadboard-socket/2760003.html) if that tells you anything.
Title: Re: Which resistor to use for blue led
Post by: DrAzzy on Jan 06, 2015, 10:55 pm
I'm not surprised there was no datasheet in an arduino starter kit (I haven't been able to scare up datasheets, part numbers, or any other documentation short of (often inaccurate) Vf and current specs. However, I'm disappointed that they put in LEDs that didn't work as expected with the resistors they included - that's really shoddy. You need to start people off with parts that work - then once they're comfortable with how things should work, then they can start buying dodgy parts from china and it won't be so bad. But it's not going to get people interested in electronics to sell them kits that don't work.


Re: the led actually burning out - are you sure you didn't slip up and power it without the resistor, even for a split second? If you put 5v on an indicator led, with no resistor, it will typically die *instantly* - you usually won't even see a flash like you do with incandescent bulbs.


Wow, I thought radioshack gave you more than 1 LED for $2...
Title: Re: Which resistor to use for blue led
Post by: Thomas499 on Jan 07, 2015, 12:08 am
Quote
are you sure you didn't slip up and power it without the resistor, even for a split second?
I did leave the module connected to my computer when I left town for a night not even thinking about it so the led was on for a solid 16 hours. I don't know if it's possible for it to overheat or what not. It is possible I used it in an experiment trying to figure out how to make a parallel circuit I don't remember which led's I used for that. As a beginner when you first get a kit you really don't know what you are doing and remembering all the crazy things you attempted trying to figure things out.... well it's definitely possible it was an error on my end. What is the life expectancy of a led by the way? Can you leave one on for a month straight and still expect it to work?

Title: Re: Which resistor to use for blue led
Post by: larryd on Jan 07, 2015, 12:13 am
Should work for 25,000 - 100,000+ hours

http://en.wikipedia.org/wiki/Light-emitting_diode (http://en.wikipedia.org/wiki/Light-emitting_diode)
Title: Re: Which resistor to use for blue led
Post by: alnath on Jan 07, 2015, 12:15 am
The Led's that I have came in an arduino starter kit. They didn't come with data sheets, I guess the makers of the kits figured newbs wouldn't know what to do with a data sheet anyway. Given that I myself am still trying to figure out how to read a datasheet (http://forum.arduino.cc/index.php?topic=290509.0)


this kit (http://arduino.cc/en/Main/ArduinoStarterKit) ?

if yes, then maybe you should read the description, and particularly this :
Quote
Click on the name of the component to download the datasheet of the part. This document will describe the design and functionality of the component.
if you click on this line :
Quote
3 LEDs (blue)
you get this page :
blue led  (http://arduino.cc/documents/datasheets/LEDB-L-53MBDL.pdf)
and you'll see that there is already an internal resistor, thus it needs to be powered at 12V (not 5V)


Title: Re: Which resistor to use for blue led
Post by: Thomas499 on Jan 07, 2015, 12:39 am
Quote
this kit ?
Yes, that was one of the kits. However, the datasheet didn't come in a paper version with the kit.

Quote
and you'll see that there is already an internal resistor, thus it needs to be powered at 12V (not 5V)
Tell me, the arduino can only supply 5V or less. Is there anything in the kit that would allow a beginner to power a led with 12V using an arduino? I know the blue led (with a 220 ohm resistor) is a solid 3 times brighter than the green or red led already. I wouldn't be surprised if it was really 5 times brighter. I can't imagine how bright it would be if it was really meant for 12V and no external resistors.

My guess though is it would probably through in the towel and die.

--------------edit-----------------
That sounded cocky. I apologize. But if the reason that particular blue led isn't working is because it requires 12V, then how am I supposed to power it?
Title: Re: Which resistor to use for blue led
Post by: Thomas499 on Jan 07, 2015, 12:48 am
I looked up my purchase history on Amazon, these are the two starter kits that I have Starter kit (http://www.amazon.com/Arduino-Starter-Official-170-page-Projects/dp/B009UKZV0A/ref=sr_1_1?ie=UTF8&qid=1412091480&sr=8-1&keywords=arduino+starter+kit) and

Electronic Parts for Getting Started With Arduino book  (http://www.amazon.com/Electronic-Getting-Started-Arduino-INCLUDED/dp/B004HL44MI/ref=sr_1_2?s=electronics&ie=UTF8&qid=1412107104&sr=1-2&keywords=getting+started)
Title: Re: Which resistor to use for blue led
Post by: alnath on Jan 07, 2015, 01:19 am
seems to be the same kit.

If the led is designed for 12V, you'll have to use a transistor or a fet (included in the kit) to drive it from arduino.
Maybe you should read the book, and find a project in it that uses these "LEDs" (I hope there is one).
BTW, it should work at 9V too (less bright ) 
Title: Re: Which resistor to use for blue led
Post by: Paul__B on Jan 07, 2015, 06:58 am
you get this page :
blue led  (http://arduino.cc/documents/datasheets/LEDB-L-53MBDL.pdf)
and you'll see that there is already an internal resistor, thus it needs to be powered at 12V (not 5V)
Well no, it doesn't.

If you do look at the datasheet, you will see that it is specified for a minimum of 4V, so it just does not shine quite as bright at 5V as it does at 12.

It is presumably - deliberate.  They are "idiot-proofing" the kit, including parts that are difficult to damage by unfortunate mistakes, such as connecting directly across the power supply.  I wonder whether the other colour LEDs are the same?

If the led is designed for 12V, you'll have to use a transistor or a FET (included in the kit) to drive it from Arduino.
Likewise, not really.
Title: Re: Which resistor to use for blue led
Post by: alnath on Jan 07, 2015, 07:39 am
Well no, it doesn't.

If you do look at the datasheet, you will see that it is specified for a minimum of 4V, so it just does not shine quite as bright at 5V as it does at 12.

right, it was late here and I didn't look at the curves. I .... needed to sleep, I guess ;)
Title: Re: Which resistor to use for blue led
Post by: Paul__B on Jan 07, 2015, 08:00 am
it was late here and I didn't look at the curves. I .... needed to sleep, I guess
That was only 6 hours, 20 minutes ago.  You probably need more sleep than that still!   :D
Title: Re: Which resistor to use for blue led
Post by: Thomas499 on Jan 27, 2015, 03:49 pm
I decided I wanted to upgrade my experience and understanding.

I want to use this blue led (http://arduino.cc/documents/datasheets/LEDB-L-53MBDL.pdf) 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.

Quote
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?
Title: Re: Which resistor to use for blue led
Post by: raschemmel on Jan 27, 2015, 04:18 pm
You seriously need to learn OHM'S LAW (http://en.wikipedia.org/wiki/Ohm%27s_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.

Quote
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.
Title: Re: Which resistor to use for blue led
Post by: Thomas499 on Jan 27, 2015, 06:56 pm
Quote
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 (http://arduino.cc/documents/datasheets/LEDG-L-7113GT%28Ver1286952261.13%29.pdf) (or see attachment) says not to bend the wires on the led. The Blue led datasheet (http://arduino.cc/documents/datasheets/LEDB-L-53MBDL.pdf) 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.

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

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




Quote
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.
Title: Re: Which resistor to use for blue led
Post by: Grumpy_Mike on Jan 27, 2015, 08:34 pm
Quote
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 (http://www.thebox.myzen.co.uk/Tutorial/LEDs.html)
Title: Re: Which resistor to use for blue led
Post by: raschemmel on Jan 28, 2015, 05:10 am
FYI,
If you really do have a led with a forward voltage of 14 V like this one (http://arduino.cc/documents/datasheets/LEDB-L-53MBDL.pdf) 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 (http://www.robotmesh.com/dc-dc-boost-converter?gclid=CjwKEAiAi52mBRDkq5bX0vq1-RQSJAAq_7IGzDkogDA5KRf7tCtGct0vBMPWwPW3g8nOXr7VV_vMRxoCrYDw_wcB)
Title: Re: Which resistor to use for blue led
Post by: Thomas499 on Jan 28, 2015, 06:05 am
Quote
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 (http://arduino.cc/en/Main/ArduinoStarterKit) 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
Quote
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.
Title: Re: Which resistor to use for blue led
Post by: Grumpy_Mike on Jan 28, 2015, 07:49 am
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.
Title: Re: Which resistor to use for blue led
Post by: raschemmel on Jan 28, 2015, 01:25 pm
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.
Title: Re: Which resistor to use for blue led
Post by: Thomas499 on Jan 28, 2015, 03:40 pm
Quote
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.

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




Title: Re: Which resistor to use for blue led
Post by: raschemmel on Jan 28, 2015, 04:10 pm
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.
Title: Re: Which resistor to use for blue led
Post by: krupski on 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.
Title: Re: Which resistor to use for blue led
Post by: Grumpy_Mike on 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.
Title: Re: Which resistor to use for blue led
Post by: raschemmel on 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.
Title: Re: Which resistor to use for blue led
Post by: Thomas499 on 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.




Title: Re: Which resistor to use for blue led
Post by: raschemmel on 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.
:D

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
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.
Title: Re: Which resistor to use for blue led
Post by: CrossRoads on 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.
Title: Re: Which resistor to use for blue led
Post by: Thomas499 on 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 (http://www.amazon.com/Getting-Started-Electronics-Forrest-Mims/dp/0945053282%3FSubscriptionId%3DAKIAILSHYYTFIVPWUY6Q%26tag%3Dduckduckgo-d-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0945053282) 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.



Title: Re: Which resistor to use for blue led
Post by: CrossRoads on 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.
Title: Re: Which resistor to use for blue led
Post by: Grumpy_Mike on 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.