How to select resistor values for LEDs | Basic Electronics

We’re gonna go over really quick on
how to calculate the resistor that you need to put in series with an LED
so you don’t blow it up. The reason we need this is because once
you pass the forward voltage of an LED, a slight increase in the voltage makes
a huge increase in the current and we don’t want to blow things up. So we put a resistor in series with it
that keeps it under control and it makes it have a little bit more
of a linear relationship between the voltage and the current though
it’s not exact, it’s better. So I have six steps for choosing
the resistor but two of them are sanity checks and
the other four are really simple. So definitely don’t stress about it. The first thing you need is to find out
the forward voltage. That’s either from the datasheet,
a generic source like our color and forward voltage table on our
website or from simple experimentation. I bought this from SparkFun and I don’t
know if they still do this because I did it a couple of years ago,
but they have some of the basic data you need in the package itself. It’s pretty cool. So I can see straight from here that the
voltage drop of this LED is 2.2V. That makes it easier than going and
looking in the datasheet. But if you don’t know, it’s worth it. So that is the first thing: find out what the
forward voltage drop of your LED is. Now, the second thing is to find out
what the max current is. They’re should also be from the datasheet
and you can almost always go past the max current and still have it work
but you’ll be shortening its life. Looking on here, this says I max (current max) is 20
milliamps which is very typical for this size of LED. I’m actually not sure if I’ve ever seen one
that’s different than 20 milliamps on these. If you get a bigger LED or a smaller LED,
you want to check that datasheet to make sure that you don’t blow this. The third thing is actually a
continuation of step two and that is we know that this can have 20 milliamps
before it starts to damage it. But how much do I actually want?
Do I need it to be that bright? Can I use less current? Step three is find out how much
current you actually want and that could be something where you
just have to do a little bit of trial and error and see how much current is needed
to give it the brightness that you want and that’s all you have to do. Once you know what the forward voltage
drop is and you know how bright you want it to be, how much current
you need to have go through it making sure that you don’t go over
the maximum current, you do step four which is figuring out what the
resistance will require to hit that current. You can use Ohm’s Law and just math it
which is voltage source minus the forward voltage at the desired current and then
voltage over current. In that case, we have the voltage source,
we’re just going to assume 5V because that’s very common and
just keeps the math simple. The voltage drop on this is 2.2V so,
5V minus 2.2V gives you 2.8V and then you just divide that by the 20 milliamps. So we actually have an app or something
on our site where you can first see this all laid out visually, gives you the
equation and you can type it in. So voltage source is 5V,
the voltage drop of the LED is 2.2V and then the current of the LED
is going to be 20 milliamps. Doing that and that way I don’t have
to do the math in my head, gives us a hundred and forty ohms. So that is basically how you figure
that out and that’s step four. The next two steps are just sanity checks. And number five is making sure the
resistor that you physically, actually using has a high enough
power rating. I’m gonna use a quarter watt resistor
with this and looking at my calculations here, it’s showing that I’m only going to be
consuming about 44 milliwatts. I can handle 250 milliwatts, this says,
I’m only going to be consuming 44 milliwatts.
I’m good to go. And then number six, the other sanity check
is just making sure that everything makes sense. So, if you have a 12V battery source and a 3V LED,
why not put three or four of them in series three or four LEDs in series instead
of all of them in parallel with huge power wasting resistors
for the rest of the voltage. If your max current is 1 amp but
you’re only driving it to 1 milliamp, why don’t you just use a
smaller cheaper LED. If this is just a project you’re doing
for the fun of it, then efficiency in saving a couple pennies
isn’t such a big deal. Just go and have some fun. But if you are planning on something
that’s a little bit more logical a little bit more sensical,
take that time to think How much power am i burning here? Is this oversized? Is this undersized?
And then go from there. So with that, I actually want
to do this really quick. We calculated a hundred and forty ohms. But in reality, unless you’re doing high
precision resistors, they’re at a different rate. So you don’t get 100, 102, 104, 105,
you get the 100, 142, 150, 100 like the more random numbers. I’ll probably only be able to find a 150 ohm
resistor to go with this but that’s okay. If you can’t get the exact resistance
if you’re already pushing the limit you want to go up a little bit in resistance
so 150 ohms will be perfect for this. I’m just gonna grab my power source
here and turn it on. So it’s gonna be 5V because
that’s fairly common with USB. I’m gonna hook this up to the anode.
Spread that out. And then I’m going to hook up to the
resistor and hook up to the cathode and we’re gonna
see what happens. We’re getting a bright shiny
green LED and not only that but just as you can see here I’ve got 5V
and we’re at 19 milliamp which is about exactly what we expected with
a 150 ohm resistor. We’re gonna be burning much less
than this quarter watt resistor can handle. And I think we’ll be good to go.
So that is what happens in action. All those steps really quick: First, find the forward voltage. Second, find the max current. Third, figure out what current you want as long as
it doesn’t go over that max current. Fourth, use Ohm’s Law to find out
what resistance you need. Fifth, make sure that your resistor is rated
for the power dissipation that you’re actually going to be
putting it through. Sixth and final is just make sure that
your whole circuit makes sense. That you’re not doing something
crazy and inefficient or really expensive that just
doesn’t need to happen. And that’s it! It’s really straightforward. Don’t even need all those steps. If you just get rid of those
sanity checks, you’ll be fine. If you liked this video, give us a like.
Subscribe. Leave something in the comments and
we’ll see you next time.

Leave a Reply

Your email address will not be published. Required fields are marked *