Greenhouse Rain Logger Kit with ESP32 + Ultrasonic
ESP32 Greenhouse Rain Logger Kit — Automated Tank Monitor, First-Flush Control & Rain Event Logging
Every part needed, pre-tested for compatibility, with an AI build companion trained on this exact project. Shipped from Bengaluru in 3-5 days.
When you’re managing a greenhouse, every litre of rainwater matters — and so does preventing contaminated first-flush runoff from entering your irrigation tank. With this kit, you’ll build a standalone logger that uses dual HC-SR04 ultrasonic sensors to measure tank level, triggers a motorised valve to divert the initial rainwater, switches the pump over to mains backup when the tank runs low, and records every rain event with timestamped data on a microSD card. It’s a rugged, field-deployable system built around the ESP32, with battery backup and an OLED display for live readings.
What You'll Build
You’ll assemble a complete rainwater management controller inside a waterproof enclosure. Once programmed, the device sits between your greenhouse roof gutters and the collection tank. It continuously monitors tank fill level, diverts the first 1–3 mm of rain to waste, then opens the inlet to the tank. When the tank level drops below a set threshold (e.g., 20%), it drives a 4-channel relay to start the mains backup pump and logs the switch event. All readings — tank level, rain sensor status, and pump state — appear on a 0.96-inch OLED and are written to an SD card with DS3231 real‑time clock stamps. The dual HC‑SR04 sensors give you redundancy and let you average out sloshing-induced errors.
What You'll Learn
- Interfacing two HC-SR04 ultrasonic sensors with an ESP32 and handling timed distance reads
- Implementing first-flush logic with a rain sensor and relay-controlled solenoid valve
- Programming automatic pump changeover: rainwater tank to mains backup based on level thresholds
- Data logging on a microSD card using SPI, with formatted timestamps from a DS3231 real-time clock
Kit Contents
| Component | Quantity |
|---|---|
| ESP32 Dev Board | 1 |
| HC-SR04 Ultrasonic Sensor | 2 |
| Rain Sensor | 1 |
| 4-ch Relay Module | 1 |
| DS3231 RTC Module | 1 |
| MicroSD Card Module | 1 |
| 0.96in OLED Display | 1 |
| LM2596 Buck Converter | 1 |
| 18650 Li-ion Cell | 2 |
| TP4056 Charging Module | 1 |
| 100nF Ceramic Capacitor | 10 |
| 10kΩ Resistor | 10 |
| PCB Prototype Board | 2 |
| Waterproof Enclosure | 1 |
| Soldering Iron | 1 |
| Solder Wire | 1 |
Why Buy This Kit Instead of Sourcing Parts Separately
| Factor | Sourcing Separately | Compoden Kit |
|---|---|---|
| Compatibility checks | You verify every part | Pre-tested as a system |
| Build support | Forums and scattered tutorials | AI companion trained on this exact project |
| Time to first working build | Days of debugging | Hours, with step-by-step guidance |
| Shipping coordination | Multiple sellers, multiple delays | One shipment from Bengaluru in 3-5 days |
Who This Kit Is For
This kit is built for advanced makers, B.Tech ECE/EEE students working on smart agriculture capstone projects, and professionals prototyping greenhouse automation. It fits perfectly into Smart India Hackathon challenges on water conservation, ATL Tinkering Lab extensions at engineering colleges, and final-year projects at IIT, NIT, VIT, or BITS Pilani. If you already know your way around an ESP32 and want a field-ready water management system that logs every rain event and switch cycle, this kit puts everything in your hands.
Built and Backed by Compoden
Every Compoden kit ships with an AI build companion trained on this exact project — accessible via a QR code on the box, with WhatsApp and email backup. We've spent 10 years building projects for makers, schools, and institutions across India. If a part fails because of a manufacturing defect, replace it free within 7 days.
What if I get stuck during the build?
Scan the QR on the box to chat with the AI companion that knows every wire and line of code for this specific kit. You can also reach our team on WhatsApp for a direct walkthrough.
Can I run this entirely on battery power without an external supply?
Yes, the kit includes two 18650 cells, a TP4056 charger, and an LM2596 buck converter so the logger can operate off‑grid inside the greenhouse. The ESP32’s deep‑sleep modes can be configured to maximise battery life between rain events.
How do I set the first‑flush diversion volume?
The code uses the rain sensor to detect the start of rainfall and a timer (or accumulated rain depth from a simple rain gauge, if you add one) to hold the diversion valve open. You can adjust the threshold in the firmware via a config file on the microSD card.
Is the kit suitable for a solar‑powered installation?
Absolutely — the LM2596 can take a wide input range from a solar panel, and the TP4056 module handles battery charging from the regulated supply. The enclosure is prepared for cable glands, making it easy to integrate with a small PV panel.
Greenhouse — Ultrasonic level sensor monitors tank. Diverts first-flush, controls pump to mains-backup valve and logs rain events.
What's in this kit
Choose your assembly option:
- Soldering Kit — 25W soldering iron, 60/40 solder wire, flux, and small perfboard for permanent assembly.
- Breadboard Combo — 800-point full-size breadboard with 65-piece jumper wire pack for solderless prototyping.
Other projects you can build
Shipping Information
- Prepaid Orders: ₹75 for orders up to ₹999, FREE shipping above ₹999
- COD Orders: ₹125 shipping + ₹50 COD fee = ₹175 total
- Delivery Timeline: Dispatch in 1-2 days, delivery in 2-7 days depending on location
Returns & Warranty
- 7-Day Return: Manufacturing defects only (approval required)
- Warranty: 7 days from delivery
- Non-Returnable: Batteries, consumables, cut wires, clearance items