Temperature sensors are commonly used in embedded applications to monitor ambient temperature and prevent overheating. As a thermal management of the device, these sensors can issue a warning or trigger a cooling mechanism.
However, the use of these sensors varies, depending on the application. For example, temperature sensors are used in:
- Industrial equipment for process control or detection of potential failures and malfunctions
- Home automation applications to control heat, ventilation, and air conditioning (HVAC) systems
- Battery management systems for optimizing the charging and discharging processes
- Automotive applications to monitor engine performance and the cabin temperature for climate control
- Medical applications for body temperature
- Data centers to optimize the operating conditions of the servers and network equipment
- Environmental monitoring and weather readings
- Robotics to measure the operational conditions of the robot or to simply collect the temperature data
In this article, we’ll review the different types of temperature sensors, including the most popular ones used in electronics and Internet-of-Things (IoT) projects. We’ll focus on digital temperature sensors as they’re the most accurate and convenient to interface with microcontrollers.
Types of temperature sensors
There are several types of temperature sensors. Features differ depending on requirements for accuracy, precision, range, response time, size, and weight.
Most temperature sensors fall into one of the following categories.
- Thermistors
- Resistance temperature detectors
- Thermocouples
- IR temperature sensors
- Digital temperature sensors
1. Thermistors are thermally sensitive resistors. Their resistance changes based on the temperature. A thermistor could have a negative temperature coefficient (NTC) or a positive temperature coefficient (PTC). The resistance of an NTC thermistor decreases with the increase in temperature. The resistance of a PTC thermistor increases with a rise in temperature.
Thermistors are low-cost and small, offering a wide temperature range and fast response time. Physically, thermistors are fragile and must be protected from shock and vibration. They’re also at risk of self-heating.
2. Resistance temperature detectors (RTD) are metal wires that change predictably with temperature. They have a positive temperature coefficient, so their resistance increases as the temperature rises. Most RTDs use platinum as the sensing element because of its high melting point, excellent corrosion resistance, and well-defined linear relationship between temperature and resistance. The platinum wire is wrapped around a ceramic or glass core.
A small, constant current is passed through the RTD, and the voltage drop across it is measured for an accurate temperature reading. Based on the calibrated characteristic curve of the particular RTD element, the temperature is calculated as it is directly proportional to the resistance. RTDs are highly accurate, stable, and durable, measuring a range of temperatures. But they’re costly and have a long response time. The lead wire’s resistance can also affect its accuracy. That is why three or four-wire configurations are often used for compensation.
RTDs are often used in high-end applications where accuracy is critical, such as in the semiconductor, aerospace, medical device, chemical, and power generation industries.
3. Thermocouples operate on the principle of the Seebeck effect, which occurs when an electromotive force (emf) develops across two points of an electrically conducting material whenever there’s a temperature difference between them.
Thermocouples are made by joining two different metals at two points, called hot and cold junctions. The hot junction is placed where the temperature must be measured, and the cold junction is used as a reference temperature. When the hot junction experiences a different temperature than the cold junction, the Seebeck effect kicks in — creating a voltage difference across the joined ends. By measuring this voltage difference, the temperature at the hot junction is determined based on the pre-defined relationship between the voltage and temperature for the specific thermocouple material combination.
Thermocouples offer fast response times and a wide temperature measurement range. However, they require a stable reference temperature at the cold junction, often achieved using electronic circuits or ice baths. Like thermistors, thermocouples are fragile, and their accuracy can suffer from the non-linear relationship between the temperature and voltage drop. Thermocouples often require proper calibration and a linearization circuit.
4. Infrared (IR) temperature sensors measure temperature without physically touching an object. They emit infrared radiation (invisible to the human eye) with an intensity relative to the temperature. By detecting and analyzing this radiation, IR sensors can accurately determine the surface temperature of objects.
Inside the sensor, there’s a special detector, often made from materials like silicon or mercury cadmium telluride, which absorbs the infrared energy and converts it into an electrical signal. The signal is processed within the sensor’s circuitry via amplification, filtering, and calibration. The processed signal is translated to a specific temperature reading.
IR sensors are typically used with a screen that displays the temperature reading.
It’s worth noting that these sensors only measure surface temperatures, which might be affected by nearby objects and ambient temperature. The accuracy of an IR temperature sensor depends on the emissivity of the object’s surface, which varies for different materials.
5. Digital temperature sensors convert temperature into a digital signal that’s interpreted by a microcontroller and a digital circuit. They require no external signal conditioning or analog-to-digital converters (ADCs). Each digital sensor has a temperature-sensitive element — like a thermistor, RTD, or thermocouple — that detects temperature changes.
The signals from the sensing element are amplified, filtered, calibrated, and converted into a digital representation using an internal ADC. The temperature data is output via communication protocols like I2C, SPI, or simple serial buses. Digital temperature sensors offer high accuracy and resolution. They’re easy to interface and can be connected to any GPIO of a microcontroller. But they’re not cheap and often have a predefined or limited range of temperature measurements. The additional circuitry of the sensor also increases its overall power consumption.
Popular sensors
Below are some of the more popular temperature sensors used in electronics and IoT projects.
LM35/LM34/LM335 are analog output temperature sensors from Texas Instruments. All three sensors belong to the same family of precision voltage-to-temperature converters and directly output a voltage proportional to the temperature. However, each sensor differs in its output voltage.
- LM35 outputs 10 mV/° C, so for every degree Celsius increase in temperature, its voltage output increases by 10 mV. This makes it ideal for measuring temperatures in Celsius (°C).
- LM34 outputs 32 mV/°F, so its voltage increases by 32 mV for every degree Fahrenheit increase in temperature. This makes it suitable for measuring temperatures in Fahrenheit (°F).
- LM335 outputs 10 mV/K, making it ideal for measuring Kelvin (K) temperatures.
These sensors have a temperature range between -55° and +150° C, though the LM35 and LM34 offer better accuracy than the LM335. These sensors are used for measuring ambient air or object surface temperatures. They’re not ideal for measuring internal or highly precise temperatures.
DS18B20 is a well-known digital temperature sensor from Maxim Integrated Products that’s accurate and versatile. It uses a silicon temperature sensor element to convert temperature into a digital signal, offering a ±0.5°C accuracy over a temperature range of -55° to +125° C. It operates on a 3.0 or 5.0V power supply, interfacing with a microcontroller through a single data line.
Every DS18B20 sensor has a unique 64-bit serial code. Temperature conversion is initiated by sending a command through the 1-wire bus. The sensor then performs the conversion and stores the data internally. The converted temperature data from the sensor is retrieved through another command on the 1-wire bus.
A microcontroller can communicate with multiple DS18B20 sensors sequentially on the same wire. The sensor can draw power directly from the data line itself in a “parasite power” configuration, but it tends to have a slower response time. The sensor is used in environmental monitoring, process control in industries, medical equipment, wearables, robotics, and drone applications.
TMP36/TMP37 are analog output temperature sensors from Analog Devices. They provide a voltage output linearly proportional to temperature and operate on a power supply of 2.7 to 5.5V DC, requiring no external calibration. However, the two sensors differ in their specifications.
- The TMP36 outputs 10 mV/° C. It has a temperature range of -40° to +125° C and offers an accuracy of ±1° C at +25° C. It provides a wide temperature and tends to be less costly than TMP37.
- The TMP37 outputs 20 mV/° C. It has a temperature range of 5° to +100° C and offers an accuracy of ±0.5° C at +25° C. It’s highly accurate but suitable in lower-temperature applications.
These are low-cost sensors with excellent accuracy. They can be easily interfaced with any microcontroller or ADC — but as analog sensors, they can only be interfaced with the microcontroller’s analog input pins with an external ADC. They’re also sensitive to the power supply noise and typically require proper calibration.
BMP280 is a digital pressure and temperature sensor from Bosch Sensortec. It has an internal temperature sensor that compensates for fluctuations, ensuring accurate pressure measurements. With an internal circuitry, it converts the resistance change (for pressure) and the temperature sensor output into digital values. It’s designed to measure pressure and temperature simultaneously.
BMP280’s temperature sensing element has a range from -40° to +85° C and an accuracy of ±1° C. It interfaces with a microcontroller through an I2C or a SPI. The microcontroller will send a command to the sensor to start a new measurement cycle, reading the sensor’s output registers containing the pressure and temperature values. The temperature value from the raw sensor output can be isolated using appropriate conversion formulas or libraries.
BME280 is an environmental digital sensor from Bosch Sensortec that measures pressure, temperature, and humidity. The sensor communicates with microcontrollers through an I2C or SPI, digitally providing the trio of environmental data points. The temperature measurement range of the sensor lies from -40° to +85° C, with an accuracy of ±1° C throughout the operating range. The temperature-sensing element has a resolution of 0.01° C. This is a low-power and highly accurate environment sensor for all three data points. It’s typically higher in cost and often requires calibration.
ADT7410/ADT7412 are analog output temperature sensors from Analog Devices. They have a platinum resistance thermometers (RPT), which uses a thin platinum film as the temperature-sensing element. The internal circuitry applies a constant current to the RPT and measures the resulting voltage drop. The voltage drop is directly proportional to the temperature, providing an analog output signal that an ADC can read.
- ADT7410 offers a temperature range of -50° to +150° C, with an accuracy of ±0.2° C @ +25° C and ±0.75° C at full range. It has an output sensitivity of 5 mV/° C.
- ADT7412 offers a temperature range of -200° to +200° C, with an accuracy of ±0.3° C @ +25° C and ±1.0° C at full range. It has an output sensitivity of 10 mV/° C.
Although ADT7140 offers better accuracy, ADT7412 provides a broader temperature range and greater output voltage change per degree. These sensors are used in various applications, including industrial process control, medical equipment, food and beverage protection, aerospace, and environmental monitoring.
PT100/PT1000 are RTDs with a thin coil of platinum wire or film at their core. They differ primarily in their nominal resistance at 0° C. PT100 has a resistance of 100 ohms at 0° C, whereas PT1000 has a resistance of 1000 ohms at 0° C.
The sensors receive a current from an external circuit, which detects the voltage drop across the sensor. The resistance of the sensor, which is a function of temperature, determines this voltage drop. PT1000 can be used in two-wire configurations and has higher output sensitivity, typically with higher accuracy. PT100 requires three-wire or four-wire configurations but it’s more cost-effective and also smaller than PT1000.
SHT3x is a family of digital humidity and temperature sensors from Sensirion. A silicon chip incorporating Sensirion’s patented CMOSens technology is at the core of these sensors, delivering accurate and stable digital outputs.
The company has dedicated sensors for humidity and temperature measurements. The sensor interfaces with a microcontroller through a I2C and comes with a factory calibration. The temperature range of the sensor is -40° to +125° C, with an accuracy of ±0.5° C. The SHT35 is the automotive-grade version of SHT30/SHT31 with enhanced noise immunity and a more comprehensive temperature range. Although these sensors are costlier than many other temperature and humidity sensors, they’re optimized for low-power design and offer high accuracy and fast response time.
MLX90614 is a digital non-contact infrared thermometer from Melexis. The sensor’s core is a thermopile, an array of thermocouples that convert temperature differences into a voltage. MLX90614 focuses received infrared radiation onto the thermopile, and an internal circuitry amplifies and processes the thermopile signal to calculate an object’s temperature.
This digital sensor communicates the digital value of temperature through an I2C or an SMBus to a microcontroller. There are two versions available:
- MLX90614ESF-BAA has a temperature range from -40° to +125° C
- MLX90614ESF-BAB has a temperature range of -70° to +380° C
Both sensors offer an accuracy of ±0.5° C at room temperature, which decreases at extremes.
TMP106/TMP107 are digital output temperature sensors from Texas Instruments.
- TMP106 has a temperature range from −40° to +125° C, with a typical accuracy of ±0.5° C and ±1° C maximum. The sensor has a 12-bit resolution and connects with a microcontroller through an I2C or SMBus.
- TMP107 has a temperature range of -55° to +125° C, with an accuracy of ±0.4° C at -20° to +70° C, ±0.55° C when at -40° to +100° C, and ±0.7° C at full range. The sensor has a 14-bit resolution and features a UART-compatible SMAART Wire interface that supports daisy-chaining up to 32 sensors.
Overall, TMP107 offers a higher accuracy, wider temperature range, daisy-chaining capability, and programmable alert feature. It’s suitable for extended temperature sensing, industrial process control, medical devices, and distributed monitoring. TMP106 suits general-purpose temperature sensing in consumer electronics, automotive, and industrial settings.
MAX31855 is a cold-junction compensated thermocouple-to-digital converter from Analog Devices. The sensor connects to a thermocouple, a pair of dissimilar metals forming a voltage junction that varies with temperature. It measures temperature at the reference junction (cold junction) and subtracts the cold-junction temperature from the thermocouple voltage — compensating for temperature variations at the connection point. The processed temperature data is provided as a signed 14-bit value through an SPI interface.
This sensor supports diverse thermocouple types (K, J, N, T, S, R, E) for various applications. It has a temperature range of -270° to +1800° C, with an accuracy of ±2°C for K-type thermocouples. Its resolution is 0.25° C with a 14-bit output. MAX31855 is used in industrial process control, environmental monitoring, power generation, automotive, aerospace, and defense applications.
MLX90632 is a miniature, non-contact infrared thermometer from Melexis. It comes in two versions:
- MLX90632ESF-BAA is the standard version with a temperature range of -40° to +125° C and a typical accuracy of ±0.5° C, with decreases at extremes.
- MLX90632ESF-BAB is a medical-grade version with enhanced accuracy for medical applications, typically around ±0.2° C, but within a narrow range.
Both versions have a digital output that communicates through an I2C interface. These sensors are used in applications like building and smart home automation, non-invasive temperature measurement in laboratories, industrial process control, ear thermometers, and wearable devices.
You may also like:
Filed Under: IoT tutorials, Sensors, Tutorials
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.