Borehole and Tank Water Monitoring — Pump Protection and \"How Much Water Do I Have Left?\"
The cheapest, most-useful first IoT project for most Kenyan farms — automatic pump shutoff, tank level monitoring, and a phone alert when you run dry.
Borehole and Tank Water Monitoring — Pump Protection and "How Much Water Do I Have Left?"
If you can only do one IoT project on your farm this year, do this one. Tank-level monitoring with pump protection solves three of the most common, expensive, painful problems on Kenyan farms: cows or crops without water; a pump that ran dry and burned out; a borehole tap that was left on all night.
Total parts cost: under KES 8,000. Time to install: one weekend. Payback: usually one prevented pump failure.
The three problems it solves
1. Burned-out pumps
A submersible borehole pump that runs dry overheats within minutes. The motor windings burn. A replacement pump and re-installation costs KES 50,000–200,000, plus 1–2 weeks of downtime while waiting for parts.
The cause: the pump is told to start, but the borehole level has dropped below the inlet. Or someone left the pump switched on overnight.
The fix: a water-level sensor in the borehole that stops the pump when level is too low. A KES 1,500 float switch on a wire prevents this completely.
2. Empty tanks at the worst moment
You open the cattle drinker at noon and there is no water. Or you find the tank empty during evening milking. Or the vegetable irrigation runs and the tank empties before the cycle finishes.
The cause: no early warning. You only notice at the point of use.
The fix: tank-level sensor with phone alerts at 50%, 25%, and 10% full. You see the trend coming days in advance.
3. Forgotten taps and leaks
A tap left dripping, a buried pipe leaking, a valve stuck open at the end of irrigation. Over a week, this can drain a 5,000-litre tank without you noticing.
The cause: no record of how fast the tank is being drained.
The fix: continuous monitoring shows a steady drop when there should be none. Alerts trigger when usage is unusual.
What to install
A complete system has three parts:
1. A float switch in the borehole (pump protection)
A simple cable-mounted float switch sits at the minimum-safe-water level in your borehole. When the water drops below it, the switch opens. Wired in series with your pump's control circuit, this physically prevents the pump from running dry.
- Cost: KES 1,500–2,500
- Where: Local irrigation hardware shops (Ngara, Industrial Area) or AliExpress
- Installation: connects to your pump's existing control wiring; an electrician can do it in 1–2 hours This piece works without any IoT. It is just a safety switch. If you do nothing else, do this.
2. A tank-level sensor (monitoring)
The two practical options:
Ultrasonic sensor — mounted at the top of the tank, looking down at the water surface. Measures distance to the water. Reports as a percentage of full.
Cost: KES 800–1,500
Pros: no contact with water, no fouling, very reliable
Cons: needs a clear path (no obstructions); some sensors are confused by very calm water Pressure sensor — mounted at the bottom of the tank, measures the pressure of the water column above it.
Cost: KES 2,000–4,000
Pros: very precise, works in any tank shape
Cons: must be food-safe if drinking water; cleaning required occasionally For drinking-water tanks, ultrasonic is usually the right choice. For irrigation tanks where shape is awkward, pressure may be better.
3. The IoT brain (alerts and trends)
An ESP32 node reads the tank-level sensor every few minutes, transmits over LoRa to your farm brain, which sends WhatsApp alerts and shows the trend on your dashboard.
If your farm brain is not yet built, you can use a standalone ESP32 with Wi-Fi connected directly to your home Wi-Fi router. Reports straight to a free cloud dashboard (Adafruit IO, Blynk, or similar). Less powerful, but a working solution for under KES 4,000 all-in.
Alert rules that actually matter
Tank below 50%: Push notification (informational) Tank below 25%: SMS + WhatsApp (action needed soon) Tank below 10%: Phone call (urgent) Tank empties in <2 hours from full: SMS (suspect a big leak) Tank rises with no pump running: SMS (suspect rain entry, contamination check) Pump runs >2 hours when 24h average is 30 min: SMS (suspect a leak or stuck valve) Pump cycle count exceeds normal: Push (suspect a faulty pressure switch)
The last three are the under-appreciated alerts. They catch the slow problems — the leaks, the stuck valves, the dying pressure switches — long before they become visible at the tap.
Costs, all-in
| Item | Cost (KES) |
|---|---|
| Float switch for borehole pump protection | 1,500–2,500 |
| Ultrasonic level sensor (HC-SR04 in IP rated housing) | 1,200 |
| ESP32 board | 800 |
| LoRa module (if using farm brain) OR ESP32 with Wi-Fi (if standalone) | 800 or 0 |
| IP66 enclosure + cabling | 1,200 |
| Power: small solar panel + 18650 cell | 1,800 |
| Installation labour (if hiring an electrician) | 2,000–3,500 |
| Total: DIY | ~7,300 |
| Total: with electrician | ~10,500 |
For comparison: one burned-out borehole pump costs KES 50,000–200,000 to replace.
Installation steps
- Power down the pump. Lock-out the breaker.
- Wire the float switch. In series with the existing pump control circuit. Test with a multimeter that the pump only starts when the float is up.
- Mount the ultrasonic sensor. Drill a 22mm hole in the top of the tank. Seal with the sensor housing's gasket.
- Run the sensor cable to the ESP32 enclosure mounted nearby in shade.
- Power the ESP32 with the solar + battery module.
- Configure the ESP32 to read the sensor every 5 minutes and report to your brain.
- Set alert thresholds on your dashboard.
- Test by manually draining the tank and confirming alerts fire at each threshold. Time: one weekend if you have all parts; one day if installing pump-protection float separately.
Common deployment problems
| Problem | Cause | Fix |
|---|---|---|
| Ultrasonic readings jumpy | Water surface ripples; tank too narrow | Average 5–10 readings; consider a stilling tube |
| Sensor reads zero | Out of range (tank too tall) or sensor too close to water at full | Re-position; check the sensor's spec range (most work 2cm–4m) |
| Pump won't start after install | Float switch wired wrong | Re-check wiring; float should be up when water is above level |
| Algae or muck on pressure sensor | Tank uncleaned | Clean tank quarterly; pressure sensors need maintenance |
| Battery dies in 2 weeks | Reading too often, or sensor uses a lot of power | Sensor on/off via transistor between readings |
What to do next
For most Kenyan farms, water is the most expensive, time-consuming, frustrating resource to manage. Tank monitoring is the IoT use case with the best ratio of cost to peace-of-mind. Start with the pump-protection float switch — that alone is the single highest-value preventive purchase on this list.
Add the level sensor and the alerts once you have one working. Within a month you will wonder how you ever ran a farm without it.
Track your water consumption (per livestock, per irrigation cycle, per month) at shira.farm — the tank data plus the consumption record tells you whether the tank size is sufficient, whether you have a leak, or whether you are using too much in a specific area.
See it in action
Tap this exact setup on our interactive visual guide — photorealistic farm scenes with clickable explainers showing what every device does, what it costs, and which Shira tier unlocks it.
Open the IoT Showcase