Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BME688 Mobile App Live-test always say it is coffee

    BME688 Mobile App Live-test always say it is coffee

    New Poster

    Dear fellow users,

    I just started training the BME688 gas sensors (Dev Kit) using the AI Studio. The recorded samples (30 minutes) of coffee and (30 minutes) air were imported successfully into the AI Studio. I created a model (around 95% accuracte with few errors in the confusion matrix) using all default values and exported the .config and .aiconfig and saved them in the SD card. But when I ran the live-test from the mobile app, it did not matter which class I chose, it always reported it was coffee whether I put the sensors (Dev Kit) in a container containing coffee or not. I also created another model including all data channels instead of the default gas data channel only, trained the model and saved the exported config files to the SD card. The Live-test still reported coffee whether I put the sensors in the coffee jar or not. 

    I even selected the Example Project from the AI Studio, selected the 'coffee or not' model, exported and saved the config files in the SD card, the result was the same: always coffee even it should have been air!

    Any suggestions?

    Note: I always deleted the .config and .aiconfig from the SD card before copying the new config files to it.

    If this issue has been solved before, please forgive me, I could not find it searching the topics.



    7 REPLIES 7

    Community Moderator
    Community Moderator

    Hi mrdreambot,

    As BME688 application note( mentioned before you start with the measurements, there are three things to keep in mind:

    When you record data, there are 4 steps: record normal air, record espresso coffee, record normal air again, record filter coffee.

    Thanks for the reminder, BSTRobin. 

    • I populated my SD card with the 2021_08_09_10_39_BoardConfiguration.bmeconfig which I download from one of the Community discussions. I inserted the SD card, baterry in the Dev Kit, plug the USB cable in the Adafruit Feaher and let it running for jsu under 24 hours. Does a few hours make such a difference. Should I let it run for another 24 hours?
    • I've attched the bmeconfig here for reference. I uderstand that I could have use the AI Studio to create a bmeconfig. At that time, I did not know that yet. Since then, I have generated another .bmeconfig from AI Studio and repeated the sample collection, model training, deployment and testing cycle with the same outcome
    • Yes, the SD card has been inserted and I've been recording many MByes of samples. And I could import files in AI Studio and train several modes but none of them worked. Attached the screen shot of one model which is supposed to destinguish tea and normal air.

    My question to you BSTRobin is what can I try? Run the dev kit for another 24 hours, change the .bmeconfig to certain values recommended by you? I welcome any suggestion.


    We have the same problem and are curious why this could be. 

    After achieving a high accuracy in the AI studio, we ran it on the mobile app. First, it was coffee, then relatively quickly changed to air. After a few minutes, we stuck it almost on top of the coffee beans. Nothing happened. Only one channel changed after several minutes. I have to say that this is not encouraging.

    Here is an update after spending more time with the Dev Kit:

    I was able to get further than before but still having some issues. I have summarised what I did, the results and my questions for the experts reading this post. If you have encountered these issues and resolved them, or have an explanation for them, please let me know.

    What I did

    1. Deleted all files on the SD card
    2. Generated a default .bmeconfig in AI Studio and copied it to the SD card
    3. Power up the Dev Kit and let it run for over a day
    4. Copied the example 'Coffee or Not' .aiconfig and .config files to the SD card and applied power (sampling natural air)
    5. Connected the mobile app and switched to Live-test and observed if the behaviour remained the same as before (always predicting coffee)

    The results

    1. Selected the 'Air' class. Initially, some sensors were still reporting Coffee but after some time (minutes), they reported 'Air'
    2. Put the Dev Kit in a container containing coffee and switched the mobile app 'Live-test' class to coffee. After sometime, the mobile 'Predictions' page was still predicting 'Air' while the 'Raw Data' page showed 'Prediction Likeliness' 100% for coffee. This continued until I disconnected and re-connected the mobile app. Then the Prediction showed 'Coffee' See screen shots attached.
    3. Took the Dev Kit out of the coffee container. The Prediction continued to be coffee until minutes later when 3 of the 4 sensors correctly predicted 'Air'. See screen shot attached.

    My Questions:

    1. Do I need to disconnect and reconnect for every environmental change before new environment can be detected?
      Is it normal for the Live-test Raw Data of the sensors contradict those on the Prediction page?
    2. How long does it take normally for the sensors to detect the change in environment (air to coffee and coffee to air)? For me, it took several minutes which, in my opinion, was too long.
    3. Was it normal for certain sensors to predict the environment incorrectly? For some of those incorrect predictions, looking at the Raw Data, it seemed that the 'Prediction Likeliness' were quite close for the 2 classes: coffee and air.
    4. What can I do to improve the detection accuracy and reduce the delay in detecting environment change?

    Screen Shots

    raw Data shows coffee but Prediction page still showing all air


    Took a long time to correctly prediction air after taking the dev Kit out of the coffee container


    Thanks in advance.