The BME688 DigitalNose App for PiCockpit enables your BME688 sensor to smell! We at pi3g e.K. offer a plug & play BME688 breakout module, which you can connect directly to the Raspberry Pi header. It connects the BME688 to your Raspberry Pi using I2C. Continue reading to learn how to use our PiCockpit webinterface to teach your sensor how to distinguish up to four smells.
This is modern day magic! Watch me demonstrate the capabilities of the BME688 in this fun “magic show” video:
Do you want to work some magic yourself?
After you have logged into your PiCockpit account and connected your RaspberryPi, select it from My Raspberry Pis. You will see a list of apps available for your Raspberry Pi. Click on the BME688 DigitalNose app to show its features.
Use Boschs AI Studio to train your smell detection algorithm. The DigitalNose App allows you to upload that algorithm, label your classes and display the output data all in one webinterface.
We have provided sample file(s) for your convenience.
Installation and Setup
Power your Raspberry Pi off and connect the BME688 module. Refer to your vendor’s instructions how to do this.
Note: the BME688 also supports SPI operation. This app however only supports I2C operation.
Power your Raspberry Pi back on. By this time PiCockpit has hopefully been installed. You do not need to install any software besides PiCockpit for this app to work.
Open the BME688 DigitalNose app, and click on the Setup button:
This will lead you to the setup page
Enable the BME688 sensor by clicking on the enable sensor toggle.
Check whether the I2C address is correct. (For the pi3g BME688 breakout board, it is 0x77 by default – this might vary depending on your vendor).
You will be asked to agree to the Bosch BSEC license. This is necessary, since the sensors smell detection feature relies on Boschs proprietary BSEC 2.0 software.
Note: The BME688 DigitalNose App and the BME688 Airmeter App cannot run simultaniously.
The sensor should now be enabled and PiCockpit will try to record data. If the sensor can be reached, the message below should update to Data received: … with a timestamp of the most recent data packet received.
Note: data packet frequency depends on the settings – One measurement typically takes around 10 seconds.
Enable advanced view (show all data)
Enabling advanced view will show all parameters which the BSEC 2.0 software is capable of calculating. Those include the IAQ (Index of Air Quality), C02 equivalent and more.
These are all the additional measurements available in the BME688 DigitalNose App in PiCockpit, when using the advanced view
- air humidity
- air humidity (raw)
- air pressure
- air quality (IAQ)
- air quality (IAQ) accuracy
- air temperature
- air temperature (raw)
- breath VOC equivalent
- breath VOC equivalent accuracy
- CO2 equivalent
- CO2 equivalent accuracy
- comp gas value
- comp gas value accuracy
- gas percentage
- gas percentage accuracy
- gas resistance (raw)
- sample number
- static IAQ (raw)
- static IAQ accuracy
Note: for better CO2 measurement precision, we also offer a CO2 Sensor App!
Smell Detection Setup
The Smell Detection Setup is the place to upload your trained algorithm and to label your classes. We are currently usibg BSEC 220.127.116.11 so please make sure that you export your algorithm to match this version (requires at least Bosch AI Studio 1.6.0).
AI Studio exports the algorithm as a BSEC configuration file which ends with .conf. To upload the algorithm, just click the paperclip icon and select your file.
The BME688 sensor can distinguish up to four different classes. Select the Gas Estimate Class that you want to name. Click on the X to remove the name.
Below the gas estimate classes you can add some notes.
Reset all settings
The RESET ALL SETTINGS button is located at the bottom of the page. It allows you to reset the setup to factory default settings.
Be careful, the settings cannot be retrieved.
This concludes the setup. Press the SHOW SNIFF RESULTS button at the top to return to the data screen.
Under Sniff Results you can see a bar chart of the most recent data. The decimal values show the probability of each class being present.
Description & Notes
Below the Sniff results you can find a line chart. It shows the histrorical data of a selected value. Hover over one of the dots to display the description of that data point.
With the light blue line chart handles you can zoom into a specific period of time and into a specific range of values.
Drag and Drop the white handles to the desired minimum and maximum
Use the HIDE LINECHART button to hide the line chart.
Change which value is displayed in the line chart by selecting an option in the data table.
The data table displays the current values of all captured data. It is advisable to enable the advanced view or else most of the values will be N/A.
Press the SHOW ME button behind the value you are interested in to display it in the line chart above.
Use the magnifying glass icon to focus on a special value
Note: The historical data will only be preserved while the app is open. Once you navigate away, or close the tab, the data will be lost forever.
Is the BME680 also supported?
No, the BME680 is not supported because estimating the classes requires the sensor to run in parallel mode, which is a feature introduced with the BME688. But with our custom script you can use your BME680 to record data for training your classification algorithm (although it will take longer to record a meaningful number of samples).
How do I record data for training?
The simplest way is to use Boschs BME688 Gas Sensor Developer Kit. Another option is to use our custom script and any BME68X breakout board. Read this blog post for an in depth explanation on how to record the data.
Note: To use the script, the sensor needs to be connected to your Raspberry Pi via I2C (not SPI).
Where can I buy a compatible sensor?
We (pi3g e.K.) have developed a plug & play BME688 module for the GPIO port of the Raspberry Pi.
Other vendors, e.g. Pimoroni and Adafruit, also sell BME688 and BME680 breakout boards.
Can I use the DigitalNose App and the Airmeter App simultaniously?
No you cannot use both apps at once because they operate on the same BSEC instance and most likely on the same I2C address. In the future we might make it possible to run both apps at once, provided that you use two sensor with two different I2C addresses.
If you enable the advanced view, the DigitalNose App will display all values that BSEC is able to calculate.
Why are my Sniff Results not accurate?
There many possible reasons. These are some things you can do to improve the accuracy.
- Use more training data
- Use more diverse samples
- Make sure the testing environment is not too different from the recording environment
- Check the cofusion Matrix in AI Studio
- Wait 5 minutes for the sensor to warm up and adjust to the environment.
Note: It takes up to one minute for the gas mixture to get inside the sensors casing.
Sample config file(s) for the BME688 DigitalNose app:
- Distinguish Meet / Cheese (.config)