Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Agriculture & Smart Farming

Greenhouse Monitoring System: Temperature and Humidity ESP32

Greenhouse Monitoring System: Temperature and Humidity ESP32

March 11, 2026 /Posted byJayesh Jain / 0

A greenhouse monitoring system with ESP32 for temperature and humidity is essential for Indian protected horticulture farmers growing high-value crops like strawberries, roses, capsicum, and exotic vegetables. India’s polyhouse and greenhouse area has expanded rapidly in states like Maharashtra, Punjab, Karnataka, and Himachal Pradesh under government subsidy schemes. However, many small-scale greenhouse operators still rely on manual observation, missing critical temperature and humidity excursions that damage crops. An ESP32-based monitoring system costs under ₹3,000 and can save lakhs of rupees in crop losses.

Table of Contents

  • Greenhouse Farming Context in India
  • Parameters to Monitor
  • Hardware Components
  • Wiring Diagram
  • Complete ESP32 Monitoring Code
  • Setting Up Alerts
  • Automatic Control Integration
  • Frequently Asked Questions

Greenhouse Farming Context in India

India has over 40,000 hectares of protected cultivation (greenhouses, polyhouses, net houses) with Andhra Pradesh, Telangana, Gujarat, Maharashtra, and Rajasthan leading in area. Common crops include:

  • Floriculture: Roses, gerbera, chrysanthemum, carnation
  • Vegetables: Capsicum, cucumber, tomato, cherry tomato
  • Fruits: Strawberry, melon
  • High-value: Orchids, anthurium

These crops have specific environmental requirements — roses need 20-25°C daytime and 16-18°C nights; capsicum needs 25-28°C days and 18-20°C nights. Temperature excursions outside these ranges reduce yield, quality, and make plants susceptible to fungal diseases. A monitoring system that alerts farmers immediately when conditions deviate is fundamental to professional protected horticulture.

Recommended: SHT10 Soil Temperature and Humidity Sensor Module — Dual soil temperature and moisture sensor ideal for greenhouse root zone monitoring alongside aerial environment monitoring with BME280.

Parameters to Monitor

A comprehensive greenhouse monitoring system tracks:

  • Air Temperature (°C): Primary growth regulator; monitor at plant canopy level, not roof level
  • Relative Humidity (%): High humidity (above 85%) promotes fungal diseases; low humidity (below 40%) causes water stress
  • CO2 concentration (ppm): Enrichment to 800-1000 ppm in sealed greenhouses increases yield 15-30%
  • VPD (Vapour Pressure Deficit): Calculated from temperature and humidity; optimal VPD for most crops is 0.8-1.2 kPa
  • Light intensity (lux/PAR): Photoperiod and DLI management for flowering crops
  • Soil moisture and temperature: At root zone for irrigation management

Hardware Components

  • ESP32 development board (₹350-500)
  • BME280 sensor x2-3 (place at multiple points in greenhouse) (₹300-600)
  • MH-Z19B CO2 sensor (₹800-1,200) — optional but highly recommended
  • BH1750 light sensor (₹80-150)
  • Capacitive soil moisture sensor x2 (₹160-300)
  • DS18B20 waterproof temperature probe (for soil temperature) (₹80-150)
  • 4-channel relay module (for fan, heater, cooling pad, CO2 valve) (₹100-200)
  • GSM module SIM800L (for SMS alerts) (₹150-350)
  • IP65 enclosure for electronics (₹300-500)

Total monitoring-only system: approximately ₹2,000-3,500. Full monitoring + control (with relays for fan/heater): ₹3,000-5,000.

Wiring Diagram

Connect all I2C devices (BME280 x3, BH1750) to the shared I2C bus. Use different I2C addresses for multiple BME280 sensors: one at 0x76 (SDO to GND) and one at 0x77 (SDO to VCC).

// GPIO assignments
#define I2C_SDA       21   // BME280 x2, BH1750 on shared I2C
#define I2C_SCL       22
#define CO2_RX        16   // MH-Z19B CO2 sensor UART
#define CO2_TX        17
#define MOISTURE_PIN  34   // Capacitive soil moisture
#define RELAY_FAN     25   // Exhaust fan relay
#define RELAY_HEATER  26   // Heater relay
#define RELAY_COOLER  27   // Cooling pad relay

Complete ESP32 Monitoring Code

#include <Wire.h>
#include <WiFi.h>
#include <Adafruit_BME280.h>
#include <MHZ19.h>
#include <BH1750.h>

const char* ssid = "GREENHOUSE_WIFI";
const char* password = "WIFI_PASSWORD";

Adafruit_BME280 bme1;  // Address 0x76
Adafruit_BME280 bme2;  // Address 0x77
MHZ19 mhz19;
BH1750 lightMeter;
HardwareSerial co2Serial(2);

struct GreenhouseData {
  float temp1, temp2, avgTemp;
  float humidity1, humidity2, avgHumidity;
  int co2ppm;
  float lightLux;
  int soilMoisture;
  float vpd;  // Vapour Pressure Deficit
};

float calculateVPD(float temp, float rh) {
  // Tetens formula for saturation vapour pressure
  float svp = 0.6108 * exp((17.27 * temp) / (temp + 237.3));
  float avp = svp * (rh / 100.0);
  return svp - avp;  // VPD in kPa
}

GreenhouseData readAllSensors() {
  GreenhouseData data;
  data.temp1 = bme1.readTemperature();
  data.humidity1 = bme1.readHumidity();
  data.temp2 = bme2.readTemperature();
  data.humidity2 = bme2.readHumidity();
  data.avgTemp = (data.temp1 + data.temp2) / 2;
  data.avgHumidity = (data.humidity1 + data.humidity2) / 2;
  data.co2ppm = mhz19.getCO2();
  data.lightLux = lightMeter.readLightLevel();
  data.vpd = calculateVPD(data.avgTemp, data.avgHumidity);
  return data;
}

void setup() {
  Serial.begin(115200);
  Wire.begin();
  co2Serial.begin(9600, SERIAL_8N1, 16, 17);
  
  bme1.begin(0x76);
  bme2.begin(0x77);
  mhz19.begin(co2Serial);
  lightMeter.begin();
  
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) delay(500);
  
  Serial.println("Greenhouse Monitor started. IP: " + WiFi.localIP().toString());
}

void loop() {
  GreenhouseData data = readAllSensors();
  
  Serial.printf("T1:%.1f T2:%.1f Avg:%.1f°C | H1:%.1f H2:%.1f Avg:%.1f%% | CO2:%dppm | Light:%.0flux | VPD:%.2fkPa
",
    data.temp1, data.temp2, data.avgTemp,
    data.humidity1, data.humidity2, data.avgHumidity,
    data.co2ppm, data.lightLux, data.vpd);
  
  delay(30000);  // Monitor every 30 seconds
}

Setting Up Alerts

Define alert thresholds appropriate for your crops. For capsicum greenhouse in India:

// Alert thresholds for capsicum
const float TEMP_MAX = 32.0;     // Capsicum heat stress above 32°C
const float TEMP_MIN = 15.0;     // Capsicum chill injury below 15°C
const float HUMIDITY_MAX = 85.0; // Fungal disease risk above 85%
const float HUMIDITY_MIN = 40.0; // Water stress below 40%
const int CO2_LOW = 400;         // Enrichment needed if below 400 ppm
const float VPD_HIGH = 1.8;      // Severe water stress above 1.8 kPa

// Send SMS alert via SIM800L or WhatsApp via ESP32 Wi-Fi
void checkAndAlert(GreenhouseData data) {
  String alert = "";
  if (data.avgTemp > TEMP_MAX)
    alert += "HIGH TEMP " + String(data.avgTemp, 1) + "C! ";
  if (data.avgTemp  HUMIDITY_MAX)
    alert += "HIGH HUMIDITY " + String(data.avgHumidity, 0) + "%! ";
  if (data.vpd > VPD_HIGH)
    alert += "HIGH VPD " + String(data.vpd, 2) + "kPa! ";
  if (alert.length() > 0)
    Serial.println("ALERT: " + alert);  // Add SMS/WhatsApp sending here
}

Automatic Control Integration

Extend the system to automatically control greenhouse equipment:

  • Exhaust fan: Turn ON when temperature exceeds upper limit; turn OFF when temperature returns to normal range. Use PWM speed control for gradual response rather than on/off.
  • Evaporative cooling pad: Turn ON with fan when both temperature is high AND humidity is low (below 70%). In Indian summer, cooling pad + fan reduces temperature by 8-12°C.
  • Heater: Turn ON when temperature drops below lower limit. Add a night setback mode that allows slightly lower temperatures (2-3°C) to reduce energy cost.
  • CO2 valve: Open CO2 enrichment valve during daylight hours (when plants can use it) if CO2 drops below 400 ppm. Close at sunset and always maintain below 1500 ppm (plant limit).

Never let automatic control override your presence — add a manual override switch for each controlled device and implement dead-band control (separate thresholds for turning on and off) to prevent rapid cycling.

Recommended: 5V Noiseless Mini Submersible Pump with USB Input — Low-noise pump ideal for greenhouse cooling pad water circulation or nutrient solution circulation in hydroponic greenhouse setups.

Frequently Asked Questions

How many BME280 sensors do I need for a 500 sqm greenhouse?

For a 500 sqm greenhouse, use minimum 4 sensors: one near the inlet vent, one in the centre, one near the outlet vent, and one at ground level (below plant canopy). Temperature and humidity vary significantly from floor to ceiling (stratification) and from inlet to outlet. A single sensor gives an unrepresentative reading. Place sensors at plant canopy height for the most agronomically relevant measurements.

What Wi-Fi range is sufficient for greenhouse monitoring?

Standard ESP32 Wi-Fi range is 30-50 metres in open air, but greenhouse polythene and metallic shading nets significantly attenuate Wi-Fi signals. In a large polyhouse (1,000+ sqm), Wi-Fi may not reliably reach from a router at one end to sensors at the other. Solutions: use a Wi-Fi range extender inside the greenhouse, use ESP-NOW protocol between multiple ESP32 nodes with one node as the gateway, or use LoRa radio modules (900 MHz easily penetrates greenhouse structures to 500+ metres).

How do I prevent condensation on BME280 sensors in a humid greenhouse?

In greenhouse environments with 80-95% RH, condensation regularly forms on cold surfaces. The BME280’s humidity measurement is affected by condensation on the sensor itself. Solutions: mount the BME280 inside a radiation shield with good airflow; use a BME280 with an integrated heater (BME688 has this feature) to keep the sensor slightly above dew point; or mount sensors vertically with the sensing element facing downward so condensation drips off rather than accumulating.

How do I calibrate my greenhouse monitoring system for high accuracy?

Compare your sensors against a reference psychrometer (whirling hygrometer, ₹500-1,500 at agricultural instrument shops) placed at the same location. The psychrometer requires no electronic calibration and provides accurate dry and wet bulb temperature readings from which humidity and VPD can be calculated. Adjust your sensor readings with a software offset if they differ by more than 1°C or 3% RH from the psychrometer.

Can I use this system in a net house (shade net structure) in India?

Yes. Net houses have less temperature and humidity control than fully closed polyhouses, but monitoring still helps identify hot spots, plan irrigation, and detect pest pressure (many pest populations increase when humidity is outside optimal ranges). For net houses, focus on temperature and humidity monitoring along with soil moisture. CO2 enrichment is not needed in net houses as they have adequate natural ventilation.

Shop Smart Farming Components at Zbotic →

Tags: agriculture, CO2 Sensor, ESP32, greenhouse monitoring, humidity, Temperature
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
Atal Tinkering Lab Kit: Best C...
blog atal tinkering lab kit best components to buy in 2026 598706
blog reflow oven diy build a toaster oven controller with arduino 598713
Reflow Oven DIY: Build a Toast...

Related posts

Svg%3E
Read more

Farm Drone Pilot Training: Course and Certification India

April 1, 2026 0
Table of Contents DGCA Requirements Choosing an RPTO Curriculum and Duration Costs Career Opportunities Practical Tips Commercial agricultural drone operations... Continue reading
Svg%3E
Read more

Crop Insurance Sensor: Weather Data for Claims India

April 1, 2026 0
Table of Contents How PMFBY Works Weather Data for Claims Claim-Ready Weather Station Documenting Damage Insurance Integration Cost-Benefit PMFBY protects... Continue reading
Svg%3E
Read more

Fertigation Controller: Drip Irrigation Nutrient Mixing

April 1, 2026 0
Table of Contents What Is Fertigation EC and pH Monitoring Automated Dosing System Nutrient Schedules Sensor Integration Economics Fertigation through... Continue reading
Svg%3E
Read more

Organic Farm Certification: Monitoring Requirements

April 1, 2026 0
Table of Contents Certification Process Monitoring Requirements Sensor Documentation Soil Health Monitoring Pest Management Records Cost and Premium NPOP organic... Continue reading
Svg%3E
Read more

Agri-Tech Startups India: Technology Partners for Farmers

April 1, 2026 0
Table of Contents India’s Agri-Tech Landscape Advisory Platforms Farm Management Companies Market Linkage Startups Precision Ag Startups Choosing Partners India’s... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now