Driving a Submersible Water Pump

Draft. This tutorial has not been checked against the physical product yet. Confirm wiring, pin assignments and voltage limits against the product documentation before building it.
DifficultyAdvanced
CategoryMotion
Supported boardsArduino Uno R3 and compatible ATmega328P boards
Time needed50 minutes
PrerequisitesSwitching Bigger Loads with a Relay
Tested boardNot yet verified
Tested onNot yet verified
Arduino IDE versionNot yet verified
LibraryNot yet verified

What it does

A small brushless pump that sits in the water it moves. Drop it in a tank, run a tube from its outlet, and it will lift water three metres.

For an Arduino project it is the first part that moves a real quantity of something. A plant watering system, a tank transfer, a small fountain: all of them are this pump plus a way of switching it.

The numbers, from the label

The Siratek part is marked:

Model QR30E
Supply DC 12 V, 4.2 W
Maximum head, Hmax 300 cm
Maximum flow, Qmax 240 litres per hour
Maximum liquid temperature 60 degrees C

Two of those deserve working out rather than reading past.

4.2 watts at 12 volts is 350 milliamps. That is well beyond anything an Arduino pin can supply and beyond the 5V pin as well, which is why this page’s prerequisite is the relay tutorial. The Arduino switches; it never carries the current.

Hmax and Qmax do not happen together. The pump gives 240 L/h at zero lift, and zero flow at three metres of lift. Everything in between is a curve. Lift water one metre and expect appreciably less than 240 L/h; lift it three and you get a trickle.

For a plant watering project, the practical consequence is simple: measure the flow in the arrangement you actually build, with the tube you will use at the height you will use. The method is below and it takes two minutes.

Before you begin

Required parts and tools

  • An Arduino Uno or compatible board.
  • One submersible pump. This is Siratek product 2808.
  • A relay module, Siratek 3308 or 3398, or a MOSFET. See below.
  • A 12 V supply capable of at least 500 mA. Not the Arduino.
  • Silicone or PVC tube to fit the outlet, and a container of water.
  • A multimeter.

It must stay wet

This is the rule that kills these pumps, so it comes first.

The pump is cooled and lubricated by the water it is pumping. Run it dry, even for a short time, and it heats quickly and the bearing wears. A few minutes dry can be enough to ruin it.

Two consequences for any project:

  • Never leave it running unattended without knowing the tank has water. A water level sensor or a float switch is not a refinement here; it is what stops an empty tank destroying the pump.
  • Put a time limit on every run. A watering routine that runs for thirty seconds and stops cannot empty a tank and then keep going. A routine with no limit can.

The sketch below has both.

Submersible means the pump, not the wires

The body goes in the water. The joint where the wires leave it is the weak point, and the cable itself is not meant to sit submerged for months.

Keep the cable exit above the water line where you can, and never let the connection to the supply get wet. For a tank that will be left alone, seal the joint properly.

Relay or MOSFET

Either works, and they fail differently.

A relay is the simpler answer and what the prerequisite tutorial covers. It switches cleanly, isolates the contacts from the control side, and is entirely adequate for something that turns on for thirty seconds twice a day. Its contacts are consumable, which at a few operations a day does not matter.

A MOSFET switches silently, has no contacts to wear, and allows speed control by PWM, which a relay cannot do. It needs a logic-level part, a gate resistor and a flyback diode, and gets you a pump you can run at half flow.

This page uses a relay, because a watering system does not need variable flow and the relay page already exists. If you want PWM control, the L298N tutorial’s reasoning applies directly.

The flyback diode

A pump motor is an inductor. Switching it off collapses the magnetic field and produces a voltage spike, which arcs across relay contacts and shortens their life.

Fit a diode across the pump, cathode to the positive side, a 1N4007 or similar. On a relay board it is not strictly required, because the contacts can take it for a while, but it costs almost nothing and visibly extends the life of the contacts.

If you use a MOSFET instead, the diode is not optional at all.

Pin reference

Connection To Notes
Arduino D7 Relay IN Through the relay module
Arduino GND Relay GND
Arduino 5V Relay VCC Coil current; see the relay page
12 V supply + Relay COM Load side
Relay NO Pump red So it is off when unpowered
Pump black 12 V supply -
Diode across the pump Cathode to red 1N4007
A submersible pump switched by a relay from a separate 12 volt supply, with a flyback diode across the pump and the Arduino only driving the relay input
350 mA at 12 V: the Arduino switches the relay, and never carries the pump current.

Wiring steps

  1. Unplug everything, including the 12 V supply.
  2. Wire the Arduino to the relay module’s control side only, as in the relay tutorial, and prove you hear it click before going further.
  3. Unplug again. Wire the load side: 12 V positive to COM, NO to the pump’s red wire, pump black back to the 12 V negative.
  4. Fit the diode across the pump’s two wires, the banded end to the red wire.
  5. Put the pump in a container of water, with the tube fitted and the outlet somewhere you do not mind getting wet.
  6. Plug in the USB cable, then the 12 V supply.

Step 5 is not a joke. The first time this runs it will move more water than you expect, in a direction you did not plan for.

Software and libraries

No library is required.

Minimal working example

// Siratek: run the pump for a fixed time, and never longer.

const int pumpPin = 7;

// Relay polarity: see Switching Bigger Loads with a Relay.
const int PUMP_ON  = LOW;
const int PUMP_OFF = HIGH;

// Nothing may ever run the pump for longer than this.
const unsigned long MAX_RUN = 30000UL;

bool running = false;
unsigned long startedAt = 0;

void startPump() {
  if (running) {
    return;
  }
  running = true;
  startedAt = millis();
  digitalWrite(pumpPin, PUMP_ON);
  Serial.println("pump on");
}

void stopPump() {
  if (!running) {
    return;
  }
  running = false;
  digitalWrite(pumpPin, PUMP_OFF);
  Serial.println("pump off");
}

void setup() {
  digitalWrite(pumpPin, PUMP_OFF);     // before pinMode, so it cannot pulse on
  pinMode(pumpPin, OUTPUT);

  Serial.begin(9600);
  Serial.println("Siratek: pump test. Ten seconds on, ten off.");
}

void loop() {
  // The limit is checked every pass, whatever else the sketch decides.
  if (running && millis() - startedAt >= MAX_RUN) {
    Serial.println("maximum run time reached");
    stopPump();
  }

  // A simple ten-on, ten-off test cycle.
  unsigned long phase = (millis() / 10000UL) % 2;
  if (phase == 0) {
    startPump();
  } else {
    stopPump();
  }
}

The maximum run time is checked separately from the thing that decides to pump. That is the whole point of its placement: a bug in the watering logic, a sensor that sticks, a threshold that never clears — none of them can run the pump for longer than thirty seconds, because the limit does not consult them.

For anything unattended, this is the difference between a failed sensor meaning a dry plant and a failed sensor meaning a flooded room.

Measuring what it actually delivers

Two minutes, and it replaces guesswork with a number.

// Siratek: run for exactly ten seconds, then stop.
// Catch the output in a measuring jug and multiply by 360 for litres per hour.

const int pumpPin = 7;

// Relay polarity: see Switching Bigger Loads with a Relay.
const int PUMP_ON  = LOW;
const int PUMP_OFF = HIGH;

void setup() {
  digitalWrite(pumpPin, PUMP_OFF);
  pinMode(pumpPin, OUTPUT);
  Serial.begin(9600);

  Serial.println("Siratek: ten seconds, starting now.");
  digitalWrite(pumpPin, PUMP_ON);
  delay(10000);
  digitalWrite(pumpPin, PUMP_OFF);
  Serial.println("done. Measure what came out.");
}

void loop() {
}

Do it at the height the project will actually lift to, with the tube the project will actually use. A narrow tube and a metre of lift can easily halve the figure on the label.

From that number, a watering routine becomes arithmetic: if you measure 400 ml in ten seconds and a plant wants 200 ml, the answer is five seconds.

Expected result

Water moving, quietly. A brushless pump is much quieter than a brushed motor, so a pump that is running can be hard to hear: watch the outlet rather than listening.

Nothing should get warm. A pump that warms up is either running dry or working against a blocked outlet.

Troubleshooting

Symptom Likely cause Check or fix
Nothing happens Relay not clicking Prove the control side first, with no load
Relay clicks, pump does not run Load side wiring, or the 12 V supply Measure 12 V at the pump’s wires
Pump runs weakly Supply sagging under 350 mA A supply rated for at least 500 mA
Runs but moves no water Air lock, or inlet above the water Submerge it fully; tilt to release air
Much less flow than 240 L/h Lift and tube resistance Expected; measure your own
Pump hot Running dry, or outlet blocked Stop at once; it damages quickly
Stops after a while, then works again Thermal protection, if fitted Find out why it got hot
Relay contacts pitted early No flyback diode Fit one across the pump
Arduino resets when it starts Shared supply Separate 12 V, grounds joined
Flooded the bench No run-time limit That limit is not optional
Noisy running, no flow Impeller fouled Rinse it; keep debris out of the tank

Next steps

  • Easier first: Switching Bigger Loads with a Relay, which this page depends on.
  • Related products: the soil moisture sensor, to decide when to water, and the water level sensor, to know the tank is not empty.
  • Next project: an automatic plant watering system, which is this pump, a moisture reading and a run-time limit.

Sources and attribution

All text, wiring guidance and code in this tutorial are original Siratek work.

  • The model number QR30E, the 12 V 4.2 W supply, the 300 cm maximum head, the 240 L/h maximum flow and the 60 degree liquid temperature limit were read from the label in the Siratek product photographs for item 2808. The 350 mA figure is 4.2 W divided by 12 V.
  • Relay switching, the startup behaviour and the safety scoping are as set out in Switching Bigger Loads with a Relay.

Flow depends on lift and tube diameter, so the figures on the label are maxima and this tutorial gives a procedure for measuring the real value. The warning about running dry is a property of how these pumps are cooled. No third-party tutorial text, diagrams, photographs or code has been reproduced here.

Product used in this tutorial: Submersible Brushless Mini Water Pump 12v
Shop
Sidebar
0 Wishlist
0 Cart