windkh / mysensors

4 stars 6 forks source link

BME680 library still available? #1

Open maddhin opened 3 years ago

maddhin commented 3 years ago

Hi! I cannot compile the BME680 sketch ('getConfig' was not declared in this scope). The linked library is not available anymore and there seem to be problems with the fork from @vicatcu... Or am I doing something wrong?

vicatcu commented 3 years ago

@maddhin I haven't maintained that fork in years @maddhin sorry

maddhin commented 3 years ago

thanks for the fast response! @vicatcu Any tipp for a good BME680 library working with a ATMEGA328? :)

windkh commented 3 years ago

@vicatcu @maddhin Same for me. I did not maintain this for years, but I should still have the library if you need it. I think that getConfig stuff changed in mysensors, but I should have a newer version on my laptop. If you need help I am sure we can get something running.

maddhin commented 3 years ago

@vicatcu @maddhin Same for me. I did not maintain this for years, but I should still have the library if you need it. I think that getConfig stuff changed in mysensors, but I should have a newer version on my laptop. If you need help I am sure we can get something running.

I think the Adafruit or Seed or ? library are sort of working (might some error messages but it seems to run on ATMEGA328) - I tried most of them but cannot remember which had what problems:)

For me, the biggest issue is that those libraries are just returning the resistance values and not the AQI numbers. Did you create some "resistance in kOhm to AQI"-correlation table? I used a CSS811 before and there you can correlate the CO2-eqivalent to the AQI but with kOhm values I am totally lost...

I guess I need to ugrade to another processor to run the BME680 properly. Which is a pitty though as the ATMEGA328 is perfect as a low energy mysensors sensor...

windkh commented 3 years ago

@maddhin there is a general problem with these type of sensors. The resistance increases over the lifetime of the sensors. Hence you always have to recalibrate or adjust the calculation. The Bosch library does that by assuming that the sensor gets fresh air at least once a day. The minimum resistance of the day is the reference for the AQI. For that reason I lost interest in this sensor. My MQ135 consumes a lot of power but it stayed constant over the months. The BME680 is basically the same but shrinked to fit into an smartphone. Thus the zinc oxide part of the sensor is only a very tiny part inside of the chip. It can ve easily polluted which results in totally wrong output values... long story short: you can not programme a fixed formula or lookup table.

vicatcu commented 3 years ago

@maddhin to add to what @windkh said, if you look at the Bosch library, the way they want to see their sensor used is a combination of their chip plus a "proprietary algorithm" distributed in binary form and meant to be be linked to source code. As such, their intention is either that you have a much more spacious processor than an ATMega328p to provide the resources to service their software blob in addition to your application source code, or you'd want a co-processor running their algorithm and providing a serial interface to the ATMega328p. In any case, that all makes it somewhat less interesting as an Arduino sensor, unless you come up with your own "proprietary algorithm" to interpret the raw resistance measurement data provided by the sensor.

windkh commented 3 years ago

@vicatcu yes completely right. I talked some day to one of their engineers what that software does. Basically it stores what the sensor measured over time... the rest is doing math on the historical data. In the end you have to pay the small size by adding memory which is not a problem in smart devices but a huge one in low power low cost scenarios