# Some help with resistors

Hello

I got the duemilanove board for xmas and its been alot of fun. I'm a software design student however my electrical knowledge is pretty poor.My issue is resistors.

I was doing the "Control your Arduino using an Infrared Remote and the IK38khz sensor Tutorial" I connected a 10kOhm resistor. Im not 100% sure about resistance but I expected it to fail. It did work however, and after pressing the on button on my remote, my green LED turned on. Some tutorials online hinted at using only a 220ohm resistor.

My first question is what resistor should I be using. Also I was expecting my 10kOhm resistor to stop the flow of electricity. Why didn't it ?

Thank you.

Also I was expecting my 10kOhm resistor to stop the flow of electricity. Why didn't it ?

What do you mean by stop? If 10kOhm could stop all electricity, why would higher values of resistors exist?

Resistors, slow current. They "resist" it. If they stopped current, they would be called Stopistors. (or Switches.)

Again, I'm sorry but my knowledge on electricity is quite poor :) . In my mind, resistance is opposing the flow of electrons. If resistance would be very high and the Intensity of Current would be very low, wouldn't there be no flow of electrons ?

Well I googled for http://www.fabiobiondi.com/blog/2009/11/control-your-arduino-using-an-infrared-remote-and-the-ik38khz-sensor/ . If that is the project you are talking about, I can't find a wiring drawing in the page and the picture quality is not good enough to tell what is going on. If your question is how do you properly size a series current limiting resistor for an LED, then maybe I can help a little.

First a current limiting resistor is required for leds because once an applied forward voltage equal or greater then the Vf rating (diode forward voltage drop) for the led, it starts to conduct and will effectively act like a short circuit unless something external to the led limits the current into this quasi 'short circuit'.

Moving on to sizing the resistor, one needs to know the following information before the calculations can be made.

Vf rating of the led (green are typically 3.5vdc I think) Desired continuous current for the led (20ma is typical max) Value of source driving voltage (Most Arduino output pins are +5vdc.

Resistor in ohms = (driving voltage - Vf) / .020 amps = 75 ohms

A red Led usually has a Vf value of 1.5vdc so ohms = 175 ohms.

Now frequently you will see larger value resistors used instead of what I show here. That is because a typical led (with 20ma max rating) will display light form anywhere from 1ma on up to 20ma, and it's hard to tell a real difference in brightness from around 10ma on up, so why use more current then needed. I think most arduino boards use a 1,000 ohm resistor driving the on board led at 3ma.

Now as to you 10,000 ohm resistor, I wouldn't think that would allow enough current to light the led, note that the resistor can't 'stop' current, only reduce it such a value as to not generate light in the led. Resistors just participate in Ohm's law, they can't start or stop anything. But you say your led lights? Hum, is it really a 10,000 ohm resistor? Did you measure it with a ohm meter? Did you properly read and decipher the color coding bands on the resistor? Only you can answer those questions.

The important point is you should always insure that you aren't drawing too much current from an arduino output pin as that can damage the pin and the circuitry you are driving. AVR pins are rated at absolute max on 40ma, recommended 20ma, and a max rating of 200ma for all output pins combined.

Hope that helps.

Lefty

If resistance would be very high and the Intensity of Current would be very low, wouldn't there be no flow of electrons ?

http://en.wikipedia.org/wiki/Ohm's_law

Resistors, slow current. They "resist" it. If they stopped current, they would be called Stopistors. (or Switches.)

Some lucky company's marketing department is really missing the boat is they don't now quickly come out with a new line of Stopistors in various colors and sizes. Switches are so 2010. ;)

Resistors also can't 'slow' current, but rather reduce current. Otherwise they would call them Slowistors. ;)

Lefty

Now would probably be a bad time to mention I am a "Sales and Marketing Executive." ;)

okay, thank you both!

I think I have a better understanding. So since R = V/I , because Voltage is at 5V, increasing the resistance will only decrease I. That makes sense and explains the LED.

To clarify the resistor was connected to the output of a Infrared Receiver, while the LED was on Pin 13 on the board.

You mentioned for a green LED the Vf is 3.5V. Is it possible to measure the Vf of my IR receiver or other devices, perhaps using a multimeter ?

Now would probably be a bad time to mention I am a "Sales and Marketing Executive."

Great, then Monday you can gather your staff together and tell them about the great new slowistor and stopistor products you want them to jump on. First to market and all that. ;)

Lefty

I think I have a better understanding. So since R = V/I , because Voltage is at 5V, increasing the resistance will only decrease I. That makes sense and explains the LED.

Ok, but in our context V = 5v - 3.5v = 1.5vdc, not 5volts. To clarify the resistor was connected to the output of a Infrared Receiver, while the LED was on Pin 13 on the board.

Well then that resistor has no bearing on the led at all! The infrared reciever outputs a digital signal to an arduino input pin, and an input pin requires almost no current at all so the resistor doesn't hurt anything but technically it should not even be used there at all. Wire directly from the receiver signal output to the desired arduino digital input pin.

You mentioned for a green LED the Vf is 3.5V. Is it possible to measure the Vf of my IR receiver or other devices, perhaps using a multimeter ?

Your IR receiver is not an LED, it's an 3 terminal IC that includes a IR photo detector and electronics. It requires no external resistors.

So I'm worried about how you have wired your real LED, the green one, not the 3 terminal IR receiver IC. How is it wired please, both wires go where? and no series resistor used with it? That would be bad bad for your arduino output pin, making it cry in pain and may soon parish.

PS: And Yes you do need to get a multimeter, soon, now, if you plan on building stuff with an Arduino. A multimeter is to a electronic hobbyist what a text editor is to a programmer, you can't do proper work without one.

Lefty

Again, thanks for clearing things up!

The LED is connected like this: http://arduino.cc/en/uploads/Tutorial/ExampleCircuit_bb.png

The LED is connected like this:

OK, unpower your Arduino and don't use that led wired like that until you install a series resistor of the size we have already calculated or higher, 75 to 500 ohms should work. The way you have it is shorting out pin 13 and it will soon burn out and may already be weakened and fail later. Don't be too concerned as replacement AVR328 controller chip with bootloader installed can be had for around \$6: http://www.sparkfun.com/products/9217.

PS: Order a multimeter while you are at it. ;)

Lefty

Since its a Duemilanove, its an entirely pointless exercise anyhow, theres already a correctly wired LED with resistor on the board for pin 13.

The real problem is that there are many out of date tutorials on the internet from the Arduino NG days which didn't have an LED already connected but did have a series resistor on pin 13 and it was accepted practice to just plug an LED straight in. Noobs just blindly follow 'em.....