# Temperature sensors — piecewise linear function

A0..A5 (slope), B0..B5 (y intercept) and T0..T4 (end of range) are the coefficients documented in chapter 6.26.

I've wondered how to interpret them exactly. Assuming that the function should be near-continuosly and guessing a bit around, I came to the equation

corrected = measured_°C * 1024 / Ax + Bx / 32 ; Tx values also to be interpreted as °C.

From the beginning I've expected the Bx to be falling, if the Ax rise. But both, A and B, rise. Is there somewhere the exact documentation on that?

Kind regards, Jochen

• PS: the decimal values of Ax, Bx and Tx as taken from the documentation:

# a0= 806 [0x00000326] b0=-17 [0xffffffef] t0=-30 [0xffffffe2]
# a1= 840 [0x00000348] b1=-66 [0xffffffbe] t1=  0 [0x00000000]
# a2= 938 [0x000003aa] b2=-66 [0xffffffbe] t2= 25 [0x00000019]
# a3=1038 [0x0000040e] b3= 18 [0x00000012] t3= 60 [0x0000003c]
# a4=1213 [0x000004bd] b4=292 [0x00000124] t4= 80 [0x00000050]

• Hi

What temperature sensor is this? I think this question is better suited to the temperature sensor manufacturers instead of us, as we don't have intricate knowledge of every type of sensor on the market.

Best regards,

Simon

• The internal temperature sensor of the nRF52833. Perhaps I should have repeated this in my post — it is in the labels on the right side, too.

• Hi

Ok, I don't think you need to use this equation to use the internal temperature sensor, please check out the temperature peripheral example we have that shows how to use the internal temperature sensor. I don't think it's necessary to implement this equation at all.

Best regards,

Simon

Related