top of page
Search
  • Writer's pictureIfrim Ciprian

Nicla Sense ME/Nano 33 BLE Sense - Temperature, Humidity, Pressure Calibration

Updated: Apr 7, 2022

As stated many times in different blogs, and especially here: https://ciprianaa30.wixsite.com/aurismartwatch/post/bm280-vs-nicla-sense-me

Nicla has an issue where the values outputted are incorrect, and there is a small variance between the percentage error depending on the values themselves.


If I take the output graph from before, with the 4 entries that I got (average of 5 outputs), it looks like this:

If we then take the 4 values of both BM280(green) and Nicla Sense ME(orange) columns and order them, then fit a line on the data we get the following Scatter Graph:

This looks like a linear relation, therefore, I can use the Linear Regression (from Statistical Regression analysis) and find the slope of the line. In this case it looks like the following:

As can be seen at the end, the Equation to best fit the points and achieve sensor calibration is the following: Y = 0.699*X + 4.21.


This equation, after applying it to the Temperature reading in arduino, does provide me with an accurate output. The code is:

float regressed_temp = round_to_half_integer(0.6990 * final_temp + 4.210);

I will be reading more data from other scenarios, and will be finding a line that provides even higher accuracy. Furthermore, I will be performing the same analysis on Humidity and Pressure data, as well as the Temperature, Humidity, Pressure data from the Arduino Nano 33 Ble Sense, which I am using for voice recognition, and I am planning on using for sensor fusion for even more accurate data.


---------------------------------------------------------------------------------------------------------------------------

Edit: 17/03/2022

After reading from 8 new locations with both the Nicla Sense and Nano Sense, and comparing it against the commerical Air Monitor device, Weather Station in my location and BMP280 from Bosch.

1) Bedroom


2) Front yard


3) Cofort room

And also Hallway, 2nd floor, Kitchen and Garden.


I get the following readings:

If I then compute the Mean Absolute Deviation Error, it looks as follows:


Therefore, we can fix this deviation error within 1-2% of accuracy, by performing Linear Regression.

In statistics, linear regression is a linear approach for modelling the relationship between a scalar response and one or more explanatory variables.


I have made a new Repo on GitHub, and used Scipy to compute the Linear Regression best fit equation, and Seaborn to plot the graph: https://github.com/CiprianFlorin-Ifrim/Linear_Regression_Plotting


For the Nicla Sense Temperature, it looks as follows:


For the Nicla Sense Humidity, it looks as follows:


For the Nano 33 BLE Sense Temperature, it looks as follows:


For the Nano 33 Ble Sense Humidity, it looks as follows:

We can see that there is not that high of a relation between the Nano 33 Ble Sense Humidity values and the correct ones, because of this, the error highly varies between 0 to 10%.


After checking the outputs with the new best fit equation, I get the following error ranges:

  • Nicla - Temperature - 0 or 0.5 Celsius error

  • Nicla - Humidity - +/-1% error until 30% Humidity, 1-2% from 30% Humidity to the maximum

  • Nano - Temperature - 0.5 to 1 Celcius error

  • Nano - Humidity - +/- 0-10% error from 0-100% Humidity range depending on the scenario.

In order to make sure the BSEC Air Quality values are accurate as well, "SensorTypes.h" needs to be modified:


These values would then be modified with a % added in the Arduino code in order for our Linear Regression to be accurate, as the scalling is general.

8 views0 comments

Recent Posts

See All
bottom of page