What it’s for
- Automatically fill a tank when the level is low and stop the pump when it reaches the maximum level.
- Prevent a submersible pump from running dry when the water level drops too much.
- Automate filling a domestic rooftop tank or cistern without constant manual supervision.
- Control a small recirculation pump in aquariums or hydroponic systems.
- Implement simple irrigation that prevents completely emptying the reserve tank.
Expected result
- The pump only receives 12 V DC when the float indicates the configured condition (for example, low level), and 0 V when it must remain off.
- With a multimeter you measure ~12 V between the pump terminals when the relay is activated, and 0 V when it is deactivated.
- The relay coil correctly receives 12 V DC between its pins when the float switch closes the control circuit.
Target audience: Electronics hobbyists and makers who assemble domestic or hobby pumping systems; Level: Basic–intermediate.
Architecture/flow: 12 V DC supply → relay in series with the pump → relay contacts interrupt or allow the pump power; the float switch governs the relay coil, activating or deactivating it according to the water level.
Materials
- 1 × 12 V DC water pump (for example, small submersible pump of 1–3 A).
- 1 × 12 V DC relay, SPST or SPDT contact (capable of switching at least the pump’s maximum current).
- 1 × Float switch (buoy‑type with NO/NC contact or reed with float).
- 1 × Flyback diode (for example, 1N4007) to protect the supply when deactivating the relay coil.
- 1 × 12 V DC power supply suitable for the pump (for example, 12 V 5 A, depending on the pump).
- 1 × Fuse (fuse holder + fuse, according to pump current; for example, 3–5 A).
- Wires for connection (flexible cable suitable for 12 V and the pump current).
- 1 × Digital multimeter (to measure voltages and continuity).
- 1 × Main switch (optional, to cut off the 12 V power).
- 1 × Terminal block or screw terminals for safe connections (optional but recommended).
Wiring guide
In this practical case we will use the same 12 V supply to power the relay coil and the pump (DC only, no 220 V/110 V). The float will be used as a switch in series with the relay coil.
- Connect the positive terminal of the 12 V supply to the fuse.
- From the fuse output, run a wire to the common of the main switch (if you use it).
- From the main switch output, run the 12 V positive to the VA node (main positive node of the system).
- From the VA node, connect a wire to the common (COM) of the relay power contact.
- Connect the relay’s normally open (NO) contact to one of the water pump terminals.
- Connect the other pump terminal to the GND node, which corresponds to the negative of the 12 V supply.
- Connect the negative terminal of the 12 V supply directly to the GND node.
- For the relay coil:
- Connect one of the relay coil pins to the VA node.
- Connect the other coil pin to the VB node (float output).
- Connect the float switch as follows:
- One float contact to the VB node.
- The other float contact to the GND node.
- Connect the 1N4007 diode in parallel with the relay coil:
- Diode anode to the VB node.
- Diode cathode to the VA node.
(In this way the diode is reverse‑biased under normal conditions and only conducts when the coil is turned off).
Typical logic (adjust it according to your float):
– Configure the float so that it closes the contact (joins VB with GND) when the water level rises or falls, depending on whether you want the pump to turn on when the level is low or high. In this example we will assume:
– When the level is low, the float closes the circuit and allows current to flow through the coil → relay activates → pump runs.
– When the level is high, the float opens the circuit → relay deactivates → pump turns off.
Schematic
+12V fuente
|
[F1] Fusible
|
o VA node
|
+-----------------------+
| |
| [K1] Relé bobina
| |
| o VB node
| |
[D1] 1N4007 |
(K1 protección) |
|-| |
| \| |
| +--------------------------+
| Flotador
| [S1]
| |
+-------------------------+
|
GND node
|
GND
Potencia bomba (contactos del relé):
VA node o------------------[K1 COM]
|
+----[K1 NO]----o---- Bomba ----o GND node
| |
+12V hacia bomba Retorno bomba
---
Quick legend:
– F1 = fuse.
– K1 = relay (coil and COM/NO contacts).
– S1 = float switch.
– D1 = protection diode (1N4007).
Measurements and tests
- No‑load check (without connecting the pump):
- Disconnect the pump and leave the relay output terminals free.
- Measure with the multimeter in V DC mode between VA node and GND node: you should read about 12 V.
- Change the float position simulating low/high level:
- With the float in the position that activates the pump: measure the voltage between the relay coil terminals (VA and VB) → you should read close to 12 V.
- With the float in the position that deactivates the pump: the voltage between VA and VB must be 0 V or very close.
- Voltage measurement at the pump output:
- Reconnect the pump.
- Set the multimeter to V DC mode and measure between the relay output terminal (the side that goes to the pump, after [K1 NO]) and GND node:
- Float in low level position (pump should turn on): you should read approximately 12 V.
- Float in high level position (pump should turn off): the reading should be 0 V.
- Pump current measurement:
- Set the multimeter to A DC mode and place it in series with the pump (for example, between [K1 NO] and the pump).
- With the float in the low level position, measure the current: that value is the pump operating current.
- Verify that this current is less than or equal to the maximum contact current indicated by the relay (datasheet value).
- Float continuity check:
- Disconnect the 12 V supply.
- Set the multimeter to continuity or resistance mode.
- Measure between the two float terminals [S1]:
- With the float in the low level position: it should beep (closed contact) or show very low resistance.
- With the float in the high level position: it should not beep (open contact) or show very high resistance.
Notes on the nomenclature used:
– VA node: point where the 12 V positive arrives after the fuse and main switch.
– VB node: junction point between the relay coil and the float.
– GND node: common return point (negative of the supply and pump return).
Common mistakes and how to avoid them
- Confusing the relay pins (COM, NO, NC, coil):
- Always check the datasheet or the diagram on the relay case.
- The coil usually has a resistance of a few tens or hundreds of ohms measured with the multimeter, while the contacts are open (infinite resistance) when the relay is not energized.
- Not using a flyback diode (D1):
- When turning off the relay coil, a voltage spike is generated that can damage the supply or the electronics that control that coil (in this case it is only the supply, but it can still be harsh).
- The 1N4007 diode in antiparallel is a simple and very effective protection.
- Overloading the relay:
- If the pump draws 5 A and the relay only supports 3 A on its contacts, they can burn or weld.
- Check that the nominal current of the pump is below the maximum contact current of the relay.
- Float mounted upside down (inverted logic):
- Some floats allow the body or the float to be rotated to change behavior:
- Float up = closed contact.
- Float up = open contact.
- Make sure the pump turns on only when you really need it (tank low) and turns off when it is full.
- Using dangerous voltages (220 V / 110 V AC) without experience:
- This case is designed for 12 V DC only.
- Do not connect the pump or relay directly to the mains if you do not have specific training: it is dangerous.
Safety and good practices
- Always work with the power disconnected while you make or modify connections.
- Use a proper fuse very close to the power supply: if there is a short circuit, the fuse will blow before cables or components are damaged.
- Make sure all connections are well insulated (use terminal blocks, electrical tape, strip connectors, etc.), especially in damp environments.
- Keep electrical parts away from water: the float must be suitable for immersion, but the relay, supply and connections must be in a dry area.
- Respect polarity: 12 V positive to the VA node, negative to the GND node. Reversing polarity can damage the pump or the diode.
Possible improvements
- Add an indicator LED to show whether the relay is activated (and therefore the pump is on).
- Add a second float to implement hysteresis control (one for high level and another for very low level, avoiding very frequent starts/stops).
- Replace direct coil control with a microcontroller + transistor, so you can add more advanced logic (delays, run‑time counters, alarms).
- Integrate a flow sensor to confirm that water is actually flowing when the pump is on and thus detect blockages.
With this setup you already have a solid and safe base to automate turning a water pump on and off with a relay and a float using only basic electronics concepts.
More Practical Cases at Prometeo.blog
Find this product and/or books about this topic on Amazon
As an Amazon affiliate, I earn from qualifying purchases. If you buy through this link, you help keep this project going.
Quick Quiz
More Practical Cases on Prometeo.blog
Find this product and/or books on this topic on Amazon
As an Amazon Associate, I earn from qualifying purchases. If you buy through this link, you help keep this project running.



