This is a simple project I've made to keep my plants alive while travelling and make sure they are ok. Feel free to use it.
- WeMos D1 Mini (be careful, since it's operating voltage is 3.3V !).
- 125V, 0.5m water pump
- 125V, 5A relay module
- jumpers
- 1 led (just to show me when WeMos wakes up)
- 5V Micro USB power source
- cables and power plugs (so you don't need to destroy the pump power cable)
- a 2m rubber hose (some T connectors may be a nice addition too. I'll try to find them, and if it works good, I'll update the list).
You can connect everything as follows in the sketch. Sketch
It will look something like this (this corner is a bit dusty, sorry 😅): The Device
Water supply with the pump inside
To write the code I used the Arduino IDE. It's free and have nice tools, like the serial plotter (altho we won't use the plotter here). To use it with ESP, you will need to do a quick setup. Here is a nice guide that will help you. To make the schematics, I used Fritzing.
To control the device and keep track of it's activity, I made use of ThingSpeak platform. Create a channel and two fields. One will store the activation command flag so every 10 minutes, the device will wake up, get the command flag value from the field and do what is needed. The other field will store your device activity, so you can keep track of whatever is happening.
ESP8266 DeepSleep function can lower your device power consumption by a good ammount. It makes your ESP enter in a state where the only thing working is the RTC. If you plan on creating more awesome stuff or some serious IoT projects, it's good to keep in mind that efficient power consumption is essential. Take a look here for better understanding. If for any reason you need to store some kind of data locally while using DeepSleep, you can make use of it's persistent memmory. It's not used here, since the control flag is stored at a ThingSpeak Field.
This is a simple project I've made in one day for fun and to keep my plants alive while I'm visiting my parents. Let me know if you like it or have any suggestion 😁.