02-23-2022 11:01 PM
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
}
Solved! Go to Solution.
03-18-2022 02:02 PM
Hello,
i have the same problem with the Nicla Sense ME.
Temperature, Pressure and Humidity seem to be wrong.
I also have some other sensors here to compare the results.
BMP280
T: 20.5 °C
p: 1043 hPa
BME280
T: 19.1 °C
p: 1042 hPa
h: 43 %
Nicla Sense
T: 25.4 °C
p: 1038 hPa
h: 29 %
Nicla Sense (with corrections)
T: 20.8 °C
p: 1045 hPa
h: 39 %
The correction formulas seem to work for my board too.
I hope there will be a solution in the near future.
03-18-2022 02:09 PM - edited 03-18-2022 02:22 PM
Yes Olboss, for the IAQ you'd have to go into the library and change the sensor scaling, however it won't be as accurate as you cannot have a linear scaling function like with the formulas that I presented, only a number like 0.8 or 0.1 etc.
Here are my 8 readings against other sensors, please keep in mind that the Smart Air Monitor is a $120 device with reviews claiming within 99% accuracy.
Also mind the fact that the IAQ is calculated differently on the Air Monitor by using the Particulate Matter and Carbon Monoxide, with different weights. The Nicla calculates it with temp, hum, voc, estimated co2(not actual).
Furthermore, the Air Montior rounds up temperature within the next .5, and the both the humidity and VOC are rounded to the next integer.
Every single row in the table below has had its data measured after 3 minutes of letting the sensor calibrate to the environment + averaging the last 4 outputs. The Air Monitor was left for 20 minutes to calibrate.
04-04-2022 11:57 PM
Just over two weeks ago I contacted Arduino regarding a refund under warranty. They said they will discuss the issue with Bosch.
It seems there is some issue as to who 'owns' the problem.
04-07-2022 12:54 AM
Very interesting statement.
04-27-2022 04:21 AM
We are preparing software to compensate temperaure and humidity value. It will be officially released, it is in the process.