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
- YL-69 + YL-38 Moisture sensor
- Submersible water pump (3-6 volts)
- n-p-n transistors
- Jumper wires
- 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
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).
- 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 red = 3;
int blue = 4;
int green = 5;
// higher number is more dry
temp = DHT.temperature;
SensorValue = analogRead(soilsensor);
if(SensorValue >= max_dryness)
if(temp >= max_temp)
if(temp <= max_temp)