Introduction:
This report details an air quality monitoring project utilizing an ESP32 WiFi module, two P10 LED matrix displays, and an API request system. The project retrieves air quality data from OpenWeatherMap.org and displays it on the LED matrix.
Components:
- ESP32 WiFi Module: Acts as the central processing unit, connecting to WiFi and handling data processing.
- 2x P10 LED Matrix Displays: Provide a visual representation of the air quality data.
- 5V DC 10A Power Supply: Powers the entire project.
Functionality:
-
API Request:
- The ESP32 module retrieves an API key from OpenWeatherMap.org.
- Using the API key and location data, the module sends a request to the OpenWeatherMap server.
- The server responds with a JSON formatted data packet containing air quality information.
-
Data Processing:
- The ESP32 receives the JSON response and parses the data.
- It extracts the desired air quality information, such as the Air Quality Index (AQI).
-
Data Display:
- The extracted data is formatted and sent to the P10 LED matrix displays.
- The displays showcase the air quality information in a clear and readable format, poor
- including:
- AQI value
- Textual representation (e.g., “Good”, “Moderate”, “Unhealthy”)
- Color-coded indicator based on AQI severity
Report Sections:
The report can be divided into the following sections:
- Project Overview: Briefly describe the project goals and functionalities.
- Hardware Components: Detail the specifications and roles of each hardware component.
- Software Development: Explain the overall software flow, including:
- WiFi connection setup
- API request process with OpenWeatherMap
- JSON data parsing and extraction of relevant air quality information
- Display control and data formatting for the P10 LED matrices
- Power Supply: Discuss the chosen power supply and its capacity to handle the project’s requirements.
- Deployment and Testing: Describe the testing procedures to ensure proper functionality and data accuracy.
- Conclusion: Summarize the project’s achievements and potential future enhancements.
Additional Considerations:
- Error Handling: Implement error handling mechanisms in case of network issues or invalid API responses.
- Display Customization: Explore options for customizing the LED matrix display with icons, scrolling text, or animations for better user experience.
- Data Visualization: Consider displaying additional air quality parameters like PM2.5 or PM10 levels alongside the AQI.
- Project Enclosure: Design and build an enclosure to protect the project components and enhance its aesthetics.
By following this report structure and incorporating the considerations, you can create a comprehensive document that effectively details your air quality monitoring project.
Example of API request
http://api.openweathermap.org/data/2.5/air_pollution/history?lat=508&lon=50&start=1606223802&end=1606482999&appid={API key}
where start & end is optional.
Response from API Request
{
“coord”:[
50,
50
],
“list”:[
{
“dt”:1605182400,
“main”:{
“aqi”:1
},
“components”:{
“co”:201.94053649902344,
“no”:0.01877197064459324,
“no2”:0.7711350917816162,
“o3”:68.66455078125,
“so2”:0.6407499313354492,
“pm2_5”:0.5,
“pm10”:0.540438711643219,
“nh3”:0.12369127571582794
}
}
]
}
Fields In API Response
coord
Coordinates from the specified location (latitude, longitude)list
dt
Date and time, Unix, UTCmain
main.aqi
Air Quality Index. Possible values: 1, 2, 3, 4, 5. Where 1 = Good, 2 = Fair, 3 = Moderate, 4 = Poor, 5 = Very Poor. If you want to recalculate Air Quality indexes according UK, Europe, USA and Mainland China scales please use “Air Pollution Index levels scale” page
components
components.co
Сoncentration of CO (Carbon monoxide), μg/m3components.no
Сoncentration of NO (Nitrogen monoxide), μg/m3components.no2
Сoncentration of NO2 (Nitrogen dioxide), μg/m3components.o3
Сoncentration of O3 (Ozone), μg/m3components.so2
Сoncentration of SO2 (Sulphur dioxide), μg/m3components.pm2_5
Сoncentration of PM2.5 (Fine particles matter), μg/m3components.pm10
Сoncentration of PM10 (Coarse particulate matter), μg/m3components.nh3
Сoncentration of NH3 (Ammonia), μg/m3
Reviews
There are no reviews yet.