Smart Garden

Show All Items

In this project we will design and program a smart garden watering system. This system will use Arduino UNO and a moisture sensor to measure the volumetric water content in soil. It will also have a light (photocell) sensor to detect when the plant should get sunlight. So, when the soil is dry a red LED will light up, when it’s wet a blue LED will light up, and when the plant needs a light a white LED will blink. You will need basic 2D-designing skills and CNC machine to design and build our own planter box. Alternatively, you can just use a normal jar. Also, you can make your planter box using acrylic and cut it by a laser cutting machine.

For the 2D-design we will be using Inkscape because it’s free and really easy to use software (you can download it from: ). For the cutting part we can either use a laser cutting or a CNC machine depending on the type of the materials that we will use.

Note: this project was originally made by: zacharyianhoward

Original project:

. . 3 LED .

Inkscape CNC . .



Step 1: Requirements

Smart Garden

Show All Items

1-Arduino UNO

2-Photocell (light sensor)

3-3 LED lights (red, blue, and white)

4-Moisture sensor

5- Resistor.

6-Breadboard – Mini Modular (White)

7-Female/Male ‘Extension’ Jumper Wires.

8-MDF wood. Or Acrylic (Thickness 6 mm)

9-Wood glue.

You’ll also need:

CNC Laser Cutter

3D Printer (optional)



1- Arduino UNO

2- Photocell (light sensor)

3- LED ( , , )




7- MDF


Step 2: Making the planter box

Smart Garden

Show All Items

For this step, what we did is just cut couple of 20X20 cm frames using the CNC machine and stack them in top of each other.

Make sure to drill three holes for each LED light, also, make sure to make a little window in the first frame for the power cable that will be connected to the Arduino UNO. Just before the last frame from the top, you might want to put an acrylic sheet to separate the bottom part which will be the place for the Arduino UNO, and the top which will be the place for the plant. Also, you will need to drill or cut a hole on the acrylic sheet so you can wire thru your wires. And this is very much it for this step.


20 CM 20 x .

3 LED . .


Step 3: Connecting the Arduino UNO.

Smart Garden
Smart Garden
Smart Garden

Show All Items

In this step you can just follow the pictures

-First, connecting the LEDs.

– Second, connecting the moisture sensor.

– Third, connecting the photocell sensor.

Once all the parts are connected, we can go to the next step which is programming our project


1- LED



Step 4: Programming our project

You can download this code and try to make your own adjustments and see what happens.

To test the Moisture sensor, simply water your plant and put the sensor right into the soil. If you see the red LED turned off and the blue LED turned on it means that it’s working fine.

Now, for the light sensor, just try to cover it for 20 seconds. If you see the white LED starts blinking it means that it’s working fine too.

-Note, the values are based on our own testing. You might get different results depending on your environment’s variables.

-Note, the value for light sensor is not real, it’s just for our own testing. The way it should work in real projects is by calculating the number of hours that a plant didn’t get any sunlight and then start blinking. For more information about this, you can read and search more about (Shade Plants and Shade Gardens) and adjust the values of the sensor according to the number of sunlight hours that these types of plants need.

Hint: some plants need sunlight after 8 hours of being in shade. So, we will change the value of the light sensor form 20 sec to 8 hours which is (28800 seconds).



. , .

20 .

: . .



: 8 . 20 28800 8 .

  • Smart Garden


  • arduino – Smart Garden, in category: technology