5142+ reviews
Order by 16:00 for same day shipping
14 days return
GB
EN
Individual
Business
15/04/2025
Smart technology projects are becoming increasingly easy to make. Thanks to Arduino, Raspberry Pi and ESP32, hobbyists and professionals can get started themselves. Temperature sensors are often indispensable in this. They measure the ambient temperature and enable automation, from home automation to industrial control. In this article, you will discover the most important types of temperature sensors, such as the DS18B20, DHT11 and DHT22. We explain how they work, how they differ, and what their advantages and disadvantages are. We also provide tips for choosing the right sensor, tailored to your project and environment.
A temperature sensor measures temperature by changes in physical or electrical properties. These properties respond to heat or cold and can be converted into measurable signals. There are five main types of sensors, each with its own technology.
Resistance thermometers (RTDs)
RTDs use metals that change resistance with temperature changes. A well-known example is the PT100, which measures exactly 100 ohms at 0 °C. RTDs are very accurate and stable. However, they require additional electronics to accurately measure small changes.
Semiconductor
sensors Sensors such as the LM35 and TMP36 use integrated circuits. These convert temperature directly into an analog voltage. Microcontrollers can easily read this voltage. They are cheap and easy to use. At extreme temperatures, accuracy sometimes decreases.
Digital sensors
Digital models, such as the DS18B20, send measurement data via protocols such as One-Wire. This allows you to connect multiple sensors to one data line. The DHT11 and DHT22 measure humidity as well as temperature. They communicate via a serial connection and are popular in climate projects.
Thermistors
Thermistors are sensitive resistors that respond strongly to temperature. NTCs decrease their resistance when heated. PTCs do the opposite. They are cheap and accurate, but not linear. Therefore, they require calibration and a voltage divider circuit to provide usable signals.
Thermocouples
Thermocouples consist of two metals that together generate a small voltage at temperature differences. This signal is weak, so an amplifier is needed, such as the MAX6675. They are robust and suitable for high temperatures, for example in industrial ovens or engines.
The DS18B20 is a digital temperature sensor. It uses the One-Wire protocol, which allows multiple sensors to communicate via a single data wire. This greatly simplifies wiring. The sensor measures temperatures from -55 to +125 degrees Celsius. The resolution is adjustable between 9 and 12 bits.
The sensor converts the temperature directly into digital values. These values are sent via the data line. In the case of parasitic power, the sensor even gets its power from the same wire. This allows you to connect multiple sensors without much cabling.
Thanks to libraries such as OneWire and DallasTemperature, you can easily read the sensor with an Arduino. This makes the DS18B20 popular for projects that require multiple measurement points, such as smart thermostats, weather stations or climate monitoring. The DS18B20 is also often used as a thermometer in aquariums and humid areas. There is also a waterproof version of this sensor available.
Advantages
The DHT11 and DHT22 not only measure temperature, but also humidity. This makes them very suitable for applications where climate control is important. Both sensors operate digitally and use serial communication via a single data wire.
The DHT11 is the simplest. It measures temperatures between 0 and 50 degrees, with an accuracy of 2 degrees (often more accurate). It measures humidity between 20 and 90 percent, with an accuracy of 5 percent. It is cheap and suitable for basic projects such as indoor climate measurements.
The DHT22 is more accurate and measures a wider range: from -40 to +80 degrees and 0 to 100 percent humidity. It is a bit more expensive, but performs better. This makes it suitable for projects where more accuracy is needed.
Both sensors work with existing libraries. They send their measurements as digital pulses that the microcontroller decodes. This makes them easy to integrate into Arduino or Raspberry Pi projects.
Advantages
The LM35 and TMP36 are analog temperature sensors. They provide a voltage signal that is linearly proportional to the temperature. This makes them simple and fast to use.
The LM35 provides an immediate output voltage in degrees Celsius. For every degree, the voltage increases by 10 millivolts. This means that no complicated calibration is required. The sensor responds quickly to temperature changes. It also works well in real-time applications such as temperature controllers or weather stations.
The TMP36 is very similar to the LM35, but operates at a lower supply voltage and has a wider temperature range. It has an output that can be used directly with microcontrollers. This makes it popular with hobbyists looking for an affordable solution.
Advantages
The BME280 is an advanced sensor that combines three functions: temperature, humidity and air pressure. It is designed for applications where multiple environmental factors need to be measured simultaneously. For example in weather stations or IoT systems. The sensor communicates via I2C or SPI and is well supported in both Arduino and Raspberry Pi .
The BME280 is accurate, stable and flexible in use. It is small in size, but delivers reliable data. The internal algorithms ensure stable and consistent measurements. This makes it a favorite in smart applications, such as indoor climate control or weather prediction.
The BMP180 is primarily an air pressure sensor. It also includes a simple temperature sensor that is primarily used to calibrate air pressure measurements. This sensor is smaller and somewhat simpler than the BME280. However, it is still useful in applications where air pressure is important.
Both sensors are popular in portable systems and space-constrained projects, such as drones or mobile weather stations.
Advantages
Thermistors are resistors that react strongly to temperature. There are two types: NTC and PTC. NTCs decrease their resistance as the temperature increases. PTCs do the opposite. Because of their sensitivity, thermistors are ideal for accurate temperature measurement in small systems.
They are small, cheap and fast. But they are not linear, which means you have to correct the signals in software. They work best when you calibrate them well and use them with a voltage divider. You can then read the measured values via an analog input.
Thermistors are often used in household appliances, heating systems and vehicles. They are robust and reliable, but require a little more attention during installation.
Advantages
Disadvantages
Thermocouples are made of two different metals that are connected at one end. When there is a temperature difference between the connection point and the other end, a small voltage is created. This is called the Seebeck effect.
Thermocouples are very suitable for measuring high temperatures. Think of industrial ovens, engines and other heavy applications. Because the generated voltage is very small, you need an amplifier or converter chip. The MAX6675 and MAX31855 are commonly used chips to make this signal readable.
They are robust, cheap and can withstand extreme conditions. That is why they are often used in industrial and scientific projects. In hobby projects they are a bit more difficult because of the extra electronics that are needed.
Advantages
Disadvantages
Arduino is popular with beginners and advanced users. The platform offers many libraries for using temperature sensors. Whether you work with a DS18B20, DHT11 or LM35, installation is often easy. Thanks to the user-friendly software, you can quickly start measuring.
Application
A classic Arduino project is a weather station. You combine sensors such as the DS18B20, DHT22 or BME280. This way you measure temperature, humidity and air pressure. You can display the data on an LCD or send it to a server via Wi-Fi.
The Raspberry Pi runs a full operating system. This allows you to analyze or store sensor data directly. Digital sensors such as the DS18B20 and DHT22 connect to the GPIO pins. Thanks to Python and useful libraries, integration is smooth.
Application
Use the Raspberry Pi in a smart home project. For example, measure the temperature in multiple rooms. Store the data in a database and connect additional sensors such as the BME280 for a complete climate picture.
The ESP32 is a powerful microcontroller with Wi-Fi and Bluetooth. This makes it ideal for wireless applications. It supports both digital and analog sensors. The computing power is more than sufficient for data analysis and control processes.
Application
An ESP32 is suitable for greenhouse management. Measure soil temperature with DS18B20s. Add DHT22s for humidity. Send everything wirelessly and manage the system remotely.
Choosing a sensor depends on your project. You need to consider accuracy, environment, cost, and integration. Below are the most important considerations.
Is your project going to be exposed to extreme cold or heat? Then choose a sensor with a wide temperature range, such as the DS18B20 or DHT22. For indoor use, a simpler model is often sufficient.
Do you want precise measurements? Then choose a sensor with high resolution. In scientific applications or temperature control, every degree counts. The DHT22 or well-calibrated analog sensors are then the most suitable.
Digital sensors are easier to use than analog ones. They convert the signal themselves, thus relieving the task of your microcontroller. Examples are the DS18B20 and DHT22.
Also pay attention to the communication protocol. Arduinos often use One-Wire or I2C. Choose a sensor that matches the available ports on your board.
Sometimes you want more than just temperature. Think humidity or air pressure. The BME280 offers all these measurements in one chip.
Do you need to measure in multiple places? Then the DS18B20 is handy. You can connect multiple at the same time to one wire.
Are you working on a budget? The DHT11 and LM35 are cheap, but less accurate. For professional projects, it pays to invest a little more in a sensor like the DHT22 or BME280.
Popular sensors such as the DS18B20 are widely available and have a lot of online support.
Is your sensor going to be outside or in humid air? Then a waterproof housing, like the DS18B20, is a smart choice. Also pay attention to how you mount the sensor and protect it from external interference.
Want to get the most out of your temperature sensor? Follow these practical tips. They will improve accuracy and ensure stable operation.
Calibrate your sensor, especially with analogue types or thermistors. These are sensitive to deviations and are often not linear. Digital sensors can also deviate slightly. If possible, use a reference measurement. Correct the results with software if necessary.
Analog sensors in particular are sensitive to fluctuations in the power supply. Therefore, use a stable, regulated power source. If necessary, add a capacitor to suppress noise. This prevents malfunctions and incorrect measurements.
Keep wiring as short as possible. This is especially crucial for analog sensors. Their signals are weak and can easily be disrupted. Use shielded cables if you are working in a noise-sensitive environment.
Add filters to your code, such as a moving average or median filter. This helps to attenuate measurement noise. Filters are especially useful in installations where electrical interference occurs. But also when combining multiple sensors.
Place several sensors next to each other. This way you discover if one deviates. This is useful for experiments or in changing environments. You can then adjust deviations with software.
Online you will find a lot of documentation, examples and tips. The Arduino, Raspberry Pi and ESP32 community will help you quickly with sensor problems or code questions.
Temperature sensors are indispensable in modern electronics and IoT projects. Whether you work with a DS18B20, DHT11, DHT22, LM35 or TMP36, the right choice depends on your purpose. For advanced applications, such as weather stations or indoor climate measurement, the BME280 offers additional possibilities thanks to the measurement of multiple parameters.
When making your choice, consider the measurement range, accuracy and compatibility with your system. Digital sensors are often easier to integrate. Analogue variants require more attention, but can be accurate with good calibration. Your budget also plays a role: simple projects do not require expensive sensors. While complex applications require better performance.
Ensure stable power, good wiring and calibration. Use software corrections to minimize measurement noise. This will give you reliable data, essential for automation, monitoring or control.
In this article you read how different sensor types work and how to apply them. With this knowledge you can choose more specifically and build better projects. Whether you are just starting with microcontrollers or have years of experience. Your success depends on the right combination of hardware and smart software.
Keep testing, learning and improving. Experiment with sensors, compare results and optimize your setup. The world of temperature measurement is full of opportunities for smart, practical and innovative applications.