Weirdly differing temperature readings

Posted on
  • Hey guys, I need some advice.

    I've purchased two Puck-s (to start with), and I'm running exactly the same code on both, which reports temperature via BLE advertising (example from docs).

    I'm seeing wildly different readings between both -- look at the screenshot below.
    One would report 19, while the other: 27 degrees.

    Is it something I should consider normal?

    2 Attachments

    • Screen Shot 2017-06-29 at 6.00.12 PM.png
    • IMG_0882.JPG
  • You'd expect them to differ by a few degrees - the nRF52 datasheet says at around the 25 degrees C mark it should vary by a maximum of 2.5 degrees C in either direction. However what you're seeing there does look particularly extreme - and it's odd that one of them changes temperature over time while the other doesn't move at all... That looks a bit fishy to me.

    It seems most IC manufacturers factory trim the actual sensitivity of the sensor, but not the temperature offset which they leave up to the user... So if you calibrated just the offset yourself, they'd end up being reasonably accurate, but out of the box they're not amazing.

    I've actually just added a Puck.magTemp() function (which will be in the cutting edge 'travis' builds, or firmware 1v93 when it's released). That allows you to check the temperature according to the magnetometer - but if I'm honest that looks even more inaccurate than the microcontroller!

  • I'm testing something now... I've put the over-high puck into freezer for a minute (went down to ~15 deg). I've then put them together on a table and let them "settle".

    The second puck has also been triggering button presses when I picked it up, or when gently tapping it (without the click, just vibrations).

    I've since reset it again, uploaded my code again and let it settle with temp. I now have around 3 deg difference between them, which is not bad. I'm calibrating them now with a primitive thermometer.

    I'll try to get a more accurate one and calibrate them both again, and see if I get this weird behaviour again.

    I'll report back. Thanks!

  • Hi @Gordon,

    E.getTemperature() returns >= 0 values for positive temperatures including zero, but for -1 Celsius returns 255, for -2 Celsius returns 254, etc. Is this the expected behavior ?

    Thank you.

  • No, it's not! And just to be sure this is Puck.js with a reasonably up to date firmware? It should be pretty easy to get it sorted

  • I just tested this with the latest builds of Espruino for Puck.js and it's totally fine, producing negative values.

    Perhaps the problem is you're sending the data as one byte in an advertising packet, and then you're not decoding negative values properly at the receiving end?

  • Hi @Gordon,

    You are right. The mistake is on my end.

    Thank you.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Weirdly differing temperature readings

Posted by Avatar for Thinkscape @Thinkscape