Measuring air quality with the Raspberry Pi

Interpreting the Air Quality Sensor Quantitative Results

Reading the raw values of the AQS from the 16-bit ADC will yield a value from 0 to ~32,000. Although I am looking primarily at changes in the sensor to see how sensitive it is, the raw data on the results curve can be interpreted qualitatively, as shown in Table 1.

Table 1

Qualitative Interpretation of AQS Values

Raw Value from ADC



Fresh air


Low pollution


Medium pollution


High pollution


Very high pollution


I took the whole sensing system home for testing, because the environment at SwitchDoc Labs is fairly boring, and set it up for a 48-hour test. The annotated results are shown in Figure 6. I was pretty impressed with how sensitive the TP-401A was in a home environment. I kept a log that allowed me to identify each event on the graph. I'm not showing the sensor current graph, because it was very flat at 49mA and really boring.

Figure 6: Two-day test. (A) Dryer door opened, ironing begun. Could smell fabric softener. (B) Door opened to outside first for Panther The Cat, then door left open for a while. Finally, dinner cooked in oven. (C) Door opened for cat. Cat slow to leave. Very slow. (D) First hairspray test. Short spurts of hairspray in the bathroom – note air conditioner was on. (E) Dinner cooked (fried chicken and spinach salad with bacon bits). (F) Night – ripples are probably autofan and air conditioning effects. (G) Hairspray in bathroom; this time the real thing as the wife got ready for work.

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content