Let's Make Robots!

Using resistors - what the hell do they do?


First off I'm no expert but I have gotten a bit wiser about what resistors are good for and how to find the right ones for a specific purpose. I will tell you about two important uses of resistors.

Limiting current so things don't burn

Let's say you just bought this amazing new component called an LED that you want to use in your robot. You plug it into your circuit and turn the power on. Poof! Smoke and fire everywhere (ok that's maybe a bit over the top, but you get the idea). What happened?

Well the LED is a component that has very little resistance so a lot of current can flow through it even if the applied voltage is small - it is almost like a short-circuit. The great amount of current will destroy the LED (maybe because of the heat or something - I don't really know why) and you will generally not be very happy with the result.

In order for the LED not to burn you have to limit the amount of current that is supplied to it and this is where resistors come into the picture.

Resistors are components that obey Ohm's law:

U = R * I

Which says that the voltage-drop U across a resistor is equal to the resistance R of the resistor times the current flowing through the resistor.

If you put a resistor in series with the LED (either before or after the LED) you will limit the current going through the LED to the amount of current going through the resistor (which can be calculated as I = U/R where U is the supply voltage to the circuit minus the voltage drop over the LED - you can just use the supply voltage as U since it will only result in less current than you expected and not the other way around).

If you happen to buy a package with assorted LEDs like I did you can check the package to see what the maximum amount of current they should have is - on the ones I bought it said 50 mA maximum but standard LEDs
are nicely lit at around 15 mA so if you have a voltage supply of 5 V a resistor with a resistance of 330 ohms should do nicely.

Generally you should read the datasheet for your components and check what kind of values it can cope with. 

Measuring voltage through voltage dividers

This is a very very powerful and common construction. It enables you to measure a voltage - usually through an analog-to-digital converter (ADC for short).

The setup is two resistors with resistances R1 and R2 in series so that the resistor with resistance R1 is connected to positive power Vin (let's say it's 5V) and the resistor with resistance R2 is connected to ground. At the point where the resistors are connected to each other we connect the ADC-pin. The voltage Vout at this pin is then

Vout = Vin * R2 / (R1 + R2)

This might seem like an odd thing to do, but if the resistor with resistance R1 is a variable resistor, like for example a light dependent resistor that has low resistance when light is shining on it and high resistance when it is not, then Vout will vary with the amount of light shining on the resistor and this can be measured by the ADC-pin and used as a number value in your micro-controller.

I know this is perhaps not the best explanation in the world :-) and it doesn't help that there are no pictures or figures, but I hope you got a bit of insight into why we need resistors. Just trying to help my fellow robo-builder :-)

My advice for beginners going to buy resistors is to buy packages with assorted resistors like the Velleman set of 610 resistors which have 10 resistors of each of the values in the E12 series (61 different values) and when you have built a couple of circuits you will likely know what types of values you will typically use and then you can order those specific values in packages of 100 or 1000 resistors per value.

TigPT kindly provided me with a link to a color code table for resistor values - you should print it out and have it hanging at your workbench :-)

Resistor color codes

- Jimmy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

In a mixed pack I got 2.2Ω,10Ω, 47Ω,100Ω, 680Ω,1kΩ,10kΩ, 22kΩ, 68kΩ, 100kΩ, 330kΩ, 1MΩ resistors, 10 of each. I need, say 15 ohms for a string of LEDs (Im running it at 4.5 Volts and a string of 2 LEDs in series takes around 4V). Now onviously I have no 15 ohn resistors so could I combine, say, two 10 ohm resistors in series ( ----(resistor)---(resistor)-----) to get enough resistance to male my circuit work?

 

And the wiki explains why.

thanks! I was just thinking back to my year 11 physics and now I feel really silly! thanks for the info, and hopefullt his thing can now get off the ground

You can use a voltage divider across two sensors as well to get a comparison. If both are equal then the voltage will be half of the input, otherwise it will rise and fall in relation to the imballance between them. This could be useful for a phototropic robot for example, as you could have two light sensors and only need to read one input.

This also saves you computational effort reading from both and then comparing the result.

The best rule I learned was Ohm's Law.

Simply remember this

 

                  

 


                          V    

 

                       I  *  R


 

Voltage is V

Current or Amps is I

and R is resistance

 

V divided by I gives you R

V divided by R gives you I

and I multiplied times R gives you V

 just remember VIR.

 

 

I think you was greath, just to help the ones that wanna play with them, here is a table of the values.

resistor_color_code.jpg

Fell free to add to the main post, so ppl don't need to read my noob comment. (link is: http://itsi.concord.org/resources/images/00_circuits_sensors/resistor_color_code.jpg)

Thank you very much for the link! It is very essential to have the color codes when using resistors :-)

- Jimmy

(Colour in English, or Color in American)

An easy way to remember the colours if you don't want ANOTHER lookup table is "Richard Of York Gave Battle In Vain." This helps you remember the colours of the rainbow. Guess what? These are also the colours on a resistor. Sadly, you need to remember that the "in" is to be ignored and that black and brown come before and grey (grey in English or gray in American) and white come after.

Does anyone have an aide memoire to help me remember the sequence BBROYGBVGW?

In fact, I think http://letsmakerobots.com/node/337 might be the place for this.

God created the integers; all else is the work of man - Leopold Kronecker

Perhaps something like

"Big Bad ROY Gave British Vera Grounded Wire"

:-D

- Jimmy

...but still not suitable for a 7-year-old. 

God created the integers; all else is the work of man - Leopold Kronecker