Jump to main content

Build a Circuit to Automatically Water Your Plants

1
2
3
4
5
310 reviews

Abstract

Have you ever taken care of a plant? It can be tricky to get it right. You have to remember to water it regularly, and you also have to make sure to give it the right amount of water — not too much or too little. What if technology could help? In this engineering project, you will learn how to automate the entire process of watering a plant. Using a soil moisture sensor and a pump, you will build a circuit that will automatically detect when the soil is too dry, add water, and stop when the soil reaches the right moisture level. With this system, you can keep your plants healthy and use only as much water as you need. You can even expand the system to water multiple plants or an outdoor garden!

Summary

Areas of Science
Difficulty
Method
Time Required
Long (2-4 weeks)
Prerequisites

Previous experience with Arduino is recommended. See our How to Use an Arduino tutorial.materi

Material Availability

A kit is available from our partner Home Science Tools®. See the Materials section for details.

Cost
Average ($40 - $80)
Safety

No issues

Credits
Science Buddies is committed to creating content authored by scientists and educators. Learn more about our process and how we use AI.

Objective

Build, calibrate, and test an automatic plant-watering system.

Introduction

Humans have used irrigation, the artificial application of water to plants (as opposed to natural application from rainfall), for thousands of years. Irrigation can help crops grow in areas that otherwise do not receive enough rainfall. It can also be used for home gardens and landscaping. It can be done manually — for example, using a hose or bucket — or automatically, by using sprinklers or another type of irrigation system (Figure 1).


A field of crops with multiple sprinklers spaced throughout the field spraying water Image Credit: Science Buddies
Figure 1. A sprinkler system irrigating a field of crops.

Some irrigation systems just run on a timer. They apply a fixed amount of water for a certain period of time every day. While this is simple, it can also result in overwatering (which can harm plants) and wasting water, because the sprinklers will run even if it is raining or the soil is already wet. To avoid wasting water, irrigation systems can use an electronic rain sensor or soil moisture sensor. These sensors can detect rainfall or the soil's moisture level, and the irrigation system can be programmed to automatically adjust the amount of water applied or to skip watering altogether. This process requires careful calibration to avoid over- or under-watering the plants.

In this project, you will build your own automatic irrigation system for an indoor plant, like the one in Figure 2. This way, you do not need to worry about waterproofing your circuit for outdoor use, although that is an optional variation of the project. The circuit will use a soil moisture sensor, an Arduino, and a small pump. The Arduino will take readings from the soil moisture sensor and use those readings to automatically control the pump. You will need to calibrate the soil moisture sensor so the pump turns on and off at appropriate moisture levels for your plant and its soil.


Figure 2. An Arduino-based automatic watering system for an indoor potted plant.

To do this project, you should be familiar with the basics of using an Arduino. See the How to Use an Arduino reference in the Bibliography if this is your first time using an Arduino. You will also need to learn how to use the soil moisture sensor and how to control a pump with your Arduino. These topics are covered in the following two videos.

Terms and Concepts

Questions

Bibliography

Materials and Equipment Buy Kit

Recommended Project Supplies

Get the right supplies — selected and tested to work with this project.

View Kit

Disclaimer: Science Buddies participates in affiliate programs with Home Science Tools®, Amazon.com, Carolina Biological, and Jameco Electronics. Proceeds from the affiliate programs help support Science Buddies, a 501(c)(3) public charity, and keep our resources free for everyone. Our top priority is student learning. If you have any comments (positive or negative) related to purchases you've made for science projects from recommendations on our site, please let us know. Write to us at [email protected].

Experimental Procedure

This project follows the Engineering Design Process. Confirm with your teacher if this is acceptable for your project, and review the steps before you begin.
Before you begin: Review How to Use an Arduino Tutorials 1-3.

Calibrate Your Sensor

Before you build a full automatic watering system, you need to calibrate your soil moisture sensor for the soil you plan to work with.

  1. Build the circuit shown in Figure 3.
    1. For the soil moisture sensor:
      1. VCC to Arduino pin 8
      2. GND to the ground bus
      3. SIG to Arduino pin A0
    2. For the LEDs:
      1. Red LED and 220 Ω resistor to Arduino pin 2
      2. Yellow LED and 220 Ω resistor to Arduino pin 3
      3. Blue LED and 220 Ω resistor to Arduino pin 4

    Figure 3. Breadboard diagram for the Arduino soil moisture sensor circuit.
  2. Download soil_moisture_sensor_calibration.ino. Read through the commented code so you understand how it works. A Tinkercad Circuits simulation with the code is also available.
  3. Upload the code to your Arduino and open the serial monitor (Tools→Serial Monitor). The serial monitor should read 0 and the red LED should be on when the probes are not touching anything. If you touch both probes at the same time with one finger, the reading in the serial monitor should change, since your skin is slightly conductive.
  4. Prepare a bowl of dry soil. You can leave the soil out in the sun or speed up the process by drying it in an oven or microwave. Try to make the soil as dry as possible.
  5. Prepare a data table like Table 1.
Swipe left to see more
  Dry soil Wet soil
Trial Initial reading Final reading Initial reading Final reading
1        
2        
3        
Average        

Table 1. Table for recording sensor calibration data.

  1. Push the sensor firmly into the soil, so the probes are almost completely submerged (Figure 4).
  2. Watch the serial monitor and immediately write down the sensor's initial reading.
  3. The sensor reading may fluctuate at first. Wait five minutes for the reading to stabilize, then write down the final reading. If the reading is still changing, wait another five minutes, then check again.
    Figure 4. Close-up picture of the soil moisture sensor in the soil.
  4. Pull the sensor out of the soil. Dry it off with a clean towel.
  5. Put the sensor in a different location in the soil. The measurement will depend on the contact area between the sensor probes and the soil, so make sure you test it at the same depth each time.
  6. Repeat steps 7–10 as needed for at least two more trials with dry soil.
  7. Slowly add water to the soil until it is completely saturated (cannot absorb any more water).
  8. Repeat steps 6–11 for at least three trials with wet soil.
  9. Calculate average initial and final readings for both the wet and dry soil.
  10. In the code, adjust the values for the wet and dry variables. You will need to pick appropriate values based on your calibration, your soil, and your plant. For example, you might not want to wait until the soil is completely dry to start watering, and you might not want to apply water until the soil is saturated. You may wish to set values in the code that are somewhere between the calibration values you recorded.
  11. Finally, adjust the delayTime variable. This variable defaults to 1 second (1,000 milliseconds) to make the calibration process quick, but you probably do not need to check the moisture level of your plant's soil every second! You should think about what value makes the most sense for your plant, but be careful not to make the delay too long. For example, if you only check the sensor once per hour, then when the soil gets dry, the pump will run continuously until the Arduino checks the sensor value again an hour later. This could result in overwatering or even water spilling out of the pot!

Set Up Your Automatic Watering System

Now you are ready to connect a pump and start automatically watering your plant.

  1. Connect the pump to your circuit as shown in Figure 5. Note: This image uses a DC motor to represent the pump, because Tinkercad does not have a separate "pump" part, but the wiring is the same.
    1. Put the MOSFET in the breadboard with its pins in three different rows.
      1. Connect the MOSFET's gate (the pin on the left when the writing is facing you) to Arduino pin 11.
      2. Connect the MOSFET's drain (the middle pin) to the pump's negative wire.
      3. Connect the MOSFET's source (the pin on the right when the writing is facing you) to ground.
    2. Connect the pump's positive wire to 5 V.

    Figure 5. Pump (represented by a DC motor in this diagram) connected to the circuit. The pump is controlled by a MOSFET since the Arduino's pins cannot supply enough current to drive the pump directly.
  2. Download soil_moisture_sensor_pump.ino and upload it to your Arduino. A Tinkercad Circuits simulation is also available.
  3. Now you need to physically set up the system for your plant. Your exact setup will depend on your situation, but here are some things to consider. (Figure 2 shows an example.)
    1. How will you power the Arduino? You might not want to leave it plugged in to your computer's USB port for weeks at a time. You can power the Arduino using a wall charger or a USB wall adapter and the USB cable (see materials list).
    2. How will you protect the Arduino and circuit from dirt and moisture? Will you put them in a container? Where will you put the container?
    3. Where will you put your reservoir of water?
    4. How will you connect the pump's tubing from the reservoir of water to the plant? Will you need something to hold the tubing in place? Where will you put the outlet tube? At the edge of the pot or at the base of the plant? Somewhere in between?
    5. Where will you put the soil moisture sensor? Does it matter? For example, do you want to take readings near the base of the plant, or at the edge of the pot? If you put the sensor right next to the pump's outlet tube, what effect could this have?
    6. Do you need to do anything to protect the entire system — for example, from pets or small children?
  4. Once your system is set up, you are ready to monitor its performance and your plant. Depending on how often you normally water your plant, this process could take days or weeks. Note that you might not be there to observe when the pump is running (you could be at school or asleep). Keep an eye on both the soil and the plant. Does the soil look too dried out or oversaturated? Does the plant look wilted? If so, you may need to adjust the wet and dry variables in your code.
  5. Even when it is only powered on intermittently, the sensor's probes can oxidize over time. If you notice any drift in the system's performance, like a trend toward over- or under-watering, you may need to recalibrate your sensor. Your plant could also be growing and consuming more water. Continue to monitor the soil and your plant's health, and adjust thewet and dry variables as needed.
  6. Can you get to a point where the automatic system can reliably water the plant for you? (You will still need to refill the external container of water occasionally.) Since this is an engineering design project, there are many other features you could add to your automatic watering system. See the Variations section for some ideas.
icon scientific method

Ask an Expert

Do you have specific questions about your science project? Our team of volunteer scientists can help. Our Experts won't do the work for you, but they will make suggestions, offer guidance, and help you troubleshoot.

Global Goals

The United Nations Sustainable Development Goals (UNSDGs) are a blueprint to achieve a better and more sustainable future for all.

This project explores topics key to Zero Hunger: End hunger, achieve food security and improved nutrition and promote sustainable agriculture.

Variations

  • Can you build a circuit with multiple soil moisture sensors to take readings from different locations in the pot?
  • Can you make your circuit waterproof and use it with outdoor plants?
  • Can you use the Arduino's analogWrite() function to run the pump at variable speeds instead of only turning it fully on or off?
  • Can you do an experiment to compare the performance of manual watering, watering with a timer, and automatic watering with a soil moisture sensor? You can monitor plant health, size, yield, etc., and see how the different methods compare. You can also keep track of the total amount of water used in order to monitor water waste.
  • Can you add potentiometers and a display to your circuit so you can adjust the wet/dry variables without needing to re-upload the code?
  • The soil moisture sensor in this project is resistive. The probes of a resistive moisture sensor can oxidize over time, requiring you to recalibrate the sensor. This is why you only power the sensor intermittently when you take a reading, instead of connecting it directly to the Arduino's 5 V and leaving it on all the time. Alternatively, you can use a capacitive soil moisture sensor, which avoids some of the problems faced by resistive sensors. Can you do an experiment to compare the performance of the two types of sensors over time?
  • Can you design a larger automatic irrigation system with multiple soil moisture sensors, either for multiple potted plants or different locations in a garden bed? Can you use multiple pumps, or electronic valves to control the flow from a single pump, to only water the plants or areas that need it?

Careers

If you like this project, you might enjoy exploring these related careers:

Career Profile
Not all dirt is created equal. In fact, different types of soil can make a big difference in some very important areas of our society. A building constructed on sandy soil might collapse during an earthquake, and crops planted in soil that doesn't drain properly might become waterlogged and rot after a rainstorm. It is the job of a soil scientist to evaluate soil conditions and help farmers, builders, and environmentalists decide how best to take advantage of local soils. Read more
Career Profile
Hydrologists examine the physical characteristics, distribution, and circulation of water above and below the earth's surface. They study rainfall and other precipitation, the paths precipitation takes through the soil and rocks underground, and its return to the oceans and air. Often, they specialize in either underground water or surface water. They examine the form and intensity of precipitation, its rate of infiltration into the soil, its movement through the Earth, and its return to the… Read more
Career Profile
With a growing world population, making sure that there is enough food for everyone is critical. Plant scientists work to ensure that agricultural practices result in an abundance of nutritious food in a sustainable and environmentally friendly manner. Read more
Career Profile
Just as a potter forms clay, or a steel worker molds molten steel, electrical and electronics engineers gather and shape electricity and use it to make products that transmit power or transmit information. Electrical and electronics engineers may specialize in one of the millions of products that make or use electricity, like cell phones, electric motors, microwaves, medical instruments, airline navigation system, or handheld games. Read more
Home Science Tools®

Contact Us

Our kits are developed in partnership with Home Science Tools®. If you have purchased a kit for this project, Home Science Tools® is pleased to answer any questions.

In your email, please follow these instructions:
  1. Include your Home Science Tools® order number.
  2. Please describe how you need help as thoroughly as possible:

    Examples

    Good Question I'm trying to do Experimental Procedure step #5, "Scrape the insulation from the wire. . ." How do I know when I've scraped enough?
    Good Question I'm at Experimental Procedure step #7, "Move the magnet back and forth . . ." and the LED is not lighting up.
    Bad Question I don't understand the instructions. Help!
    Good Question I am purchasing my materials. Can I substitute a 1N34 diode for the 1N25 diode called for in the material list?
    Bad Question Can I use a different part?

Contact Support

News Feed on This Topic

 
, ,

Cite This Page

General citation information is provided here. Be sure to check the formatting, including capitalization, for the method you are using and update your citation, as needed.

MLA Style

Finio, Ben. "Build a Circuit to Automatically Water Your Plants." Science Buddies, 5 Nov. 2025, https://www.sciencebuddies.org/science-fair-projects/project-ideas/PlantBio_p055/plant-biology/arduino-automatic-plant-watering. Accessed 18 June 2026.

APA Style

Finio, B. (2025, November 5). Build a Circuit to Automatically Water Your Plants. Retrieved from https://www.sciencebuddies.org/science-fair-projects/project-ideas/PlantBio_p055/plant-biology/arduino-automatic-plant-watering


Last edit date: 2025-11-05
Top
Free science fair projects.