Plant Monitoring System


A Plant Monitoring System using NodeMCU enables remote monitoring of plant health by employing sensors to gather data on soil moisture, temperature, humidity, and light levels. With the NodeMCU's Wi-Fi capabilities, this data is transmitted to a web server or cloud platform for analysis. Users can access this information through a web interface or mobile app, allowing them to monitor real-time plant conditions, receive alerts for unfavorable changes, and even remotely control watering systems. By merging IoT technology with plant care principles, this system offers a convenient and effective means of ensuring optimal plant growth and health, empowering users to manage their gardens from anywhere.

 Circuit Diagram :-


Code :-

#define BLYNK_PRINT Serial
#include <OneWire.h>
#include <SPI.h>
#include <BlynkSimpleEsp8266.h>
#include <DHT.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS D2
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
char auth[] =”BOsoqmyvsdJSenk51n6EplHN0jqela_aajwi”;
char ssid[] = “Iqbal”;
char pass[] = “Password”;
//code written by Md iqbal
//website:-techiqbal.com
//Youtube:-Techiqbal
#define DHTPIN 2
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
SimpleTimer timer;
void sendSensor()
{
float h = dht.readHumidity();
float t = dht.readTemperature();

if (isnan(h) || isnan(t)) {
Serial.println(“Failed to read from DHT sensor!”);
return;
}

Blynk.virtualWrite(V5, h); //V5 is for Humidity
Blynk.virtualWrite(V6, t); //V6 is for Temperature
}
void setup()
{
Serial.begin(9600);
dht.begin();

timer.setInterval(1000L, sendSensor);
Blynk.begin(auth, ssid, pass);
sensors.begin();
}
int sensor=0;
int output=0;
void sendTemps()
{
sensor=analogRead(A0);
output=(145-map(sensor,0,1023,0,100)); 
delay(1000);
sensors.requestTemperatures();
float temp = sensors.getTempCByIndex(0);
Serial.println(temp);
Serial.print(“moisture = “);
Serial.print(output);
Serial.println(“%”);
Blynk.virtualWrite(V1, temp);
Blynk.virtualWrite(V2,output);
delay(1000);
}
void loop()
{
Blynk.run();
timer.run();
sendTemps();
}

Components :-

a person holding a small device in front of a laptop

Nodemcu 

Buying Link -

 https://amzn.to/3U2wY3T

Soil moisture sensor

Buying Link -

https://amzn.to/3xPTPIi

DHT 11 

 Buying Link -

https://amzn.to/3UnEUOn

 Relay

 Buying Link -

https://amzn.to/4463QgI

Water Pump

Buying Link - 

https://amzn.to/3vZmGJI

Jumper Wires

 Buying Link - 

https://amzn.to/49KpOqX

Gas Detector