AQI script for micropython and BME688

Hello,

Has anyone coded something similar to the air quality script for BME688 python found here:

I am trying to work on a project with a pico w, a 1.5" Pimoroni display and a neopixel led ring.
I’ve got the other stuff figured out but I would like to have an AQI as well.
As a side note, any ballpark gas resistance ranges for “bad”, “acceptable” and “good” that I could use?

Thank you.

I did a lot of programming and testing with the BME688 and I must say this is an absolutely useless device for measuring “air quality”. The BME688 measures VOC (volatile organic compounds) and is perfect to detect and measure decaying fruits, cheese and so on. But anything else? A definite NO. I spent more than eight hours in a closed room to see if the sensor detects some changes in “air quality” and it does not. But maybe I don’t breath enough ;-). I also put it directly next to my 3D-printer with PET and PETG, and in contrast to my nose the sensor did not react at all. The gas sensor does react very sensible to temperature changes, but that is actually nothing you want to have.

If you are really interested in air quality, use the SCD40. Maybe the ENS160, which is cheaper and also does not measure CO2 directly, but according to my tests it is not that bad.

In addition: the temperature measurement of the BME688 is also useless. The device has a builtin heat-plate for the VOC-sensor, and as you can imagine this will lead to temperatures far off.

Thank you bablokb for taking the time to reply. I also read quite a bit about it and it seems to me that the gas readings are hard to quantify properly. I am not a prolific programmer and from what I read people tried with varied degrees of success to get something useful.
I have assumed that Pimoroni’s script it is somewhat usable ( as good as it can be giving the shortcomings of the sensor ) so I wanted to get something for micro python but a lot of stuff does not have the proper modules for pico.
Why do you think that ENS160 could be so much different in response ? From the specs it is heater based same like the BME688.
I will probably ending up getting a SCD40 but I have a BME688 and just wanted to have some fun.

I tested it. In contrast to the BME688 it did show a definite response to the “man-in-the-closed-room” test, i.e. air quality changed over time. The results - although on a metric scale - are probably only useful on a qualitative level. But that is not much different for “true” CO2 sensors.

BTW: I did test SCD40 and SCD41 in parallel. I would not spend the extra bucks for the SCD41. I have the version from M5Stack (m5-docs), which is really nice since it has an enclosure and can be easily mounted.

Another thing to watch out for: the BME680 python-driver of Pimoroni is definitely incorrect. I already created an issue for that in May 2021: constants don't match Bosch-version · Issue #42 · pimoroni/bme680-python · GitHub. But for more than 3 years there was no reaction from Pimoroni.

Their baked in driver in their MicroPython firmware does use the original Bosch-Sensortec code, so this should at least work to standards.

Thanks again for your reply. I wanted to get an SCD40 for a while now and I will probably get one to play with. I already have/had the BME680 and wanted to see if other people did some work with it in micropython beyond Pimoroni’s examples.
The Enviro board software has a gas bar displayed along with temperature and other parameters. Not sure if that coding is more accurate but it does changes with the air “quality”.