Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Water Level Monitor & Auto Pump Controller

An Arduino Uno–based water tank level monitor with automatic pump control, built and simulated in Wokwi, then converted into a full KiCad 10 PCB design.

The system uses an ultrasonic sensor to measure water level, displays the percentage on a 16x2 LCD, and switches a pump on/off through a relay — either automatically based on level thresholds, or manually via a pushbutton.


Features

  • Real-time water level percentage on a 16x2 LCD
  • Auto mode — pump switches ON/OFF automatically based on tank level
  • Manual mode — pump toggled by a pushbutton, with an overflow safety cutoff still active
  • One-button calibration to set the tank's empty-level reference (saved to EEPROM, survives power loss)
  • Relay output for driving a real pump
  • Designed in Wokwi first, then laid out as a real PCB in KiCad — 0 DRC / 0 ERC violations

General Working

The HC-SR04 ultrasonic sensor is mounted facing down into the tank and measures the distance from itself to the water surface. That distance is converted into a fill percentage relative to a calibrated "empty tank" reference distance stored in EEPROM.

Calibration

  1. Make sure the tank is empty.
  2. Set the mode switch to AUTO.
  3. Press the SET button once — the current sensor distance is saved as the empty-tank reference (EEPROM address 0).

Auto Mode (switch open / pulled HIGH)

Condition Action
Level < 30% Pump turns ON
Level ≥ 95% Pump turns OFF

Manual Mode (switch closed to GND)

  • Pressing SET toggles the pump ON/OFF directly.
  • A safety cutoff still forces the pump OFF if the level reaches ≥ 99%, so manual mode can't overflow the tank.

Display

  • Line 1: WATER LEVEL: <xx>%
  • Line 2: PUMP:<ON/OFF> <AUTO/MANUAL>

PCB Notes

  • Verified clean: 0 DRC and 0 ERC violations.
  • The Arduino Uno 3D model does not render in the KiCad 3D viewer for the Arduino_UNO_R3 footprint on this system, so the 3D preview/renders are shown without the Uno model in place. This is a visualization-only gap — the footprint, pin mapping, and board layout underneath it are unaffected.

Images

PCB

Front Back
3D Front 3D Back

PCB Layout

Front Back
Layout Front Layout Back

KiCad Schematic

Schematic 1 Schematic 2
Schematic 3 Schematic 4

Wokwi Simulation Schematic

Wokwi Schematic


Future Improvements

  • Add the status LED from the Wokwi simulation to the PCB as a physical pump-state indicator — it was dropped during the hardware conversion.
  • Add a buzzer or audible alarm for low-level or overflow conditions.
  • Resolve the missing Arduino Uno 3D model so the KiCad 3D preview renders the full assembly.
  • Add WiFi or Bluetooth connectivity for remote level monitoring and pump control.
  • Move calibration storage off raw EEPROM writes (e.g. wear-leveled storage) for longer write endurance.
  • Add a float switch as a redundant safety backup to the ultrasonic sensor.
  • Support multiple tank presets instead of a single calibrated reference value.

Author

Srushti D Hebbar GitHub


License

This project is licensed under the MIT License. See the LICENSE file for the full license text.

About

Arduino Uno water-level monitoring and pump controller with HC-SR04, 16×2 LCD, and relay-based pump control. Wokwi-validated and designed as a 2-layer PCB in KiCad 10.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages