Plants do not complain until they are already dying. A small monitor that watches temperature, humidity, and air quality gives you the warning while there is still time to act. This build lives in a greenhouse, a grow tent, or on a sunny windowsill.
Parts list
NodeMCU ESP8266 development board with built-in OLED — controller, WiFi, and display in one. DHT22 / AM2302 temperature and humidity sensor module — the plant’s climate. MQ-2 smoke and combustible gas sensor module — air quality and fumes. A Raspberry Pi 4 power supply, 5V 3A USB-C works fine as a bench supply for the NodeMCU too — check the plug and voltage on the product page before you order.
What the sensors do
The DHT22 measures 0 to 100% relative humidity (plus or minus 2%) and -40 to 80 degrees C (plus or minus 0.5 degrees C) over a single data pin, on 3.3 to 5.5V. That covers the temperature and humidity range of any indoor grow space. The MQ-2 detects smoke, liquefied gas, butane, propane, methane, alcohol, and hydrogen over a range of 300 to 10,000 ppm. It gives both analog and digital outputs with an adjustable threshold potentiometer, so you can set a trip point for a warning. Its heater runs at 5.0V, it responds in 10 seconds or less and recovers in 30 seconds or less.
Code approach
Read the DHT22 every few seconds and the MQ-2 analog output on the same schedule. Show the numbers on the built-in OLED: temperature, humidity, and a simple air-quality reading. Set two thresholds — one for humidity too low (time to water or mist) and one for the MQ-2 digital output tripping (ventilate). On the NodeMCU you can also push the readings to a web page over WiFi so you can check the greenhouse from the house.
Tips
The MQ-2 heater needs warm-up time after power-on — give it a few minutes before you trust the readings. Keep the DHT22 away from direct sun and from the MQ-2’s own heater, or the temperature reads high. Mount the whole thing where air actually moves, not in a dead corner behind a pot. For a full weather readout, add the BMP280 pressure sensor from the weather station guide.
All parts in this guide ship from NY, USA. See the full list of guides on the Drone Guides page.
Related guides: Build a Weather Station with DHT22, BMP280, and OLED · NodeMCU ESP8266 with Built-In OLED: WiFi Projects with a Display






