The latest generation of the "all in one processor" from Bosch not only captivates temperature, humidity, pressure and altitutes measurement, but also the measurement of gases. So far so good: but Bosch makes it not easy to interpret the measured gas values: the datasheet provides a conversion to ohms and provides a so-called IAQ table.This article deals with exactly this question and sets on the other components, such as the Photon, the LCD20x4 and the control via I2C adapter on previous articles of the same structure. Check BME280 or SHT31-D.
A good starting point is the test with the available Adafruit Library for the BME680 within the WebIDE.
The available example should work immediately and, in the simplest case, display the individual readings on the Particle console.
Datasheethttps://cdn-shop.adafruit.com/product-files/3660/BME680.pdf
50 pages circumference - not bad gentlemen. In summary, several gases are measured, but these can not be identified individually. Rather, it behaves in the "principle, this output is in an index that can have values between 0 and 500 with a resolution of 1 to indicate or quantify the quality of the air available in the surrounding. ", see chapter 1.2.
Using David Bird's function, the necessary algorithm could be implemented. His simplified presentation provides assistance:
In his ReadMe on GitHub, he describes that his function so far only "humidity and the gas are used for the index."
Please note its copyright by excluding commercial use.
ImplementationFirst the two necessary libraries are included in the program code, the variables are set, objects are instantiated and during the setup the BME680-example is used followed by David's function GetGasReference();
Among other things, the sensor values on the serial monitor are output within the loop (command)
particle serial monitor
And then the IAQ index is determined and correspondingly output on the display LCD20x4 accordingly.
You can vary the values displayed on the display: the temperature in Fahrenheit is already prepared, as well as air pressure or altitude. I have provided line 4 for the interpretation of the gas.
// Gas - Option C - Interpretation Output as String
lcd->setCursor(0,3);
lcd->print(CalculateIAQ(air_quality_score));
If you find the measured gas values unbelievable, please wait up to 30 minutes for the sensor stabilization.
In the next step, optical (green and red LEDs) and sounders (a buzzer) can be added to trigger an alarm.
Try out what results you get with this circuit in the sauna.
Update at 25.10.2018 - STL-File for a 3D-PrintoutYou will find a STL-File in the attachments for housing the components.
Comments