This project is stored on GitHub.
Tired of changing the terrace irrigation timer every two years, I decided to design a timer: obviously IoT connected and based on MQTT.
The result is this complete DIY project of an irrigation timer, better than many commercial ones, designed and manufactured according to the state of the art.
This timer contains a STA (WiFi client), an AP (not used), a MQTT client and a MQTT server (broker), provided with programmable logic (script): in practice a mini mosquitto+ node-red on-board! So in this project, the operating logic is all internal: an external MQTT server 24/7 is not required (in fact I think a server 24/7 is too much to water a terrace!). The timer is totally autonomous, but at the same time always compatible with external standard MQTT clients and brokers.
A probe monitors the state of the soil (dry/soaked, with adjustable threshold) and conditions the watering.
Monitoring and configuration of the timer are performed with MQTT clients with dashboards, both on a PC and on a smartphone. Access is local via WiFi, but can be made Internet global using a free dynamic DNS service (example noip:https://www.noip.com/).
While using updated and quality components, this timer is very cheap: total cost less than €15 (US $18)! All this is made possible by the happy union of two phenomenal products:
- Sonoff basic, economic WIFI card with power supply, microprocessor EPS8266 and relay
- esp_MQTT, a firmware for EPS8266 created by Martin-ger, which transforms the Sonoff-basic into a tank.
Two times: T1 and T2 (hh:mm)
Operating mode:
- manual (ON, OFF)
- cycle at T1 every 48 hours,
- cycle at T1 every 24 hours
- cycles at T1 and T2 every 24 hours
- starts at T1, ends at T2 every 24 hours
cycle: starts only if dry soil
interval: ON when dry soil, OFF when soaked soil
Duration of the watering cycle: 1 min...3 hours (1...180 min)
Commands: ON, OFF (unconditional), CYCLE (immediate, conditioned)
Features- Autonomous: contains a MQTT server with the operating logic (script).
- Compatible: can be used with standard MQTT client and MQTT server, has a complete set of commands and information via MQTT.
- Autostart: preserves status and configuration in flash ROM: in case of reset or blackout restores the previous status autonomously.
- NTP-client: requires connection to the domestic WiFi, with access to the Internet, to have the correct time. Commands for summer/winter time.
- Serial console: for installation and debugging, via WiFi (telnet) or serial COM.
- OTA update: the operating logic (script) can be updated via OTA (Over The Air), without moving or opening the timer.
- MQTT client: currently 2 options for monitoring and configuration: Full client on PC (node-red), Reduced client on Android (IOT MQTT Dashboard app)
- Power supply: (90-250) 220V AC, 220 V solenoid valve (attention!!!)
- Standby consumption: not measurable (<1 W)
- Consumption ON: 6 W (220 V)
- Case: waterproof (IP66) and transparent, 3 LEDs: power on,irrigation on, wet soil
1. Depending on the type of watering system, short times or very long times are available (drip systems).
2. The positioning of the hygrometer probe affects the operations: I have positioned it in a point not watered but wet by rain. It is also possible to place it in a watered place, to create a sort of feedback (mode 4).
3. It is possible to control a small pump (max 500 W) instead of the solenoid valve.
To read the full story, see English document or Italian version.
Comments