Plant Watering Kit


This page describes how to build an automated plant watering system. It uses a soil moisture sensor and a water level sensor. It turns on a pump when the soil is too dry and turns on a buzzer when the water level is too low.


  • Arduino Uno
  • Grove shield
  • 12V power supply
  • three 20cm cables
  • two 40cm cables with power line cut
  • red jumper wire
  • pump
  • two 2 foot (about 6cm) sections of vinyl tubing
  • Grove button
  • Grove relay
  • Grove buzzer
  • water sensor
  • soil moisture sensor
  • water container
  • potted plant

Prepare your Arduino

  1. Use the provided screws to attach the Arduino to the base plate.
  2. Add rubber feet to the base plate.
  3. Attach the Grove shield to the Arduino. Be sure to line up the pins properly.
  4. Install the plugin if you haven't already.
  5. Plug in the Arduino into your computer using a USB cable.

Assemble the Plant Watering System

  1. Wire the pump:

    1. Connect the black pump wire to the barrel connector negative side.
    2. Connect the red pump wire to the relay (either side).
    3. Connect the red jumper wire from the relay (other side) to the barrel connector positive side.

  2. Connect the hoses to the pump:

    1. The short hose connects to the pump inlet (top of pump; see photo)
    2. The long hose connects to the pump output (side of pump; see photo)

  3. The water sensor has two ends: one with a circuit board and one without:

    The circuit end should be outside the container and non-circuit end near the bottom inside the container. When the water drops below this level, the buzzer will sound. You can bend the wires over the rim of the container. When you have found a good position for the sensor, attach it using foam tape. Make sure the container is clean and dry before attaching the sensor.

  4. Connect the devices to the Arduino:

    1. Connect the soil moisture sensor to A0 using a long cable.
    2. Connect the water level sensor to A2 using a long cable.
    3. Connect the button to D2 using a short cable.
    4. Connect the relay to D4 using a short cable.
    5. Connect the buzzer to D6 using a short cable.

  5. Calibration (optional): You can use the Plant Watering Calibration lesson to help you calibrate the threshold values.

  6. Send the code to the Arduino:

    1. Use the Arduino Programmer to send the PlantWatering program to your Arduino.

      You can use the Options tab to change the thresholds for the water / soil sensors as well as increase or decrease the delay between updates from the sensors. Longer delays will help prevent corrosion, but they'll also increase the ammount of time the pump runs for. This is because the pump only turns on or off when the sensor values change. Depending on your plant and water container sizes you may want to adjust the delay.

      You can find more information about the moisture sensors and how the delay affects corrosion here.

  7. Start the system:

    1. Fill the hoses with water. The hoses must be filled before the pump is turned on.

      It's fine to temporarily submerge the pump to do this. Submerge the hoses and the pump together and when the hoses are filled with water, place a finger over the hose ends and move them to the plant and water containers (make sure to fill the water container).

    2. Make sure the output hose is going into the plant. (Otherwise you may end up with a small flood.)

    3. Plug in the power supply. At this point the pump will run if the soil is dry.

  8. Test the system: The button will force the sensor values to update. Otherwise they update every 10 seconds by default to help prevent corrosion.

    1. If you hold down the button and remove the moisture sensor from the soil, the pump should turn on.
    2. If you hold down the button and empty the water supply container, the buzzer should turn on. (You may need to give it a few minutes to dry out.)