Arduino Smart Watering System
by Techno With Ranula in Circuits > Arduino
231 Views, 2 Favorites, 0 Comments
Arduino Smart Watering System


an Arduino-based automated watering system using an LCD with I2C communication and a relay to control the water pump. This example assumes you have a soil moisture sensor to detect the moisture level.
Supplies





Components Required:
- Arduino (e.g., Uno, Nano)
- Soil Moisture Sensor
- Relay Module
- I2C LCD (e.g., 16x2)
- Jumper wires
- Water Pump (optional, for testing)
Wiring Connections:

Soil Moisture Sensor:
- VCC to Arduino 5V
- GND to Arduino GND
- A0 (Analog output) to Arduino A0
Relay Module:
- VCC to Arduino 5V
- GND to Arduino GND
- IN1 (control pin) to Arduino D2
I2C LCD:
- VCC to Arduino 5V
- GND to Arduino GND
- SDA to Arduino A4 (for Uno/Nano)
- SCL to Arduino A5 (for Uno/Nano)
Arduino Code:

Downloads
Explanation:
- Libraries: The code includes the Wire and LiquidCrystal_I2C libraries for I2C communication and controlling the LCD.
- Setup: In setup(), it initializes the relay and LCD, showing a title for a brief moment.
- Loop: In the loop(), it reads the soil moisture level. If it's below a certain threshold (adjust as needed), it activates the relay to start watering; otherwise, it turns off the pump.
Adjustments:
- Modify the moisture threshold based on your sensor's characteristics and soil type.
- Adjust the I2C address (0x27) based on your LCD; you can use an I2C scanner sketch to find the correct address if needed.
Testing:

Make sure to test the system carefully. Start with the pump connected to a power source, but not with water until you confirm the relay operates correctly.
Thank You!!
Thank you for watching this blog and video hope you learned something newww!!!!!!!!!!