Introduction: Arduino Smart Watering System

About: MY YT :- PLS SUBCRIBEE!!!!!!!!!!!!

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:

  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)

Step 1: Wiring Connections:

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)


Step 2: Arduino Code:

Step 3: 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.

Step 4: 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.

Step 5: 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.

Step 6: Thank You!!

Thank you for watching this blog and video hope you learned something newww!!!!!!!!!!