Arduino Smart Watering System

by Techno With Ranula in Circuits > Arduino

123 Views, 1 Favorites, 0 Comments

Arduino Smart Watering System

Arduino Smart Watering System | #arduino #sinhala
Screenshot 2024-10-31 141157.png

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

Screenshot 2024-10-31 141318.png
Screenshot 2024-10-31 141332.png
Screenshot 2024-10-31 141359.png
Screenshot 2024-10-31 141415.png
Screenshot 2024-10-31 141432.png

Components Required:

  1. Arduino (e.g., Uno, Nano)
  2. Soil Moisture Sensor
  3. Relay Module
  4. I2C LCD (e.g., 16x2)
  5. Jumper wires
  6. Water Pump (optional, for testing)

Wiring Connections:

Screenshot 2024-10-31 134859.png

Soil Moisture Sensor:

  1. VCC to Arduino 5V
  2. GND to Arduino GND
  3. A0 (Analog output) to Arduino A0

Relay Module:

  1. VCC to Arduino 5V
  2. GND to Arduino GND
  3. IN1 (control pin) to Arduino D2

I2C LCD:

  1. VCC to Arduino 5V
  2. GND to Arduino GND
  3. SDA to Arduino A4 (for Uno/Nano)
  4. SCL to Arduino A5 (for Uno/Nano)


Arduino Code:

Screenshot 2024-10-31 142030.png

Explanation:

  1. Libraries: The code includes the Wire and LiquidCrystal_I2C libraries for I2C communication and controlling the LCD.
  2. Setup: In setup(), it initializes the relay and LCD, showing a title for a brief moment.
  3. 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:

  1. Modify the moisture threshold based on your sensor's characteristics and soil type.
  2. Adjust the I2C address (0x27) based on your LCD; you can use an I2C scanner sketch to find the correct address if needed.

Testing:

Arduino Smart Watering System | #arduino #sinhala

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!!!!!!!!!!