Pages: [1]   Go Down
Author Topic: Why a resistor to ground?  (Read 1588 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 285
Posts: 25632
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It doesn't matter which side of the LED you wire the current-limiting resistor
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 513
Posts: 26247
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 285
Posts: 25632
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think the applicable law is Kirchoff's
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: