7
\$\begingroup\$

Schematic

I'm reading a tutorial and it is showing how to control a DC motor with Arduino board's micro controller. A DC motor is fed by a 9V battery and a transistor is controlling the PWM as in the figure I uploaded.

But the text is also mentioning to connect the grounds of Arduino board and 9V DC together. Why would it be recommended? It seems both Arduino's 5v and 9V battery are floating power supplies. Any ideas why they should be grounded together? Text says it is to obtain a common reference. But what happens if we do not connect them together since both are zero volts (ground)?

\$\endgroup\$
0

4 Answers 4

4
\$\begingroup\$

A battery technically has a positive and a negative terminal. There actually is no ground terminal. The potential across the battery is the voltage which you will see labeled. A 9V battery can just as easily be used as a ±4.5V battery if the positive(+) lead was connected to a +4.5V rail and the negative(-) lead was connected to a -4.5V lead. I've actually seen this done for an audio amp circuit, though I can't recall exactly where. (Sorry for the lack of sourcing).

Semantics aside, let's consider why the grounds should be connected.The main reason I can think of is actually making somewhat more definitive potential differences. That was your 5V will read properly (on a meter) as 5V and your 9V will read as 9V. Otherwise, you have two different points of reference (from each of the two grounds).

The additional benefit is avoiding a "ground loop." When the grounds are not at the same potential level, you clearly have a potential difference. Therefore, you have current flow from one point in your circuit (ground of motor/Arduion) to the other. And it forms a circuit loop between those points. That's just wasteful of power.

\$\endgroup\$
10
  • \$\begingroup\$ but the powers supplies are floating(battery and arduino via pc) they have no common earth ground in case of separate grounding. re u sure about ground loop suspicion? \$\endgroup\$
    – user16307
    Commented Nov 13, 2013 at 22:12
  • \$\begingroup\$ @user16307 For me specifically, I avoid several electrnoic hazards: static shock, copper dust landing on traces, and so on. That last tidbit is really throwing in a little extra. But you should be more aware of two different power sources with no common references. \$\endgroup\$
    – Shabab
    Commented Nov 13, 2013 at 22:21
  • 1
    \$\begingroup\$ @user16307 More importantly, you should consider the transistor, which from the schematic looks independent of the Arduino. For an NPN to function, the base voltage must be higher than the emitter voltage. If the ground potential of the 9V battery is higher such that the base voltage cannot surpass the threshold, and your motor will not activate. \$\endgroup\$
    – Shabab
    Commented Nov 13, 2013 at 22:22
  • \$\begingroup\$ for that to happen gnd of battery must be around 4 volt. how can a battery's gnd can be 4 volt? im not sure in this particular case \$\endgroup\$
    – user16307
    Commented Nov 13, 2013 at 22:25
  • \$\begingroup\$ Electrostatic discharge on the battery or the ground plane of the Arduino board, possibly. \$\endgroup\$
    – Shabab
    Commented Nov 13, 2013 at 22:27
22
\$\begingroup\$

Voltage is not an absolute value. It's pointless to say they're grounds and therefore are the same. It's like suggesting that I'm five miles away from New York and you're nine miles, therefore I just need to walk four miles to get to you. Except it's even worse than that, because that's a reference point, it's more like saying I'm five miles from my destination and you're nine miles from your destination. Are we near each other? We don't know unless our destination is the same place. Ground is just a name for your arbitrary point of reference.

For your voltages, all you have is a reference to a different point. Ground does not inherently mean 0V with reference to any other thing you want to call ground. Call your left thumb ground, a perfectly valid thing to do, and see if that makes sense to you.

So the ground on the battery and the ground on the Arduino could be quite different if referenced to one another or to a different point. The only way you can be sure you have a system with 5V and 9V supplies is if they have a common reference point.

\$\endgroup\$
6
  • \$\begingroup\$ "So the ground on the battery and the ground on the Arduino could be quite different" If I measure two ground's potential differences with a voltmeter do you think it is not more or less 0 volt? And lets say it is 1 Volt What happens in that case? I mean then maybe it will not be 9V anymore ? \$\endgroup\$
    – user16307
    Commented Nov 13, 2013 at 22:06
  • 1
    \$\begingroup\$ @user16307 If you measure two unconnected points (call them whatever you like) you may or may not get 0V, it's floating, naming them both ground won't do anything at all. The 9v node will still be 9v from its ground, but there is no telling if it'll be 9v from the other ground. \$\endgroup\$
    – Samuel
    Commented Nov 13, 2013 at 22:09
  • \$\begingroup\$ but how much can be in real? it is not data acquisition and noise is not that important imao for a DC motor control. why to ground them together for 0.0001 volt difference for instance? do u think - side of the battery and arduino ground might have significant potential difference? \$\endgroup\$
    – user16307
    Commented Nov 13, 2013 at 22:14
  • 2
    \$\begingroup\$ @user16307 Depending on the positioning of the circuits it could easily be 10's to 100's of volts difference. It's not constant it's floating. Practically speaking it can be and often is multiple volts, enough to make logic level signals meaningless. Do you understand what it means to not be an absolute value? The numbers mean nothing compared to each other unless they have a common reference. \$\endgroup\$
    – Samuel
    Commented Nov 13, 2013 at 22:47
  • 2
    \$\begingroup\$ This should be the accepted answer, because it addresses the main point of confusion and uses a very nice analogy. \$\endgroup\$
    – Rev
    Commented Nov 14, 2013 at 8:07
3
\$\begingroup\$

Voltage is a difference between two points. The Arduino supply is 5 volts higher than the Arduino ground, and the motor supply is 9 volts higher than the motor ground. You can say nothing about their relationship to each other unless you tie them together. Worst case is they happen to be close enough to the same potential for your tests and far enough apart to fail in the field.

Consider the ground shown in your schematic. If that happens to be too far above the Arduino ground, the transistor might not be able to turn on, because the relative voltage of the pin to that ground will be too low. If that ground happens to be too far below the Arduino ground, the transistor might pull more current than it can handle or the Arduino I/O can source.

\$\endgroup\$
1
  • \$\begingroup\$ but current always flows in loops why transistor pull more current from the other loop? \$\endgroup\$
    – user16307
    Commented Nov 13, 2013 at 22:39
0
\$\begingroup\$

If the potencial of the sources do not have a common reference no current will flow from one circuit to another. It is easy to understand, take a voltimeter and take two bateries of different voltaje and not connected in any way, for instance, one of 1,5V and one of 9 V. Try to measure a voltaje between the positive of battery of 1.5V and the positive of battery of 9V. What your voltimeter shows? 0Volts, no + or - 7,5V. Why this happens? easy to understand, they are circuits with no references between them, so no current can go from one to another, and with no current, no voltage, Ohm's law. So you circuit will not work if you don't make a common reference. I mean, now join the negative part of each battery and take the measurement again. Now you will have + o - 7,5V. Why because there is a circuit closed by the voltimeter so a current can pass since one battery to another because they are tied together in one point and the voltimer closes the circuit so a current can circulate through the circuit. Is quite easy, open circuit no, current, closed circuit current an voltage. If you don't connect both gound of your batteries together in the arduino circuit, you will not have current between them because you have an open circuit. So it will not work.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Your answer is bumping a two year old question which is already answered by many people. You answer does not add anything constructive that the other answers have not already written, and your voltmeter example adds extra complexity that was never asked. If that's not enough, it's not very well formatted, making it difficult to read. \$\endgroup\$
    – pipe
    Commented May 12, 2016 at 19:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.