Project 1: Smart Plant Monitor with IoT Integration

Mod edit, see also:

Description: A system that monitors soil moisture and environmental conditions to ensure optimal plant health.

Improvements:

Improvements Over Traditional Plant Monitors:

  • IoT connectivity to view data online or in a mobile app (e.g., Blynk or IFTTT webhook).
  • Automated watering via soil moisture readings.
  • Shows both temperature and humidity with a DHT11 sensor.
  • Can be solar-powered for outdoor use (optional upgrade).

Required Components:

Component Quantity
Arduino Uno 1
DHT11 Temperature/Humidity Sensor 1
Soil Moisture Sensor 1
ESP8266 Wi-Fi Module 1
Relay Module (5V) 1
Mini Water Pump 1
Jumper Wires & Breadboard as needed
5V Power Source 1

Circuit Diagram (Explanation):

here’s how to wire it:

Soil Moisture Sensor:

  • VCC β†’ 5V on Arduino
  • GND β†’ GND
  • A0 β†’ A0 on Arduino

DHT11 Sensor:

  • VCC β†’ 5V
  • GND β†’ GND
  • OUT β†’ Pin 2

Relay Module:

  • VCC β†’ 5V
  • GND β†’ GND
  • IN β†’ Pin 7
  • COM β†’ One side of pump power line
  • NO (Normally Open) β†’ Pump +ve terminal
  • Pump -ve β†’ GND / external battery

ESP8266 Wi-Fi Module:

  • VCC β†’ 3.3V (Use 3.3V regulator if needed)
  • GND β†’ GND
  • TX β†’ RX (via voltage divider)
  • RX β†’ TX

Arduino Code (Blynk/Serial Version):

#include <DHT.h>
#define DHTPIN 2
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);

int soilMoisturePin = A0;
int relayPin = 7;
int moistureThreshold = 500; // Tune this value as per soil sensor range

void setup() {
  Serial.begin(9600);
  dht.begin();
  pinMode(relayPin, OUTPUT);
  digitalWrite(relayPin, LOW); // Ensure pump is off at startup
}

void loop() {
  float temp = dht.readTemperature();
  float humidity = dht.readHumidity();
  int soilMoisture = analogRead(soilMoisturePin);

  Serial.print("Temperature: "); Serial.print(temp); Serial.println("Β°C");
  Serial.print("Humidity: "); Serial.print(humidity); Serial.println("%");
  Serial.print("Soil Moisture: "); Serial.println(soilMoisture);

  if (soilMoisture > moistureThreshold) {
    digitalWrite(relayPin, HIGH); // Turn on water pump
    Serial.println("Soil is dry - Watering Plant...");
    delay(5000); // Water for 5 seconds
    digitalWrite(relayPin, LOW);
  } else {
    Serial.println("Soil is moist - No watering needed.");
  }

  delay(10000); // Wait 10 seconds before next reading
}

Optional: Blynk / IoT Platform Integration

You can use this system with Blynk or IFTTT Webhooks to view data in a mobile app. Let me know if you want the version with full Blynk code and setup!

How to Use:

  1. Upload the code to your Arduino Uno.
  2. Connect components as per the wiring above.
  3. Power on the system and open the Serial Monitor (9600 baud).
  4. Watering will automatically happen if soil is dry.
  5. (Optional) Connect ESP8266 and send data online.

I can't get the ESP8266 to work
Please help

1 Like

Buy on amazon or I can ship it to you too.

Buy what?
Give me a link

the ESP8266

I already have it.

Then how u cant get it to work

It's not sending anything

r u an engineer?

No, do I have to be one?

I don't see any question in your first post. What sort of General Guidance are you looking for?

sorry as i was new to this platform , i thought this as github of arduino where we can post about our ideas, sorry

You would move your posts to the Projects > Showcase sub category.

oh thank u <3

I can’t see your schematic/circuit.. ?

I've removed some inappropriate comments and their immediate replies. As I'm sure regular contributors are well aware name calling, insults and rudeness are not tolerated here and can lead to a suspension.

If you have something useful to comment please do so, if not then please keep your thoughts to yourself.

@ayushverma , perhaps you've already said but can you make it clear what you are here for? Help? Or just to show people what you've done? Or something else?

Thank you.