✨ Use RCAPP and get 5% off 👇
Skip to content
Free Delivery on Orders Above Rs 999/- Pan-India
Cash on Delivery Available for Orders above Rs.500/- and Upto Rs 3000/-
SAVE more when you BUY more. Upto 30% Off on BULK PURCHASE
GST Invoices for Your Business
Dedicated Technical Support Team
Safely Delivering Genuine Products PAN INDIA

Smart Irrigation System Using Arduino Uno: Automatic Plant Watering Project

Smart Irrigation System Using Arduino Uno: Automatic Plant Watering Project
-
Written By - Robocraze -
📅 Updated on 12 Jun 2026
Summarize with AI
✅ Prompt copied

Summary

Efficient water management is an important part of plant care, but fixed watering schedules do not always reflect actual soil conditions. Soil moisture can change throughout the day due to sunlight, temperature, and plant water consumption. This often results in plants receiving either too much or too little water.

In this project, we will build a Smart Irrigation System using Arduino Uno that automatically waters plants based on soil moisture levels. Using a soil moisture sensor, relay module, water pump, and LCD display, the system continuously monitors the soil and activates irrigation only when it is needed. 

Smart Irrigation System Using Arduino Uno: Automatic Plant Watering Project - Cover image

Components Required

To build this project, you will need:

  • Arduino Uno board – This is the brain of the entire setup. It reads the moisture sensor data and decides when the water pump needs to be switched on or off. 
  • Soil moisture sensor module – This sensor sits in the soil and keeps checking how much moisture is present.  
  • 20x4 I2C LCD display – The LCD lets us see moisture readings, soil condition, and pump status directly on the project. 
  • Relay module – Since the Arduino cannot drive a water pump directly, we'll use a relay module as a switch to control the pump safely. 
  • Mini DC water pump – This is the component that actually delivers water to the plant whenever the soil becomes dry. 
  • Battery – The water pump requires its own power source, so a battery is used to provide the necessary power. 
  • Jumper wires – These help connect all the components together and make the circuit easier to assemble. 
  • Water container – Acts as the water reservoir from which the pump draws water. 
  • Plant pot – This is where the moisture sensor is placed and where the system monitors the soil conditions. 

Components and Supplies

💥 Hot deal
Original Arduino Uno R3 microcontroller board with ATmega328P and USB port - Arduino Uno Board -RobocrazeOriginal Arduino Uno R3 microcontroller board with ATmega328P and USB port - Arduino Uno Board -Robocraze

    Arduino Uno R3 Original

    Arduino UNO R3 Original The Arduino Uno R3 is a microcontroller board based on the ATmega328P chip and is widely recognized as the best original Arduino Uno board for beginners and projects. This board has 14 digital I/O pins (6 support PWM), 6 analog...
    Rs 2,619/-
    Rs 2,619/-
    Rs 2,649/-
    Save Rs 30/-
    Soil Moisture Sensor Module - Measures soil moisture for smart gardening. -Soil Moisture Sensor -RobocrazeSoil Moisture Sensor Module - Measures soil moisture for smart gardening. -Soil Moisture Sensor -Robocraze

      Soil Moisture Sensor Module

      Soil Moisture Sensor Module This is a soil moisture sensor or soil humidity sensor designed to help you monitor the water level in soil. With this soil moisture sensor module, you can easily determine when your plants need watering by checking how moist the...
      Rs 38/-
      Rs 38/-
      Rs 59/-
      Save Rs 21/-
      20x4 LCD Display Module (Blue) - 20x4 blue LCD display for Arduino & embedded applications. -LCD Display -Robocraze20x4 LCD Display Module (Blue) - 20x4 blue LCD display for Arduino & embedded applications. -LCD Display -Robocraze

        20x4 LCD Display Module (Blue) 2004A

        20x4 LCD Display Module (Blue) This is the 2004A Parallel LCD Display Module (Blue), A display is required if you want to add visual output to your Arduino projects. If you only need a small amount of data displayed, the LCD 20x4 Parallel LCD...
        Rs 284/-
        Rs 284/-
        Rs 449/-
        Save Rs 165/-
        5V 30A 1-Channel Relay Module – 5V single-channel high-power relay for heavy loads. -Relay Module -Robocraze5V 30A 1-Channel Relay Module – 5V single-channel high-power relay for heavy loads. -Relay Module -Robocraze

          5V 30A 1-Channel Relay Module

          5V 30A 1-Channel Relay Module The 5V 30A 1-Channel Relay Module comes with LED indicators, It can be controlled by microcontrollers such as Arduino, AVR, PIC, ARM any other microcontroller operating at 5V. The relay module uses an authentic quality mechanical relay and the industry's top...
          Rs 140/-
          Rs 140/-
          Rs 199/-
          Save Rs 59/-
          DC Mini Submersible Water Pump Motor 12VDC Mini Submersible Water Pump Motor 12V

            DC Mini Submersible Water Pump Motor 12V

            DC Mini Submersible Water Pump Motor 12V This DC Mini Submersible Water Pump Motor 12V.The pump can be used with an Aquarium or any other small solar-based pumping application. It can be also used with a Sanitizer Dispenser. This pump is completely submersible. DC Powered, can...
            Rs 285/-
            Rs 285/-
            Rs 439/-
            Save Rs 154/-
            9V HW High-Quality Battery – 9V battery for smoke detectors, toys & electronics.-HW Battery -Robocraze9V HW High-Quality Battery – 9V battery for smoke detectors, toys & electronics.-HW Battery -Robocraze

              9V Original HW High-Quality Battery

              High-Quality Original 9V HW Battery Hi-Watt 9V Battery is a high-capacity & low-cost solution for many electronic devices. It is used with its specific battery snap, The HW battery clip can be used to power LEDs or other devices with a 9V battery. It is Used...
              Rs 25/-
              Rs 25/-
              Rs 35/-
              Save Rs 10/-
              Jumper Wire Set - M2M, M2F, F2F (40 pcs each) – Ideal for Arduino & prototyping. Electronic Components - RobocrazeJumper Wire Set - M2M, M2F, F2F (40 pcs each) – Ideal for Arduino & prototyping. Electronic Components - Robocraze

                Jumper Wire Set - M2M, M2F, F2F (40 pcs each)

                Jumper Wire Set - M2M, M2F, F2F (40 pcs each) These DuPont jumper wires for electronics is a premium quality wire manufactured by using quality assured material and advanced techniques, which make them up to the standard in this highly challenging field. This 120pcs...
                Rs 139/-
                Rs 139/-
                Rs 169/-
                Save Rs 30/-

                How the Project Works

                Before building the circuit, let’s understand the basic working principle behind this project. 

                The soil moisture sensor is placed inside the soil and continuously measures the moisture content around its probes. The sensor sends an analog signal to the Arduino Uno, which compares the reading against a predefined threshold value. 

                When the soil becomes dry, the Arduino activates the relay module. The relay then switches on the water pump and starts supplying water to the plant. Once the moisture level increases beyond the threshold, the Arduino turns the relay off and stops the pump.

                To make monitoring easier, the LCD display shows the current moisture value, soil condition, and pump status in real time. 

                Circuit Connections 

                Connect all the components as shown below.

                Soil Moisture Sensor Connections 

                • Soil Moisture Sensor VCC → Arduino 5V 
                • Soil Moisture Sensor GND → Arduino GND 
                • Soil Moisture Sensor AO → Arduino A0 

                Relay Module Connections 

                • Relay Module VCC → Arduino 5V 
                • Relay Module GND → Arduino GND 
                • Relay Module IN → Arduino D7 

                LCD Display Connections 

                • LCD VCC → Arduino 5V 
                • LCD GND → Arduino GND 
                • LCD SDA → Arduino A4 
                • LCD SCL → Arduino A5 

                Water Pump Connections 

                • Water Pump (+) → Relay NO 
                • Relay COM → Battery (+) 
                • Water Pump (-) → Battery (-) 

                NOTE: Connect all grounds together, including the Arduino GND, relay GND, LCD GND, sensor GND, and battery negative terminal.

                Building the Circuit

                Start by connecting the soil moisture sensor to the Arduino Uno. Once the sensor wiring is complete, connect the relay module and LCD display according to the connections listed above.

                Smart Irrigation System Connection Diagram

                Next, connect the water pump through the relay contacts. The relay acts as an electrically controlled switch, allowing the Arduino to control the pump safely without supplying motor current directly.

                After completing the wiring, place the water pump inside a water container and insert the moisture sensor probes into the soil near the plant roots.

                Before powering the circuit, double-check all power and ground connections.

                Uploading the Arduino Code

                After assembling the hardware, open the Arduino IDE and upload the following program.

                
                #include  
                #include  
                 
                LiquidCrystal_I2C lcd(0x27, 20, 4); 
                 
                int sensorPin = A0; 
                int relayPin = 7; 
                int threshold = 500; 
                 
                void setup() { 
                pinMode(relayPin, OUTPUT); 
                 Serial.begin(115200); 
                 
                 lcd.init(); 
                 lcd.backlight(); 
                 
                 lcd.setCursor(0,0); 
                 lcd.print("SMART IRRIGATION"); 
                 delay(2000); 
                 lcd.clear(); 
                } 
                 
                void loop() { 
                 int moisture = analogRead(sensorPin); 
                 
                 Serial.print("Value: "); 
                 Serial.println(moisture); 
                 
                 lcd.setCursor(0,0); 
                 lcd.print("Moisture: "); 
                 lcd.print(moisture); 
                 lcd.print("    "); 
                 
                 if(moisture > threshold) 
                 { 
                   digitalWrite(relayPin, HIGH); 
                   Serial.println("PUMP ON"); 
                 
                   lcd.setCursor(0,1); 
                   lcd.print("Soil : DRY       "); 
                 
                   lcd.setCursor(0,2); 
                   lcd.print("Pump : ON        "); 
                 } 
                 else 
                 { 
                   digitalWrite(relayPin, LOW); 
                   Serial.println("PUMP OFF"); 
                 
                   lcd.setCursor(0,1); 
                   lcd.print("Soil : WET       "); 
                 
                   lcd.setCursor(0,2); 
                   lcd.print("Pump : OFF       "); 
                 } 
                 
                 delay(1000); 
                }
                

                Understanding the Code

                Let's quickly look at what the program is doing behind the scenes.

                The LCD libraries are initialized first so the display can communicate with the Arduino.

                
                #include <wire.h>
                #include <LiquidCrystal_I2C.h>
                

                Inside the main loop, the Arduino continuously reads the moisture sensor value.

                
                int moisture = analogRead(sensorPin)
                

                The reading is then compared with a threshold value.

                
                if(moisture > threshold)
                

                If the soil is dry, the Arduino activates the relay.

                
                digitalWrite(relayPin, HIGH);
                

                This turns on the water pump and begins irrigation.

                When sufficient moisture is detected again, the relay is switched off and the pump stops running.

                At the same time, the LCD display updates the moisture reading and system status, allowing you to monitor the operation without opening the Serial Monitor.

                Calibrating the Moisture Sensor

                Different soil types can produce different sensor readings, so it is worth spending a few minutes calibrating the threshold value.

                Start by observing the sensor reading in wet soil and then compare it with readings from dry soil. Based on these values, adjust the threshold in the code if required.

                
                int threshold = 500;
                

                A lower threshold will make the pump activate sooner, while a higher threshold will delay irrigation until the soil becomes drier.

                Testing the System

                Once the code is uploaded, place the sensor in moist soil and observe the LCD display.

                The display should indicate that the soil is wet, and the pump should remain off.

                Next, place the sensor in drier soil or allow the soil to dry naturally. As the moisture reading crosses the threshold value, the relay should activate and the water pump should start running.

                The LCD will also update the soil condition and pump status, making it easy to verify that the system is responding correctly. 

                Expanding the Project

                Once the basic system is working, there are several ways to add more functionality.

                You can integrate:

                These additions can turn a simple irrigation project into a more advanced smart agriculture system.

                Final Thoughts

                In this project, we built a Smart Irrigation System using Arduino Uno that automatically waters plants based on soil moisture levels. The project combines sensor monitoring, relay control, and automation into a practical application that can be used in gardens, indoor plants, and small farming setups.

                Beyond the irrigation application itself, the project also provides a solid introduction to working with sensors, controlling external devices using relays, and building automated systems using Arduino.

                Excerpt

                Build a smart irrigation system with Arduino Uno! Automate plant watering based on soil moisture using a sensor, relay, and pump. Full step-by-step guide.
                Prev Post
                Next Post

                Leave a comment

                Please note, comments need to be approved before they are published.

                Thanks for subscribing!

                This email has been registered!

                Shop the look

                Choose Options

                Edit Option
                Back In Stock Notification
                Compare
                Product SKU Description Collection Availability Product Type Other Details

                Choose Options

                this is just a warning
                Login
                Shopping Cart
                0 items
                FREE SHIPPING!
                ₹100 OFF
                ₹200 OFF
                ₹999
                ₹2500
                ₹4900
                WhatsApp Chat Chat