Go Down

Topic: Project 2 - Resistor from Cathode? (Read 1 time) previous topic - next topic

notflip

I'm confused by why in project 2, the resistor is behind the LED? And not before the LED to protect it from burning out?
Or am i getting this wrong?

Thanks!

CrossRoads

Order does not matter.  Current will be limited by the resistor both ways.
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.

notflip


Order does not matter.  Current will be limited by the resistor both ways.


Thank you very much! Is there a best practice? Or the way most people do it or does it really not matter?
Oh and for the digital outs, do you need a resistor? Or will the led not be destroyed from digital out?

thanks!

CrossRoads

Best practice, I don't think so.
LED will not be destroyed from digital out if you are using a current limit resistor.
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.

CSGuy

So many people ask this same question. I wish the book would have explained why they did this. It's not instantly obvious when you are just starting out that you can put the resistor on either side.

CSGuy

#5
Mar 11, 2014, 06:16 am Last Edit: Mar 11, 2014, 06:19 am by CSGuy Reason: 1
So I'm wondering why doesn't this work at other times?

Sorry about the bad pictures, but I think you can get the point...

On one picture. I put the power into one side of the switch, and the resistor on the other side, then a green wire to Arduino on the side with the resistor. This works fine.

On the other picture I plug the resistor before the switch, a black wire to ground and the green to Arduino. This does nothing. Arduino is never informed when the switch is pushed.

If I try another hookup, putting a red wire from power, and a 10k ohm resistor on one side of the switch, and ground and green to Arduino on the other side, the Arduino craps out and turns off when I press the switch... So that's clearly wrong.

I don't understand what makes a difference. Why can't I put the resistor after the switch, like I can with an LED, and why does hooking both power and resistor to the same side make the Arduino crap out?

Top picture nothing happens (resistor from power to switch, green Arduino, black ground).
Middle picture works fine (resistor going to ground, green Arduino).
Bottom picture, resistor going to power, Arduino craps out.


CrossRoads

Does this make sense?
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.

Go Up