Build Your Own Plant Humidity Sensor




Introduction: Build Your Own Plant Humidity Sensor

About: Mechanical Engineering Student specialized in Product Development

Do you want to perfectionize your plants well being? Are you unsure how much water your plant needs? or do you just want to track how much water the plant consumes? Then this project is for you.



  • Arduino Nano (any other microcontroller)
  • Arceli Water Level Sensor (alternatively: soil moisture sensor)
  • 16x2 QAPASS LCD
  • RGB LED Module
  • Cables/Wires
  • Power Cable (Mini USB type B to USB type A)


  • PLA Filament


  • CAD Software (Autodesk Fusion 360)
  • 3D Printer (Flashforge Adventurer 3)
  • 3D Print Slicer Software (FlashPrint)
  • Soldering Iron & Wire

Step 1: Build Your Circute

Choose your components and create your circute diagram. The diagram will be very useful when programming the microcontroller.

Step 2: Program Your Microcontroller

Program your microcontroller and test the system.

Arduino Code:

#include <LiquidCrystal_I2C.h>     // include the library code for the LCD screen
LiquidCrystal_I2C lcd(0x27,20,4);  // set the LCD address to 0x27 for a 16 chars and 2 line display

#define POWER_PIN 6
#define SIGNAL_PIN A1

int value = 0;  // variable to store the sensor value
int red_light_pin = 4;
int green_light_pin = 3;
int blue_light_pin = 2;

void setup() {
  Serial.begin(9600);           // start the serical console

  // sensor setup
  pinMode(POWER_PIN, OUTPUT);   // configure D4 pin as an OUTPUT
  digitalWrite(POWER_PIN, LOW); // turn the sensor OFF

  // LCD setup

  // LED setup
  pinMode(red_light_pin, OUTPUT);
  pinMode(green_light_pin, OUTPUT);
  pinMode(blue_light_pin, OUTPUT);

void loop() {
  // sensor loop
  digitalWrite(POWER_PIN, HIGH);  // turn the sensor ON
  delay(10);                      // wait 10 milliseconds
  value = analogRead(SIGNAL_PIN); // read data from SIGNAL_PIN and store it to value variable
  digitalWrite(POWER_PIN, LOW);   // turn the sensor OFF

  // LCD loop
  lcd.setCursor(2,1);             // define where to write on the LCD screen
  lcd.print(value);               // write value on LCD screen

  //LED loop
  if (value<300) RGB_color(150,0,0);                     //Red
  else if (value>300 && value<350) RGB_color(150,150,0); //Yellow
  else if (value>350) RGB_color(0,150,0);                //Green

  delay(990); // wait 990 milliseconds

void RGB_color(int red_light_value, int green_light_value, int blue_light_value)
  analogWrite(red_light_pin, red_light_value);
  analogWrite(green_light_pin, green_light_value);
  analogWrite(blue_light_pin, blue_light_value);

Step 3: Model Your Enclosure

For this project I used Autodesk Fusion 360 to model the enclosure. The goal was to make it as small as possible, so it fits in the plant pot. To do this I downloaded 3D models of the electronic parts and used them to make a tight fit. I did leave some space for the wires. At the end the enclosure consisted of 3 parts that could be assembled by press fitting. The STL files are listed below.

Step 4: 3D Print Your Enclosure

The 3 parts were first sliced with FlashPrint and then 3D printed with an FlashForge Adventurer 3. The material used was black PLA.

Step 5: Assemble

Solder the electronics and insert them into the main enclosure. Then fit the other two enclosure parts.

Step 6: Test Your Unit

Connect the power supply and test your sensor unit in your plant

Step 7: Share Your Result and Gained Knowledge

Finally, I would like to encourage to comment below and maybe even create your own instructable.

First Time Author Contest

This is an entry in the
First Time Author Contest

Be the First to Share


    • Sculpt & Carve Challenge

      Sculpt & Carve Challenge
    • Remote Control Contest

      Remote Control Contest
    • First Time Author Contest

      First Time Author Contest