Hi, can someone please tell me what the currents and voltages are at the pins when in use. I need to calculate what resistors to use with my LEDs but don't know what power I am getting.
Thank you in advance! ![]()
Hi, can someone please tell me what the currents and voltages are at the pins when in use. I need to calculate what resistors to use with my LEDs but don't know what power I am getting.
Thank you in advance! ![]()
Use 5vdc as the source voltage of a digital output pin for calculating a current limiting resistor for use with a LED. The pin has a maximum current rating of around 40ma, but it's best not to run at maximum ratings, better to limit at 20ma which is fine for most standard LEDs.
Beware that there is also a processor chip package current maximum limit of around 200ma of current consumption so don't plan on driving more then 10 output pins at 20ma each.
Lefty
ok, so I dont have to use any resistors and connect a 20mA 5V LED strait between a pin and ground?
Thank you!
ok, so I dont have to use any resistors and connect a 20mA 5V LED strait between a pin and ground?
No to wiring a LED from ground to an output pin, without also a series resistor. Yes you need to compute and install a series resistor!
Not sure about your 5V LED?, a simple LED is not rated by voltage but by it's nominal forward current and it's nominal forward voltage drop.
A typical red led may have an internal forward voltage drop specification of 1.5vdc. So you take your source voltage (5vdc) minus the LED's voltage drop (1.5vdc) and get 3.5vdc. Now you use ohm's law to calculate the resistance needed to limit current to 20ma. So 3.5vdc divided by .020 amps is equal to 175 ohms for the required series connected resistor. Other color LEDs have different forward voltage drops and different recommended continous forward current ratings.
The important concept to understand is that the Arduion digital output pin does not control the amount of current being supplied to the load circuit, it only has a recommended maxium safe current that should be drawn from the pin before possible damage to the output pin. The digital output pin cannot protect it's self without external current limiting components, in your case with a resistor wired is series with the LED.
That make any sense?
Lefty
that makes a lot sense! thank you!
will ask again if i get stuck, thanks!
I realize this probably an older thread, but (sorry, very basic question) I'm wondering how the resistor will limit the current out of the pin when the resistor is located after the pin.
Wouldn't it look like this?
Output(5V) ---->-current too high--->--- Resistor--->--current OK--->
Do I just really not understand how this works? How would the resistance keep the output low enough?
Output(5V) ---->-current too high--->--- Resistor--->--current OK--->
Do I just really not understand how this works? How would the resistance keep the output low enough?
Because in a series circuit, the current flow is the same amount measured anywhere in that series circuit. Think of it as a river flowing, the water into a section is the same as the water leaving that section. Ckeck out Kirchhoff's current law:
In your example:
Output(5V) ---->-current value xx ma--->--- Resistor--->--current same here--->ground
Lefty
Thanks, I think I get it now. It's not like the current is pushed out at full force and then pulled through the resistor. Rather, it's sort of like the devices pull a certain current, and the resistor restricts what that current can be.
So the current stays the same for the entire series circuit.
Thanks again, sorry for such a basic question.
No questions are too basic, Danny. That's what the forum is for, explaining things!