DIY TUTORIAL
Level: ★★★☆☆
1
1 Esp32 Microcontroller ESP32 Microcontroller
2 Moisture Sensor Moisture Sensor
3 Pump Water Pump
4 Transistor Transistor
5 Wiederstand 1k 1kΩ Resistor
6 Cables Jumper Wires
7 Breadboard Breadboard
2

Hardware Setup

  1. Connect your Esp32 to a breadboard
  2. Power your Esp32 via your Laptop
  3. Connect your Moisture Sensor to your Esp. The yellow cable should connect to an Analog pin
  4. Spread your Transistors legs into three different rows.
  5. Connect the Transistors middle leg via a Resistor to a different row on the Breadboard
  6. The orange cable you see in the photo below should now connect your middle Transistor leg via the Resistor to an Output pin on your Esp32
  7. Connect the left leg of the Transistor to your power supply
  8. Connect the right leg of the Transistor to your Pump
  9. Connect the black cable end of your Pump to your GND
  10. OPTIONAL: If you're a pro and do not mind putting in some extra work you can also attach an LED to your project so you always know when your friends plant needs water.
1 Hardware Step 1 Connect ESP32 to Breadboard
2 Hardware Step 2 Power ESP32
3 Hardware Step 3 Attach Moisture Sensor
4 Hardware Step 4 Connect to matching cables, leave out the white one
5 Hardware Step 5 Connect the yellow cable to an analog pin, the power cables to 5vol and GND
6 Hardware Step 6 Split the Transistors legs into three different rows
7 Hardware Step 7 Connect the cables to the Esps power source
8 Hardware Step 8 Stick the resistor between the transistors middle leg and a new row
9 Hardware Step 9 Now connect the new resistor row to an output pin of your Esp (orange cable)
10 Hardware Step 10 Also connect your Transistors left leg to the Esps power source while the right leg gives power to the pump via a red clamp
11 Hardware Step 11 Connect a black clamp directly from the Esps GND to the pump and your're all set
3

Software Installation

To build our project you must install the following software:

1. A IDE that works with Hardware: Clion or Visual Studio Code (recommended)

2. PlatformIO extension for your IDE
PlatformIO for Visual Studio Code
PlatformIO for CLion
3. Install the ESP32 board support package in PlatformIO
PlatformIO ESP32 Board Support

Clone our GitHub repository and upload the code to both ESP32s:

git clone https://github.com/water-broadcast/iot-project.git
cd iot-project
platformio run --target upload

Configure the WiFi credentials in the config.h file

4

Final Installation

  • Place the soil moisture sensor in your plant's soil
  • Mount the water pump in your water reservoir
  • Route the tubing to your plant
  • Secure all components in an enclosure
  • Enjoy your connected watering system!
5

How the finished system works

Once your setup is finished you should have 2 identical hardware systems, one ESP32 flashed with the Flower1 code and one ESP32 flashed with the Flower2 code. When you now water your own plant your friends plant, no matter how far away, will also get watered if its moisture detector detects its soil as dry. You now have a new way of creating connection with your friend without having to take any extra time during your day. If you are up for the challenge you can copy the system for all the plants in your household and share a plant watering chore and switch duty every week. Even when your friend is on holiday you can take care of their Plants without having even to enter their apartment!