Particle Powered Air Quality Sensor Logging to Google Docs
-
@jaredwolff said in Particle Powered Air Quality Sensor Logging to Google Docs:
...
inputs[nInputs].signal = _data.humidity/1000.0f; // Need to divide by 1000 for fp;
...WTF, they have a known bug in the library and we all have to discover it by ourselves?....
How cool is that, you seem to have solved the problem I had.... :)
BSEC library version 1.4.7.3 Timestamp [ms], raw temperature [°C], pressure [hPa], raw relative humidity [%], gas [Ohm], IAQ, IAQ accuracy, temperature [°C], relative humidity [%], Static IAQ, CO2 equivalent, breath VOC equivalent End setup() 279, 21.37, 94698.00, 57.66, 80982.00, 25.00, 0, 21.37, 57.66, 25.00, 500.00, 0.50 3278, 21.21, 94700.00, 57.42, 111997.00, 25.00, 0, 21.15, 58.10, 25.00, 500.00, 0.50 6278, 21.22, 94700.00, 57.25, 127972.00, 25.00, 0, 21.16, 57.80, 25.00, 500.00, 0.50 9278, 21.22, 94702.00, 57.10, 135341.00, 25.00, 0, 21.16, 57.58, 25.00, 500.00, 0.50I hope I will have a graph in two days and I can compare the Bosch sensor to the NIDIR-Sensors...
-
@jaredwolff said in Particle Powered Air Quality Sensor Logging to Google Docs:
...
inputs[nInputs].signal = _data.humidity/1000.0f; // Need to divide by 1000 for fp;
...WTF, they have a known bug in the library and we all have to discover it by ourselves?....
How cool is that, you seem to have solved the problem I had.... :)
BSEC library version 1.4.7.3 Timestamp [ms], raw temperature [°C], pressure [hPa], raw relative humidity [%], gas [Ohm], IAQ, IAQ accuracy, temperature [°C], relative humidity [%], Static IAQ, CO2 equivalent, breath VOC equivalent End setup() 279, 21.37, 94698.00, 57.66, 80982.00, 25.00, 0, 21.37, 57.66, 25.00, 500.00, 0.50 3278, 21.21, 94700.00, 57.42, 111997.00, 25.00, 0, 21.15, 58.10, 25.00, 500.00, 0.50 6278, 21.22, 94700.00, 57.25, 127972.00, 25.00, 0, 21.16, 57.80, 25.00, 500.00, 0.50 9278, 21.22, 94702.00, 57.10, 135341.00, 25.00, 0, 21.16, 57.58, 25.00, 500.00, 0.50I hope I will have a graph in two days and I can compare the Bosch sensor to the NIDIR-Sensors...
@fotofieber I'm not sure they know.. haha I should tell them.
Good luck and let me know how it goes!
-
They know about it. They keep their library up to date on Github:
Here's the diff:
Here's the library link:
https://github.com/BoschSensortec/BSEC-Arduino-library
You probably downloaded it from the website just like I did.
I'll have to update my repo and point it to this as a submodule.
-
They know about it. They keep their library up to date on Github:
Here's the diff:
Here's the library link:
https://github.com/BoschSensortec/BSEC-Arduino-library
You probably downloaded it from the website just like I did.
I'll have to update my repo and point it to this as a submodule.
@jaredwolff
I downloaded the binaries from the Bosch site and the source library from the github repo.In the binaries archive is an arduino library with an example with the error, you found.... The github repo has no binaries and I couldn't get it up with the binary.
The binary distribution of essential code makes it more complicated than it could be...
The integration in platformio is not to complicated in my code. I only had to add (after investigating for some hours)
build_flags = -Llib/BSEC/src/esp32/ -lalgobsec -
@FotoFieber how goes the testing?
The BME680 and the SGP30 both correlate in their readings with temperature. This means when the temperature goes up and down, i've seen the TVOC reading go up and down as well. Hardly useful for a sensor that is supposed to tell you if your air is bad or not.
Take a look at the screenshot below:

You can see that both sensors react wildly to temperature. Whereas the CCS811 has a bump but not significantly. If I go by the scales in the data sheets for the BME680 and SGP30, the room that these sensors are in require immediate venting.
Even right now, the SGP30 sensor is half way to the danger zone. 😵
Danger zone!

While testing that, I also threw everything together into an enclosure. Even added GPS:

So it sits up in the kitchen and chirps at me when I burn my food. I switch on my air purifier and the particulate level goes down pretty quick!
-
@FotoFieber how goes the testing?
The BME680 and the SGP30 both correlate in their readings with temperature. This means when the temperature goes up and down, i've seen the TVOC reading go up and down as well. Hardly useful for a sensor that is supposed to tell you if your air is bad or not.
Take a look at the screenshot below:

You can see that both sensors react wildly to temperature. Whereas the CCS811 has a bump but not significantly. If I go by the scales in the data sheets for the BME680 and SGP30, the room that these sensors are in require immediate venting.
Even right now, the SGP30 sensor is half way to the danger zone. 😵
Danger zone!

While testing that, I also threw everything together into an enclosure. Even added GPS:

So it sits up in the kitchen and chirps at me when I burn my food. I switch on my air purifier and the particulate level goes down pretty quick!
Thank you for the feedback @jaredwolff, that is very useful.
Do you confirm that you use the BSEC library for the BME680 and not direct values from the sensor ? -
Thank you for the feedback @jaredwolff, that is very useful.
Do you confirm that you use the BSEC library for the BME680 and not direct values from the sensor ?@nca78 I am using the BSEC library. I’m using the compensated humidity and temperature so I’m sure if that. I may have to take a second look at the code for both sensors. I may have mucked something up!
-
@FotoFieber how goes the testing?
The BME680 and the SGP30 both correlate in their readings with temperature. This means when the temperature goes up and down, i've seen the TVOC reading go up and down as well. Hardly useful for a sensor that is supposed to tell you if your air is bad or not.
Take a look at the screenshot below:

You can see that both sensors react wildly to temperature. Whereas the CCS811 has a bump but not significantly. If I go by the scales in the data sheets for the BME680 and SGP30, the room that these sensors are in require immediate venting.
Even right now, the SGP30 sensor is half way to the danger zone. 😵
Danger zone!

While testing that, I also threw everything together into an enclosure. Even added GPS:

So it sits up in the kitchen and chirps at me when I burn my food. I switch on my air purifier and the particulate level goes down pretty quick!
@jaredwolff
My experiments with VOC sensors were all not satisfactory.The NDIR-sensors reported more or less the same as the netatmo devices and I will therefore stick with them. Apart from that, using the NDIR-sensors in arduino is much easier and you don't have to store baselines or link precompiled code.
-
@jaredwolff
My experiments with VOC sensors were all not satisfactory.The NDIR-sensors reported more or less the same as the netatmo devices and I will therefore stick with them. Apart from that, using the NDIR-sensors in arduino is much easier and you don't have to store baselines or link precompiled code.
@fotofieber said in Particle Powered Air Quality Sensor Logging to Google Docs:
@jaredwolff
My experiments with VOC sensors were all not satisfactory.The NDIR-sensors reported more or less the same as the netatmo devices and I will therefore stick with them. Apart from that, using the NDIR-sensors in arduino is much easier and you don't have to store baselines or link precompiled code.
Of course sensors measuring CO2 will give better results than sensors trying to guess the CO2 levels by measuring something else.
But the power consumption is way too high, my hope was to be able to have a battery (li-ion) powered sensor able to run the BME680 in low power settings for a few months and just use it as a warning on when you need to ventilate a room. Unfortunately it seems to not even be fit for this limited use case :( -
@fotofieber said in Particle Powered Air Quality Sensor Logging to Google Docs:
@jaredwolff
My experiments with VOC sensors were all not satisfactory.The NDIR-sensors reported more or less the same as the netatmo devices and I will therefore stick with them. Apart from that, using the NDIR-sensors in arduino is much easier and you don't have to store baselines or link precompiled code.
Of course sensors measuring CO2 will give better results than sensors trying to guess the CO2 levels by measuring something else.
But the power consumption is way too high, my hope was to be able to have a battery (li-ion) powered sensor able to run the BME680 in low power settings for a few months and just use it as a warning on when you need to ventilate a room. Unfortunately it seems to not even be fit for this limited use case :( -
@jaredwolff said in Particle Powered Air Quality Sensor Logging to Google Docs:
I haven’t measured the low power mode on the BME. What were you getting @Nca78
With 5mn interval it's supposed to use only 90uA, it's good enough for a li-ion battery of a reasonable size.
-
@jaredwolff said in Particle Powered Air Quality Sensor Logging to Google Docs:
I haven’t measured the low power mode on the BME. What were you getting @Nca78
With 5mn interval it's supposed to use only 90uA, it's good enough for a li-ion battery of a reasonable size.
@nca78 agreed. It totally depends on the application. On a 225mA button cell that may not work especially if it has to last a year or two!
-
So @jaredwolff & @FotoFieber what sensor would you suggest to use for measuring air quality using an Arduino (nano/uno), with the option to make it battery powered in the future. From my understanding this will remove the BME from the list due to memory/computing requirements. What are your suggestions?
-
Hey @Sebex
After running my setup for more than 8 months here are a few suggestions:
- If you care about particulates then the PM2.5 sensor works wonders. I've been using the HPMA115S0. It uses UART which you should be able to use with any Arduino variant.
- If you're more concerned with chemicals, a MOx sensor like the CCS811 is still my choice.
The CCS811 is available as development boards from Adafruit and Sparkfun. The HPMA115S0 can be purchased from Arrow, Mouser and Digikey.
I actually developed an all-in-one for Featherwing board. You can check that out for inspiration as well.
-
Regarding the bme680, has anyone yet figured out the correct amount of pre-heating that should be applied to it, or is that still unknown? See https://forum.mysensors.org/topic/7788/bosch-bme680-sensor/15?_=1578489395821 .
-
Hey @Sebex
After running my setup for more than 8 months here are a few suggestions:
- If you care about particulates then the PM2.5 sensor works wonders. I've been using the HPMA115S0. It uses UART which you should be able to use with any Arduino variant.
- If you're more concerned with chemicals, a MOx sensor like the CCS811 is still my choice.
The CCS811 is available as development boards from Adafruit and Sparkfun. The HPMA115S0 can be purchased from Arrow, Mouser and Digikey.
I actually developed an all-in-one for Featherwing board. You can check that out for inspiration as well.
@jaredwolff thanks. I noticed that for the CSS811 there's no mysensor sketch example, any suggestions for a good guide to build one myself?
Something else I wondered is adding multiple sensors to 1 pin. I want to combine the CCS811 with the Si7021 that I am running now on an Arduino. Perhaps I don't necessarily need to use the same pins but lets say you have running X amount of sensors that it becomes inevitable to use a similar pin. Is it possible to share pins in arduino sketches, if so how does this work? Or is every value sent by the sensor tagged. Couldn't find the answer anywhere on the forum.
-
@jaredwolff thanks. I noticed that for the CSS811 there's no mysensor sketch example, any suggestions for a good guide to build one myself?
Something else I wondered is adding multiple sensors to 1 pin. I want to combine the CCS811 with the Si7021 that I am running now on an Arduino. Perhaps I don't necessarily need to use the same pins but lets say you have running X amount of sensors that it becomes inevitable to use a similar pin. Is it possible to share pins in arduino sketches, if so how does this work? Or is every value sent by the sensor tagged. Couldn't find the answer anywhere on the forum.
@Sebex said in Particle Powered Air Quality Sensor Logging to Google Docs:
Perhaps I don't necessarily need to use the same pins
Both the sensors you quote are using I2C. So they both use the same 2 pins (SDA, SCL) to communicate. You can put many I2C sensors on those same pins, they each have an address to know which sensor is receiving/sending data to the master (here, your arduino).
Look for a tutorial on I2C first. -
Regarding the bme680, has anyone yet figured out the correct amount of pre-heating that should be applied to it, or is that still unknown? See https://forum.mysensors.org/topic/7788/bosch-bme680-sensor/15?_=1578489395821 .
I've set up the BME680 to use low power mode. I saw that the temperature readings were much higher in normal mode. Here's the init:
// Begin BME680 work #ifdef HAS_BME680 bsec.begin(BME680_I2C_ADDR_PRIMARY, Wire); checkIaqSensorStatus(); // Set up BME680 sensors bsec_virtual_sensor_t sensorList[7] = { BSEC_OUTPUT_RAW_TEMPERATURE, BSEC_OUTPUT_RAW_PRESSURE, BSEC_OUTPUT_RAW_HUMIDITY, BSEC_OUTPUT_RAW_GAS, BSEC_OUTPUT_IAQ, BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE, BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY }; bsec.updateSubscription(sensorList, 7, BSEC_SAMPLE_RATE_LP); //BSEC_SAMPLE_RATE_LP checkIaqSensorStatus(); #endif@Sebex I agree with @Nca78, you can look into how I2C works. The cool thing is you can add up to 255 sensors as long as they have different addresses. (or if you do some tricky hardware stuff for devices with the same address) Unfortunately I only have implementations for my Featherwing.
-
@Sebex said in Particle Powered Air Quality Sensor Logging to Google Docs:
Perhaps I don't necessarily need to use the same pins
Both the sensors you quote are using I2C. So they both use the same 2 pins (SDA, SCL) to communicate. You can put many I2C sensors on those same pins, they each have an address to know which sensor is receiving/sending data to the master (here, your arduino).
Look for a tutorial on I2C first.@Nca78 said in Particle Powered Air Quality Sensor Logging to Google Docs:
@Sebex said in Particle Powered Air Quality Sensor Logging to Google Docs:
Perhaps I don't necessarily need to use the same pins
Both the sensors you quote are using I2C. So they both use the same 2 pins (SDA, SCL) to communicate. You can put many I2C sensors on those same pins, they each have an address to know which sensor is receiving/sending data to the master (here, your arduino).
Look for a tutorial on I2C first.Thanks I get it now :smile: