Cistern and Greenhouse pump control by Wemos D1 Mini via MQTT

Summer, sunshine, dry flower beds but a rainwater cistern. But having to irrigate it by hand every morning and evening is time-consuming. To make better use of this time, we have installed a Garden Micro Drip System, which is fed through the existing rainwater cistern. Gardena offers irrigation computers, but these switch the water supply on and off via a magnetic contact. The pump would therefore run permanently. For this reason, another solution had to be found that would switch the pump on and off by itself.

Solution

The following solution is based on a D1 Mini with Relay as hardware, MQTT as connection protocol, MQTTDash as client and Node-RED for the automated flow as follows.

  • Connects to the Wireless Access Point / Wi-Fi Router
  • Securely connects to the MQTT Broker (TLS)
  • Subscribes to the desired MQTT topics
  • Handles incoming MQTT messages
  • Controls ESP8266 Chip Level Data Pins
  • Sends a heartbeat signal to the MQTT broker periodically
  • Switches a double relay for cistern pump and a socket
  • Checks the status of the cistern pump and switches it off automatically after a certain time (threshold value) if no switch-off signal is received by the specified time (protection against garden flooding)

Prevent the siphon effect

In practice, unfortunately, a physical principle has turned out to be a problem. Due to the difference in height between the approx. 1.5 high rain barrel and the Gardena Microdrip drippers, the siphon effect works, i.e. even when the pump is switched off, the water continues to run – and theoretically until the rain barrel is empty.

A feather-based check valve from GEKA (York-Zwischenventil, Messing Innengewinde 3/4″) has proved very useful here. The opening pressure applied to our pump is so low that the water can flow when the pump is in operation. The opening pressure, on the other hand, is so high that the siphon effect can no longer take effect, and the valve thus prevents the water from flowing on.

  • 1x GEKA G3/4″ 24,66 mm (Art-Nr.: 2693SB)
  • 2x GEKA Adapter 1/2″ 13mm (tube) to G3/4″ 24,66 mm (ventil) (Art.Nr.: 17.7600.9)

Garden Irrigation System

There are many irrigation systems, after some research my wife and I decided to use the Gardena Micro Drip System.

https://www.gardena.com/de/produkte/bewasserung/micro-drip-system/

We are still very pleased with this. In order to increase the life span, we dismantle the 3/16-inch components including drippers and spray nozzles over the winter months, the 1/2-inch components remain in the garden, are blown water-free by a compressor to avoid defects caused by frost.

Greenhouse Automation and Monitoring

One of our Corona projects was the purchase of our own greenhouse in order to be able to start sowing and raising seedlings earlier in the year. For irrigation, we decided on a similar concept based on our good experience with the MicroDrip system and documented below: