Arduino Forum

Using Arduino => General Electronics => Topic started by: PerryBebbington on Dec 15, 2019, 02:32 pm

Title: Common ground and why you need one
Post by: PerryBebbington on Dec 15, 2019, 02:32 pm
A common mistake for people new to electronics is to have 2 circuits fed from different power supplies with signals passing between the circuits, but with the grounds not connected. This leads to questions asking why the project doesn't work. You don't have to spend long reading these fora to see this is asked often. Here I attempt to explain the problem and why it matters to connect the grounds. Note that in all of the schematics that follow I have used a battery as a power supply; this is not important, the power supply could by anything that can supply the appropriate DC voltage. What is important is how it is connected.

Electrical circuits are called 'circuits' because for them to work there has to be a complete, uninterrupted circuit all the way around and back to the power supply. Not just any power supply, the power supply that is supplying that bit of the circuit.

Consider these two circuits with a power supply and LED:
(https://forum.arduino.cc/index.php?action=dlattach;topic=653831.0;attach=337499)
In the top circuit the LED does not light as the circuit is not complete and the current cannot flow all the way round. The bottom circuit is complete and the current can flow, lighting the LED. This is an important principal and applies to all circuits, however complex, including micro-controllers, which are very complex inside.

This schematic shows 2 devices connected to separate power supplies and with a signal between them.
(https://forum.arduino.cc/index.php?action=dlattach;topic=653831.0;attach=338200)
Device 1 has an output connected to an input on device 2. In this schematic the ground of device 1 is not connected to device 2, which means the current representing the signal from device 1 can get to device 2 but it cannot get back to device 1's power supply, so the signal connection between the two devices does not work as the circuit is not complete.

In this schematic the grounds are connected:
(https://forum.arduino.cc/index.php?action=dlattach;topic=653831.0;attach=338198)
Now the signal from device 1 to device 2 has a complete circuit from the power supply of device 1, through the output of device 1 to the input of device 2 and then back to device 1's power supply. The circuit is complete and will work.

Credits
Thank you Robin 2 (https://forum.arduino.cc/index.php?action=profile;u=174714) and Ballscrewbob (https://forum.arduino.cc/index.php?action=profile;u=261482) for your help with this tutorial
Title: Re: Common ground and why you need one
Post by: ballscrewbob on Dec 21, 2019, 08:37 pm
Two common methods of grounding.

Common ground can be broken out as two types. (simplified)

Both are known as GROUND.
In most cases you will probably use something similar to the post from Perry

However if you are planning a CNC, multiple motors, servos, actuators etc. type of project there is another method to consider.

STAR GROUNDING

In its most simplistic it is a central point where all grounds meet using a "star" formation.
Often also used in audio, musical instrument situations to name just two.

The star ground is a single reference that connects both analog and digital ground planes.
This is to help eliminate ground loops.
A ground loop (simplified) is a dual route to ground that can cause signals to interfere with each other.
They can often be awkward to diagnose and in some cases fix.

(https://forum.arduino.cc/index.php?action=dlattach;topic=653831.0;attach=338376)

Electrically there can be multiple differences in the way both schemes work even though it may on the surface look like the grounds are all just connected to each other.

Simple GROUND tips.


Other aspects to be considered but not dealt with here are :-

And a few more but for the purposes of keeping it simple I only added the above to compliment Perry's post.

Also my thanks to Robin and Perry for the insights and assistance.

Title: Re: Common ground and why you need one
Post by: PerryBebbington on Jan 01, 2020, 02:03 pm
Sometimes you don't want to connect the ground of one circuit to the ground of another because you want to isolate the power supply of one from the other. In this case you need something that will pass the signal from one part to the other without any electrical connection. Common devices that can do this are relays and opto-isolators. Relays use magnetically operated mechanical contacts to transfer the signal from their input to output, opto-isolators use light. Both provide electrical isolation between 2 separate circuits.

The example below shows a relay used to isolate a low voltage circuit from a mains powered circuit. The common reason for doing this is safety; you are not at risk from electric shock if you touch the low voltage circuit even though it is controlling mains.

(https://forum.arduino.cc/index.php?action=dlattach;topic=653831.0;attach=339932)
Title: Re: Common ground and why you need one
Post by: Franzaforta on Feb 22, 2020, 10:56 pm
Thank you for your explanation... but I still don't get it! I am very sorry!

Why can the current from device 1 not simply flow off into ground of device 2? I understand that there must be a current flow. But why does the current have to flow back to the SAME ground? For batteries, I imagine that there could be some kind of capacity/limit of how much current can be dumped into their ground. But if the power supply uses a power socket ground, the need for common ground is completely mysterious to me.

For circuit 1, why does it matter if some current is lost along the way?

For circuit 2, why does it matter if its ground has to sink a little more than the + side of the power supply provides?

Title: Re: Common ground and why you need one
Post by: ballscrewbob on Feb 23, 2020, 01:29 am
@Franzaforta

I  might not explain this too well so forgive me if I am a little off base.

Take a signal sent to a device.
That signal can be a series of on/off pulses.
Without a ground it cannot really go anywhere as it needs a "return path"

But you may say "what about radio waves they just go into the atmosphere"
When in fact they do and they dont.
They are in fact referenced to a "ground plane" otherwise they would not get very far at all and probably just interfere with other radio signals.
In short they are  specially tailored interference signals

That same stands for other signals, they have to go somewhere.
You certainly dont want them interfering with other signals that may be critical to a working circuit.
The ground provides a reference of sorts and helps keep the signals confined to the return path (ground) and prevent them from interfering with each other.

Sinking and Sourcing are another different topic in electronics although often related to ground in some form.

As for having one circuit sink a little more current there are times when that can be beneficial and times when it can be a disadvantage. For the most part electronics and more so where signals are involved there is a need to share a common reference point (ground)

I keep using the word reference and that is a KEY factor here.
The posts so far only touch on "ground" issues and are only intended as basic instructions.

There are whole reference books on grounding and when, why, along with sinking and sourcing signals etc.
It was not our intention to go down that route as there are much more qualified topics on the internet and in libraries.






Title: Re: Common ground and why you need one
Post by: PerryBebbington on Feb 23, 2020, 09:25 am
Quote
Why does the current have to flow back to the SAME ground?
It is fundamental to the way electricity works that current has to circulate, it has to start from some source, such as a battery, go around and come back to where it started. This need to circulate is why they are called circuits. Forget the term ground, I think it is confusing you. What matters is the electrons can go back to where they started from.

It is possible to push a lot of electrons in one direction and make it difficult for them to return, what you do that this (https://www.extremeelectronics.co.uk/) happens.

I want to add to this tutorial something that explains 0V, ground and earth, the problem I'm having is those terms are used both interchangeably as if they mean the same thing, and differently by different people in different countries, made worse by the fact that in particular circuits they might well be the same thing.
Title: Re: Common ground and why you need one
Post by: Franzaforta on Feb 23, 2020, 11:35 am
Evidence shows that you are right, so the problem must be my lack of understanding  :)

I mean, even in a battery the current does not flow back exactly to where it came from but to the separate other pole, right? Otherwise if the poles where not separated but connected, there would be a short circuit? But if the poles "power" and "ground" are internally separated anyway, why can the power then not flow to a different ground? In case ground is the literal ground/earth, i assume that there is no real limit as to how much it can absorb? It can easily absorb a lightning strike? Why does it obviously matter that the power source and its specific ground are closely together?
Title: Re: Common ground and why you need one
Post by: PerryBebbington on Feb 23, 2020, 12:50 pm
Quote
In a battery the current does not flow back exactly to where it came from but to the separate other pole.
The poles are not separate, they are joined by the electrolyte. There is no electrolyte between the positive of one battery and the negative of a completely different battery. The battery works because chemical reactions create an imbalance between positive and negative charge carriers on the respective poles; excess electrons on the negative electrode and excess positive ions on the positive pole. The external circuit allows this imbalance to equalise, the electric current in the external circuit is the result of this equalisation process. No such equalisation can take place between 2 separate batteries.
Title: Re: Common ground and why you need one
Post by: Franzaforta on Feb 23, 2020, 06:16 pm
I get it now (at least 99 % so, just some minor questions left, but they do not matter for now).

Many thanks for your friendly/swift/helpful replies!
Title: Re: Common ground and why you need one
Post by: hextejas on Feb 28, 2020, 12:49 pm
It is with great interest that I am trying to follow this.
At one time I think that I nearly set my house on fire by a grounding mistake.
I was installing a new turntable and it had a handy green ground wire. I had no clue what to do with it so i attached it to the
center screw of the house mains supply. It's a ground screw right ??
Kaboom and big smoke mark on the wall.
An electrical engineer from work shook his head and tried to explain signal ground vs power ground.

And that leads to my confusion.
I understand the concept of needing a complete signal/power path but if I have 2 Power requirements, 6v and 3.3v, I don't yet see the reason for needing to hook them together. Then throw in a signal path and things get hairier.

I see more studying is in my future.
Title: Re: Common ground and why you need one
Post by: AJLElectronics on Feb 28, 2020, 01:12 pm
And that leads to my confusion.
I understand the concept of needing a complete signal/power path but if I have 2 Power requirements, 6v and 3.3v, I don't yet see the reason for needing to hook them together. Then throw in a signal path and things get hairier.


You don't "hook them together" but as explained above, you need a reference. As Perry pointed out, terminology varies around the world, so something clear to he and I would be nonsense to an American for instance.

How about instead of "ground" or "earth", we call it "Common"? So the negative (conventionally) side of both power supplies is commoned, so that they both have the same reference.

When you measure a Voltage, it is not absolute, it is a Voltage with reference to something else, usually the negative pole of the power source.
Title: Re: Common ground and why you need one
Post by: herbschwarz on Mar 04, 2020, 05:03 pm
The concept of electrical ground began when radio receiver sets were being
manufactured. At that time, many of the components were large and had to be
mounted firmly. Each set was built on a metal chassis. The power transformer,
tube sockets, i.f. transformers and tuning and filter capacitor(s) were riveted
or bolted to it. At that time, a power supply had a power output terminal and a
return terminal. The engineers decided that the chassis could be considered as
a big, fat wire. So they connected the return wire of each of the power supplies
to the chassis. Then every circuit wherever it was located would have a wire
connected to the chassis for the power supply returns. That saved a lot of wire,
made radios easier to build, better looking inside and cheaper. It was a
win, win situation. The circuits return connections became known as chassis
ground. Later the term was shortened to just ground. (Today, we use ground
planes on many of our PCB's. It's the same idea.) So that is where the power
supply ground came from. Now, it seems to be confusing to some if not many
newcomers to the hobby. Some think that every circuit MUST have a ground.
That is not true. This problem is reinforced by our use of ground symbols
on our schematic diagrams. Just imagine if you had to draw a complex
schematic without using ground symbols. Who could see the real circuit with
all those ground wires in place? What a mess that would be! So we take the
short cuts and use grounds. Another confusion seems to come from the use
of the same ground symbol for different power supplies. Not to worry, the
electrons know where they need to go, so they do not get lost. Maybe if
people think of the ground terminal or symbol as just a return to power
supply, the confusion would be eliminated.
Title: Re: Common ground and why you need one
Post by: aqibi2000 on Mar 20, 2020, 01:11 am
Thank you for your explanation... but I still don't get it! I am very sorry!

Why can the current from device 1 not simply flow off into ground of device 2? I understand that there must be a current flow. But why does the current have to flow back to the SAME ground? For batteries, I imagine that there could be some kind of capacity/limit of how much current can be dumped into their ground. But if the power supply uses a power socket ground, the need for common ground is completely mysterious to me.

For circuit 1, why does it matter if some current is lost along the way?

For circuit 2, why does it matter if its ground has to sink a little more than the + side of the power supply provides?


Hi

to help visualise why the flow of return current must be the same try to think of the power source to be a 'water pump' for it to pump out a certain amount of water that same amount must also enter (which is why current sink and source has to be exactly proportional, thus the need for the common ground to provide the path for it to return)

Please see my below diagram for a visual explanation, not sure how to make the thumb nail preview

(mod edit)
(https://forum.arduino.cc/index.php?action=dlattach;topic=653831.0;attach=352019)

(https://ibb.co/Xb6CFz4]<img src=)">
Title: Re: Common ground and why you need one
Post by: chrismorris on Mar 26, 2020, 08:00 am
Great! Thanks for sharing
Title: Re: Common ground and why you need one
Post by: PerryBebbington on May 27, 2020, 05:02 pm
I have now asked the moderators to lock this topic.

Please do not send me a PM with questions about this tutorial; I will just reply telling you to use the forum.

If you have a question about this tutorial please read
General guidance (https://forum.arduino.cc/index.php?topic=652669.0") and
How to use this forum (https://forum.arduino.cc/index.php?topic=148850.0)
and then start a new question in the appropriate forum.

Thank you.