Overhead tank level controller with dry-run protection
Overflowing tanks on terraces waste lakhs of litres in every city, and pumps burn out when they run dry. A controller that fills only when needed and stops when the sump is empty fixes both.
- Parts
- ₹3,750
- Build
- 8 weeks
- Board
- Arduino Uno
- Objectives
- 5
Block diagram
- Ultrasonic level sensorMeasures water level in the tank
- Sump float switchStops the pump when the sump is empty
- Arduino UnoRuns the fill logic
- RelaySwitches the pump (a contactor for a real motor)
- LCDShows tank level in percent
- 4G modemSends SMS alerts and calls over the mobile network+
Objectives
- To measure tank level within ±2 cm, with the sensor mounted at least 30 cm above the full level (blind zone).
- To start and stop the pump at set levels with hysteresis.
- To stop the pump within 2 seconds when the sump runs dry.
- To estimate water saved per month for one building.
- To send SMS alerts through a 4G modem where no Wi-Fi is available.
Parts and specifications
- Arduino Uno R3 (CH340 clone)ATmega328P 16 MHz, 32 KB flash, 2 KB SRAM, 5 V logic, 6 analog inputs (10-bit), 6 PWM pins₹450Buy
- JSN-SR04T waterproof ultrasonic sensor25 cm to 4.5 m (blind zone below 25 cm), sealed probe on 2.5 m cable, 5 V₹450Buy
- Vertical float switchReed switch in a float, 10 W 100 V DC max, use as a dry-run or full-tank limit₹120Buy
- 5 V relay module (1 channel)10 A 250 V AC contacts, coil 70 to 80 mA, optocoupled input; many trigger at 3.3 V, check yours₹70Buy
- 16×2 LCD with I²C backpackHD44780, PCF8574 at 0x27 or 0x3F, 5 V, contrast trimmer on the back₹220Buy
- Two buckets, tube, wires and box₹300
- A7670C 4G LTE module4G Cat-1 with 2G fallback, SMS, calls and data, works with any Indian SIM including Jio; 3.4 to 4.2 V, 2 A peaks₹1,500Buy
- LM2596 buck converter (set to 4.0 V for the modem)4 to 40 V in, 1.25 to 37 V out, up to 2 A continuous (3 A peak), about 85% efficient₹90Buy
Total about ₹3,750 at typical online prices. Tap a part for its pinout and datasheet notes.
Design calculations
d = (t × 343 m/s) / 2. An echo of 5.8 ms gives 0.0058 × 343 / 2 = 0.99 m.
Tank depth H = 1.2 m, sensor 0.3 m above the full level. Level = H + 0.3 − d. With d = 0.99 m, level = 0.51 m = 43%.
A 1000 L cylindrical tank 1.2 m tall holds 833 L per metre, so 0.51 m is about 425 L.
Speed of sound c = 331.3 + 0.606 × T. At 35 °C c = 352 m/s, 2.6% more than at 20 °C, so measure or assume the roof temperature.
Pin map
| Signal | Pin or connection |
|---|---|
| JSN-SR04T TRIG / ECHO | D9 / D10 |
| Sump float switch | D2 (pull-up, closed = water present) |
| Relay IN | D7 |
| LCD SDA / SCL | A4 / A5 |
| Pump | Relay NO in the 12 V line (contactor for a real motor) |
Firmware outline
- Measure distance 5 times every 2 s and take the median to reject ripples and echoes.
- Convert to level and percent.
- If level < 25% and the sump float shows water, start the pump.
- Stop at 95%, or at once if the sump runs dry or the level does not rise 2 cm in 3 minutes (dry run or broken pipe).
- Show level, pump state and last fault on the LCD.
Test plan
| Test | Expected result |
|---|---|
| Measured against a tape at five levels | Within ±2 cm |
| Level below 25% | Pump starts |
| Level reaches 95% | Pump stops |
| Sump float lifted out (dry) | Pump stops within 2 s |
| Outlet blocked so level does not rise | Dry-run fault after 3 minutes |
These rows start your results table when you plan the project.
Viva practice
Say your answer out loud first, then check. The first 2 answers are free; Maker opens all 6.
Make it yours
One or two upgrades for a mini project, two to four for a major one.
Datasheets and sources to cite
- JSN-SR04T datasheet
- Microchip ATmega328P datasheet
- CPHEEO manual on water supply (per-capita demand)
About this project
How much does the overhead tank level controller with dry-run protection project cost?
About ₹2,160 for the parts in the base list: Arduino Uno R3 (CH340 clone), JSN-SR04T waterproof ultrasonic sensor, Vertical float switch, 5 V relay module (1 channel), 16×2 LCD with I²C backpack, 12 V pump for the demo model, 12 V 2 A DC adapter, Two buckets, tube, wires and box.
How long does it take?
About 6 weeks for the base project, built on an Arduino Uno. Each upgrade adds time.
Which branches is it suitable for?
Electrical and Electronics, Electronics and Communication, Instrumentation, Diploma (any electronics branch), as a mini project.
Which pins and design calculations does it use?
JSN-SR04T TRIG / ECHO on D9 / D10; Sump float switch on D2 (pull-up, closed = water present); Relay IN on D7. Worked calculations on this page: distance from echo, level and percent, volume, temperature correction.
How do I test it?
Measured against a tape at five levels: Within ±2 cm. Level below 25%: Pump starts. Level reaches 95%: Pump stops. Sump float lifted out (dry): Pump stops within 2 s. Outlet blocked so level does not rise: Dry-run fault after 3 minutes.
What are the objectives?
To measure tank level within ±2 cm, with the sensor mounted at least 30 cm above the full level (blind zone). To start and stop the pump at set levels with hysteresis. To stop the pump within 2 seconds when the sump runs dry. To estimate water saved per month for one building.
