Overview

An ultra-low-power environmental monitor for a home kitchen, built on an ESP32 LOLIN32. It tracks combustible gas, temperature and humidity, wakes on motion, and sleeps again to save battery.

Core features

  • Combustible gas and smoke measured through an analog MQ-2 module
  • Climate monitoring of temperature and relative humidity with a DHT22
  • On-demand activation: the device wakes only when the PIR detects motion
  • Live readings on a 16x2 character LCD over I2C
  • Deep sleep after 20 seconds without motion, woken by an RTC GPIO interrupt
  • Battery operation from a single LiPo cell

In this project

ChapterWhat it covers
Source repositoryrepository link, layout, build commands
System architectureblock diagram, state machine, signal flow
Hardwarefull pin map, wiring and power notes
ESP32 LOLIN32 and pin configurationboard resources and the pins in use
MQ-2 gas and smoke sensinganalog reading and interpretation
DHT22 climate monitoring1-Wire protocol and sampling
PIR motion sensing and wakeupinterrupt source and debounce
16x2 I2C display interfaceaddressing, backlight, display format
Low-power and deep sleep architecturewake sources and the idle window
Firmware build and architecturePlatformIO setup and dependencies
Resultswhat works, and what is not measured
Diagnostics and debugging guideserial logs and sensor checks