Maker.io main logo

APC1 Air-Quality Logger

2024-05-15 | By Tobias Bruckmann

Motivation

There are days when even a few morning coffees won’t get the brain ready for work, and the mind fog doesn’t pass. The reasons for such a low can be diverse, and one reason can be poor air quality.

While you can have an eye on your daily water intake and assess it quite objectively, it is often difficult to have a precise feeling for the current air quality. That’s what sparked my interest in accumulating air quality measurement data, and why this post will provide the necessary ideas to build a similar data-logger yourself. After that, the opportunities are endless as you'll see the used sensor is versatile, and improving working conditions for yourself by letting fresh air in at the right times is just one possible use. With the sensor data, it is for example possible to estimate a room's occupation and forego the use of expensive vision systems.

The Sensor

The core of this project is the APC1 from ScioSense. To roughly quote their datasheet it’s a matchbox-sized, all-in-one environmental sensor solution to measure particle matter, aerosols, volatile organic compounds, temperature, and humidity. In other words, it’s the one device to supply us with all the data points we need. While the sensor does not measure CO2 directly, it senses volatile organic compounds, which are indicated to affect human well-being to a similar or even greater extent. Due to their correlation to human respiratory output, the APC1 can even provide an estimated CO2 concentration (eCO2) based on the assumption that the VOCs emerge from human activity.

Interfacing 101

Now that we know what the sensor can provide us with, it remains open to how we obtain and archive this data. For that, we can choose between I2C and UART for interfacing and order the appropriate version of the APC1. In my case, the UART Version was provided to me with the immediate option to get the first data readouts with a USB interface supplied with the sensor. There is also a really nice application provided by ScioSense to plot and save measurement data from the device directly on your computer. For those of you looking for a quick and simple solution, this might already be a viable option. Just connect the sensor to your workspace PC, add the logging program to your Autostart, and you are ready to go. It is also possible to save measurement data as a CSV file for later examination.

SD-Card data logger

For those who don’t want their PC to be involved in collecting the data, there is the alternative solution of using an Arduino or similar device with an SD-Card interface to log data directly onto the card for later evaluation. The drawback with that solution is the fact that while data logging works great, data visualization becomes more complex, and real-time visualization is basically not possible. To address these problems, another solution is introduced.

Online data logger

To regain real-time capability in the logging system, the SD-Card module is swapped for a Network Interface. Either with a network shield for your favorite Arduino device or the use of a Wi-Fi-ready device like the ESP32 or the ESP8266. Additionally, a server running Prometheus and Grafana is needed to archive and display the collected data. The pipeline then works as follows:

  1. The ESP or Arduino reads in the current measurement data from the APC1 and stores it in a buffer.
  2. The Prometheus server queries the ESP or Arduino via the network interface and archives the retrieved data.
  3. The Grafana provides a dashboard visualizing data it queries from the Prometheus server. That way, all data is archived on the Prometheus server and viewable in real-time through a freely customizable Grafana dashboard like the one shown below.

APC1 Air-Quality Logger

It’s a lot of fun seeing the sensors' response to fluffing up pillows, airing out glue bottles near them, or letting in fresh air. With a bit of AI or simpler pattern recognition code, it might even be possible to detect the current room user’s actions and give feedback, for example in conjunction with a smart heating system to save energy. The possibilities are truly endless, and I'm excited to see where the maker community will make use of the device and which upcoming project of mine, I’ll use it in again.

制造商零件编号 APC1001U
SENSOR AIR QUALITY UART OUTPUT
ScioSense
¥197.50
Details
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum