Step-by-Step Guide: Automating Watering System With Soil Moisture Sensors, Pump, Relay, and Mobile Alerts
by EkanshAgarwal01 in Circuits > Remote Control
24 Views, 0 Favorites, 0 Comments
Step-by-Step Guide: Automating Watering System With Soil Moisture Sensors, Pump, Relay, and Mobile Alerts
Maintaining the health of plants can be a challenging task, especially when it comes to ensuring they receive the right amount of water at the right time. An automated watering system is a practical and efficient solution for this. By combining soil moisture sensors, a water pump, a relay module, and mobile alerts, you can create a system that not only waters your plants based on their needs but also keeps you informed about their condition in real-time. This step-by-step guide will walk you through the process of building a smart watering system, helping you save time, conserve water, and keep your plants thriving, whether you’re at home or away.
Supplies
Soil Moisture Sensor: Measures soil moisture level.
ESP32 Microcontroller: Processes data and sends alerts via Wi-Fi.
Relay Module: Controls the water pump based on sensor data.
Water Pump: Supplies water to plants.
Tubing and Drip Emitters: Delivers water to each plant.
Water Reservoir: Stores water for the system.
Power Supply: Powers the pump and ESP32.
Blynk App (or similar): Mobile app for monitoring plant health and receiving alerts.
Jumper Wires and Breadboard: For connections.
Wiring the Components
Soil Moisture Sensor to ESP32:
- A0 (Analog Output) → ESP32 GPIO36.
- VCC → 3.3V pin on ESP32.
- GND → GND pin on ESP32.
Relay to ESP32:
- IN (Signal) → ESP32 GPIO25.
- VCC → 3.3V pin on ESP32.
- GND → GND pin on ESP32.
- NO (Normally Open) and COM (Common) → Connect to the water pump circuit.
Water Pump:
- Connect pump power supply to the relay’s NO and COM terminals.
Tubing and Drip Emitters:
- Arrange tubing around plants and install drip emitters at the base of each plant.
Setting Up the Mobile App
- Install Blynk App:
- Download Blynk App on your smartphone.
- Create a project and note the auth token.
- Configure Widgets:
- Add a Gauge Widget for soil moisture level.
- Add a Notification Widget for alerts.
- Add a Button Widget to manually control watering.
Programming the ESP32
Deploying the System
Upload Code:
- Connect ESP32 to your computer and upload the code using Arduino IDE.
Test the System:
- Insert the soil moisture sensor into the soil.
- Check the soil moisture readings in the Blynk app.
- Ensure the pump activates when the soil is dry and deactivates when moist.
Monitoring and Alerts
Real-Time Monitoring:
- View soil moisture levels in the app.
- Manually trigger watering using the button widget in Blynk.
Automatic Alerts:
- Receive notifications when the soil is too dry or the pump is activated.
Integrating With Solar Power
Power Supply:
- Connect the water pump and ESP32 to the solar-powered battery pack.
Backup Power:
- Use a small UPS or secondary battery to ensure uninterrupted operation.