Resistors basics
Autor: fumo | Publicado: 2011-02-13T17:07:00-08:00

Today I'm going to talk about resistors... I believe it's the most basic of the basic components (pretty basic isn't it)
Take a look at this video:&nbsp;http://www.youtube.com/watch?v=VPVoY1QROMg
It's another great video by Collin Cunningham =)
Well, as he said resistors are used in almost any circuit...
There are no brands for resistors... most of times they are just referred by their resistance value. Resistors also have some manufacturing error percentage, which means it can be a bit more or less the resistance it specifies... The most common are the %5 and %1. (I don't remember seeing other one). So a 100 ohms resistor with %5 maybe between 95 and 105 ohms. For common uses, it's not a concern, but some analog circuits need precision on their resistors.
There is also the resistor's "power". This means, the max amount of power they can be connected to without any damage. So there are 1/8 W, 1/4 W, 1W, 2W, 3W, 5W, etc. So if you connect a 120 ohms 1/4 W resistor to a 9v battery, it'll produce a current of:
I = v/R = 9/120 = 0.075 A
The amount of power on the resistor is:
W = v*i = 9*0.075 = 0.675 W
So this 1/4W (0.25W) resistor is dissipating 0.675W which means it can burn out =)
I already fried out a resistor while holding it in my fingers...&nbsp;it was a 120 ohms 1/4w resistor&nbsp;and I connected it to the 120v wall outlet, so it gave me 120 W =)
I measured it's resistance after that, and it got like 2k ohms or something lol... this may be handy when you need a high resistance resistor and you do not have it xD
But don't try this at home, the smell is not good and damaged parts&nbsp;with unknown values&nbsp;may damage the entire circuit, and you lose $$$ =(
See pictures of different resistors in Google images:http://www.google.com.br/images?hl=pt-br&amp;biw=1680&amp;bih=935&amp;gbv=2&amp;tbs=isch:1&amp;sa=1&amp;q=resistors&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=
Most of circuits using resistors can be divided in 2 "categories":
1- It may be used as limiting current to power some device. Like LEDs need resistors to limit current... or when you see some electric heating system, some of them use a low resistance (like 5-50 ohms) to get the wire heated up. This can be electric water heating, or a soldering iron, etc. So you choose the proper resistor by the amount of power you need.
2- Analog circuits use resistors, capacitors and inductors as "input data" for the desired output. For example, if you have a variable voltage regulator, which in one pin you have the voltage input (a 9v volt battery for example), and you have the regulated voltage output (to supply a 5v microcontroller with that 9v battery). There is another input that will determine the output voltage, and normally it's used with resistors. So in this case the resistor is chosen by the required resistance for you to have a proper design of your analog circuits.
See this tutorial:&nbsp;http://www.sparkfun.com/tutorials/219&nbsp;about limiting current with a resistor.

There are a lot of analog circuits to do all sort of things, like amplifying a signal, regulate voltage, filtering a signal, create oscillation, etc, and most of these circuits are designed with some math to find out the right values for its components (resistors, capacitors, etc).
There won't be a lot of analog circuits in this blog, just enough to get your digital circuit connected to. There will be no guitar effect pedal for example... btw check this video:&nbsp;http://www.youtube.com/watch?v=_X0bL6WS-VY&nbsp;.
There are a lot of things in this video that we didn't speak about yet, but basically what he is doing is getting the original controls of that distortion pedal (a potentiometer) and changing it with a digital potentiometer. Analog circuits are really powerful for sound applications.
Wikipedia:
"A&nbsp;potentiometer&nbsp;(colloquially known as a "pot") is a three-terminal&nbsp;resistor&nbsp;with a sliding contact that forms an adjustable&nbsp;voltage divider.&nbsp;If only two terminals are used (one side and the wiper), it acts as a&nbsp;variable resistor&nbsp;or&nbsp;rheostat. Potentiometers are commonly used to control electrical devices such as volume controls on audio equipment. Potentiometers operated by a mechanism can be used as position&nbsp;transducers, for example, in a&nbsp;joystick."
Wikipedia makes this a lot easy :p
So when you have a circuit that needs to get as input a desired value from the user (like volume, brightness, speed, etc), one way to get this input is with a potentiometer.&nbsp;
The schematic symbol for potentiometer is this:



Or this:C
AB
And they look like this:&nbsp;
This is a slide potentiometer:This is the one used for those slide sound controllers for djs or sound equipments.
You can have knobs to put on them so they look a little better. These are knobs:



So you see common knobs and a slide knob =)
The potentiometers are referred by their resistance value between terminals A and B of the 2nd schematic picture. They are also referred as "linear" or "logarithmic" potentiometers and this refers to "the way they change their resistance". We will only use linear potentiometers in this blog which have resistance proportional to the potentiometer position. If you want to know more about potentiometers you can check wikipedia for that, at:&nbsp;http://en.wikipedia.org/wiki/Potentiometer&nbsp;.
One of the most useful things to make using only resistors is a voltage divider. Take a look at this tutorial:&nbsp;http://www.sparkfun.com/tutorials/207
So for example, we have a 5V signal and we want to make it a 3.3V signal:


The math is:
Vout = Vin*R2/(R1+R2)
3.3 = 5*R2/(R1+R2)
2/3 = R2/(R1+R2) &nbsp;-&gt; &nbsp;3*R2 = 2*R1+2*R2 -&gt; R2 =2*R1
So that means R2's resistance needs to be 2 times R1's resistance. So if you use a 100 ohms resistor in R1 you need to use a 200 ohms resistor in R2.
Well, that's easy and handy, but no one has resistors of all values at home to use in circuits. So we can use a combination of resistors so we can find the resistance we want.&nbsp;
We can connect resistors in "series" or in "parallel". Take a look at this photo:&nbsp;

So if we add resistors in series we just add their resistance. It's not very useful to add them in parallel (I never needed to) but connecting them in series is really useful. On the voltage divider example we needed a resistance R1 and R2 where R2 is 2 times R1. So we can get 3 resistors, and use one of them as R1 and connect the other two resistors in series so that they together will be the R2. This is handy because resistors are really cheap and usually they are sold in packs of 5, 10 or more. So you probably gonna have 3 or more of the same value.
This is a voltage divider calculator:&nbsp;http://www.raltron.com/cust/tools/voltage_divider.asp
We can use potentiometer as a voltage divider too:

So there is the resistor between terminals A and B, and this W terminal which is connected to the wiper we move. So this works as a voltage divider as the resistance between the wiper and the A terminal works as R1 and the resistance between the wiper and B terminal works as R2. Connecting A to +5v and B to GND or 0V, as we turn the wiper the voltage changes proportional to its position. Voltage increases as we turn the wiper to A terminal and decreases as we turn it to B terminal (if we connect B to + and A to - that would be the opposite situation).
So it's easy to measure this output voltage from the potentiometer using a microcontroller for example. But to use a potentiometer on analog circuits, it may be required to use it as a variable resistance and not a variable voltage as it is if we connect A to + and B to - (or the opposite), instead we would connect A (or B), as one terminal, and the W terminal as the other terminal, and that gives us a variable resistance that increases when we get near A (or B).
This is the same thing as a slide potentiometer.
I saw a nice video about EMF (electromagnetic field) detector. Take a look at it:&nbsp;http://www.youtube.com/watch?v=y1Bke3750WE
So it's Collin again. The basic idea is that the EMF in the place affects the wire which he connected to his microcontroller, and by reading the voltage on that pin he can control an LED to have brightness proportional to the voltage reading. He connects a 3.3 Mohms resistor from the wire to ground. That works a bit like a voltage divider. Take a look at the photo:


So in this case R1 is the voltage between an electric device like a computer, or a lamp, or anything, to that piece of wire connected to the microcontroller, and R2 is the 3.3 Mohms (3.3 *1000000 ohms) resistor. Remember the first Collin's video about resistor, he showed how to make the LED's brightness increase and decrease as he passes the connection by the graphite that's because any material has its resistance. So in the EMF detector video, when Collin goes near a device the R1 decreases which means "Vin" increases. Although it's EMF and not a common voltage, the example can illustrate a little bit what's going on. The R2 resistor is being used to "filter" a little bit so that the EMF detector is less sensitive. If we use a smaller resistance it gets less sensitive so the light start to bright a bit more close to the device we are getting near.
Edit (02/14/2011): I forgot to speak about something important. There are some sensors that work as variable resistors. There are gas sensors, microphones, LDR (light dependent resistor), etc. So this type of devices have a "resistor" inside them, that changes based on the "amount" of what they are sensing. A gas sensor for example will get a lower resistance if we have a bigger concentration of gas in the place. A LDR will have a smaller resistance in a lighted room. So that's how they work, and in order to measure this variable resistance, we need to make a voltage divider circuit. So when the sensor's resistance gets smaller, the voltage output is higher. If we using a microcontroller or something, we can measure this value with a simple calculation on the program and perform some action like move a robot, turn on a LED, show the value on a LCD or something like that. This devices are great for analog circuits because this simple variable resistance can be used with no problem in a analog circuit, what would be not so easy if we were using a digital sensor which "sends a message" with the value of what it's sensing. We will talk about some of these devices later as we move on to microcontrollers.&nbsp;
So I believe this is everything about resistors. I may add something that I did not mentioned, but I believe I talked about all the useful topics. I may add things to the topic if I remember it.
So, next time I'll talk about capacitors I think, as I never needed to use them a lot too, I probably won't talk a lot about them.
I'll try to make a post about basic names and basic prototype things that you may need to start using real electronics. Till there feel free to try proteus, it's great to try some circuits without needing to make a real circuit or even having the require components. Proteus is not good if you need some more advanced things like GSM modules or GPS modules or things like that, but can do almost everything from the analog world and a lot of things from the digital world. So it's good to have it on your machine... try search for it on torrent.
cya.