Industrial Fluid Logic: Water Pump Controller
Turning on a tiny $2 DC fish-tank pump is easy. Automatically managing an enormous 1-Horsepower AC centrifugal pump that draws 1500 Watts to fill a towering 500-gallon roof tank requires bulletproof fail-safes. The Water Pump Controller project introduces terrifying physical danger: If the logic loop fails, a massive commercial pump runs completely dry, violently melts its own impeller shaft, catches fire, and floods the house!

The Dual Float-Switch Hysteresis Check
You cannot use a generic analog depth sensor. You must use massive, physical Magnetic Reed Float Switches installed at the absolute Top and Bottom of the 500-gallon tank.
FloatTop (Pin 2): Detects if the tank is overflowing!FloatBottom (Pin 3): Detects if the tank is bone dry!- The Catastrophic Wave Error: If you just code
if (FloatTop == LOW) { turnOffPump(); }, you will fail instantly! When water reaches the top, the splashing waves will bounce the float up and down rapidly! The 1-HP AC motor will violently flicker ON and OFF 10 times a second, instantly destroying the electrical contactor! - The Hysteresis Dead-Band Trap:
if (digitalRead(FloatBottom) == HIGH) {
// Tank is totally empty! Turn it on!
digitalWrite(PumpRelay, HIGH);
pumpIsRunning = true;
}
// Do absolutely NOTHING until the water hits the very top limit!
if (digitalRead(FloatTop) == HIGH && pumpIsRunning == true) {
// Tank is entirely full!
digitalWrite(PumpRelay, LOW); // Kill power!
pumpIsRunning = false;
}
The "Dry Run" Failsafe Timer
Even with perfect floats, what if the municipal water supply is shut off down the street?
- The Arduino initiates the
PumpRelay! Water should be entering! - The C++ code starts a massive
unsigned long safetyTimer = millis();. - If 20 minutes go by, and
FloatTopis STILL not triggered, the Uno realizes there is NO WATER in the pipes! - It violently overrides the entire system, killing the Heavy Relay, blasting a Piezo Siren, and locking out the interface until human intervention!
High Voltage AC Pumping Setup
- Arduino Uno/Nano (Standard execution speeds).
- Two Physical Magnetic/Mechanical Float Switches.
- Heavy Duty 30A AC Contactor Relay or Solid State Relay (SSR) (A tiny blue 10A Arduino relay will literally melt and fuse shut on a 1-HP AC pump motor surge!).
- Standard 16x2 LCD for telemetry and system lockout feedback.
- (DANGER: Lethal Mains Voltage! Never run the 110V/220V lines anywhere near the water tank float switches. The float switches must be grounded exclusively through the safe 5V Arduino logic pins!).