Current Limiting Resistor
zamani
Posts: 4
Hi Fellows,
The expriments outlined in the workbooks all use a resistor·between the pin and the rest of the circuit to limit the current and prevent damage to·STAMP. (am I correct?). Most experiments use 220 Ohm but some use 470 Ohm. How do we come up with these numbers? In order to get these numbers, we need the characteristics of the circuit. Is this what the author has done?
Thanks
Nader·
The expriments outlined in the workbooks all use a resistor·between the pin and the rest of the circuit to limit the current and prevent damage to·STAMP. (am I correct?). Most experiments use 220 Ohm but some use 470 Ohm. How do we come up with these numbers? In order to get these numbers, we need the characteristics of the circuit. Is this what the author has done?
Thanks
Nader·
Comments
When using LEDs and other devices you may want to calculate the resistor value, the 470 is a good starting point for LEDs. Why? Well -- very generally speaking -- LEDs would like to get something between 5 - 10 mA. If a LED has a a forward voltage of 1.4 volts, we can calulate the resistor value like this:
(5 - 1.4) / 0.1 = 360
360 is not a very common value, but 470 is. By using 470 ohms we get about 7.6 mA through the LED, and that's usually just fine.
Be sure to checkout our "What's A Microcontroller?" book -- it's a great resource and will get you going.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
I can add this though. The BS2 uses a Microchip PIC processor (16C54 I believe) as its processing unit. Thus, you need the I/O characteristics of this chip. Basically, it can source or sink 25 mA through each pin, or 50 mA for the chip as a whole.
Most applications should use nowhere near this much current. The output is either +5 volts, or ground.
For current limiting, if you've tied a +5 volt output directly to ground, the equation is:
V = IR (Voltage = Current * Resistance -- Ohms law).
5V = 25 mA * x Ohms. 5V / 25 mA = x, so x == 200 ohms. 220 ohms is the closest standard resistor value, so they recommend that. With a 220 ohm resistor in series, the pins won't burn out if you accidentally connect them to ground.
Now, for an LED, a lit LED drops 1.4 volts no matter what current goes through it (that's a property of LED's). It will be fully lit with currents from 7 to 12 mA -- let's go for 10 mA. So we get:
(5V - 1.4V) = 10mA * x ohms. 3.6 Volts / 10 mA = x, so x == 360 ohms. We pick a 470 standard value, and apply Ohms law again.
(5V - 1.4V) = x mA * 470 Ohms. 3.6 Volts / 470 = x, so x == 7.6 mA, which is enough to light the LED.
Nader