# Robot works only sometimes with two power supplies: join the grounds

> Why signals fail when a controller and a motor driver use separate batteries: the grounds must be joined. Wiring rules for two supplies.

Canonical: https://roboticsengineering.in/fix/two-power-supplies-need-common-ground-robot/ | Published: 2026-11-03 | Updated: 2026-11-04

**When the controller and the motor driver have separate supplies, connect their grounds together.** Signals need a shared ground reference.

## What the message means

A logic signal is a voltage measured against ground. If the two grounds are not connected, the driver input has no reference and behaves randomly.

## Fix it in this order

1. Join the battery negative of the motor supply to the controller ground, at the driver ground pin.
2. Never join the positive sides of two different supplies.
3. Use thick wire for the motor ground path and a thin wire for the signal ground, joined at one point.
4. Keep motor wires away from signal wires.
5. Check each supply voltage with a multimeter while the motors run.

## Why it happens

Every logic signal is a voltage measured relative to ground. When the microcontroller and the motor driver run from separate supplies, each supply has its own ground reference. If those grounds are not joined, the driver’s input pins see a voltage that has no shared meaning with the controller’s output. The driver may then read a high or low level that differs from what the sketch intended, which produces erratic motor behaviour.

Joining the grounds does not mean joining the positive rails. Two supplies with their positive terminals connected can short through each other, which is far more damaging. The usual approach is to connect the negative terminals at one point, and to keep heavy motor return current away from sensitive signal wires. Running the motors from their own supply while measuring voltage under load confirms that the rails stay where they should.

## If you see this, do this

| You see | Do this |
| --- | --- |
| Motors twitch randomly | No common ground. |
| Controller resets when motors start | See the Arduino reset page. |

## Confirm the fix

1. With power off, use continuity mode on a multimeter between the controller GND and the motor supply negative; a beep confirms a shared ground.
2. With motors running, measure from the driver’s input pin to controller GND; it should swing between near 0 V and the logic high level.
3. Connect the motor supply negative to the controller ground, power up, and confirm the controller does not reset when the motors start.

**Common mistake:** Readers assume two separate power supplies are independent, when the logic signals between them only make sense with a shared ground.

## Related

[Arduino resets on motor start](https://roboticsengineering.in/fix/robot-resets-when-motors-start-separate-logic-and-motor-power/), [L298N not spinning](https://roboticsengineering.in/fix/l298n-motor-not-spinning/).

Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.
