Smart Irrigation System for Tomato Plants: A Wireless Solar-Powered Solution

Hi everyone, I’m excited to share my latest project—setting up a wireless solar-powered irrigation system for my potted tomato plants. As someone who loves gardening but hates the hassle of manual watering, especially when I’m away, I decided to take matters into my own hands. Here’s how I approached it and the lessons I learned along the way.

The Challenge
I wanted a system that could water my plants autonomously while I was away. The traditional “friendly neighbor” system wasn’t reliable enough for me, and I needed something that could be controlled precisely. Plus, there were no power outlets near my plants, so the system had to be battery-powered and solar-charged.

The Solution
After doing some research, I came up with two potential setups:

  1. ESP32 with 18650 Shield

    • This setup involves an ESP32 microcontroller, a 18650 battery shield, a solar panel, a boost converter, a relay, and a 12V pump. The idea is to have the system run in deep sleep mode most of the day, waking up at a set time to check the weather or soil moisture via Home Assistant (HA). It then waters the plants accordingly. This solution is autonomous, even without HA connectivity, but it’s a bit more expensive and requires some programming skills.
  2. Sonoff RF Relay

    • This option uses a Sonoff RF relay, 18650 batteries, a solar panel, a charging circuit, and a 12V pump. An automation in HA checks the temperature or soil moisture and sends open/close commands via RF. It’s cheaper and easier to set up but relies on the RF receiver working reliably, which can be a concern.

The Decision
I went with the ESP32 setup because it offers more reliability and autonomy. However, I integrated some features from the Sonoff RF solution to ensure redundancy. For instance, I added a 15-second delayed closing after the opening signal to prevent overwatering, which adds an extra layer of safety.

Implementation Details

  • Solar Charging: I used a small solar panel to charge the 18650 batteries, ensuring the system is self-sufficient.
  • Soil Moisture Sensor: I paired the setup with a Mi Plant sensor integrated into HA to monitor soil moisture in real time.
  • Automation: The system checks the soil moisture and temperature every morning and evening. If the soil is dry or the temperature is high, it triggers the pump for a set duration.

Lessons Learned

  1. Battery Management: Proper battery management is crucial. I had to ensure the charging circuit was efficient and that the batteries could handle the load without draining too quickly.
  2. Reliability of RF: While the ESP32 setup is more reliable, I learned that RF can be temperamental. Adding the delayed closing feature helped mitigate this issue.
  3. Integration with HA: Integrating with HA made the system smarter. The ability to check weather data and soil moisture in real time added precision that manual methods couldn’t match.

Future Improvements

  • I plan to add more sensors to monitor light levels and adjust watering times accordingly.
  • Exploring the possibility of using a larger battery bank to ensure the system runs smoothly during extended periods of cloudy weather.

Conclusion
This project has been a fantastic learning experience. It not only helped me create a reliable irrigation system but also deepened my understanding of IoT and automation. If anyone has similar projects or tips, I’d love to hear about them! Cheers to innovative gardening! :seedling::sparkles: