Understanding the BSEC Algorithm and IAQ¶
The core of the uThing::VOC is the Bosch BME680 sensor, which provides raw measurements of temperature, humidity, pressure, and gas resistance. To turn these raw values into a meaningful Indoor Air Quality (IAQ) index, the device uses Bosch's powerful BSEC (Bosch Sensortec Environmental Cluster) software library.
This page explains how this process works and how to correctly interpret the data.
How the VOC Sensor Works¶
The BME680 contains (in addition to a temperature, humidity and a barometric pressure sensor), a metal-oxide (MOX) sensor. In simple terms:
- A tiny plate inside the sensor is heated to a high temperature.
- In clean air, oxygen molecules stick to this plate, creating high electrical resistance.
- When Volatile Organic Compounds (VOCs) are present, they react with the oxygen on the plate, which lowers the electrical resistance.
In contrast to sensors selective for one specific component, the BME680 is capable of measuring the sum of VOCs/contaminants in the surronding air. This enables the sensor to detect e.g. outgasing from paint, furniture and/or garbage, high VOC levels due to cooking, food consumption, exhaled breath and/or sweating.
Therefore, the sensor does not identify specific gases, but rather measures the total change in resistance (the higher the concentration of reducing VOCs, the lower the resistance, and vice-versa).
The Role of the BSEC Algorithm¶
The BSEC library is the "brain" that interprets the raw sensor data. It performs sensor fusion, combining the gas resistance value with temperature and humidity to produce a final, compensated Indoor Air Quality (IAQ) index.
BSEC Calculated Outputs
- Indoor Air Quality (IAQ): A relative index from 0 (clean) to 500 (heavily polluted).
- IAQ Accuracy: A status from 0-3 indicating the reliability of the IAQ value.
- Equivalent CO₂ (eCO₂): An estimated CO₂ concentration in ppm.
- Breath-VOC Equivalent (bVOC): An estimate of VOCs typically caused by human presence.
- Compensated Temperature & Humidity: More accurate ambient readings.
The IAQ Index is Relative¶
This is the most important concept to understand about the IAQ value.
From the BME680 Documentation
"Indoor-air-quality (IAQ) gives an indication of the relative change in ambient TVOCs... algorithms automatically calibrate and adapt themselves to the typical environments where the sensor is operated... The calibration process considers the recent measurement history (typ. up to four days) to ensure that IAQ=25 corresponds to typical good air and IAQ=250 indicates typical polluted air."
What this means for you:
- The sensor learns the "normal" air of its environment to create a baseline.
- The IAQ value of 25 does not represent a specific ppm of a gas, but rather what the algorithm considers "typical clean air" for that specific room.
- If you move the sensor to a new room, it will begin the learning process again to adapt to the new environment's baseline.
Understanding the iaqAccuracy Status¶
The BSEC algorithm constantly reports on its own calibration status. As a developer, you should use this status to determine if the IAQ value is reliable.
| Accuracy | Status | Meaning |
|---|---|---|
| 0 | Stabilizing | The sensor has just been powered on. The data is not yet reliable. |
| 1 | Uncertain | The air has been very stable, and the algorithm cannot yet establish a clear baseline. |
| 2 | Calibrating | The algorithm is actively learning and adjusting its baseline. The IAQ value is becoming more reliable. |
| 3 | Calibrated | The algorithm has a reliable baseline. The IAQ value is trustworthy. |
Recommendation:
Only use the IAQ, eCO2, and bVOC values for triggers or logging when the iaqAccuracy is 2 or 3. The uThing::VOC automatically saves the calibration state, so after an initial learning period of a few days, it should frequently report an accuracy of 3.
IAQ Classification¶
The table below shows the standard classification for the IAQ index.
VOCs and Health
According to guidelines from the German Federal Environmental Agency, exceeding 25 mg/m³ of total VOCs can lead to headaches and other neurotoxic impacts. While the IAQ index is relative, a consistently high value (e.g., > 250) indicates a significant presence of VOCs that should be investigated.
Breath-VOC Details¶
Bosch uses the ISO16000-29 standard “Test methods for VOC detectors” to calibrate the BME680 sensors.
Besides ethanol as a target test gas, the sensors are also tested with breath-VOC (b-VOC), which composition is detailed in the table below (from the BME680 datasheet):
| Molar fraction | Compound | Production tolerance | Certified accuracy |
|---|---|---|---|
| 5 ppm | Ethane | 20% | 5% |
| 10 ppm | Isopropene /2-methyl-1 | 20% | 5% |
| 10 ppm | Ethanol | 20% | 5% |
| 50 ppm | Acetone | 20% | 5% |
| 15 ppm | Carbon Monoxide | 10% | 2% |