# Have a Question regarding resistors and placement

Hi guys. I’ve been following a few tutorials, both adafruit and from the book: Getting Started with Arduino.

With the adafruit tutorials, the circuit goes 5v(Or specific pin turned HIGH) > Resistor > LED > Ground

This makes sense to me, as the resistor is before the LED.

In the GSWA Book, they show 5v (Or specific pin) > LED > resistor > Ground

Here are some pictures to illustrate where I’m getting this:

From the book:

Am I correct in assuming it doesn’t matter where the resistor is placed, as long as it is there, either between the LED and ground, or LED and 5v? And would you mind explaining why this is?

Thanks!

Yes the resistor can go on either side, its restricting the amount of current that is flowing tru the whole circuit

And would you mind explaining why this is?

You can think of it like a flow of water in a tube and the LED being a turbine.

If you restrict the flow before a turbine then the speed decreases. If you restrict the flow after the turbine then it does the same thing becuase the water cannot move through through the turbine any faster.

It is the same with circuits, you are restricting the flow of electrons around the circuit.

Mowcius

It raises the question, which is before and which is after ?. Components are marked to suit the old convention that current flows from positive to negative (eg the arrow on the diode), but its generally accepted nowadays that current actually flows in the opposite direction. Just as well it doesn’t matter…

I think he has been answered now so just an aside.

I was told in Electronics 101 that electrons flow from neg to pos and that “holes” flow from pos to neg , just not so many of them . It wasn’t until much later I realised this was a lecturers creation to cover conventional current flow . They obviously got it wrong at the start . They guessed at one way or the other .

Lately in my mental meanders I thought I should suggest that as holes are obviously different to electrons then it should be possible to block the flow of one and allow the flow of the other.

I wonder what we would get if it actually were true?
A holy stream ? Perhaps thats where religion comes from.

Wow, thanks guys! I know I didn’t start this thread, but I’m just now realizing I never really understood how that worked!

!Muchas Gracias!