This project implements a real-time Air Quality Monitoring System using ESP8266 (NodeMCU) integrated with MQ135 gas sensor and DHT11 temperature-humidity sensor. The system continuously monitors environmental conditions and uploads sensor data to cloud platforms for remote visualization and analysis.
An LCD 16x2 with I2C interface displays live readings locally, making the system suitable for smart homes, industries, and environmental monitoring.
- Install Arduino IDE
- Add ESP8266 board support
- Install required sensor libraries
- Open
AQi.ino - Enter Wi-Fi credentials and API key
- Upload code to NodeMCU
- Monitor data on LCD and cloud dashboard
Make sure to install the following libraries in Arduino IDE before uploading the code:
| Library Name | Purpose |
|---|---|
| ESP8266WiFi | Wi-Fi connectivity |
| DHT Sensor Library | Read temperature & humidity data |
| Adafruit Unified Sensor | Dependency for DHT library |
| LiquidCrystal_I2C | Control LCD 16x2 display |
| ThingSpeak | Send data to cloud platform (optional) |
| Blynk | IoT dashboard integration (optional) |
- Open Arduino IDE
- Go to Sketch → Include Library → Manage Libraries
- Search library name
- Click Install
| Component | Pin | Connected To (ESP8266 NodeMCU) |
|---|---|---|
| MQ135 Gas Sensor | VCC | 3.3V |
| MQ135 Gas Sensor | GND | GND |
| MQ135 Gas Sensor | A0 | A0 |
| DHT11 Sensor | VCC | 3.3V |
| DHT11 Sensor | DATA | D4 |
| DHT11 Sensor | GND | GND |
| LCD 16x2 (I2C) | VCC | Vin / 5V |
| LCD 16x2 (I2C) | GND | GND |
| LCD 16x2 (I2C) | SDA | D2 |
| LCD 16x2 (I2C) | SCL | D1 |
- Mobile app integration
- Multiple gas sensors (CO, CO2, NH3)
- AI-based pollution prediction
- GPS location tagging
- ThingSpeak
- Blynk
- Any HTTP-based IoT service