Hello! Just got my Arduino this week and it is my first time playing around with electronics. I got the starter kit and most of the tutorials involving LED's use 220 ohms resistors from the cathode to ground. I know that a LED shouldn't use more than 23 milliamps, so wouldn't you want to connect power to the anode using the resistor, rather than grounding it with the resistor?
If someone could help explain to me the reason behind grounding with resistors, it would be greatly appreciated.
VOH (Minimum Voltage that will be recognized as LH when the Pin asserts LH) = 4.2V.
Source current IOH (igonre the -ve sign) = 20 mA.
(Why -ve sign? It is the convntion that currents entering to a node are taken as positive.)
Voltage drop across LED = 1.2V
Apply KVL:
(a) VOH = 1.2 + 220 x I
(b) I = (4.2 - 1.2)/220 = 13.6 mA
If we don't put the resistor in series, the IO pin source huge current that probably will
exceed it maximum limit of 40 mA; this might damage the LED and the port-pin.
220 ohm resistor works here as a current limiting resistor. We may place it at either side of the
LED.
23mA? It all depends on the LED - small LEDs often are rated around 20mA or so, but modern high-efficiency
ones only need 1 or 2 mA to be plenty bright enough.
The LED and the current limiting resistor are in series - the same current flows though them, each produces
its own voltage drop, and the sum of the voltage drops doesn't depend on which order they are connected,
you can place the resistor on the anode, the cathode, or part of it on the cathode and part on the anode if
you want to be difficult!
The current round the circuit flows everywhere simultaneously (at the timescales we are talking here)
[ actually at the timescales where this isn't the case, the circuit layout completely dominates what happens, and Kirchoff's laws do not hold, Maxwell's equations are needed - but none of this need concern you in practice ]
rifdis:
If someone could help explain to me the reason behind grounding with resistors, it would be greatly appreciated.
Thank you!
In a series circuit leg, it doesn't matter where the resistor is in relation to the led, but in general practice, 99% of the circuits you see will have the resistor on the cathode.
The important thing to understand is exactly what the resistor does, and how it affects the current and voltage in a series circuit. Also something to not just dismiss is power. The resistor you used is probably a 1/4Watt resistor. Have a look at ohm's law and try hard to figure out how it is applied to circuits and individual components. It isn't hard, but learning it early will help you more than you know, unless you just plan on following the recipes of others (where's the fun in that??)