A comprehensive sensor monitoring system built with MicroPython on ESP32, featuring real-time environmental monitoring and remote control capabilities via ESP-NOW.
- Temperature, Humidity, and Pressure (BMP280)
- Air Quality (MQ135)
- Flame Detection
- Color Detection (TCS3200)
- Heart Rate Monitoring (MAX30102)
- ESP-NOW for low-latency remote control
- Wi-Fi for data logging to Firebase
- Automatic switching between ESP-NOW and Wi-Fi modes
- Custom ESP-NOW remote with button controls
- On-demand heart rate monitoring
- On-demand color detection
- Real-time sensor data updates
- ESP32 Development Board
- BMP280 Temperature/Pressure Sensor
- MQ135 Air Quality Sensor
- MAX30102 Heart Rate Sensor
- TCS3200 Color Sensor
- Flame Sensor
- DHT11 Temperature/Humidity Sensor
- Neopixel LED (for status indication)
- Custom ESP-NOW Remote Controller
| Component | ESP32 Pin | Description |
|---|---|---|
| MAX30102 (Heart Rate) | SDA: GPIO14 SCL: GPIO15 |
I2C Communication |
| BMP280 | SDA: GPIO20 SCL: GPIO19 |
I2C Communication |
| DHT11 | GPIO18 | Digital Input |
| MQ135 (Air Quality) | GPIO0 | ADC Input |
| Flame Sensor | GPIO1 | ADC Input |
| TCS3200 (Color) | S2: GPIO4 S3: GPIO5 OUT: GPIO3 |
Digital I/O |
| Neopixel LED | GPIO8 | Digital Output |
- MicroPython
- Required Libraries:
networkespnowmachinedhtmax30102bmp280neopixelurequests
- Flash MicroPython to your ESP32 board
- Install required libraries
- Configure Wi-Fi credentials in
sensorHub.py:SSID = "your_wifi_ssid" PASSWORD = "your_wifi_password" FIREBASE_URL = "your_firebase_url"
- Upload the code to your ESP32
- Power up the custom ESP-NOW remote
- The system automatically collects sensor data every 60 seconds
- Data is transmitted to Firebase for storage and analysis
- Button 2: Trigger heart rate measurement
- Button 3: Trigger color detection
| Color | Meaning |
|---|---|
| ⚪ White | System ready |
| 🔴 Red | Heart rate measurement in progress |
| 🟢 Green | Color detection in progress |
| 🟣 Purple | Data transmission to Firebase |
| 🟡 Yellow | Firebase transmission complete |
Sensor data is collected and transmitted to Firebase at regular intervals, including:
- Air quality metrics (CO2, NH3, NOx, etc.)
- Temperature and humidity readings
- Pressure measurements
- Flame detection status
- Heart rate (when measured)
- Color detection (when measured)
- Check sensor connections
- Verify power supply
- Ensure proper I2C addressing
- Verify remote is powered
- Check distance between devices
- Ensure both devices are in ESP-NOW mode
- Verify Wi-Fi credentials
- Check Firebase URL
- Ensure internet connectivity
This project is open-source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.