Pages: 1 [2] 3   Go Down
Author Topic: Earthing of Arduino Board  (Read 5457 times)
0 Members and 1 Guest are viewing this topic.
Anchorage, AK
Offline Offline
Edison Member
*
Karma: 42
Posts: 1176
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ground loops are superficially easy to understand, but defining exactly what happens can take experienced engineers entire articles to explain.  I'm way out of my league there.  The essential gist is that a ground loop is when there are multiple paths to ground, so instead of voltage flowing directly to the nearest ground, it may follow an alternate route that you haven't anticipated.

Here's an example.  Let's say you have an amplifier in your garage, for playing tunes while you work on your car.  You decide you want to listen to some music on your computer, so you run a long cable from your office or living room, through the house, and into the garage.

The amp is grounded through the power outlet in the garage.  Your computer is grounded to the outlet in your house.  The amp and computer are also grounded to each other through the audio cable.  Now, because all cables have resistance, and many homes have old wiring with worn-out connections and outlets, the resistance between the breaker panel and the power outlet is probably substantial enough that the inside room's ground and garage's ground are not equal.  So, the amp could very well find a lower resistance path through the audio cable and into the computer.  The result being AC offset signals on the audio input, and therefore hummmmmmmmmmmmmmmmm...

Ground is ideally a 0v reference, any deviation from this is detected as a signal.  You hear it in an audio signal, but in digital electronics, it manifests in other ways.

Let's look at your first diagram there, with the two high-value resistors to ground.  Imagine that top line is like a strip of copper on a PCB.  From that line, let's say you have the ground side of the coil from five relays in a row, which are clicking away independently.  Every time one of those relays turns on, there is current flowing through the coil, to that trace on the PCB.  If the center relay is on, what's the voltage on that trace?  It should be zero, with reference to ground, because it's connected to ground.  But it won't be, because there are fat resistors between the relays and the real ground point.  This is an extreme example, because your ground reference will hopefully have less than M-ohms of resistance.  But even if it's 1 ohm, will the voltage on that top line be exactly 0v?  Nope.

So, if that center relay is on, dumping 5v into a high-resistance path to ground, what does that mean for the relays on either side of it?  What is their reference?  Current prefers to flow where there's lower impedance, so it'll flow more toward the side with the lower value resistor.  Now there's a difference between the ground reference of the leftmost relay and the rightmost relay.  If this offset is high enough, there may not be sufficient voltage difference between the + and - side of the coil for it to engage.

It can get worse if we used that line on the PCB to connect another circuit.  Imagine we connect it to an LED with a 220 ohm resistor straight to ground.  220 is a lot less than 100M, so the relay current will flow through the LED to get to ground.  (This is a heavily contrived example, but it illustrates that current may flow through a path we didn't intend if it's a lower resistance path.)

The point of all this is, you can't treat a ground as a black hole.  Every connection has some amount of resistance.  Ideally, every ground in your circuit has its own, unshared connection straight back to the reference point.  That way, every component has the same base voltage to compare with.  (This is known as star grounding.)  That's rather impractical in most cases, so instead we commonly use large ground planes to minimize the resistance, which is the second best approach.

The absolute worst approach is to have a bus ground, like the imaginary trace on the PCB with relays attached to it.  The potential will be slightly different at every point along that bus, which could mean instead of going straight to ground, there may be times where the easiest path to earth is through some other component with a lower resistance to ground.  Or, some component may not be working the way it should because the voltage across it isn't what we inteded it to be.

Sorry this is a book.  :-)
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 462
I am a amateur.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The circuit I showed you; the high resistance isn't actually 100M ohm. I don't know the resistance of my house when I am on the second floor, so I made up that resistance. If I establish that circuit, will I actually induce a voltage / current between the Earth and A0? Is there a way I can reproduce this effect using my "floating ground" (it's still a ground)? I know that it is a convention to draw the current from the positive voltage source to a ground (negative). But, in real life, electrons flow from negative (GND) to positive, because they are pulled by the positive charge. So, technically, I am drawing electrons out of the Earth?! Yes, I understand that electrons prefer the easiest path, so the voltage may not be even.

Quote
But it won't be, because there are fat resistors between the relays and the real ground point.
Are you talking about a parallel circuit? In parallel circuits, current is shared between the paths, but the one with lower resistance will get more current. If the + terminal is 5V, the voltage across the relays won't be 5V due to the resistors, I think. But, the voltage in the parallel circuits should be the same, or am I wrong again? Sorry, I prefer to work with graphics. In Ground Loop 3.png, there would be a difference in earth reference between the left relay and the right relay, correct? So the voltage across the relays are not the same as each other.


* Ground Loop 3.PNG (28.52 KB, 767x269 - viewed 7 times.)
Logged


Anchorage, AK
Offline Offline
Edison Member
*
Karma: 42
Posts: 1176
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I don't know the resistance of my house when I am on the second floor, so I made up that resistance.

I don't know what it would be either.  In anything but theory, it's close enough to infinity that it probably doesn't matter.

Quote
If I establish that circuit, will I actually induce a voltage / current between the Earth and A0?

That's beyond what I understand.  I was kinda hoping someone with more electronics experience than me would jump in here.  I understand some theory, but it's part physics, part chemistry, and part magic.  I'm trying to design stuff that works.  How the electrons make their trek from one place to another -- well, I can speculate based on what I know (or think I know).  Sooner or later, I run out of answers.

So.. is it you conducting between earth and A0?  I don't know.  It might be static energy, or the electrons flowing through your body (we are partly electrical beings).  I can assume the amount you measure will vary respective to ground when that ground is earth via USB, or an isolated battery.

Quote
Are you talking about a parallel circuit? In parallel circuits, current is shared between the paths, but the one with lower resistance will get more current.

Yes, right..  See the picture I've attached.  This is more like how I pictured it.  I chose more reasonable resistances of 100 and 3.6 ohms, rather than 100M and 3.6M, because with a 5v source, in reality, those relays will never turn on.  The triggers are 5v square waves, at different frequencies, so they turn on and off independently.  (This was an illustrative point I made in the last post, but otherwise not important.)

Quote
If the + terminal is 5V, the voltage across the relays won't be 5V due to the resistors, I think.

Right.  The coil has its own resistance, so it's essentially a voltage divider.

Quote
But, the voltage in the parallel circuits should be the same, or am I wrong again?

If the trace on the - side of the coils, between the resistors, had 0 ohms resistance, then yes -- the voltage at the top end of both resistors would be the same (and current through each side would be relative to its resistance).  But that trace does have some resistance, so it will affect the voltage at each end.  By how much is proportionate to how much current is flowing.  In most cases, not much different, but if you're dealing with long / thin traces, high current, or very low voltages, it's significant enough that you need to know it's there.

Quote
Sorry, I prefer to work with graphics.

I'm visual too.  Also lazy.  ;-)

Quote
In Ground Loop 3.png, there would be a difference in earth reference between the left relay and the right relay, correct? So the voltage across the relays are not the same as each other.

Well, I didn't intend for the resistors to be parallel to the relays when I wrote my last post, so your diagram 3 has the advantage of having a low-impedance ground reference.  My last post assumes the absurd 100M and 3.6M values between the coil - pins and ground.  (Again, the relays would never actually work this way, it was just an example.)  The voltage through the coils would be nearly exactly the same.  The only thing that prevents them from being precisely the same is variance in the coil impedances (tolerance), and the imperfect nature of the ground bus beneath them.  To help understand the last part, imagine those traces as very low-value resistors, not a straight line.

Since the connections between the relay grounds is not perfect, there will be voltage on the ground bus between relay 1 and 2 if relay 3 is on, for instance.  This affects relay 1 and 2's point of reference, because the + terminal is no longer with respect to 0v.  It's with respect to 0v + the voltage across the ground bus.

The better way to design a PCB based on your latest diagram would be to put the ground connection under relay 2, so it's (closer to) equidistant from each of the relays.  If you have a fourth relay, then you can align them in a square, with the ground lead in the middle.  Or, just make that PCB trace fat enough that its impedance is so low that it doesn't affect your circuit.

We've gotten away from your original quandry (why the capacitive sensing doesn't work from a battery).  I don't really know how to help with that specifically, since I've never tried to do it myself.  All I have is theories, and I'm not sure all those are correct, or if I've explained everything right.  I often find out how much I still have to learn by trying to explain my thoughts to someone else, so I might get schooled here soon.  :-)


* relay.png (8.7 KB, 501x327 - viewed 8 times.)
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 652
Posts: 50853
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
How high off the ground is that rock?  Ten feet, right?
Not necessarily. The analogy was great, except that you said nothing about the orientation of the ladder. A 10 foot ladder leaned up against the side of a house will not have its top 10 feet above ground level. Only a ladder that is vertical will have its top to feet above the ground, but, then, I'm not climbing it to put the rock on top. Lay that ladder flat, and put the rock at the top of the ladder, and the rock is still laying on the ground.
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 462
I am a amateur.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Welcome back, PaulS! I hope you aren't gonna blabble about my ledVal again! Just so you know, we are having a conversation about the Earth and electricity (not ladders or ledVal). It would be nice for you to provide some info!
Quote
I might get schooled here soon.  :-)
I don't think that PaulS would have said that if you hadn't said this!
Quote
Also lazy.  ;-)
Compared your posts to mine!
Quote
We've gotten away from your original quandry (why the capacitive sensing doesn't work from a battery).
What does "quandry" mean? I searched it on Google, and found only "quandary".
This conversation isn't over yet (I hope [because everyone seems to have lost interest]). I hope someone more knowledgable will help us here. If mains electricity never used the Earth as a universal reference (maybe they used a long insulated wire), and I touch a 10kV wire, will I get hurt? How can my extremely large resistance to the Earth affect an Earthed Arduino? This topic seems more related to science than Project Guidance. Maybe they should have a catagory for that. I speculate that connecting my Arduino GND pin to the Earth socket while using battery power will have not cause the same effect as USB power, because the grounds are merely equalizing (door between the different temperature rooms ajar), not becoming only the Earth, if you know what I mean.
« Last Edit: May 12, 2012, 07:52:26 pm by dkl65 » Logged


Global Moderator
Melbourne, Australia
Offline Offline
Brattain Member
*****
Karma: 511
Posts: 19306
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Just so you know, we are having a conversation about the Earth and electricity ...

And Uranus I believe. smiley-wink
Logged

http://www.gammon.com.au/electronics

Please post technical questions on the forum - not to me by personal message. Thanks a lot.

Offline Offline
Sr. Member
****
Karma: 1
Posts: 462
I am a amateur.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Uhh... where did everyone go? Now we're not talking about anything!  smiley-sad
Logged


Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26622
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
This convo isn't over yet
What does "convo" mean? I searched it on Google, and found only "convoy".

Quote
Maybe they should have a catagory for that.
Google gave up on "catagory"
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Sr. Member
****
Karma: 1
Posts: 462
I am a amateur.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What does "convo" mean? I searched it on Google, and found only "convoy".
Someone used it as "conversation". I have changed that word in my post.
P.S. I searched it on Google and I found "short for 'conversation'". smiley-wink
« Last Edit: May 13, 2012, 03:14:27 pm by dkl65 » Logged


Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Someone may have said it, I only skimmed thru but if the arduino is connected to the earth ground then the absorbed emf from your body (originating from the mains) probably likes to go thru ur arduino to the earth ground
when on a battery the arduino ground is no better than you so the current you pass on to the arduino has nowhere to go, both the arduino + and - are fluctuating with that emf, which the arduino doesn't see as much
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34724
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry winner but that is simply not true.
Logged

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It seems to make sense to me, but then again I never really went to school for this stuff lol
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 462
I am a amateur.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe it may be like this: the human body has some capacitance like 100pF. The human body can absorb and release 50/60 Hz EMF from the mains. Mains is wired to the Earth. When the Arduino is connected to the Earth, they have a common reference point, and the Arduino is very sensitive to the mains EMFs. But what I don't get is that, how can I be Earthed enough if I am not standing on the Earth? The path can't be through an insulator.... I also don't get why a near insulator can be used as a common reference point: http://arduino.cc/forum/index.php/topic,105461.msg791490.html, etc.
« Last Edit: May 13, 2012, 10:41:14 am by dkl65 » Logged


Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well in rf doesn't the circuit consist on the actual air waves and the earth?
also I think since capacitors work by a gap(dielectric watever), you act like a capacitor to the ground, ur body which is slightly more conductive, air gap(shoes,floor watever) then the conductive ground
its actually amazing how conductive the actual ground is, if you test continuity from say the ground in an outlet to the actual dirt(stick the probe in the dirt yes) you actually get a short
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34724
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Form an other thread by the same poster:-
Quote
I still don't get why if you stand on the Earth and touch to high voltage wire, you get hurt.
Simply you don't unless you provide a path to ground. Have you ever seen birds perched on a high voltage wire? They are not harmed because there is no path to ground.
If you are insulated from ground you can happily touch a high voltage wire without feeling it. It is while you are touching the high voltage wire that if you touch a ground as well you get a severe shock. Most of the electric shocks I had as a teenager came about from touching a ground, in this respect grounds are as dangerous as high voltages. Touch the two and it is painful.

Quote
The path can't be through an insulator
As has been pointed out there is no such thing as an insulator. Electrical resistance covers the second widest range of values in the whole of Physics (for extra credit what measured parameter covers the widest range).

It only takes a few mA to start to feel an electric shock, and a high voltage can push this through quite high resistances.

Quote
the Arduino is very sensitive to the mains EMFs
No it is not, no more or less than most electronic circuitry.

Quote
if you test continuity from say the ground in an outlet to the actual dirt(stick the probe in the dirt yes) you actually get a short
No you don't there are several ohms between a good earth and an electrical earth. When I was a radio ham I had a good earth consisting of a biscuit tin (U.S. read cookey tin), filled with coke (the coal derivative not the drink) and soil. Buried and watered it produced a good ground. I think there was about 8 ohms between that and the third pin on the mains socket. 
Logged

Pages: 1 [2] 3   Go Up
Jump to: