GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing learn.sparkfun.com — Temperature Sensor Comparison - SparkFun Learn
≡ Pages
Contributors:
Share
Use this URL to share:
IntroductionIt all started when I wanted to measure the temperature of a room at SparkFun. But what is the best? Well, it depends on what you are looking for in your project. There are a lot of temperatures available. This article will compare a few of the more popular ones we carry. Required MaterialsTo follow along with this comparison guide, you will need the following parts at a minimum to connect to the sensors. You may not need everything though depending on what you have. Add it to your cart, read through the guide, and adjust the cart as necessary. Straight Header - Male (PTH, 0.1in., 40-Pin)PRT-00116A row of headers - break to fit. 40 pins that can be cut to any size. Used with custom PCBs or general custom headers.
$1.95
SparkFun RedBoard QwiicDEV-15123The SparkFun RedBoard Qwiic is an Arduino-compatible development board with a built in Qwiic connector, eliminating the need …
$21.95
USB Micro-B Cable - 6 FootCAB-10215USB 2.0 type A to Micro-B 5-pin. This is a new, smaller connector for USB devices. Micro-B connectors are about half the heig…
$6.50
Breadboard - Mini Modular (Blue)PRT-12045This blue Mini Breadboard is a great way to prototype your small projects! With 170 tie points there's just enough room to bu…
$4.60
Qwiic Cable - Breadboard Jumper (4-pin)PRT-14425This is a jumper adapter cable that comes pre-terminated with a female Qwiic JST connector on one end and a breadboard hookup… Qwiic Cable - 50mmPRT-14426This is a 50mm long 4-conductor cable with 1mm JST termination. It’s designed to connect Qwiic enabled components together … ToolsDepending on your project, you may need a soldering iron, solder, and general soldering accessories. Soldering Iron - 60W (Adjustable Temperature)TOL-14456This adjustable-temperature soldering iron is a great tool for when you don't want to break the bank but need a reliable iron…
$25.95
Solder Lead Free - 15-gram TubeTOL-09163This is your basic tube of unleaded (Pb-free) solder with a no clean, water soluble resin core. 0.031" gauge and 15 grams
$4.95
Suggested ReadingIf you aren’t familiar with the following concepts below or linked throughout the comparison guide, we recommend checking out these tutorials before continuing if you decide to recreate these tests. How to Solder: Through-Hole Soldering
This tutorial covers everything you need to know about through-hole soldering.
Analog to Digital Conversion
The world is analog. Use analog to digital conversion to help digital devices interpret the world.
Analog vs. Digital
This tutorial covers the concept of analog and digital signals, as they relate to electronics.
Analog vs Digital SensorBefore we compare temperature sensors, it would be good to know differences between an analog and digital sensor. Analog SensorAn analog sensor takes a reading and outputs a smooth, continuous signal. Example of a smooth, continuous analog signal.
These are usually low cost and easy to use, which is great for beginners. However, they do require an analog-to-digital converter (ADC) to read the output. Microcontrollers (like an Arduino Uno/RedBoard Qwiic) have this built in (I've yet to come across one without an analog input). Single board computers (like the Raspberry Pi) on the other hand, do not have a hardware ADC and requires a dedicated chip to read the sensor. Depending on the sensor, you may need to build an additional circuit to read or filter the signal. Sensor readings are more susceptible to noise from power supplies and other components in the circuit. The wire length may also affect the readings over long distances. Digital SensorA digital sensor outputs a signal with discrete steps. Example of a discrete digital signal.
These can cost more. However, they are easier to include in a design since they require a serial protocol to the output. Microcontrollers and single board computers should have the basic serial protocols (I2C, UART, SPI) built in. You'll just need to make sure there is a library for the architecture and your preferred programming language. Digital sensors may include additional features. No additional circuitry needs to be built if the chip is on a breakout board. These sensors are not as likely to be affected by the power supply and other components in the circuit. While serial protocols have limitations in the overall length, the sensor readings are not affect by the wire length like an analog sensor.
Note: For more information, check out our Analog vs. Digital and Analog to Digital Conversion tutorials. Analog vs. DigitalJuly 18, 2013
This tutorial covers the concept of analog and digital signals, as they relate to electronics.
Analog to Digital ConversionFebruary 7, 2013
The world is analog. Use analog to digital conversion to help digital devices interpret the world.
Round 1: TMP117 vs TMP102 vs TMP36For simplicity, let's compare three temperature sensors from the SparkFun catalog in this round! We'll be measuring the ambient temperature of the air using these sensors.
Temperature Sensor - TMP36SEN-10988This is the same temperature sensor that is included in our [SparkFun Inventor's Kit](http://www.sparkfun.com/products/12060)… SparkFun Digital Temperature Sensor Breakout - TMP102SEN-13314The TMP102 is an easy-to-use digital temperature sensor from Texas Instruments. The TMP102 breakout allows you to easily inco…
$5.95
SparkFun High Precision Temperature Sensor - TMP117 (Qwiic)SEN-15805The SparkFun Qwiic TMP117 Breakout is a high precision temperature sensor equipped with an I2C interface.
$16.95
TMP36We'll connect the TMP36 using the circuit from the SIK.
Below is the modified example code from the SIK to output to the serial monitor. Grab the code and upload to your Arduino if you are trying to follow along!
Let's observe the output that was taken at that moment to measure the ambient temperature of the room. The temperature reading seems to jump around between 75.5°F and 76.5°F. Other times, the output would spike. (This was probably due to the TMP36 being built on a breadboard or noise from the power supply). Adding a decoupling capacitor between Vcc and GND helped smooth the signal but I would still get small spikes in the readings. Click image for a closer view.
TMP102 vs TMP36Can we get a more precise reading? Why yes we can! Let's try using a digital temperature sensor to compare. I soldered headers to the TMP102 and included it on the breadboard based off the TMP102 hookup guide. Using the Qwiic cable to breadboard adapter made it quick to connect the sensor to the RedBoard.
The code was adjusted to output both the TMP36 and TMP102 in the serial monitor for comparison. Additionally, address of the TMP102 was adjusted to 0x49 to compare with the TMP117. Grab the code and upload it to your Arduino if you are trying to follow along!
After taking a set of datapoints at a different moment to measure the ambient temperature of the room, the TMP102 performed better. The temperature readings remained stable and was not as noisy. It is a bit difficult to see in the graph but by opening the serial monitor, the temperature readings only jump around 76.52°F and 76.64°F. Click image for a closer view.
TMP117 vs TMP102 vs TMP36Not bad but can we get an even better temperature reading? Why yes we can! Connecting the TMP117 was easier since all that was needed for the circuit was to add a Qwiic cable between the RedBoard Qwiic and the TMP117.
The code was adjusted once again to compare the TMP117 against the other sensors. Grab the code and upload it to your Arduino if you are trying to follow along!
After taking another set of datapoints at a different time, the TMP117 performed better than the TMP102 and TMP36. The datapoints were more smooth and less prone to noise. Looking closer at the values via the serial monitor, the temperature readings would jump between 75.99°F and 76.02°F with the TMP117. In one instance, the TMP36's output started spiking just was we saw in the initial tests using a TMP36.
Good, Better, Best? Which is the Best?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 in my eyes for this round. It is able to measure the temperature of a room without a lot of jitter and it was easy to connect with the Qwiic system. The sensors performed as expected when looking at the datasheet. The board did not require any soldering. There was no additional circuitry that needed to build 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 the analog temperature sensor. The TMP102 could work as well if I was not looking for such precise temperature reading of the room. While it is not as expensive as the TMP117, it does require some soldering for this version of the TMP102 board [ 1 ]. The TMP36 is good but it would require a bit more effort to filter out the errors.
[ 1 ] Note: At the time of writing, we had not released the Qwiic version of the TMP102. Check ont the "qwiic-er" way to connect with the Qwiic TMP102!
Other ConsiderationsFor simplicity, three sensors were used as a comparison out of the box to measure the ambient temperature of the air. This did not take into account other factors such as:
Improving TMP36 ReadingsThere are also techniques to improve on the TMP36 temperature readings that were:
Resources and Going FurtherLooking for more temperature related fun? Check out these other related tutorials from SparkFun. MAX31855K Thermocouple Breakout Hookup Guide
Learn how to take readings with a k-type thermocouple using the MAX31855K cold-junction-compensated k-type thermocouple-to-digital converter.
HIH-4030 Humidity Sensor Hookup Guide
Measure relative humidity with SparkFun's HIH-4030 Humidity Sensor Breakout.
RHT03 (DHT22) Humidity and Temperature Sensor Hookup Guide
Measure relative humidity and temperature or your environment with the RHT03 (a.k.a DHT22) low cost sensor on a single wire digital interface connected to an Arduino!
Qwiic Atmospheric Sensor (BME280) Hookup Guide
Measure temperature, humidity, barometric pressure with the SparkFun Atmospheric Sensor Breakout BME280 (Qwiic).
Share
Use this URL to share:
Sections
Introduction
Analog vs Digital Sensor
Round 1: TMP117 vs TMP102 vs TMP36
Resources and Going Further
| ||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | ||||||||||||||||