# Mini water pump does not start or resets the board: use a driver, not a pin

> Drive a small pump with a transistor, MOSFET or relay module from its own supply, with a flyback diode and a shared ground.

Canonical: https://roboticsengineering.in/fix/mini-water-pump-relay-or-mosfet-wont-start-or-resets-board/ | Published: 2026-11-03 | Updated: 2026-11-04

**Never drive a pump straight from a pin.** Use a switch and a separate supply.

## What the message means

A pump draws far more current than a pin can give, and its coil produces voltage spikes when it switches off.

## Fix it in this order

1. Read the pump voltage and current rating.
2. Switch it with a logic-level MOSFET, a transistor or a relay module.
3. Put a flyback diode across the pump.
4. Power the pump from a supply that fits its rating.
5. Join the grounds of the pump supply and the board.
6. Never run the pump dry, and keep wiring away from water.

## Why it happens

A small pump motor draws far more current than a microcontroller pin can supply, and its start-up surge and switching spikes can reset the board.

Switch the pump through a relay or a logic-level MOSFET, power it from its own supply with a common ground, and put a flyback diode across the motor. Check the pump voltage and current in its specification.

## If you see this, do this

| You see | Do this |
| --- | --- |
| Board resets when pump starts | Spike or shared supply. |
| Pump hums, no flow | Dry run or low voltage. |

## Related

[flyback diode](https://roboticsengineering.in/fix/flyback-diode-relay-motor-spikes-reset-board/), [relay module](https://roboticsengineering.in/fix/relay-module-always-on-active-low/).

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.

## Why this happens

A small pump is a DC motor. It needs the current in its specification, often a few hundred milliamps, while a classic Arduino pin is rated for about 20 mA in normal use, and an ESP32 pin for even less. Connecting it directly either does nothing, because the voltage collapses, or it overloads the pin. The pump also draws a surge on start and generates a voltage spike when it switches off, because the winding resists a sudden change of current.

A transistor or logic-level MOSFET acts as the switch. A flyback diode across the pump gives the spike a path. A separate supply with a shared ground keeps the dip away from the controller, and that fixes the resets.

## How to confirm the cause

- Read the pump’s rated voltage and current on the label or listing, and compare the current with what your supply can give.
- Connect the pump directly to its supply, with no board, for a second. If it runs, the pump is fine and the switching is at fault.
- Measure the voltage at the gate (MOSFET) or base (transistor) when the pin is high. A MOSFET needs enough gate voltage to be fully on; check the data sheet for Rds(on) at 3.3 V or 5 V.
- Measure the supply across the pump while it runs. A low value means the supply or wiring is too weak.
- Watch the board for resets at the moment of switching; that points to a shared supply or a missing diode.

## Worked example

The example drives the pump through a MOSFET for three seconds every thirteen seconds. Wiring is in the comments.

```
// low-side switch, N-channel logic-level MOSFET
// pin -> 100 ohm -> gate, 10k gate to GND
// pump + to supply +, pump - to drain, source to GND
// flyback diode across pump: cathode to supply +
const int PUMP = 5;

void setup() {
  pinMode(PUMP, OUTPUT);
  digitalWrite(PUMP, LOW);
}
void loop() {
  digitalWrite(PUMP, HIGH); delay(3000);
  digitalWrite(PUMP, LOW);  delay(10000);
}
```

## Common mistakes

- Fitting the flyback diode backwards, which shorts the supply.
- Choosing a MOSFET that is not logic-level, so it only half switches on and gets hot.
- Leaving out the common ground between supply and board.
- Running the pump dry or with the inlet above the water.

## If this did not fix it

- Check blocked tubing or a clogged inlet, which stalls the pump.
- Check that a relay module is active-low or active-high as your code expects.
- Check the pump voltage under load; a weak battery drops below the starting level.
- Check the wiring for water near the electronics.
