Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
J

jaredwolff

@jaredwolff
About
Posts
33
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @NeverDie

    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.

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    Hey @Sebex

    After running my setup for more than 8 months here are a few suggestions:

    1. 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.
    2. 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.

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @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!

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @nca78 I mean, you can run it on a battery. Just need a really big one! 😬

    Because of the internal heater it does make it hard to integrate into a battery powered application.

    I haven’t measured the low power mode on the BME. What were you getting @Nca78

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @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!

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @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:

    0_1560869706305_image.png

    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!

    0_1560869685735_image.png

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

    0_1560869778746_image.png

    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!

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    They know about it. They keep their library up to date on Github:

    Here's the diff:

    https://github.com/BoschSensortec/BSEC-Arduino-library/commit/e9a10fe23739bb95650d2ab89ed37764a4ba3caf

    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.

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @fotofieber I'm not sure they know.. haha I should tell them.

    Good luck and let me know how it goes!

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @fotofieber the library does have an error I found earlier. Divide _data.temperature by 100.0f and _data.humidity by 1000.0f. This is in BSEC.cpp

    See below:

    /**
     * @brief Read data from the BME680 and process it
     */
    bool Bsec::readProcessData(int64_t currTimeNs, bsec_bme_settings_t bme680Settings)
    {
    	bme680Status = bme680_get_sensor_data(&_data, &_bme680);
    	if (bme680Status != BME680_OK) {
    		return false;
    	}
    
    	bsec_input_t inputs[BSEC_MAX_PHYSICAL_SENSOR]; // Temp, Pres, Hum & Gas
    	uint8_t nInputs = 0, nOutputs = 0;
    
    	if (_data.status & BME680_NEW_DATA_MSK) {
    		if (bme680Settings.process_data & BSEC_PROCESS_TEMPERATURE) {
    			inputs[nInputs].sensor_id = BSEC_INPUT_TEMPERATURE;
    			inputs[nInputs].signal = _data.temperature/100.0f; // Need to divide by 100 for fp
    			inputs[nInputs].time_stamp = currTimeNs;
    			nInputs++;
    			/* Temperature offset from the real temperature due to external heat sources */
    			inputs[nInputs].sensor_id = BSEC_INPUT_HEATSOURCE;
    			inputs[nInputs].signal = _tempOffset;
    			inputs[nInputs].time_stamp = currTimeNs;
    			nInputs++;
    		}
    		if (bme680Settings.process_data & BSEC_PROCESS_HUMIDITY) {
    			inputs[nInputs].sensor_id = BSEC_INPUT_HUMIDITY;
    			inputs[nInputs].signal = _data.humidity/1000.0f; // Need to divide by 1000 for fp;
    			inputs[nInputs].time_stamp = currTimeNs;
    			nInputs++;
    		}
    		if (bme680Settings.process_data & BSEC_PROCESS_PRESSURE) {
    			inputs[nInputs].sensor_id = BSEC_INPUT_PRESSURE;
    			inputs[nInputs].signal = _data.pressure;
    			inputs[nInputs].time_stamp = currTimeNs;
    			nInputs++;
    		}
    		if (bme680Settings.process_data & BSEC_PROCESS_GAS) {
    			inputs[nInputs].sensor_id = BSEC_INPUT_GASRESISTOR;
    			inputs[nInputs].signal = _data.gas_resistance;
    			inputs[nInputs].time_stamp = currTimeNs;
    			nInputs++;
    		}
    	}
    
    
    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @fotofieber said in Particle Powered Air Quality Sensor Logging to Google Docs:

    Linking is no problem (after trial and error of two hours ).

    Yea it took me a bit to figure that out too. :grimacing:

    Have you fired up the standard I2C library to see if you can talk to the BME680? Or maybe throw a logic analyzer on it to maker sure it's communicating? I'd imaging the compiler would barf if you used the wrong static library. Bosch does have an ESP32 specific one.

    Unfortunately, I don't have any way of testing that here. Keep me posted, I'm curious as to why it's not working.

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @fotofieber integrating their static library is a PITA.

    What processor are you using exactly? That wold dictate which version of the BSEC you'd integrate.

    For Arduino, the library should handle the import of the .a file. If you're in any other environment you'll have to add a few lines:

    LIB_DEPS += $(USER_LIB_DIR)/libalgobsec.a
    LDFLAGS += -Wl,--whole-archive $(USER_LIB_DIR)/libalgobsec.a -Wl,--no-whole-archive
    

    I had to add these to the makefile in .particle/toolchains/deviceOS/1.2.0-beta.1/firmware-1.2.0-beta.1/modules/xenon/user-part for the Particle stuff to work.

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @fotofieber correct! No C02. There's also temp, humidity and pressure. Here's a little code to get up and running with their C++ library.

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @fotofieber I'm using I2C over here with great success. Let me know how it goes!

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @fotofieber hmm I'm not sure. Can you send me more info about the board you got?

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @fotofieber said in Particle Powered Air Quality Sensor Logging to Google Docs:

    I have tested several temperature sensors in the same setup and will use seperate HTU21D in my production devices anyway. So temperature and humidity would be no problem for me.

    After someone on a different forum suggested, I actually switched it from continuous to low power mode and the temperature and humidity readings look better.

    0_1557233131908_Screen Shot 2019-05-07 at 8.45.03 AM.png

    (Red line is in the middle between before and after the change.)

    @fotofieber said in Particle Powered Air Quality Sensor Logging to Google Docs:

    Yesterday another CCS811 arrived. I will add it to my setup.

    Nice, curious to see your results!

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @fotofieber said in Particle Powered Air Quality Sensor Logging to Google Docs:

    Your SGP30 CO2 ppm graph looks like mine...

    Also, Is your SGP30 plot the dark red one? Definitely not what I'd expect from this sensor. At first I thought it was the CCS811 as that one appears to be less reactive (at least in my testing)

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @fotofieber also, I compiled my conclusions about some of the smaller form factor TVOC/C02 sensors. It was inspired by everything we talked about here. Our back and forth conversation has been awesome. So I wanted to say thanks for the inspiration :)

    0_1557153919177_Screen Shot 2019-05-06 at 10.44.47 AM.png

    The above is a screenshot from the side-by-side data of the BME680, CCS811 and SGP30.

    The BME680 seemed impressive at first but I'm seeing a big difference in temperature and humidity. My thinking it's likely due to the heating elements inside keeping it a little less humid and a little more hot. (These are the compensated values by the way. The non-compensated values are even lower humidity and a hotter.)

    The SGP30 is a bit of a power hog but the TVOC readings seemed to align well with the response from the BME680.

    The CCS811, like we've seen throughout this thread, had some wacky responses using the 1.0.0 firmware. I haven't seen that since all of my CCS811 are up to date.

    It's a toss up between all three but I'd shy away from the CCS811. If anyone here plans on building a production device, the stock is not reliable enough. (Digikey and Mouser have been out of stock lately) I'm not sure if you'd have the same problem in the EU or how things are in Asia.

    Anyway my TLDR conclusions are here if anyone is interested. They include software implementation factors, hardware factors, availability factors and data output factors all rolled into one.

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @fotofieber said in Particle Powered Air Quality Sensor Logging to Google Docs:

    SGP30 Will try with the adafruit library instead of the sparktech.

    I have that one in the same branch I mentioned before if you need a working reference.

    I followed your lead on the Grafana + InfluxDB stuff. It was dead simple to setup.

    0_1557075343811_Screen Shot 2019-05-05 at 12.55.39 PM.png

    I just want to get HTTPS/SSL working. Pretty nifty little piece of software. :)

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @fotofieber that's great news! Pretty much what I've seen. I've stopped eC02 all together because it correlates 1:1 with TVOC on that part. Plus I don't know how actionable the C02 reading is. Does it indicate stale air? C02 is a byproduct of the VOCs? Maybe it's more useful for more industrial environments..

    Are you logging anything other than C02?

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811

  • Particle Powered Air Quality Sensor Logging to Google Docs
    J jaredwolff

    @FotoFieber if you check out my tvoc_test branch, I implemented the CCS811 update routine. I'm interested to see how it compares to the SPG30 and BME680..

    My Project si7021 air quality pm2.5 particle hpma115s0 ccs811
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular