I2C BME688 0x77 on Arduino MKR Zero: custom heater profile and gas resistant logging.

Hi,

We have a project to study gas emission from cooking activity in a tropical country, to determine its affect on women health. We would like to try the gas scan function of the BME688s to find the VOCs "fingerprint" when people use different fuel materials (as cow dung, wood, kerosel, etc) and the cooking foods. For this purpose of trying to distinguish gases emission from cooking activities at different areas, after reading on this forum and some publications, I think about applying a heater profile and log as much data as posible. We have a 32 GB SD card. I use "bme68xLibrary.h"

// /* Heater temperature in degree Celsius */

uint16_t tempProf[22] = {400, 100, 400, 125, 400, 150, 400, 175, 400, 200, 400, 250, 400, 275, 400, 300,400, 325, 400, 350, 400, 375};

// /* Heating duration in millismillisseconds */

uint16_t durProf[22] = { 5000, 7000, 5000, 7000,5000, 7000, 5000, 7000, 5000,7000,5000,7000, 5000,7000,5000,7000,5000,7000,5000,7000, 5000,7000};

However, the MKR got frozen after run in the function bme.setHeaterProf(tempProf, durProf, 22);

Then I tried with the force mode, 

bme.setHeaterProf(temp, 5000); // Set the gas heater temperature and duration

bme.setOpMode(BME68X_FORCED_MODE);
 

It takes 4040 ms for bme.fetchData() == 1, and the bme.getData(data) only return a value of data.gas_resistance; the arduino code is in attachment. I wonder if there is a possibility to record all gas resistance values over the heater profile cycle.

Thanks in advance. I really appreciate for all suggestion and recommendation.

 

BME68x_0x77_gasscanner.zip
1.57KB
Best reply by BSTRobin
View original
8 replies
Resolved