mcalisterkm / teach-your-pi-to-sniff-with-bme688

Using Bosch BME-AI studio to build an AI model and deploy this to a raspberry pi.
3 stars 0 forks source link

RTC on dev board and sensing #1

Open Prop4et opened 1 year ago

Prop4et commented 1 year ago

Hi, I am the guy that discussed with you about the segfault on the pi3g issue. First of all to set the RTC on your device the way that i found was to connect the device to my smartphone by using the bme ai studio mobile app. When connecting the device should automatically set the time. Secondly i tried your sniff.py with my own config file, generated between clean air and coffee with version 2.4 of the bsec library. screenshot In the screenshot it is possible to see how the sensor takes time to increase the percentage of clean air probability even if left in clean air, but it immediately goes to almost 100% when it is put in the coffee container (ignore the ETHANOL label, i was too lazy to change that, but it's coffee). Now, one thing that i noticed using the devboard is that if i use it to do the sensing using the #1 sensor on the board it gives me meaningful results as in the following screen. sens1 If i cahnge the sensor used, like with sensor #5, it shows a behaviour similar to the one i have with my raspberry pi right now and also with the raspberry pico (to be fair the pico is even worse because the probability goes up by one point every time so the difference is really meaningless). sens5 What i will try to do right now is to sample alchool and coffee, so the smells are really different between them, and see if it was a sampling problem (even if i sampled with different configuration different times, but i can give it another try).

mcalisterkm commented 1 year ago

Hi I was just amazed to get the whole lifecycle - read .. generate .. deploy - to work. Documentation is not great, but it's not too difficult.

I have yet to load the mobile app to my phone, as it had some really bad reviews in the Bosch Sensortec Community Forum - the 'Banaware' comment had me laughing. I'll give it a go.

I wanted to keep the sniff.py simple so omitted my usual step of reading a saved state file for the sensor being used. I find restoring the state file makes it quicker to get to a good accuracy level but that still takes a good 10 min from cold. And that's a thing with this sensor it like to be kept powered on and not stopped and started. But if I uncomment row 55 of sniff.py and print the whole data record, it reports quality 3 immediately - which I find hard to believe.

In your last two images (with timestamps) are you using the android app or have you compiled and run code the ESP32?

Bosch say the sensors are OK when they are within 15% of each others readings, which is quite a wide variation - and one I find true on the three modules I have, as they are all over the place on readings when sat side by side. I wonder how much variation there is across the 8 sensors say on temp and pressure?

Also the heater profile used in recording data may not be producing a great model, and the variability of the sensors results in a fragile result - the 'it works fine on my laptop' syndrome.

My next investigation is to find what's wrong with bmerawdata.py - I suspect the file labelling and format, and not recording using the BSEC library.

Prop4et commented 1 year ago

To answer your first question the timestamps come from the compiled code on the esp32 board, the mobile app doesn't work (at least until the last time i checked). Also i agree with you that the documentation isn't great and that finding a good way to train the model with the correct configuration isn't as easy as it seems.