Go Down

Topic: Current flow and resistors position (Read 3025 times) previous topic - next topic

Symbol

I am entirely new to electronics, and extremely ignorant about electricity and all the related physics. Needless to say most of this terminology is new to me. I've bought Arduino Uno starter's kit and managed to make most of the sample projects, but I'm still pretty much confused regarding some basics, and the more I research the more confused I get.

First thing I've learned is connecting a resistor, a button and an LED in series in Project 01. The resistor is connected to the positive terminal of the LED and the negative is connected to ground. (As can be seen here: http://i.ytimg.com/vi/osrMjDeGaFo/maxresdefault.jpg)
However, in Project 02 the LED is connected to the negative terminal. This does not seem to matter, from tests I've done, but even after some research I could not understand why.
(Does it have anything to do with series connection? does this not apply in parallel?)

This raised another question to my head - current flow. I've always been taught that current flows from positive terminal to the negative terminal, but now I've learned that the opposite is correct. This puzzles me.
So when I connect a circuit with Arduino, does the current flow from the GND pin? (to 5v..? does not make any sense!) or is it simply that GND is positive and 5v is the negative end? (so is it -5v? what does that even mean?)
Everywhere I look the wording is a little different and only increasing my confusion. In the end, the answer is mostly "if you reverse the direction, the math works".
What does that mean? trying to visualize this looking at Project 09 completely confused me, as it has a diode (unless the polarity reverses as well it doesn't make any sense? or does that have to do with a circuit not being fully closed?), a transistor (current flowing in the opposite direction looks weird...) and output from arduino pin (which later connects to GND... so what direction is this flowing?)
(Something like this..: http://forum.arduino.cc/index.php?action=dlattach;topic=169141.0;attach=45038;image)
Either way, diodes, output pins or whatever - I can't get my head around this idea. Just when I thought I understood the flow from positive to negative...

And last for now, as I want to understand these basics before I start blowing things up - looking at Project 09, with the motor, I don't understand why two different power sources need to have common ground. Couldn't this damage the arduino? won't some excess voltage flow to the Arduino's GND? (which is... bad?)

KeithRB

Originally it was thought that the charge carrier was positive and that it flowed from positive to negative. Eventually they figured out that it was the *electron* that was usually the charge carrier and that electrons flowed from negative to positive.

But from the high level of resistors, capacitors and transistors it makes no difference. You can think about it any way you want.

Grounds must be connected since the voltages need a common reference point. You do not need to worry about damaging things due to common grounds.

fabelizer

Just to add to Keith's reply, you can think of it either way as he says, you just need to think of it the same way all the time so you don't get confused. If you are comfortable with conventional current flow, positive to negative, use that. The actual electrons that are the physical current are moving the other way, but it really doesn't matter at this level. It is good to know, but it doesn't matter unless you are working at a molecular level.

Regarding resistor position:
If you are creating a single path for current, e.g voltage source>LED>resistor>ground, the position is not important because of WHY you are using the resistor. You are using it to limit the current through the LED, which is actually a diode. A diode will destroy itself if you let unlimited current flow through it. In this case, you want to keep the current to a safe level, and since all the current is the same in all points of a series circuit, it doesn't matter if the resistor or LED are connected to the positive terminal (in this case your arduino pin).

For someone starting out in electronics, I would highly suggest mastering Ohm's Law. It is the key to understanding the whole of electronics. Your Arduino will help with that. If you actually take the time to figure out how the resistor protects the LED, (and your arduino pin), then do some very simple calculations, you can start to understand.

For example, the very most current an arduino pin should be required to sink (when it is the negative terminal) or source (when it is the positive terminal) is .040A or 40mA. In practice, you should always use less current, but that is the maximum. So, if you just hook up a regular garden variety red LED, it will likely drop about 2.0V across it, and it needs 10-20mA to make a pretty bright red light. So, let's just arbitrarily pick 15mA of current through the LED. Since a diode (LED) will conduct in a forward biased mode as much current as you allow it to have, but it is a small device and cannot get rid of a lot of heat quickly, it also has a maximum power rating.  Let's say 100mW. (.1 Watt). If you check the power the LED will have to disburse as heat, by Ohm's Law, 2V*.015A = 30mW (.03 Watts). So, we know we can safely put that current through the LED. Now, what about the resistor? How much resistance to supply only that much current?

The LED drops about 2V, the resistor has to drop the other 3V, because your arduino pin is going to put out 5V. Since we need to use all the voltage, we want to know what resistance will use up (drop) 3V across it at our desired 15mA of current. Ohm's Law...3V/.015A = 200 ohms. So we know the current in all points in a series circuit is the same, and we know that 200 ohms will drop 3v at our desired current. We're good....except for one thing, the resistor gets drops that voltage the same way the LED does, by converting to heat, so how big (physically) of a resistor do we need to get rid of the heat? Ohm's Law 3V*.015A = .045 W (45mW) which is way less than a 1/4W, less than half of an 1/8W, so thought there are 1/16W resistors with wire leads, it is pretty safe to say anything you would have that is easy to see the colors on would work just fine! (most common size in kits is 1/4W) And everything works great!

Parallel circuits are different. The current through each of the paths for current are different according to the resistance in that path. Get the series thing down, move to parallel after you can do what I did for any series circuit. In a series circuit, the voltages are different, in a parallel circuit, the currents are different.

It all still comes down to Ohm's Law!

HTH,
-fab
 

JimboZA

It might help if you have a look at the photos I posted in replies 7, 8 and 9 of this thread.

They show firstly that the current in a series circuit is the same wherever you measure it, and that the respective voltage across the LED and the resistor is the same regardless of the connection sequence (led...resistor or resistor...led).
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

Grumpy_Mike

Quote
I've always been taught that current flows from positive terminal to the negative terminal, but now I've learned that the opposite is correct. This puzzles me.
It is correct but if you think it matters you are not understanding electricity correctly.
Many beginners think that the electricity is "used up" by the first component it encounters in a series circuit. This is totally wrong. The same current flows through every component in a series circuit. It is all components that determine the current in a series circuit, therefore it does not matter which direction you consider it is flowing.

MarkT

(conventional) current naturally(*) flows from positive to negative voltage, charge carriers
might flow either way (and do in a transistor). Current is defined as rate of flow of charge,
and electric charge is a signed quantity.  Charge carriers of either sign exist (in semiconductors
and liquids for instance).

Or put another way electron flow is electron flow, not current.  Current is more abstract.

(*) naturally means not inside a battery or dynamo, ie when electricity is powering the
component, not the other way round.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Symbol

Thank you all for your answers. I'm starting to get a clearer picture.

Originally it was thought that the charge carrier was positive and that it flowed from positive to negative. Eventually they figured out that it was the *electron* that was usually the charge carrier and that electrons flowed from negative to positive.
Ah. "usually" is really the key word here for me. I've watched some YouTube videos explaining some more and now I understand - this is just the direction because we use copper wires? if I was to use different materials - where positive particles move - in the entire circuit, it would simply flow the conventional way?

Just to add to Keith's reply, you can think of it either way as he says, you just need to think of it the same way all the time so you don't get confused. If you are comfortable with conventional current flow, positive to negative, use that. The actual electrons that are the physical current are moving the other way, but it really doesn't matter at this level. It is good to know, but it doesn't matter unless you are working at a molecular level.

For someone starting out in electronics, I would highly suggest mastering Ohm's Law. It is the key to understanding the whole of electronics. Your Arduino will help with that. If you actually take the time to figure out how the resistor protects the LED, (and your arduino pin), then do some very simple calculations, you can start to understand.

For example, the very most current an arduino pin should be required to sink (when it is the negative terminal) or source (when it is the positive terminal) is .040A or 40mA. In practice, you should always use less current, but that is the maximum. So, if you just hook up a regular garden variety red LED, it will likely drop about 2.0V across it, and it needs 10-20mA to make a pretty bright red light. So, let's just arbitrarily pick 15mA of current through the LED. Since a diode (LED) will conduct in a forward biased mode as much current as you allow it to have, but it is a small device and cannot get rid of a lot of heat quickly, it also has a maximum power rating.  Let's say 100mW. (.1 Watt). If you check the power the LED will have to disburse as heat, by Ohm's Law, 2V*.015A = 30mW (.03 Watts). So, we know we can safely put that current through the LED. Now, what about the resistor? How much resistance to supply only that much current?

The LED drops about 2V, the resistor has to drop the other 3V, because your arduino pin is going to put out 5V. Since we need to use all the voltage, we want to know what resistance will use up (drop) 3V across it at our desired 15mA of current. Ohm's Law...3V/.015A = 200 ohms. So we know the current in all points in a series circuit is the same, and we know that 200 ohms will drop 3v at our desired current. We're good....except for one thing, the resistor gets drops that voltage the same way the LED does, by converting to heat, so how big (physically) of a resistor do we need to get rid of the heat? Ohm's Law 3V*.015A = .045 W (45mW) which is way less than a 1/4W, less than half of an 1/8W, so thought there are 1/16W resistors with wire leads, it is pretty safe to say anything you would have that is easy to see the colors on would work just fine! (most common size in kits is 1/4W) And everything works great!

Parallel circuits are different. The current through each of the paths for current are different according to the resistance in that path. Get the series thing down, move to parallel after you can do what I did for any series circuit. In a series circuit, the voltages are different, in a parallel circuit, the currents are different.

It all still comes down to Ohm's Law!

HTH,
-fab
 
Thank you for this. I know I can just take some things "as granted", but I'm just obsessed about knowing everything down to the lowest level of details.
I found some great videos to explain exactly this and much more, perhaps this might help others as well:
https://www.youtube.com/watch?v=djrpGtqryL0

So what you're saying is that the resistor is there because the LED uses whatever it can get, so to prevent it from reaching it's limit we use the resistor, and if I understand correctly that is to convert the rest of the energy (in our case the 3v) to heat.
Now I wonder - say I have a 5v phone charger connected to 120v wall socket. would it use a resistor to lower the voltage? is that the same as just using, or actually "wasting" the energy? or is it more like limiting the amount of energy drawn in the first place? if I was to connect enough LEDs in series, eventually would it have the same effect of the resistor, but with light instead of heat?

It might help if you have a look at the photos I posted in replies 7, 8 and 9 of this thread.

They show firstly that the current in a series circuit is the same wherever you measure it, and that the respective voltage across the LED and the resistor is the same regardless of the connection sequence (led...resistor or resistor...led).
Visualizing this does help.
So if we imagine a circuit like a highway, a circuit in series being an highway with only one lane, then the component with the highest resistivity acts as a bottleneck for the rest of the cars? (that is, charged particles)

It is correct but if you think it matters you are not understanding electricity correctly.
Many beginners think that the electricity is "used up" by the first component it encounters in a series circuit. This is totally wrong. The same current flows through every component in a series circuit. It is all components that determine the current in a series circuit, therefore it does not matter which direction you consider it is flowing.
That is exactly what I thought at first. I still don't understand two things:
1. What about diodes? if they allow positive charge to flow only from anode to cathode, for this to work in reverse, does that mean that negative charge can flow from cathode to anode?
2. What does it mean to "use up" electricity? what happens to the charged particles in the end of the circuit? is it necessarily 0v at GND? let's say when using a battery.


(conventional) current naturally(*) flows from positive to negative voltage, charge carriers
might flow either way (and do in a transistor). Current is defined as rate of flow of charge,
and electric charge is a signed quantity.  Charge carriers of either sign exist (in semiconductors
and liquids for instance).

Or put another way electron flow is electron flow, not current.  Current is more abstract.

(*) naturally means not inside a battery or dynamo, ie when electricity is powering the
component, not the other way round.
Can there be a circuit, or for simplicity let's say just a piece of wire, where there is a current in both directions?

JimboZA

Quote
So if we imagine a circuit like a highway, a circuit in series being an highway with only one lane, then the component with the highest resistivity acts as a bottleneck for the rest of the cars?
Not really: in a series circuit, the resistances all add up. Together, they give a total series resistance, which when divided into the voltage, gives the current which must be the same everywhere.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

KeithRB

It has nothing to do with Copper wire. It was just Ben Franklin's fault when he set up his convention.

Symbol

Not really: in a series circuit, the resistances all add up. Together, they give a total series resistance, which when divided into the voltage, gives the current which must be the same everywhere.
Okay this makes sense. So to rephrase, it is as if the sum of the resistivity (sum of lanes?) is the speed of the traffic, in relation to the voltage which is... like what? how long the highway is?

KeithRB

Don't worry about analogies. Just use the math.

JimboZA

Don't worry about analogies. Just use the math.
I agree.. the best of analogies fall over at some stage and then the whole things a screw up. Put your effort into understanding the real thing.

Look up Kirchoff's Laws....
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

vffgaston

@Symbol,

By reading your posts and answers it stays quite clear you are a cultivated and inteligent person that is now interested in electronics . . .

As someone said, analogies fail at a certain point: you will save time if you start from the beginning. Sure there are excellent books for begineers in english (there are even in spanish); by means of one of these, patience and practise: multimeter(s), bread board and unexpensive leds, diodes, resistors, capacitors (arduino will help, but in a second stage, in my opinion) and some maths you will get it: what is a mess at the beginnig at a certain points became clear, believe me.

Best regards.

Symbol

Alright. Sounds logical to me.

Thank you all, I will definitely make good use of this forum. :)

DrAzzy

The classic analogy is best imo - water in pipes, with pressure analogous to voltage, and flow rate to current.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Go Up