Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BME688 Mobile App Live-test always say it is coffee

    BME688 Mobile App Live-test always say it is coffee

    mrdreambot
    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.

    coffee-or-not.png

     

    7 REPLIES 7

    BSTRobin
    Community Moderator
    Community Moderator

    Hi mrdreambot,

    As BME688 application note(https://www.bosch-sensortec.com/media/boschsensortec/downloads/application_notes_1/bst-bme688-an001....) mentioned before you start with the measurements, there are three things to keep in mind:

    2023-08-17_10h17_52.png
    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.

    tea-vs-air.png

    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

    rawData.jpgpredictions.jpg

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

    slowChangeover2.jpg

    Thanks in advance.

     

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist