what is the resistor?
I'm going to talk about electrical resistance, ohm's law, and how to pick a resistor to limit current in an LED circuit. In previous I talked about how voltage can behave like a pushing force, pushing electric current around a circuit. But in one example I connected an LED straight to 7.5V, way too much current flowed, and the LED blew up. So you can see how it would be useful if there was something that could resist the flow of electrical current. Something that could tame the flow in a controlled way. That device is called a resistor, and here are some examples of what resistors can look like. We've got a very basic resistor over here, which is the kind of resistor that most hobbyists would use at home when constructing circuits. And over here we have a tiny surface-mount resistor. This is something you'd expect to see in a small device like your phone. And this big resistor is the type of thing you'd use a large power supply.
So how do these resistors work?
Remember how in my video about current, I talked about electrons jumping from atom to atom, all at the same time, like a conga line? Well in reality this process is not 100% efficient. The atoms in a material like copper wire are always vibrating around just a little bit, and this is because of the heat-energy they have. When electrons try to move through the wire, sometimes they'll bump into an atom that's in the way, and effectively the flow of current gets resisted. As this happens, some of the kinetic or movement energy from the electrons gets converted into heat. This is the fundamental principle behind howelectric heaters and incandescent light bulbs work. But it's not just metals that have the propertyof resistance, resistance can exist simply from the fact that some materialsjust don't have a suitable arrangement of atoms forelectrons to flow through. And some materials just don't have enoughfree electrons floating around for large amounts of current to flow.
Keep in mind this is a huge simplification and this is not how actual atoms and electrons are going to look andbehave at the subatomic level. Nearly everything on earth has some resistanceto electrical current, and metals tend to have the leastresistance. Sorry, I had to put it in the video somewhere. We measure the amount of resistance with aunit called ohms. The symbol is the greek letter omega. To give you a sense of scale, a resistance of under 1 ohm is considered to be a very low resistance. That something that you'd expect to see from a piece of wire that's good at conducting electricity. 1 million ohms, or 1 megaohm, is generally considered to be a very high resistance. That's something that you might expect to see from a bad conductor of electricity like this dried out piece of carrot. This thing that I am using to measure resistance is called a multimeter, and it can measure the resistance of almost anything. I have a separate tutorial on multimeters,and I recommend you watch it as soon as possible to learn more about this important tool. Now if you're playing with electronics athome, you'll be using resistors that look like these.
They havecolored bands on them, and there's a special code that lets you translate the colors intoa resistance value. For example these red, violet, brown and goldbands mean this is a 270 ohm resistor. Now you canmemorize the color code, but it's a lot easier to just use one of the many resistor calculators out there. Just search for resistor color calculatoron Google or in your phone's app store. By having resistors with specific resistancevalues we can carefully control the amount of current thatflows in a circuit. Today, let's start out with everyone's firstsimple resistor circuit, using a resistor to limitthe current going through an LED. Make sure you've already watched my LED tutorialand have bought some LEDs and resistors, which I am going to link again in the video description section. In order to do the math for this circuit, you need to know about the mathematical relationship betweenvoltage, current and resistance. Here's an old comic that I've always likedthat illustrates the relationship on an intuitive level. More formally, we use this equation. Ohm's law. In textbooks you usually see it written as
V=I times R. Or voltage = current times resistance.
If you use a little algebra you can rearrangethe equation to calculate any of the variables as long as you know theother two. Although it's important to understand that all these versions of the equation are exactly the same thing,our LED circuit is going to be using this version, so let's focus on that. Let's say we have a 10 volt power source,and we want to make sure that no more than 10mA flows fromit. We can use ohm's law to figure out what resistorwill accomplish this. The answer is really simple, just take thevoltage, divide it by the desired current, and we get the answer of1000 ohms. So now we can either use the resistor colorcode, or a resistor calculator app to figure outwhat a 1000 ohm resistor looks like, and it turns out to be brown, black, red. The 4th color band all the wayon the right refers to the tolerance of the resistor. A real world 1000 ohm resistor might actuallyhave a resistance of 1020 ohms, or 998 ohms, andfor most circuits you play with at home +/- 5% will be goodenough. So let's double check our math in real life.
I've got my power supply set to 10 volts,it's hooked up to a 1k resistor, and as you'd expect, 10mA is flowingfrom the power supply. It's also important to know that ohm's lawis a linear relationship, meaning that for a fixed resistor value, ifyou double the voltage, you double the current. Here's 20 volts going into the same 1000 ohmresistor, and as you'd expect, the current doubles to 20mA. I want you to understand that only pure simpleresistors obey Ohm's law. The relationship between voltage and currentfor most electronics is a lot more complicated than this. In a lot of cases things will work fine upuntil their recommended voltage level, and if you exceed that thenthings suddenly blow up. But for now, resistors are good enough tohelp us limit current in a simple LED circuit. Let's start out with a 9 volt battery, a resistor,and an LED connected with the correct polarity. And noticethat it doesn't matter which way we connect the resistor - unlike the LED, polarity doesn'tmatter for resistors. We want to find out what resistor will letus safely use 9 volts with this LED. In my previous videoabout LEDs we talked about forward voltages, and for this particular white LED the forwardvoltage is 3 volts. That means that when the LED is on, thereis going to be a 3 volt drop across it.
what is the voltage across the resistor?
Remember that voltage is all about differencesin electrical potential between two points. Our power source is a 9 volt battery, so we'vegot 9 volts between here and here, and we've got 3 volts across the LED. So this must mean that we've got 6 volts acrossthis resistor, because 9 - 3 is 6. Ok so we've got our voltage. Now the current in this circuit is going tobe whatever we want to it to be. But the recommended maximum current for thisLED is 20mA, so we're going to use that. And notice that Iam using conventional current here which moves from positive to negative. That's what you are going tosee in every single electrical engineering situation, theoretical physics classes mightuse negative to positive electron flow. So let's apply Ohm's law now. 6 volts divided by 20mA gives us a resistancevalue of 300 ohms. Now I don't have a 300 ohm resistor in myparts collection, but a 330 ohm resistor will be good enough. Ifyou are messing around with LEDs at home it doesn't matter if you get the current wrongby 10%.
Ok, so here I have my 9 volt battery and a9 volt battery clip. The red positive wire is going to one sideof my 330-ohm resistor, and that's going to theLED's anode. Then I'm just connecting the negative wirefrom my battery to the LED's cathode. 9 volts, roughly 20mA, and no exploding LEDs! Finally! If we increase the resistance to, let's say,18 kiloohms, we'll get less current, and as you'd expect, the LEDis dimmer. In general, this is the equation you can useto calculate the resistor for a simple LED circuit. But... there is a limitation! I've got another power supply here set togive me 140 volts, and that's enough to mess you up so don't dothis at home. Let's put 140 volts into this equation, we'vegot 3 volts for our white LED, and we want tostick to the 20mA current limit. So we get a resistance value of 6,850 ohms. I've got a 6.8k resistor in myparts collection, which is very close to our theoretical value.
0 Comments