/IoT-Household-Plant-Watering-System

Internet connected water pump to automatically irrigate household plants

Primary LanguageArduino

IoT Household Plant Watering System

IoT Household Plant Watering System

This project is about building an internet connected switch and use it together with a water pump to automatically irrigate household plants.

It is meant to be part of a larger home automation network, where nodes are controlled from a central hub via a Node-RED server, it can also be used as stand-alone.

The build process is documented on Hackaday.io.

Hardware

The complete bill-of-materials is documented on Hackaday.io. The electronic files, including schematic and layout, are under /hardware.

Electronic schematic IoT Household Plant Watering System

The diaphragm pump is off of eBay and can function between 6-12V.

Software

The software is developed with Arduino IDE and the ESP8266 core. The MQTT libraries are courtesy of knolleary.

Before uploading the code the network credentials, MQTT broker address and port and the topic names need to be set. Once configured and uploaded the software can be updated over WiFi (Over-The-Air updating) from Arduino IDE.

Usage

The system is controlled via MQTT messages, the suggested approach is to use Node-RED server with an MQTT broker to configure the control flow.

The device subscribes to the following MQTT messages:

  • water: sets the state of the pump, 1 activates and 0 deactivates it
  • timeout: sets the maximum time the pump is allowed to function in milliseconds, if the pump is not stopped before the timeout runs out it will stop automatically
  • dutycycle: sets the PWM duty cycle from 0 to 100% for the motor, allows to control the speed of the pump

The settings for the timeout and duty cycle are stored in the EEPROM and persist over reboots.

License

The software is licensed under GNU General Public License.