Go Down

### Topic: Why a resistor to ground? (Read 9001 times)previous topic - next topic

#### j03m

##### Jul 15, 2013, 04:32 pm
I'm sure this is a total n00b question, so apologies in advance, but I'm reading my Arduino starter manual and on project 2 the space ship interface, I noticed that LEDS are connected back to ground through a resistor. Where as in project 1 a resistor is used from power before the LED. The latter made sense to me as to reduce the amount of current to the LED, but the former doesn't compute? Why do we need a resistor to ground?

#### AWOL

#1
##### Jul 15, 2013, 04:34 pm
It doesn't matter which side of the LED you wire the current-limiting resistor

#### j03m

#2
##### Jul 15, 2013, 04:39 pm
Okay, I think I understand. So a resistor will effect the whole circuit? I thought that before the resistor would be at a normal level and after the resistor would be reduced (like a dam). Is there a physical law that explains this that I can read more about?

#3
##### Jul 15, 2013, 04:40 pm
Need a resistor in series with the LED.

pin-anode, cathode-resistor-Gnd.  Requires High on pin to turn LED on.
Also acceptable:  pin-resistor-anode, cathode-Gnd.

+5-resistor-anode, cathode-pin.  Requires Low on pin to turn LED on.
Also acceptable: +5-anode, cathode-resistor-pin.

The resistor determines the amount of current that will flow in the LED. Most LEDs have a max of 20mA.
So: (5V-Vf of LED)/20mA = resistor value needed.
Ex for typical Red LED: (5V-2.2V)/.02 = 140 ohm. 150 is standard value use that
(5V-2.2V)/150 ohm = 18.6mA of current
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### AWOL

#4
##### Jul 15, 2013, 04:41 pm
I think the applicable law is Kirchoff's

#### j03m

#5
##### Jul 15, 2013, 04:46 pm
You guys rock, thank you for being so responsive.

Also, while looking around on electronics stackexchange, I found this which was helpful to me. Posting in case any other nubs stumble across this:

http://electronics.stackexchange.com/questions/13746/why-does-a-resistor-need-to-be-on-the-anode-of-an-led/13749#13749

Endolith (second voted answer at this time) illustration was useful for me.

Thanks again guys.

Go Up