Pages: [1]   Go Down
Author Topic: Project 02 - led and resistor connection question  (Read 4673 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I'm new to electronics and have a question about the wiring for project 02

Pins 3,4 and 5 are set to OUTPUT and connect directly to the  anodes of 3 LEDs. The cathodes  of each then lead to a 220-ohm resistor, which then connect to earth

I'm confused by this because in project 01 a 220-ohm resistor sat in between live and the anode of a LED apparently to protect it from burning out (it mentioned that 23 milliamps was the maximum that could safely flow through the LED).

In project 02 it seems that the resistors are connected at a point after the current has entered the LED so I don't understand how they are protecting the LEDs (which they obviously are because nothing's melting : )

It seems that I'm missing some fundamental understanding about the flow of current. Can someone correct my thinking please?

Cheers
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27386
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

Pin-LED-Resistor-GND
and
Pin-Resistor-LED-GND
are the same electrically, just 1 series circuit. Order of LED/Resistor does not matter.
Each LED needs a resistor tho, unless your code will ensure that only 1 at a time will be on.
Otherwise brightness will vary as you 1, 2, or 3 on.
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.

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

OK that's great.

I wondered if that might be the case. Thanks for adjusting my thinking smiley
Logged

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

I had this same question, and it's helpful to know.  However, does anyone know why the order of resistor and LED doesn't matter in a simple circuit? When does it matter?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27386
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

Current thru both parts is the same - thus, it never matters.
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.

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

My first post! Maybe this will help to clarify about the position of the Led and Resistor. Think about plumbing and imagine the current flowing through your circuit is water. Its easy to see how water is restricted to flow only as fast as the smallest pipe will let it. The small pipe is the resistor in your circuit and the effect is that current slows on both sides of it. The current behaves like water would. So your LED is not going to over heat no matter what side of the resistor it is on. This analogy helped me grasp the current concept better and I hope it helps everyone.
Logged

WIsconsin
Offline Offline
Full Member
***
Karma: 3
Posts: 159
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks.

I just registered to ask this exact same question. It was a little strange to see someone else asked it.

I thought from project 1 that the resistor needed to be before the LED in order to prevent the LED from burning out. Then, in project 2 the resistor is on the other side of the LED, and the book really didn't explain why this was the case.

Thanks for the explanation!
Logged

Pages: [1]   Go Up
Jump to: