Make Your Plant SMART! (By Arduino)

Introduction: Make Your Plant SMART! (By Arduino)

About: ElectroPeak is your one-stop place to learn electronics and take your ideas into reality. We offer top-notch guides to show you how you can make your projects. We also offer high-quality products so you have...

So you have always wondered how to add technology to your plants? With this cool project, you can make sure your lovely plants are always in their good condition. After doing this project you will:

  • Learn how to use analog-output sensors
  • Learn how to display data on OLED displays
  • Make your plant smile if everything is fine and cry if there is something wrong.

Smart Plant; What’s the base of the idea?

Nowadays, We can increase the efficiency of jobs, hobbies, lifestyle, etc. by adding technology to our tools and stuff with basic electronics components. Adding artificial intelligence to things that we care about is very attractive and amazing. You might have seen the Green Houses that use smart control and supervision on plants, flowers, etc. They can control the timing and amount of water of plants, lighting, temperature, and a many other important and effective parameters.
It’s a good start point to enter this exciting world and learn how to do it. In this project, we will get the necessary details about our plant’s condition; such as sand moisture, environment temperature, and the amount of light that plant can receive. Monitoring these data can help us to always keep our plant in its good condition. Reading data from sensors by Arduino is quite easy and monitoring that on a display is not so hard. So, what are you waiting for? Let’s make our plants smart!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Required Materials

Step 2: Circuit

There are a few important points you should pay attention to. First, you need a power supply that can provide at least 5V and 20mA. If your power supply does not meet these conditions, you should connect modules to the 5V pin of Arduino (Don’t use 3v3). You should also note that an OLED display with SPI protocol is used. If your display is I2C, you must connect them to the A4 and A5 pins of Arduino. In addition, the moisture sensor used here has 2 pins and therefore an amplifier board with one analog output is necessary. The DHT11 sensor can measure both temperature and humidity, but we our code displays temperature only. You can add humidity by adding a few lines of code.

Step 3: Assembling

Since our flower pot is small and there is a space limit, we have used a thin ribbon wire which is suitable for our flower pot.

For connecting this wires, it’s better to separate the pin headers from the components. First, the OLED display pin header should be desoldered. To do this, you can use a soldering iron but heater soldering is preferable.

The OLED display is stuck to a board which provides the SPI communication. To have a better view of the display and hide wires, you can separate the display panel from the board. Use a sharp knife to do this.

Now its time to solder wires to the board. The board is going to be placed in a wet sand, so we must make all the connections and components waterproof. First, we cover it with a Plastic Wrap. Then we cover it by a shrink tube. You should heat it to stick to the board. Now fill the seams by hot glue.

The moisture sensor that we chose, needs to have a separate amplifier. First, separate the pin headers, then make them waterproof.

For LDR sensor, You must connect a 10k ohm resistor between GND and sensor’s pin. This must also be made waterproof.

For Temperature sensor, You must connect a 10k ohm resistor between Vcc and Signal pin.

Now it is time to connect all sensors and display modules to Arduino Nano. After finishing the assembly, do not forget to also make Arduino waterproof.

Now empty some sand from the pot (not all of that, its harmful for the plant) and put the board and sensors (except temperature sensor) inside. The temperature sensor must be out of the pot. Now fill the pot with removed sand.

We are all done! Let’s upload the code.

Step 4: Code

In this code, We use SSD1306 and DHT library for OLED display and DHT 11. You should first add these libraries, then compile and Upload the code to Arduino Nano. If its the first time you run an Arduino board, don’t worry. Just follow these steps:

  1. Go to and download the software of your OS.
  2. Install the IDE software as instructed.
  3. Run the Arduino IDE and clear the text editor and copy the following code in the text editor.
  4. Navigate to sketch and include the libraries (Download libraries from the following links). Now click add ZIP library and add the libraries.
  5. Choose the board in tools and boards, select Arduino Nano.
  6. Connect the Arduino to your PC and set the com port in tools and port.
  7. Press the Upload (Arrow sign) button.
  8. You are all set!

Step 5: What’s Next?

Now you can develop this project to your interest. Here is some suggests that you can add them to project :

  • You can have a clock on display and measuring the time of different conditions and predict the time of conditions that plant need water or more light. you should add a RTC module like DS1307 and add some code to read time and calendar and display that or save some of them to have more details of plant.
  • By adding a buzzer, you can set some alarm that warn you about plant conditions. for example when the sand is very dry, it can ring 1 time per hour.
  • We set just two emoji for different conditions. You can add more face model for any conditions. For this you should read the OLED display tutorial to learn how convert your image to a Hex code.

Be the First to Share


    • Trash to Treasure Contest

      Trash to Treasure Contest
    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest