Build a Smart Irrigation System Using Soil Moisture Sensor
- Time
- 45 - 60 minutes
- Difficulty
- Medium
- Best for
- Class 6-8
- Subject
- Environmental Science
- Things needed
- 9, 4 at home
- Steps
- 13
- Cost
- Low, a few things to find
- You will learn
- Soil Moisture Sensing and Automated Water Conservation

What you need
0 of 9 readyTap each thing once you have it in front of you. Items with the house sign are already somewhere in your home.
- Capacitive or resistive soil moisture sensor module 1 unit No luck? Use two stainless steel nails inserted in soil connected to a transistor switch.
- Arduino Uno microcontroller board 1 unit
- 5V single-channel relay module 1 unit No luck? Use nPN transistor like BC547 with a diode if using a small DC motor.
- 5V or 12V DC mini submersible water pump 1 unit No luck? Use small 3V-6V DC hobby motor with a plastic fan blade to demonstrate motor triggering.
- 🏠 Flexible thin plastic tubing (pipe) 1 meter No luck? Use used aquarium air tube or clear plastic straw link.
- Jumper wires (Male-to-Female, Male-to-Male) 10-12 wires No luck? Use thin insulated copper wire stripped at ends.
- 🏠 Plastic container or bottle (for water reservoir) 1 container No luck? Use cut plastic cold drink bottle or plastic mug.
- 🏠 Small plant pot filled with dry soil 1 pot No luck? Use plastic tea cup filled with garden soil.
- 🏠 9V battery with connector or 5V DC power adapter 1 unit No luck? Use power bank with a USB cable.
What do you think will happen?
Real scientists guess before they look. Write one line now. After the steps, the page will show it next to what you should see.
Saved on this device- Electrical hazard: Ensure only low-voltage DC components (5V to 12V) are used for the pump and relay. Do not connect mains AC voltage.
- Water and electronics hazard: Keep the microcontroller, relay, and power source isolated and shielded from water splashing or leakage.
The procedure
Tap a step when it is done. Lab mode shows one step at a time in big letters, reads it aloud if you want, and keeps the timer.
- Position your plant pot and water reservoir on a flat surface, keeping all electronic boards and wire connections safely away from potential water splashes.Keep all control electronics, power sources, and relays strictly isolated from water leakage or splashing to prevent electrical short circuits.
- Insert the soil moisture sensor vertically into the root zone of your plant pot, ensuring the soil fits snugly against the probe without air gaps.
- Attach one end of the plastic tubing to the output nozzle of the submersible DC water pump.
- Place the DC water pump into the water container, directing the free end of the tubing toward the top of the plant pot.
- Connect the soil moisture sensor output pins to the designated analog pin, power pin, and ground pin on your microcontroller using jumper wires.
- Wire the control pin of the relay module to a digital pin on the microcontroller, then connect its power and ground pins.
- Connect the low-voltage DC water pump wires through the relay switch contacts and connect them to your DC power source.Use only low-voltage DC (5V to 12V) power for the pump and relay. Never connect mains AC power to this project.
- Write a script that reads analog moisture values, compares them against a chosen dry soil threshold, and triggers the relay pin HIGH when the soil is dry.
- Include code instructions to set the relay pin LOW to switch off the pump once moisture exceeds the threshold.
- Upload the written control program to your microcontroller using a USB cable.
- Power the microcontroller using your low-voltage battery or DC adapter to start automatic operation.Ensure all power inputs match low-voltage DC ratings (5V-12V) before plugging in.
- Saturate the soil around the probe fully with water to complete initial calibration and confirm the baseline setpoint.
- Monitor the setup to verify that the pump activates when the soil dries out and automatically stops after delivering water.
The Concept
Automated irrigation uses electronic feedback loops to optimize water delivery to crops or household plants. By reading environmental conditions directly from the soil, the system replaces rigid mechanical timers and eliminates manual watering errors.
Observation
When you insert the sensor into dry soil, the water pump turns on automatically and starts pumping water into the soil container. As the soil gets wet and absorbs water, the system senses the moisture and turns off the pump on its own.
If you add an optional LCD screen, it displays Soil: DRY | Pump: ON when the soil needs water, and switches to Soil: WET | Pump: OFF as soon as the plant gets enough water.
Why It Happens
Think of the soil moisture sensor as a hungry belly monitor for your plant. When the soil becomes dry, it sends an electrical signal to the microcontroller (the brain of the project), telling it that the plant is thirsty.
The microcontroller then flips an electronic switch called a relay. The relay opens the power line to the water pump, turning it on just like switching on a tap. Once the soil absorbs enough water, the sensor signals that the plant is full, and the brain turns off the pump to prevent overwatering.
The Science Behind It
The system relies on detecting the volumetric water content of soil through electrical conductivity or dielectric capacitance. Water is a good conductor of electricity compared to dry dirt, so wet soil allows electrical current to flow much more easily than dry soil. The soil moisture sensor measures this change and sends an analog voltage signal to the microcontroller.
The microcontroller compares this incoming reading to a pre-programmed threshold value. If the reading drops below the setpoint, it triggers the relay module to complete the circuit for the water pump. Just like in the NCERT chapter What If It Finishes?, which highlights the need to conserve natural resources before they run out, smart irrigation saves precious freshwater by delivering water only when needed and eliminating unnecessary waste.
Make It a Project
If you are presenting this automated system at a science fair, try altering single parameters to evaluate performance:
- Independent Variable: Soil moisture sensor threshold setting or soil type (sandy, loam, clay).
- Dependent Variable: Total volume of water used (mL), duration of watering cycles (seconds), and soil moisture retention over time.
- Controlled Variables: Plant type, ambient room temperature, light exposure, initial soil dry weight, and pump flow rate.
Record baseline sensor readings in completely dry soil and fully saturated soil for calibration. Measure the exact volume of water delivered during each cycle to calculate total water savings compared to a fixed timer.
FAQs
Why does my water pump stay on all the time?
Check your threshold value in the code. If your setpoint is too high, the system thinks the soil is always dry. Also make sure your sensor probes are firmly buried in the soil and your relay wiring is connected to the Normally Open (NO) terminal.
Can I use a 9V battery to power the water pump?
Standard 9V transistor batteries run out of power very quickly under motor loads. Use a 5V-12V power adapter or a rechargeable Li-ion battery pack instead so your pump gets enough current to move water without crashing your microcontroller.
What is the difference between resistive and capacitive moisture sensors?
Resistive sensors pass electricity directly through the soil, causing the metal probes to corrode quickly. Capacitive sensors measure moisture without exposed metal, making them rust-proof, longer-lasting, and far more reliable for long-term science projects.
How do I set the right threshold value for my soil?
Test your sensor readings in completely dry soil, then in saturated wet soil using your Serial Monitor. Pick a number halfway between these two readings and set it as your threshold in the microcontroller code.
Why is a relay module necessary instead of connecting the pump directly to Arduino?
Microcontroller pins can only deliver a tiny amount of current (around 20mA to 40mA), which is not enough to run a motor. A relay acts as an electrically controlled switch that allows a small signal from Arduino to safely control a larger power supply.
Your lab notebook
Two minutes here and your lab record is done. Everything stays on this device until you copy it out.
The physics or chemistry on this bench is what a working business charges for. See the numbers, the licences and the worst case before anyone spends a rupee.
🏪 ITI · Mechanic Motor VehicleStart a Car Tyre & Wheel Service Shop: Full GuideLearn how to launch a successful car tyre and wheel service business. Covers equipment costs, licensing, revenue strategy,…🧠 Understood the science? Prove it
Short quizzes on the same physics and chemistry. Free, timed, every answer explained.
Next on the bench
Kinetic & Potential Energy Interconversion on Curved TrackMeasure potential and kinetic energy transformations of a marble rolling on a curved track using simple tracking tools and physics equations.Sliced flexible PVC conduit pipe (1.5 meters) or toy track🏠 Glass marble (kancha) or steel ball bearing🏠 Measuring tape or 1-meter steel scale🏠 Smartphone with slow-motion video or stopwatch app+3 Medium⏱ 45 min12 steps⚗️ Class 9-12
How Hydraulic Brakes Work: Pascal's Principle ModelBuild a simple working model of hydraulic brakes using syringes and water to demonstrate Pascal's Law and force multiplication in fluid mechanics.50 mL syringe (without needle)10 mL syringe (without needle)Saline pipe / IV tube (flexible transparent tubing)🏠 Tap water+3 Medium⏱ 30 min12 steps🔭 Class 6-8🧑🔬 with an adult
Footstep Electricity: Piezoelectric Energy Tile ProjectLearn how to build a piezoelectric energy harvesting floor tile that turns footstep pressure into electricity to light up LEDs and charge…Pre-wired brass-backed piezoelectric discs (27mm or 35mm)1N4007 rectifier diodes (or MB10S bridge rectifier)Electrolytic capacitor (100uF to 470uF, 16V or 25V)5mm high-brightness LED (red or green)+4 Medium⏱ 2-3 hours13 steps⚗️ Class 9-12🧑🔬 with an adult
How Solar MPPT Optimizes Panel EfficiencyLearn how Maximum Power Point Tracking (MPPT) uses dynamic DC-DC conversion to keep solar panels operating at peak electrical efficiency.10W to 20W 12V Solar PanelArduino Uno or Nano Microcontroller BoardINA219 I2C Current and Voltage Sensor ModulesAdjustable Buck Converter Module (LM2596 or XL4015) or IRFZ44N MOSFET Circuit+5 Advanced⏱ 3 - 5 hours12 steps⚗️ Class 9-12🧑🔬 with an adult