Earthing of Arduino Board

But I shouldn't be earthed (or it is extremely insignificant) if I am standing on a high voltage bare wire, without touching anything else, even if the wire is connected to a concrete post, touching the Earth. You mean "equalizing" as having a common ground, right? If the Arduino is connected to a USB, the equalizing is much more significant, I "speculate". I connected a wire from my battery powered Arduino's GND pin to the Earth socket in a wall outlet or water pipe, then my finger had more of an effect on a circuit then when it was unconnected to the earth, but not as much as USB power.

Once the resistance between any object and ground is over 1M-ohm or more, it's hardly a ground anymore. So if you're doing your high-wire act on a 10kV power line, you're not conducting much power to earth. The resistance of those wooden poles, ceramic standoffs, and the air around you just don't conduct enough energy to cause any harm. You'll notice, though, at ridiculously high voltages, an air gap becomes less and less effective. Check out a YouTube video of a power station disconnect switch and you'll see what I mean.

But, here where we're dealing with 5v DC, the space between you and the nearest metal object grounded to earth presents enough impedance to effectively isolate you from earth.

The water pipe is earthed, but probably has higher resistance than copper wiring from your AC outlet. After all, it's a water pipe. Its primary purpose is to carry water, not power. That's merely a convenient (usually) side effect. In any case, it wasn't plumbed with the express intent to be as close to 0 ohms as possible. House wiring, on the other hand, is. (Not that it's 0 ohms, otherwise ground loops would never exist, but ideally it's closer.)

Now why would you make a more significant difference when powered by USB than when grounded to the wall? I don't know exactly, but I speculate it has something to do with the amount of noise on the USB circuit. Ground isn't a black hole. It's subject to physical limitations, and can be noisy.

About the equalizing bit... Let's say you have two bedrooms. It's winter out, and in one room you have the window wide open. In the other room, you're well insulated and the heating vent is open. One room will be cold, the other warm. Now let's say there's a door between them -- like one of those hotel rooms that is connected to the next suite. If you open this door, the cold room will become warmer, and the warm room cooler, until they reach equilibrium.

This is what happens when you take two isolated circuits and connect their grounds together. (Or, you touch ground on a battery-operated circuit.) The two will equalize, and you now have a common reference. If you didn't connect grounds, and you tried to read the voltage on circuit A with the ground on circuit B as your reference, the results are undefined.

It's like telling someone that a jar in one of your rooms is 10 degrees above ambient. Well, what's ambient? Without that, you can't know the absolute temperature of the jar.

Do you mean "undefined" as unable to measure the voltage? http://arduino.cc/forum/index.php/topic,102717.0.html is another forum post I made that talks about me doing an EMF detector, but when I touch the wire to the A0 pin (A0 is tied to ground via 3.6M ohm resistance), the output reads ~0.3V only when the computer is connected to the Arduino!

Since you're higher resistance than the USB port, motherboard, PSU, power cable, and house wiring, your ground potential is slightly different than its own ground reference. Thus, you induce some voltage (the difference) and it is read as a signal.

So is this supposed to cause some ground loop (I don't really understand ground loops)? So when I touch the wire, I should establish some circuit like Ground Loop.png, right? I tried recreating this circuit (Ground Loop 2.png), and measure no difference (even in the 200mV range of my multimeter). Am I doing it incorrectly, or am I completely wrong? I am using battery power.

In Ground Loop 2.png, I took a GND lead from my Arduino, connect it to another GND lead via 3.6M ohm resistance. I tried to measure a voltage across the resistance (2 1.8M ohm resisters in series).

Ground Loop.PNG

Ground Loop 2.PNG

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. :slight_smile:

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.

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.

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.

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.

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.)

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.

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.

Sorry, I prefer to work with graphics.

I'm visual too. Also lazy. :wink:

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. :slight_smile:

relay.png

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.

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!

I might get schooled here soon. :slight_smile:

I don't think that PaulS would have said that if you hadn't said this!

Also lazy. :wink:

Compared your posts to mine!

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.

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

And Uranus I believe. :wink:

Uhh... where did everyone go? Now we're not talking about anything! :frowning:

This convo isn't over yet

What does "convo" mean? I searched it on Google, and found only "convoy".

Maybe they should have a catagory for that.

Google gave up on "catagory"

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'". :wink:

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

Sorry winner but that is simply not true.

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

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: Car battery, Transformer, Inductance Charger, Mains Power, etc. - #9 by system - General Discussion - Arduino Forum, etc.

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

Form an other thread by the same poster:-

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.

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.

the Arduino is very sensitive to the mains EMFs

No it is not, no more or less than most electronic circuitry.

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.

Tru its not perfect, but still quite amazing, I didn't believe the guy at work when he said it works, then in a back garage on the opposite side of the house where the service is bonded to the ground at the water main and ground rod he got 2ohms with his fluke meter
but that reason of not having a return path that's why the battery would have less apparent noise I think, the induced voltage from your body is also being induced into the board and battery so no current flows
if you put an oscilloscope on a battery terminal and don't connect the ground clip you can see the absorbed emf the same as if you put your finger on it, obviously not as much as 150lbs of water but similiar effect

the induced voltage from your body is also being induced into the board and battery so no current flows

What you are describing is a differential input effect. Or rather a common mode input.

Electromagnetic pickup does not work like this because the pickup is not balanced.