My new findings on ZMOD4510 Air Quality Sensor
ZMOD4510 Air Quality Sensor is focused on the outdoor air quality measurement based on ozone and NOx concentration. Ozone concentration indoor is very low. I was able to detect it after a long period of time at level 0.1 ppb.
O3_ppb= 0.1 ADC [0]=17 [1]=90 [2]=238 [3]=191 [4]=145 [5]=214 [6]=132 [7]=123 [8]=131 [9]=63 [10]=130 [11]=61 [12]=129 [13]=131 [14]=129 [15]=156 [16]=129 [17]=112
But Fast AQI and EPA AQI based on ozone are equal to 0 for such a low concentration of ozone. It took me some time to realize it as I was thinking that I may have an issue with calling the provided ZMOD4510 library or integrating it with the FPU on CY8CKIT-062S2-43012, I need to test my Air Quality Monitor in the outdoor to get AQI values, as ozone concentration should be higher than indoor.
Bluetooth Testing
In my previous post Smart Air Quality Monitor #5 - Wireless Air Quality Sensor ZMOD4510 to CY8CKIT-062S2-43012 with I2C and BLE I've described key points of integration with BLE. As it becomes cooler here in Canada wireless connectivity will help me to stay warm indoors while the sensor will be outside for the time of testing.
I've used two different apps to access data from the Air Quality Monitor.
The Outdoor Test Preparations and Execution
I've looked up the current temperature and humidity and set them in the code as ZMOD4510 AQI v2 library needs them as input to calculations.
I've packaged breadboard, cables, power bank, CY8CKIT-062S2-43012, and ZMOD4510 into a box. And put them outside next to my window. I've connected to the monitor from the app. The LED on the board has switched on to indicate that it is connected to the board. I was lucky with the weather as it was not windy, no rain or snow, So my testing box was safe from outdoor elements.
{gallery} Air Quality Monitor |
---|
The sensor: view from the top |
The sensor: view from the side |
The sensor: The sensor in the night |
The sensor: The sensor in the deylight |
After waiting for 30 minutes for the sensor to become stable I read the sensor output. I've used an Android LightBlue app to connect to the Air Quality Monitor.
{gallery} The sensor readings from the app |
---|
Air Quality Monitor: BLE Connection established |
Air Quality Monitor: O3 ppb readings as float32 in HEX |
Air Quality Monitor: Fast AQI in HEX |
Air Quality Monitor: EPA AQI in HEX |
Air Quality Monitor: EPA AQI in Unsigned Little-Endian |
Findings From The Outdoor Test
Here are my first findings so far.
1. The sensor is working well in an outdoor environment and generates a valid output. It seems comparable to the output provided by the nearby station https://aqicn.org/city/canada/quebec/rive-sud-de-montreal , which reported O3 AQI in the range between 2 and 18 and it was 10 during my measurements.
TODO: I need to build an app that can easily show all data on one screen and in a human-readable format.
2. The Bluetooth connection from the Air Quality Monitor disappears after some time if the app is not connected to the device.
TODO: I need to investigate additional GAP parameters, which I left as is in the Bluetooth Configurator.
3. The breadboard is not the best option for outdoor testing as cables can easily be disconnected.
TODO: Need to package the monitor without the breadboard to make it more resilient.
4. Temperature and humidity are changing constantly,
TODO: Hardcoded values must be replaced with the dynamic readings from an additional sensor.
5. The power bank which I use to feed the board and sensor has a limited capacity.
TODO: I need to add some other power sources like a solar panel or connect to a power outlet.
6. BLE notifications were configured, but are not working.
TODO: I need to investigate and resolve the issue.
7, Is is not connected to Smart Home /and Smart Speakers.
TODO: Implement support for Matter standard which is now supported by MTB
Summary
While I haven't completed all project tasks identified in the Smart Air Quality Monitor #1 - Project Introduction and I still have a long to-do list to continue improving the monitor I'm pretty happy with my journey to build an outdoor air quality monitor, explore the CY8CKIT-062S2-43012 board, ZMOD4510 sensor, RToS, BLE, AQI, learnings, and results so far. I've been impressed with the capabilities of the CY8CKIT-062S2-43012 board, MTB IDE. The Bluetooth Configurator, AnyCloud_BLE_Environmental_Sensing_Service, and I2C Master projects were big time savers for me. I still need to learn more about it and the Device Configurator.
Thank you element14 community, readers, and supporters, for your attention, questions, and constructive feedback!
And the special thank you to Matthias from Renesas support for answering all my questions about ZMOD4510 sensor and the library.
Update #1
The connectivity issue was resolved by disabling advertising timeouts in the Bluetooth Configurator GAP Settings.
Update #2
The issue with BLE notifications fixed by modifying function app_set_gatt_attr_value in app_bt_gatt_handler.c with settings for humidity, AQI, and ozone.