What's causing incorrect temp measurements?

Hi,

I got the kickstarter Ruuvi tag with only temperature sensor from a friend.
Flashed the latest firmware 1.2.12 with nRF Connect.
I’m using Ruuvi Station to read values in raw mode.
Example measurements below.

Real temperature vs. what Ruuvi shows
80 vs. 40 (sauna while heating, Ruuvi tag case open -> no delay in measurement)
-21 vs -32 (freezer, case closed)
20 vs 14 (room, case closed, over night)

Any tips what could be wrong / why I get so weird temperatures

Thanks!

Hello,

If I understood correctly, you have RuuviTag basic which relies on nRF52 internal temperature sensor. The internal temperature sensor has accuracy specification of ±5 degrees, but your results do sound to be a lot off.

Sauna could be explained by positioning: It’s possible to measure 40 and 100 degrees in the same sauna at the same time.

Freezer and especially room temperature sound a bit strange. How fresh battery do you have on tag? I’m wondering if the battery is dying and that would cause poor performance. Otherwise I’ll check the long-term stability of internal temperature sensor

Hi,

Sauna, true. Wall meter is about 0,5m higher than where Ruuvi was.

Changed the battery, the previous one was old (original?)

New test results:

‘Real’ temperature vs. what Ruuvi shows
-20 vs -31 (freezer, case closed)
20 vs 16 (room, case closed)
3,2 vs -3,25 (outside temp)

Quickly plotted below with linear fit (R^2=0.9999!?).
Could there be something wrong with the calibration?

ruuvi_plot

Hello,

Thanks for the plot. I’ll check the calibration curve with nRF52 internal temperature sensor

Ok, just to double-check that I haven’t made a logic error, here’s the code for converting raw value as reported by the nRF52 into units of 0.01 C as given by BME280.

// If only temperature sensor is present.
  else
  {
    int32_t temp;                          // variable to hold temp reading
    (void)sd_temp_get(&temp);   // get new temperature
    temp *= 25;                            // SD returns temp * 4. Ruuvi format expects temp * 100. 4*25 = 100.
    raw_t = (int32_t) temp;
  }

In other words, BME280 returns raw value at the units of 0.01 C, ie. 100 => 1.00 C and -100 => -1.00 C.
nRF52 returns temperature in units of 0.25 C, ie. 4 => 1.00 C and -4 => -1.00 C. We multiply the nRF52 value by 25 to give it the same scale as BME280 results: (4*25) = 100 => 1.00 C, (-4*25) = -100 => -1.00 C.

I measured one Kickstarter-era tag with 1.2.12 against 3 “various” RuuviTags with BME280 running 1.2.12 in freezer, fridge and office:

Environment    BME280     nRF52    Difference
Freezer        -19.14 C   -22.75 C -3.61 C
Fridge           6,81 C     4.25 C -2.56 C
Office          22.32 C    20.25 C -2.07 C

It seems to me that there is some gain error in my sensor too, but nowhere near as dramatic as in yours and my piece is within the specified ± 4 C.

I’d think that this issue is in your sensor internal calibration, and not a larger problem in all RuuviTags.
Kickstarter-era tags are past of our one year warranty, but I can compile a firmware with a constant correction factor just for you if you calculate the desired correction :slight_smile:

1 Like

Regarding internat nRF temperature sensor:

sd_temp_get()

returns chip i.e. Die temperature which (as Otso mentioned) is documented to be only ±5°C accurate !
Testing/verification should be against some other device, for example a thermometer.

Battery state is either “good enough” to run the devices or “dead” (and should not have any effect of temperature measurement.
Please see https://github.com/ruuvi/ruuvitag_fw/wiki/FAQ:-battery

Thanks @dgerman for the battery tip, I also thought if the battery health would be on/off or would it be possible that sensing precision would suffer.

@otso a custom firmware would of course be great. I’ll collect some more reference point and will let you know the working correlation equation…

1 Like