A temperature sensor is not so popular in robotics such as light, infrared, accelerometer, gyroscope, force, or ultrasonic sensors, but they can be useful in rescue and firefighting applications. In the following, you can learn how to interface and programming a wide range of temperature sensors with Arduino, Raspberry Pi, and other electronics.
A temperature sensor is not so popular in robotics, but it is a powerful instrument to measure the temperature in different environments and conditions. Some of the sensors presented in this article are very simple measuring tools, while others are complex sensors that can be used to measure temperature, barometric pressure, and the altitude.
A series of tutorials, guides, and simple examples make the subject of this article, as well as a short overview with specifications for all temperature sensors.
Table of Contents
ToggleDS18B20
DS18B20 is perhaps the most popular temperature sensor used in robotic applications. It is cheap, and despite its price, it is built to measure the temperature between -55°C to +125°C (-67°F to +257°F). The accuracy is also an important feature, and for this sensor it fits between ±0.5°C. DS18B20 is designed to report degrees at a precision between 9 and 12 bits, and can be connected to a power supply from 3.0V to 5.5V.
- Adafruit’s Raspberry Pi Lesson 11. DS18B20 Temperature Sensing – step by step tutorial that teach you how to interface the DS18B20 sensor with Raspberry Pi board and how to write programming lines for displaying the values recorded by the sensor;
- OneWireCRC – short example how to build a program for displaying the DS18B20 output values;
- One Wire Digital Temperature. DS18B20 + Arduino – tutorial from where you can learn how to program the Arduino board in order to display the temperature detected by the sensor, and how to cover few exceptional cases that may occur during initialization or in operation mode;
- Raspberry Pi – tutorial where you can find programming code for Raspberry Pi in order to read the sensor data and display the values;
- Arduino – One Wire Digital Temperature Sensor – DS18B20 – simple example how you can use the Dallas Temperature library with Arduino and display the temperature values recorded by the sensor;
- Working with Dallas DS18S20 and DS18B20 temperature sensors – this is another example how the Dallas Temperature library is used to display the temperature values in Celsius and Fahrenheit degrees;
- TEMP Temperature Sensor Module Quickstart Guide – guide how to use and connect the Module Pinout with DS18B20 and Eleven board;
- DS18B20 Temperature Sensor – a complete project from how to interface and how to programming the DS18B20 sensor. The final result is an application that measure the temperature and display values on an LCD display;
TMP100
TMP100 name comes from the TMP100 chip designed to measure the temperature in a wide range of applications. Since it can be connected to a 5V or 3.5V power source, the TMP100 is a powerful temperature sensor compatible with DFRobot Uno, Arduino UNO or Arduino Mega boards.
- TMP100 Temperature Sensor – example how TMP100 sensor can be interfaced with DFRobot Uno board and display the temperature in Celsius degrees;
TMP36
TMP36 is a cheaper analog temperature sensor with output values proportional to the ambient temperature. It can be powered from power source between 2.7 and 5.5V.
- TMP36 Temperature Sensor – comprehensive tutorial from where you can learn how to test and interface the sensor with an Arduino board.
SHT1x
The SHT1x temperature sensor is digital two wires low cost, low power consumption, and one of the most accurate temperature sensors with accuracy between +/- 0.3°C.
- SHT1x Humidity and Temperature Sensor – a comprehensive guide that includes programming lines to read the temperature from the sensor and how to interface the sensor;
- Visualize humidity with the SHT11 sensor – comprehensive tutorial with explanations and steps for interface and programming the SHT11 temperature sensor. The final result is an application where displays the temperature and humidity recorded by the sensor;
LilyPad Temperature Sensor
The MCP9700 has a Lilypad design style with 20mm outer diameter. The sensor has a resolution of 10mV per degree C and is a powerful tool that can be used in robotic applications for touch detection or to detect the ambient temperature.
- LilyPad Arduino – sensing ambient temperature – tutorial that show you how to build an application based on the Lilypad temperature sensor in order to activate LEDs based on ambient temperature ;
Thermistor
A thermistor is a sensor designed to be used to measure the temperature in liquids and this is the main reason that it can be confused with an electric cable.
- Thermistor – comprehensive article where you can find information about how to test, interface and programming the thermostat to detect the temperature;
DHTXX
DHTXX include a series of complex sensors designed to be used for temperature and humidity detection. The sensors are characterized by excellent long-term stability and high accuracy.
- DHT11 Temperature and Humidity Sensor – tutorial from where you can learn how to interface the sensor and how to display the values from the sensors;
- DHT11 Arduino with VirtualWire – programming code Arduino compatible that interpret the output of the DHT11 temperature sensor;
- DHTxx Sensors – comprehensive tutorial with interfacing schema and programming code for the Arduino board in order to display the humidity and temperature recorded by the sensor;
- DHT Humidity Sensing on Raspberry Pi with GDocs Logging – tutorial that show you how to connect the DHT11 and DHT22 with Raspberry Pi and record the output of the sensor into a file;
LM35
Measuring the temperature in Celsius degrees, the LM35 is a precision sensor with output values proportional with temperature recorded. This sensor can be used in application where the temperature varies from -55°C to 150°C. LM35 is designed for accuracy, and at this point, it is much more precise than a thermostat.
- Arduino temperature sensor LM35 – simple example how to interface the sensor with an Arduino board and display the temperature recorded by the sensor;
- Project 6 – temperature sensor to LCD display – complete tutorial from where you can learn how to interface the LM35 temperature sensor to the Arduino, and build the program that display the values detected by the sensor on an LCD screen;
- Making an LM35 temperature recorder – comprehensive tutorial with schemes to connect the LM35 sensor with 12F675 PIC microcontroller and programming lines to read the sensor output;
- A Digital temperature meter using an LM35 temperature sensor – an article where you can find all you need to understand and start building your first application using the LM35 sensor and PIC16F688 microcontroller;
- Arduino LM35 Sensor – tutorial based on the well-known LM35 sensor and Arduino board, an application where the result is a screen for motorizing the temperature with graphic and scale;
- The ATMega16 LCD LM35 Digital Thermometer – a project based on ATMega16 AVR and LM35 sensor. From this article you can learn how to interface the sensor and write a programming line to display the temperature recorded by the sensor on an LCD screen;
BMP085
BMP085 is all in one sensor that can measure the temperature, barometric pressure, and the altitude. Built by Bosch, the sensor is one of the most accurate from its range with accuracy between – 2 and +2 Celsius degrees.
- Using the BMP085 with Raspberry Pi – complete guide to interface and programming the BMP085 with Raspberry Pi in order to display all the values measured by the sensor including higher the temperature, pressure, and altitude;
- How to set up a Barometric pressure sensor BMP085 on Raspberry Pi with Raspbian
– comprehensive guide to display the values recorded by the sensor using Raspberry Pi with Raspbian; - BMP085 Quickstart Guide – tutorial with explanations, how to interface, how to calibrate the sensor and programming the Arduino board to display the values recorded by the BMP085 sensor;
- Sensing Barometric Pressure | BMP085 + Arduino – article with programming lines that has as output the values recorded by the sensor for temperature, pressure, and altitude;