Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    Nicla Sense ME temperature and humidity inaccurate

    Nicla Sense ME temperature and humidity inaccurate

    olboss
    Member

    I have three Nicla Sense ME boards, and on all of them the temperature is about 7.5 degrees too high, and the Humidity is about 22% too low. There is little difference between the native temperature reading and the compensated BSEC output. Adjusting the multiplier in the library to the corrected value also has little effect.

    I've tried running in standalone mode, and as a shield on an Arduino MKR1010. Same result. 

    Attached is a plot from 24h, demonstrating a comparison against a BME280.

    The code running on the Nicla Sense is below.

    Does anyone have any suggestions? And has anyone tested the gas sensor accuracy against a benchmark? I have my doubts, given the strange temperature and humidity readings.

    /*
    *Script to set the NICLA to respond to a wire command and return bsec data
    */
    #include "Nicla_System.h"
    #include "Arduino_BHY2.h"
    #include <Wire.h>

    Sensor temp(SENSOR_ID_TEMP); //!!the library has a multiplier: https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/Use-BSEC-with-BHI260AP-on-Arduino-Nicla-...
    Sensor humi(SENSOR_ID_HUM );
    Sensor baro(SENSOR_ID_BARO);
    Sensor gas(SENSOR_ID_GAS);

    SensorBSEC bsec(SENSOR_ID_BSEC_LEGACY); //it's critical to follow this tip https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BME688-Nicla-Sense-me-how-to-access-the-...

    #define BAUD_RATE_SERIAL_DATA (115200) //To transfer bsec data https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/Nicla-Sense-ME-I2C-Disconnecting-Bug/m-p...

    int sampleInt = 5000;
    unsigned long lastMillis = 0;

    void setup()
    {
    //Serial.begin(115200);
    Serial.begin(BAUD_RATE_SERIAL_DATA);

    BHY2.begin();

    temp.begin();
    humi.begin();
    baro.begin();
    gas.begin();
    bsec.begin();

    nicla::begin();
    nicla::leds.begin();

    Wire.begin(8); // join i2c bus with address #8
    Wire.onRequest(requestEvent); // register event
    }

    void loop()
    {
    int blueOn = 0;
    //static auto lastMillis = millis();

    // Update function should be continuously polled
    BHY2.update(100);

    if ((unsigned long)(millis() - lastMillis) > sampleInt) {
    lastMillis = millis();

    uint32_t eCO2 = bsec.co2_eq();
    if (eCO2 < 800) nicla::leds.setColor(green);
    if (eCO2 >= 800 && eCO2 < 1200) nicla::leds.setColor(yellow); // it's near green, could be optimized
    if (eCO2 >= 1200) nicla::leds.setColor(red);
    blueOn = 0;
    }

    if (millis() - lastMillis > 4000 & blueOn == 0) {
    //blue means its waiting for a new query
    nicla::leds.setColor(blue);
    blueOn == 1;
    }

    }

    void requestEvent() {
    nicla::leds.setColor(magenta);
    String output = bsec.toString();
    char huh[131];
    output.toCharArray(huh, 131);
    Serial.print("Wire sending: ");
    Serial.println(huh);
    Wire.write(huh, 131); // respond with message of 131 bytes
    // as expected by master
    }

     

     
    28 REPLIES 28

    Not a problem,

    This is the result of: 

    ioreg -p IOUSB -l -b | grep -E "@|PortNum|USB Serial Number"

    Nicla Sense CMSIS-DAP@14100000  <class AppleUSBDevice, id 0x100002545, registered, matched, active, busy 0 (1055 ms), retain 18>

              "PortNum" = 1

              "USB Serial Number" = "CC57804E"

    Ciprian
    Established Member

    This is fantastic news, it would be really good to have a timeline for this, as the device was bought for accurate readings and currently it has issues. 

    I will be following this thread to check for updates, specifically in the following 2 weeks.

    Hi,

    I wonder whether you have an update on this issue?

    Currently, the Nicla Sense ME is essentially useless, I can guess the temperature more accurately than it can. If no update is available soon, I'd be happy for a refund or recall.

    Ciprian
    Established Member

    Hey Olboss, I don't know if you need it anymore, but I have done some testing and comparison against other sensor + linear regression to get the best values.

    The graphs look like the following, I have only been able to get 8 data points, with more, the error could be less.

    Use the function for correct temperature within 0.5Celsius error: correct_temp = 1.0095 * nicla_temp - 4.8051

    Use the function for 1% error between 0-30% humidity range, and 2% error (approximated) with 30%> humidity: correct_hum = 1.4383 * nicla_hum -2.5628

    Use the following formula for correct barometric readings: correct_pressure = 0.718/100 * nicla_pressure + nicla_pressure

    These are all perfomed by myself and will not offer 100% accuracy as specified, but the error should be less 0.5% for temp and pressure, with 1-2% for the humidity depending on the range.

    temperature regressiontemperature regressionhumidity regressionhumidity regression

    Thanks Ciprian.

    I think there's a massive question as to where the error is coming from, whether it's self-heating, or a software issure, or chip-dependent... and then whether the BSEC air quality values can be trusted. My guess is that they are derived (in part) from temperature and humidity, and are therefore equally inaccurate.

    From my perspective, the sensor is currently useless.

    It looks like Arduino provide the warranty. Next week I'll move the discussion over there, and request a refund.

     

     

     

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist