6
\$\begingroup\$

I was debugging the circuit below with my new multimeter when I found that my Arduino's ground pin was actually emitting power. I connected the longer leg of an LED to the ground pin and confirmed that in fact the pin was powering the LED.

I feel like this is likely the issue I am having with this circuit and am wondering what would cause the ground pin to emit a non-negative voltage? Better yet, how could I solve this problem?

Schematic

simulate this circuit – Schematic created using CircuitLab

Enter image description here

\$\endgroup\$
14
  • 7
    \$\begingroup\$ If you put the LED in series with the ground wire then all the current returning to the power supply must follow through the LED. The whole Arduino is acting like a resistor. \$\endgroup\$
    – Transistor
    Jun 30 at 19:21
  • 1
    \$\begingroup\$ More information needed and, perhaps, a photo of your setup and measurement technique including a clear shot of your multimeter setting and probe connections. Where exactly are you measuring this voltage or current? (Which is it?) When you connected the LED did you put it in series with the ground wiring or did you touch the anode (+) to the ground wire and, if so, where did you connect the cathode (-)? \$\endgroup\$
    – Transistor
    Jun 30 at 19:29
  • 1
    \$\begingroup\$ +1 for adding the photo (very helpful diagnostic) \$\endgroup\$
    – MarkU
    Jun 30 at 19:59
  • 1
    \$\begingroup\$ OK. The LED issue is solved. @Justme has explained it. You risk damaging something doing that. The Arduino ground should always be connected directly to ground as all signals are referenced to ground. \$\endgroup\$
    – Transistor
    Jun 30 at 20:19
  • 4
    \$\begingroup\$ If you don't connect the ground pin to ground, it won't be grounded. What's the mystery? \$\endgroup\$ Jul 1 at 17:55
28
\$\begingroup\$

You don't need to solve the problem because there is none. What you see is perfectly normal, if you put a LED on a ground return wire, but putting a LED to ground return wire of Arduino is not normal.

Arduino takes in power by consuming current from the 5V supply via the 5V pin. The current then must return out from the GND pin back to the power supply. That current will light up a LED if you put it in the path of current taken by Arduino.

Just remove the LED because it does not belong there to begin with and the circuit is fine. If the Arduino consumes more current than the LED can handle the LED will get damaged and it can burn out.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ "it can burn out." or burst in flames. I only have seen it once, in carefully prepared laboratory conditions, but it did happen. \$\endgroup\$
    – Mołot
    Jul 1 at 10:14
  • 1
    \$\begingroup\$ @Molot It's not very likely with an Arduino, I think, because they don't use very much current \$\endgroup\$
    – user253751
    Jul 1 at 19:27
  • 10
    \$\begingroup\$ More important, with that LED over there, the GND is not GND anymore, but it stays around 1 V above ground. So now the logic circuits will "see" the input voltage as shifted down by this one, and everything could happen --- for sure the noise margins of the signals is going to be badly affected. \$\endgroup\$
    – Rmano
    Jul 2 at 7:48
26
\$\begingroup\$

I think that what you are missing is that when you connect up a device, it's ground pin isn't supposed to supply ground -- you are supposed to supply ground to it. The Arduino uses current to operate; after it's stuffed into the VCC pin it has to go someplace, and that place is the ground pin.

You need to hook that ground pin up correctly. In the mean time, yes, expect current to come out of it.

\$\endgroup\$
3
\$\begingroup\$

Driving a motor (or any other inductive load) requires a very low-impedance ground return system. Looking at the photo, those long, thin wires and that white solderless breadboard just aren't the right construction approach for driving a motor. There are transient effects (which you can't see without an oscilloscope) when the ULN2003 switches on and off, which can send surprisingly large currents through the ground return system, and that in turn causes "ground bounce" errors.

The diagnostic test of putting an LED in series with GND only demonstrates that there was some current flowing from the Arduino into the ground return system; it's not an indication of trouble. But it's not a good diagnostic test, because a side effect of this test is that it raises the voltage on the chip's GND. So instead of getting the full 5V supply voltage, the Arduino only gets maybe 3.5V (assuming 1.5V LED forward voltage), and the logic levels are referred to the Arduino's GND pin, not the ground return system. With such a very large voltage drop as an LED gives, that can be enough to make the logic levels be mis-interpreted by things outside the Arduino.

It's a fairly common problem, because on schematics we just drop a ground symbol anywhere and just assume that the ground return currents do whatever they need to do. On a PCB with a groundplane, that's a valid assumption; but for motor driving, the ground return system is an important part of the system as a whole. Most of the large ground current will be flowing in a loop around the motor, the ULN2003, and the power supply. The key is to make that high-current loop physically as small and compact as possible, with the widest diameter / shortest length wiring you can mange. Once you have that, the low-current Arduino ground can be connected using the kind of wire you have in the photo.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ How could I drive this motor with any other kind of wires then? All of the connectors are dupont so i don't see another way \$\endgroup\$ Jun 30 at 19:55
  • \$\begingroup\$ Thank you mark this theory had been recommended to me before so I'm assuming it has some merit. However I have tried this and it has not fixed my circuit. I also got the circuit to work before with these wires. I'm just struggling to recreate it for some reason... \$\endgroup\$ Jun 30 at 20:00
3
\$\begingroup\$

All currents flowing into the Arduino - on its power pins and I/O pins - must have somewhere to flow out of. That is the purpose of the GND pin.

Now we've established that there should indeed be a current flowing out of the GND pin.

Now observe that the LED is a device that acts like a current detector: the more forward current, the more light it produces (until it gets destroyed with too much current).

So, by putting the LED in the GND pin's path, you're just measuring - indirectly - the ground pin current, using a current meter with rather high burden voltage (1-2V).

That's all. If you want to actually measure the current, use a current meter (A or mA mode on a multimeter), not an LED.

\$\endgroup\$
3
\$\begingroup\$

what would cause the ground pin to emit a non-negative voltage?

It's not really emitting a non-negative voltage, it's emitting a current from all of the loads (transistors) that are internal to the Arduino. If you put a meter on the ground pin, you'll see a voltage difference (example 2).

When an LED is placed on this pin, it raises the voltage of the entire Arduino (Example 3). This has a few bad effects.

  1. Raising of the voltage of the ground also shifts the low voltage level of all the GPIO, so they don't work properly

  2. The LED is not a constant load and neither is the Arduino, but the Arduino shifts current levels from the transistors switching on and off (you'll probably see the LED changing brightness if the Arduino actually runs in this condition), this will shift all the voltage levels of the Arduino and could result in a lockup of the processor.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
2
  • \$\begingroup\$ I don't fully understand all you just said but it sounds bad, is my arduino going to be okay if I stop putting the LED there? \$\endgroup\$ Jun 30 at 19:47
  • 1
    \$\begingroup\$ Probably yes, if it was getting hot while you did the experiment then no. \$\endgroup\$
    – Voltage Spike
    Jun 30 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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