Plant Care and Monitoring System

A Plant Care and Monitoring System is an IoT-based project that uses sensors and microcontrollers like Raspberry Pi or Arduino to monitor plant health indicators such as soil moisture, temperature, humidity, and light. It automates irrigation and notifies users when attention is needed.

1. Introduction to Plant Care and Monitoring System

This system helps in automating the process of caring for plants by monitoring key environmental parameters. It ensures optimal plant growth by providing timely watering, maintaining light exposure, and alerting the user in case of any abnormal conditions. It is especially useful for home gardens, greenhouses, and agricultural research.

Applications:

  • Home and balcony gardening
  • Greenhouse management
  • Urban and vertical farming
  • Smart agriculture projects
  • Educational plant growth experiments

2. Components and Tools Required

Required Components:

  • Raspberry Pi (or Arduino)
  • Soil Moisture Sensor
  • DHT11/DHT22 Sensor (for Temp & Humidity)
  • Light Sensor (LDR)
  • Water Pump Module or Relay
  • OLED or LCD Display
  • Wi-Fi Connectivity (inbuilt with Raspberry Pi)
  • Jumper Wires, Breadboard, Power Supply

3. Assembling the Hardware

Steps for Assembly:

  1. Connect the Soil Moisture Sensor to analog input (via ADC for Raspberry Pi).
  2. Connect the DHT11 sensor to a digital pin (e.g., GPIO4).
  3. Connect LDR to a voltage divider and analog input (via ADC).
  4. Connect a water pump via a relay module to a GPIO pin.
  5. Connect OLED/LCD to display data in real-time.
  6. Ensure proper grounding and power supply.

4. Configuring the Raspberry Pi

Steps for Setup:

  1. Install Raspberry Pi OS and enable I2C, SPI, and GPIO.
  2. Update packages using `sudo apt update && sudo apt upgrade`.
  3. Install Python libraries: `Adafruit_DHT`, `RPi.GPIO`, `smbus`, `time`, `requests`, etc.
  4. Calibrate the soil moisture sensor for dry and wet readings.

5. Writing the Python Code

  1. Read data from all sensors (moisture, temp, humidity, light).
  2. Display readings on OLED/LCD.
  3. If moisture level is low, turn on the water pump automatically.
  4. Optional: Send data to the cloud or alert user via email/notification.
import Adafruit_DHTimport RPi.GPIO as GPIOimport timeDHT_PIN = 4PUMP_PIN = 17GPIO.setmode(GPIO.BCM)GPIO.setup(PUMP_PIN, GPIO.OUT)while True:    humidity, temperature = Adafruit_DHT.read_retry(11, DHT_PIN)    moisture = read_moisture()  # Custom function    print(f'Temp: {temperature:.1f}°C, Humidity: {humidity:.1f}%, Moisture: {moisture}')    if moisture < 400:        GPIO.output(PUMP_PIN, GPIO.HIGH)        print('Watering the plant...')    else:        GPIO.output(PUMP_PIN, GPIO.LOW)    time.sleep(5)

Run Command: python3 plant_monitor.py

Real-time display of sensor values. Pump turns ON when soil is dry and OFF when moist.

6. Use Cases and Enhancements

Advanced Features:

  • Cloud-based plant data monitoring (Thingspeak, Firebase, etc.)
  • Smartphone notifications via Telegram or Blynk
  • Automated grow light control using light sensor
  • Camera module integration for plant image monitoring

7. Safety and Precautions

  • Do not overwater the plant—calibrate your moisture threshold carefully.
  • Ensure that the water pump is properly insulated.
  • Avoid placing sensors directly into the water—only in the soil.
  • Secure your Raspberry Pi from moisture and water splashes.

8. Troubleshooting

Common Issues:

  • Moisture reading always high/low? Calibrate with known wet and dry soil.
  • Pump not working? Check relay wiring and power source.
  • OLED not showing data? Confirm I2C address and wiring.
  • No sensor data? Verify GPIO pins and code libraries.

9. Conclusion: What You’ve Learned

  • How to build a smart plant care system using Raspberry Pi.
  • Automating irrigation using soil moisture sensors.
  • Monitoring multiple environmental parameters like light and humidity.
  • Expanding plant care with mobile notifications or cloud logging.

10. Resources and References