Hi All,
I purchased the Qwiik digital temperature sensor (SEN-18521), and have recently hooked it up to a raspberry pi 4 using the tutorial. The code runs and it outputs a temperature. I’m using this sparkfun tutorial <LINK_TEXT text="https://learn.sparkfun.com/tutorials/py … re-sensor
">https://learn.sparkfun.com/tutorials/python-programming-tutorial-getting-started-with-the-raspberry-pi/experiment-4-i2c-temperature-sensor
</LINK_TEXT>
My issue is that the temperature is clearly wrong. It consistently outputs a temperature that is low by ~10 degrees C. (testing in a well controlled indoor environment). The temperature does change if I heat or cool the sensor.
Reading the tmp102.pdf (linked in the item description, and I’ve attached to this post) shows that there is a specific read-only configuration register that should be set to 0b01100000. On my device it is set to 0b01000000, but because it is a read only value I cannot change it. I’m thinking this may be the issue for two reasons.
-
the documentation says “The converter resolution bits, R1 and R0, are read-only bits. The TMP102 converter resolution is set at device start-up to 11 which sets the temperature register to a 12 bit-resolution.”
-
in the example, there is a screenshot in the tutorial I linked that shows a the first byte of the config register being set to 96 (which would be 0b01100000, and matches the documentation)
Has anyone else seen this issue? I’m hoping that either I made a mistake that someone can point me to the solution, or that someone knows how I calibrate this sensor with R1 being set to 1 and R0 being set to 0.
Thanks!
tmp102.pdf (639 KB)