It seems that every time you use Arduino output pins there has to be a resistor. So let's take http://arduino.cc/en/Tutorial/DigitalPins for example. " it is a good idea to connect OUTPUT pins to other devices with 470[ch937] or 1k resistors, unless maximum current draw from the pins is required for a particular application."
Why is it in this case a 470[ch937] or 1k[ch937] resistor required? Is it because the LEDs usually work at a lower voltage than 5V? The resistor lowers the voltage?
What if I wanted to connect a 5V SSR(Omron G3MC-101P) to the output pin? These SSRs are 5V. Would I need to ad an resistor? If so why?
Here is another take I have on this in my mind. You need at least 125[ch937] on the pin. At 5V 40mA(pin max) you have 125[ch937]. Any less resistance would burn the pin. So I guess in any application what ever you put on the pin, it needs to have more resistance than that.
Sorry if I am a complete idiot and I got it all wrong...
When you are building a project on a breadboard or some other substrate where you plug wires in there is always the chance that you will wire something wrong or write your code so two devices are sending voltage on the same wire at the same time. The resistor is there to limit the current to a value small enough that the pin can absorb it without damage.
A resistor limits the flow of current. When current is flowing through a resistor is develops a voltage across it. That's it. As the voltage across a resistor increases so does the current, the relationship is linear. That is double the voltage and you double the current.
Now an LED (and other semiconductors) are none linear, that is you don't get a straight line relationship between voltage and current, they are sort of like a voltage dependant resistance. So an LED will be linear until you reach a threshold or turn on voltage, after that any small increase in voltage increases the current a lot, enough to exceed the maximum current the device can take and burn it out. This happens normally between 1.7V and 2.5V depending on the colour.
So if you were to put it across a 5V battery it would burn out.
So you put a resistor in line with it so that as the LED takes more current the resistor has more voltage across it. The resistor takes the excess voltage off the LED and keeps the current to a sensible limit. The small the resistor the bigger this limit is, if the resistor disappears to zero the limit climes up to infinity, not nice.
Yes 125[ch937] is the maximum load a pin can drive and still have 5V across it.
In this case the Arduino is a factor limiting the current as well as the load, however, you could draw more current out of it only the voltage will drop. That's why you can connect an LED directly to an output pin as the output voltage will drop to the turn on voltage of the LED. However, you don't want to do this because you will be stressing both the LED and the Arduino.
Feeding the Arduino into a higher impedance load, like an other logic IC or a FET will not require a limiting resistor. Low impedance loads and none linear loads will need one.
This directly relates to a fundamental law in electronics that you should know. Ohm's law. It is:
E=IR
E, is voltage. I is current and R is resistance. This is how we size the resistors. So, at five volts, and 1k resistor, we have 5/1000 or a current of 5mA. If we want 100mA, with a voltage of 5v, it's 5/.1 or 50 ohms.
I was taught that I was for 'ion' as designated by Michael Faraday because his observations were on the chemical reactions resulting form passing electricity through various materials.
The arduino seems to attract wise old pedagogues, someone here probably knows the exact derivation of I
I loved to mess with my teachers, so at once point I asked an electrical engineering professor is "Ampres is measure of current, what are volts a measure of?", expecting the answer of elecromotive force. It took him most of the semester to come up with the answer of "electrical potential."
Early in the standards definition process, the ampere was called "international ampere" so I beleive the symbol "i" comes from that. I did a little reseach: International System of Units from NIST
As long as you substitute the correct values in the equation V=IR when making calculations you can call them whatever you like , give them a petname if you please
As regards to connecting a resistor in series with an LED :
The suggested voltage drop in an LED may vary according to the colour and manufacturing process. Different colours require different voltage drops.
The suggested voltage drop in an LED may vary according to the colour and manufacturing process. Different colours require different voltage drops.
And 2 LEDs produced one after the other in the same batch may also vary because of the manufacturing process which is why you should never connect 2 LEDs directly in parallel on the same resistor.
What if I wanted to connect a 5V SSR(Omron G3MC-101P) to the output pin? These SSRs are 5V. Would I need to ad an resistor? If so why?
In this case, the opposite is true. Your relay will probably need more current than what the pin can provide. Even though the voltage is 5, that doesn't necessarily mean that you have the current to throw the switch.
Ref the datasheet and discover what amperage the relay needs to flip the switch. Most relays need more than what an Arduino pin can provide. You will need to rig something else up, such as a transistor that will be closed by the Arduino pin, allowing the 5v pin on Arduino to power the relay.
Just got my brand-new Arduino Diecimila and I've figured out how to connect it to my laptop and make the LED blink. Now I'm ready to order a bunch more LEDs and resistors.
Thank you for the Ohms Law lessons. So, If I understand correctly, the current rating on the LED is the important factor here. The stats I have found say the MAX output on a digital pin is 40ma. I get that. So am I to also understand the output voltage of the same pin is 5vdc? I've looked and saw no explicit call out of the voltage - or is that also dependent on the voltage source, I.E. USB, battery or wall wart?
Sorry for the quite possibly dumb questions - it's gonna be tough to teach this old dog new tricks.
The voltage is 5 volts for most type of arduino board, although a few are 3.3volts. You can check the specs for the board you are using, but If you assume the VCC (the operating voltage) is 5 volts, the LED will work (although a little less bright) on a 3.3v board .