Go Down

### Topic: Project 02 - led and resistor connection question (Read 8908 times)previous topic - next topic

#### bream

##### Dec 26, 2013, 04:57 pm
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

#1
##### Dec 26, 2013, 05:11 pm
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.
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.

#### bream

#2
##### Dec 26, 2013, 05:23 pm
OK that's great.

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

#### EspeciallyYesterday

#3
##### Jan 08, 2014, 02:11 am
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?

#4
##### Jan 08, 2014, 02:27 am
Current thru both parts is the same - thus, it never matters.
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.

#### Sunny_day

#5
##### Jan 23, 2014, 06:30 pm
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.

#### CSGuy

#6
##### Jan 23, 2014, 10:43 pm
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!

#### sagui_surfista

#7
##### Mar 23, 2016, 10:05 pm
Hello all,
I'm new in Arduino and eletronic, what is the correct way to connect the led?

The Led there is two connections anodes and cathodes where, anodes = '+' and cathodes = '-'  right?

Arduino has GND and Pin 13 (in my case I'm using Pin 13), where I have to connect GND and Pin 13 in my Led? Does GND = anode and Pin 13 in cathode?

Thanks

#8
Cathode to GND.

Go Up