SparkFun will be closed on Monday, May 30th, for Memorial Day. We will resume normal business hours at 9am (MT) on Tuesday, May 31st. Orders placed after 2pm (MT) on Friday May 27th will process and ship out on Tuesday, May 31st. From all of us at SparkFun, we wish you a safe and happy Memorial Day weekend!
Comparing analog and digital temperature sensors TMP36, TMP102 and TMP117. Which is better?
It all started when I wanted to measure the ambient temperature of a room at SparkFun. But what is the best option? Well, it depends on what you are looking for in your project. Let's compare three temperature sensors from the SparkFun catalog!
My initial choice was to grab the TMP36 from my parts kit. It only required three connections and an analog pin. However, after viewing the output, I noticed a majority of the time that the temperature would jump 1°F to 2°F. At other times, the value would spike. Unsatisfied, I placed the project off to the side as this would require a bit more planning to average the values and add additional parts in order to throw out the errors.
The project sat there on my desk for a bit until I noticed the TMP117 high precision digital temperature sensor in the catalog. I thought it would be a good opportunity to revive the project and see if I could obtain more stable readings using a different temperature sensor. I decided to compare the TMP36 against the TMP102 and TMP117. I wrote some code  to output the readings to the Arduino Serial Plotter.
Looking at the TMP102, it performed better than the TMP36 when measuring the ambient temperature of the room. The temperature readings remained stable and it was not as noisy. The temperature readings for the TMP117 performed better than the TMP102 and TMP36. The data points were more smooth and less prone to noise.
So, you might ask, which of the three temperature sensors is the best? Well, that really depends on how you plan to use it. In my opinion, the Qwiic TMP117 is a winner. The sensors performed as expected when looking at the datasheet. The board did not require any soldering. There was no additional circuitry or code needed to average the temperature sensor readings. The power supply did not cause as much of a fluctuation with the digital temperature sensors like it did with the analog temperature sensor.
The TMP102 could work as well if I was not looking for such a precise temperature reading. While it is not as expensive as the TMP117, it does require some soldering for this version of the TMP102 board. The TMP36 is good but it would require a bit more effort to filter out the errors.
What is your favorite temperature sensor to work with in your projects? Until next time - I'm off to build my digital indoor thermometer!