Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyberscopetoday/esp32-airquality-station
Smart environmental monitor with ESP32: measuring temperature, humidity and pollution levels with OLED display and control via Telegram.
https://github.com/cyberscopetoday/esp32-airquality-station
Last synced: 13 days ago
JSON representation
Smart environmental monitor with ESP32: measuring temperature, humidity and pollution levels with OLED display and control via Telegram.
- Host: GitHub
- URL: https://github.com/cyberscopetoday/esp32-airquality-station
- Owner: CyberScopeToday
- License: mit
- Created: 2024-11-29T21:29:28.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-11-29T22:40:38.000Z (about 1 month ago)
- Last Synced: 2024-11-29T23:25:24.210Z (about 1 month ago)
- Language: C++
- Size: 1000 Bytes
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# πΏ ESP32-Based Air Quality Monitoring Station πΏ
[![CodeFactor](https://www.codefactor.io/repository/github/cyberscopetoday/esp32-airquality-station/badge)](https://www.codefactor.io/repository/github/cyberscopetoday/esp32-airquality-station)
> **An IoT project for monitoring temperature, humidity, and air quality with a user-friendly interface, RGB indication, and control via a Telegram bot.** π
---
**[π·πΊ Click here for the Russian version of the README (ΠΠ°ΠΆΠΌΠΈΡΠ΅ Π·Π΄Π΅ΡΡ Π΄Π»Ρ ΡΡΡΡΠΊΠΎΠΉ Π²Π΅ΡΡΠΈΠΈ README)](readmeru.md)**
---
## π Description
This air quality monitoring station measures:
- π‘οΈ **Temperature** (sensors **DS18B20** and **SHT21**)
- π§ **Humidity** (sensor **SHT21**)
- π«οΈ **Particle concentration** PM1.0, PM2.5, PM10 (sensor **PMS5003**)### π Acquired Data:
- **Displayed** on an OLED SSD1306 display πΊ
- **Indicated** using an RGB LED π‘
- **Sent** to the **ThingSpeak** platform π
- **Accessible** via a **Telegram bot** π€---
## π Used Technologies
| Technology | Description |
|---------------------|------------------------------------------------------------|
| ESP32 | Main controller of the project |
| ![Arduino IDE](https://img.icons8.com/color/48/000000/arduino.png) **Arduino IDE** | Development environment for programming the ESP32 |
| ![ThingSpeak](https://img.icons8.com/color/48/000000/api.png) **ThingSpeak** | Platform for data analysis and storage |
| ![Telegram](https://img.icons8.com/color/48/000000/telegram-app.png) **Telegram Bot** | Device management and data retrieval |
| OLED Display | Displays temperature, humidity, and air quality data |---
## π₯ Device Demonstration
### π¦ Air Quality Color Indication
π Air quality indication via LED:
- π’ Green: Low pollution level (PM2.5 β€ 12)
- π΅ Blue: Medium pollution level (12 < PM2.5 β€ 35)
- π΄ Red: High pollution level (PM2.5 > 35)| Pollution Level | Indicator Color | GIF |
|-----------------|------------------|----------------------------------------|
| **Low** | π’ Green | |
| **Medium** | π΅ Blue | |
| **High** | π΄ Red | |### π Example of Data Display on the OLED Screen
---
## βοΈ Components
- πͺ£ **ESP32 DevKit**
- π‘οΈ **DS18B20** temperature sensor
- π‘οΈ **SHT21** temperature and humidity sensor
- π«οΈ **PMS5003** air quality sensor
- πΊ **OLED SSD1306 display**
- π‘ **RGB LED**
- π Resistors, wires, and other components---
## π Installation and Setup
### 1. Hardware Preparation
Assemble the circuit according to the code and schematics. Ensure all connections are secure.
### 2. Software Preparation
- Clone the repository:
```bash
git clone https://github.com/CyberScopeToday/ESP32-AirQuality-Station.git
```- Install **Arduino IDE** and the necessary libraries (see below).
### 3. Configuration Setup
#### Installing Libraries
Ensure the following libraries are installed in the Arduino IDE:
- `WiFi.h`
- `Wire.h`
- `Adafruit GFX Library`
- `Adafruit SSD1306`
- `OneWire`
- `DallasTemperature`
- `HTTPClient`
- `SHT21`
- `WiFiClientSecure`
- `UniversalTelegramBot`
- `ArduinoJson`
- `Preferences`#### Configuring `config.h`
Create a file named **`config.h`**:
```cpp
#define WIFI_SSID "your_wifi_ssid"
#define WIFI_PASSWORD "your_wifi_password"
#define THINGSPEAK_API_KEY "your_thingspeak_api_key"
#define TELEGRAM_TOKEN "your_telegram_bot_token"
#define TELEGRAM_CHAT_ID "your_telegram_chat_id"
```Replace the placeholder values with your actual credentials:
- **`your_wifi_ssid`** β Your Wi-Fi network name
- **`your_wifi_password`** β Your Wi-Fi password
- **`your_thingspeak_api_key`** β Your ThingSpeak channel API key
- **`your_telegram_bot_token`** β Your Telegram bot token
- **`your_telegram_chat_id`** β Your Telegram chat ID### 4. Uploading the Sketch
1. Connect the ESP32 via USB.
2. In **Arduino IDE**, select the **ESP32 DevKit** board.
3. Upload the code to the device.---
## π± Telegram Bot Commands
| Command | Description |
|-------------------------------|----------------------------------------------------------------------|
| `/start` | Welcome message and help |
| `/status` | Retrieve current data from the device |
| `/setapikey ` | Set a new ThingSpeak API key |
| `/setinterval ` | Set data sending interval (minimum 300 seconds) |
| `/setthreshold `| Set PM2.5 threshold values |
| `/getsettings` | View current settings |
| `/toggledebug` | Enable/disable debug information on the OLED display |---
## πΈ Device Photos
---
## π Data Visualization on ThingSpeak
All data collected by the ESP32 Air Quality Monitoring Station is sent to **ThingSpeak**, a cloud-based platform for IoT data visualization and analysis.
### π Live Dashboard Example
Explore a real-time example of air quality data visualization on ThingSpeak:
**[ThingSpeak Channel - Air Quality Monitor](https://thingspeak.mathworks.com/channels/991348)**### π Charts Available:
- π‘οΈ **Temperature**: Visualize ambient temperature from **DS18B20** and **SHT21** sensors.
- π§ **Humidity**: Monitor real-time humidity levels measured by the **SHT21** sensor.
- π«οΈ **Particulate Matter (PM)**: Track air quality with PM1.0, PM2.5, and PM10 data from **PMS5003**:
- **PM1.0**: Fine particles, diameter β€ 1.0 Β΅m
- **PM2.5**: Particles, diameter β€ 2.5 Β΅m
- **PM10**: Coarse particles, diameter β€ 10 Β΅m---
### π How to Access
1. Open the **[ThingSpeak Channel](https://thingspeak.mathworks.com/channels/991348)**.
2. Use the **charts** to view real-time air quality data updated every 5 minutes.
3. Analyze trends, download datasets, or integrate the data into your own applications using ThingSpeak's API.---
## π License
This project is licensed under the **MIT** License. See [LICENSE](LICENSE) for details.
---
## π― Useful Links
- π [ESP32 Documentation](https://www.espressif.com/en/products/socs/esp32/resources)
- π [ThingSpeak API](https://thingspeak.com)
- π€ [Creating a Telegram Bot](https://core.telegram.org/bots)---
# π·πΊ Π ΡΡΡΠΊΠ°Ρ Π²Π΅ΡΡΠΈΡ README
You can find the Russian version of this README [here](readmeru.md).
---