Smart Plant Using Arduino

Smart Plant is an Arduino based plant watering system which checks environment parameters like temperature and humidity and automatically waters plants.

What we need:

Arduino mega/ Arduino uno

  • DHT11
  • YL-69 + YL-38 Moisture sensor
  • Submersible water pump (3-6 volts)
  • n-p-n transistors
  • Jumper wires
  • Breadboard
  • Bluetooth module (HC-05)
  • USB cable

You also need to download an app called Ardu Tooth on your android device which will be used to receive the sensor values and help us take better care of plants.


Step 1: Understanding DHT11 Sensor

DHT11 sensor is very basic. It has two parts, a capacitive humidity sensor and a thermistor.

It can measure relative humidity ranging from 20-90% with an accuracy of ±0.5% and temperature ranging from 0-50֯C with an accuracy of ±2֯ C.

The capacitive humidity sensor measures the electrical resistance between the two electrodes to give the relative humidity. It contains moisture holding substrate between the two electrodes.

When water vapor is absorbed by the substrate, ions are released, which increase the conductivity between the electrodes.

Thus, resistance varies with relative humidity. Relative Humidity = (D/Ds) *100 D: Density of water vapour Ds: Density of water vapour at saturation At saturation, water vapours start condensing.

There is a single signal wire for transmitting data (both relative humidity and temperature). The sensor sends out 40 bits (5 bytes) of data continuously in the data line.

The 40-bit data from the sensor has the following structure: Data (40-bit) = Integer Byte of RH + Decimal Byte of RH + Integer Byte of Temp. + Decimal Byte of Temp. + Checksum Byte The checksum byte detects successful transmission of data.

If all data is transferred successfully, the checksum byte is equal to the last eight bits of the sum of the first four bytes: Checksum = Last 8 bits of (Integer Byte of RH + Decimal Byte of RH + Integer Byte of Temp. + Decimal Byte of Temp.) DHT11 contains a thermistor, which has a negative temperature coefficient, i.e. the resistance increases with a decrease in temperature.

Features of HMC5883L:

Voltage Supply (3 to 5.5V)

Supply Current (0.5mA to 2.5mA)

Size 15.5mm x 12mm x 5.5mm

Step 2: Understanding ​Moisture Sensor

Moisture Sensor:

The soil moisture sensor or the hygrometer is usually used to detect the humidity of the soil.

The Soil Moisture Sensor uses capacitance to measure dielectric permittivity of the surrounding medium.

In soil, dielectric permittivity is a function of the water content.

The sensor creates a voltage proportional to the dielectric permittivity, and therefore the water content of the soil.More water makes the soil conduct electricity more easily (less resistance), while dry soil conducts electricity poorly (more resistance).

Specifications: ·

  • Operating voltage: DC 3.3V - 5V
  • Output voltage signal: 0 ~ 4.2V
  • Current: 35mA
  • LED: Power indicator (Red) and Digital switching output indicator (Green)
  • Size: 60 x 20 x 5mm

Step 3: Assemble the Circuit

Assemble the circuit on breadboard as shown in the circuit.

Step 4: Upload the Arduino Code

Once uploaded, the pump will start functioning as the moisture sensor reading goes below the threshold set, watering the plant automatically.



SoftwareSerial BTserial(10, 11);

int dhtpin = A1;

int motor=2;

int fan=3;

int soilsensor=A0;

int red = 3;

int blue = 4;

int green = 5;

dht DHT;

// higher number is more dry

void setup()

{ Serial.begin(9600);


pinMode(soilsensor, INPUT);

pinMode(motor, OUTPUT);

pinMode(fan, OUTPUT);

pinMode(dhtpin, INPUT);

pinMode(red, OUTPUT);

pinMode(blue, OUTPUT);

pinMode(green, OUTPUT);


int x;

int min_temp;

int max_temp=25;

int max_dryness=900;

int temp=0;

int hum=0;

int SensorValue=0;

void loop()


x= DHT.read11(dhtpin);

temp = DHT.temperature;




SensorValue = analogRead(soilsensor);





if(SensorValue >= max_dryness)


digitalWrite(motor, HIGH);


digitalWrite(motor, LOW);


if(temp >= max_temp)


digitalWrite(fan, HIGH);


if(temp <= max_temp)


digitalWrite(fan, LOW);






    • Fandom Contest

      Fandom Contest
    • Classroom Science Contest

      Classroom Science Contest
    • Party Challenge

      Party Challenge



    1 year ago

    Hello there!

    We're glad you want to share something with the Instructables community! And we’re here to help you out. In order to be published live on the site, Instructables must consist of the following things:

    - Multiple steps showing how you made your project

    - Written instructions in each step

    - Your own original images

    Beyond making your Instructable simply publishable, this guide ( explains what is required to have your Instructables featured by our site editors. It’s very helpful and definitely worth checking out.

    We would love to review your project again after you have made the necessary edits, and we will publish your project if it is eligible.If you have any questions, please feel free to ask right here or send us an email at


    Instructables Community Manager