← Projects
workshop beginner 15 days ago ◑ 23 views ◯ 4 min read

Build a Shop Rainwater Harvesting System: Tank Sizing, First-Flush Filtration, and an ESP32 Level Monitor

Build time: A weekend (half day for plumbing and tank setup, a few hours for the sensor and dashboard)
Tools needed: Basic plumbing tools (pipe cutter, sealant, fittings), drill, ladder for gutter/downspout work, basic ESP32 programming environment
rainwater harvestingesp32water tankshop water supplylevel monitoring
Parts List

A maker shop uses more water than people expect once you add it up — rinsing resin prints, mixing dust-suppressing water for stone and tile work on a CNC router, cooling a mist system, or just hosing down a dusty floor. A shop-scale rainwater harvesting system with a tank, proper first-flush filtration, and an ESP32 level monitor turns roof runoff into a free, always-available supply for all of that non-potable use, and tells you on your phone when the tank is getting low rather than you finding out mid-job. This isn't a drinking-water system — treat it strictly as process and wash-down water unless you add a full potable treatment train, which is outside the scope of this guide.

Sizing the Tank

Roof catchment area and local rainfall determine what's realistically collectible: a simple estimate is roof area (square feet) × rainfall (inches) × 0.623 = gallons collected per rain event, accounting for some loss to first-flush diversion and gutter inefficiency. A detached shop or garage roof of 400-600 sq ft in a region with regular rainfall can realistically fill a 300-500 gallon tank across a handful of storms, which is plenty for shop wash-down and process water use between refills. Size the tank to your actual usage rate and available roof area rather than going as big as possible — an oversized tank that never fills just means stagnant water sitting for months.

First-Flush Filtration — Don't Skip This

The first few gallons off any roof carry the bulk of the collected dust, bird droppings, pollen, and roofing grit, and sending that straight into your tank means you're storing a layer of sediment and organic matter that will foul pumps and smell over time. A first-flush diverter — a simple vertical pipe with a floating ball valve that fills and seals before water is allowed to continue to the tank — discards that initial dirty flow to the ground or a drain before the cleaner water that follows gets stored. Pair it with a leaf/debris screen at the gutter downspout and a secondary inline filter (a simple mesh or sediment cartridge) before the tank inlet, and you'll have noticeably cleaner stored water with no moving parts to maintain beyond an occasional screen cleaning.

Tank, Plumbing, and Overflow

ComponentPurposeNotes
Food-grade or UV-stabilized poly tankPrimary storageOpaque tank discourages algae growth from light exposure
First-flush diverterDiscards initial dirty flowSize pipe diameter to roof area per manufacturer charts
Inlet screen / sediment filterKeeps debris out of tankClean screen after heavy storms
Overflow pipeDiverts excess back to normal drainageRoute away from the shop foundation, not just onto the ground beside it
Shutoff/check valve at outletPrevents backflow and allows pump isolationAlso useful for winterizing in freeze climates

Elevate the tank or plan for a small transfer pump if you need pressurized output for a hose or wash-down gun — gravity feed alone from a ground-level tank gives very little usable pressure.

The ESP32 Level Monitor

An ultrasonic distance sensor (the same HC-SR04/JSN-SR04T style sensor used in plenty of other maker tank and bin level projects) mounted at the top of the tank, pointed down at the water surface, gives a non-contact level reading that avoids putting any electronics in contact with standing water. Convert the measured distance to a percentage-full reading using your tank's known height, and push the result over WiFi to a simple dashboard or your home automation system (Home Assistant via MQTT or ESPHome works well here) so you can check tank level before starting a job that depends on it, and get a low-level alert with enough lead time to plan around a dry spell rather than discovering it empty mid-task.

Freeze and Overflow Considerations

If your shop is in a freeze climate, a tank and its plumbing need a plan for winter: either drain and bypass the system seasonally, bury supply lines below frost depth, or use a tank designed to tolerate some surface freezing without cracking (most poly tanks handle this reasonably well as long as they're not completely full and sealed solid). Always route the overflow to daylight well away from your shop's foundation — an overflow that just dumps against the building during a heavy storm will eventually find its way into the slab or crawlspace.