Automatic Watering System for Flowers
by tudi235 in Circuits > Microcontrollers
578 Views, 10 Favorites, 0 Comments
Automatic Watering System for Flowers
Hi everyone! Today I'll show you how to make yourself an automatic watering system for your plants with the help of an ESP8266 WiFi microcontroller and Blynk App. It can be used to water your flowers when you're away from home or just to do the job for you. You can monitor the soil moisture, water level, pump status or manually water the plants via the Blynk app on your smartphone. Check out the following steps and make your own flowers watering system.
Supplies
- ESP8266 or other WiFi compatible boards
- soil moisture sensor
- water pump with relay
- at least 1m of aquarium hose that could fit snug around the pump outlet
- 5V power supply
- jumper wires
- water bucket
Here is the link to the set I brought (includes the pump, hose and sensor)
Configure the App
- download Blynk from Google Play or App Store
- create an account or log in if you already have one
- create a new project and chose your board from the list
- generate an authentication token for your device (keep it close, you'll need it later)
- drag and drop the widgets you want
If you want to reproduce the exact app widgets and features I have read the following setup steps. If not, skip the next part.
- value display on A0 ("raw data")
- notification (for when the hardware goes offline)
- eventor (for creating events like when to water automatically)
- led on V0 ("pump status")
- button on V3 (configured as switch)
- level V on A0 ("soil moisture", values from 740 to 300 in my case, see later step for sensor calibration)
- level V on V1 ("water", values from 0 to 100)
- create the same 2 events for full functionality (see 3rd image)
Code the Board
First, make sure you have Arduino IDE on your computer. Here is a quick tutorial on how to setup Arduino IDE to work with your ESP Board if you haven't done it yet.
If you encounter problems with connecting to WPA2 Enterprise (work or uni networks like Eduroam) use the code from my repository
Downloads
Assemble the Hardware
Now it's time to assemble everything. I used a mini breadboard and some jumper wires to help me keep everything tight and tidy and a DC-DC converter as a power supply.
- connect the power supply (5V to Vin pin on your board and GND to any GND pin)
- connect the sensor Vcc and GND to the same pins on the breadboard and the data pin(yellow) to A0 pin on the ESP
- connect the pump relay's Vcc to 3.3V pin on the board, GND to any GND pins, and Data In (grey) to D7 pin (Vcc should be connected to the same potential as Data In otherwise, it'll malfunction, in my case 3.3V as it's the operating voltage of the NodeMCU)
- now connect one wire coming from the pump to the GND pin from the power supply and the other one to the relay's output. Connect the other output from the relay to 5V on the power supply
As a final touch to the project, you can add an enclosure for the hardware. I kept mine exposed as I personally like it more so and because I only use it when I travel for a longer period of time. Double check if you wired everything correctly, power it up and enjoy your watering system!