Comparison of Temperature Sensors

Introduction: Comparison of Temperature Sensors

About: An electronics hobbyist

You are probably familiar with microcontrollers like Arduino,ESP,PIC etc. Now Sensor is a device that is used to get the information of the outer world with the help of electrical transducers. Any physical property of the environment can be converted to voltage or currents with those transducers and that change is fed into microcontrollers where necessary calculations are done to bring out standard values of that physical quantity/property. Examples LDR, Photodiode,PTC/NTC, etc. We will be here discussing about temperature sensors.

Now probably you are familiar with temperature sensors.Many temperature sensors like LM35,DHT 11/22, DS18B20, etc are comaptible with arduino and are very popular.So I here will be presenting a comparative study of DS18B20,LM35 and DHT22 using UNO as the brains of our organisations.

Step 1: Parts Required

1. Arduino UNO/Nano/Mega/promini

2. DHT22

3. LM35

4. DS18B20

5. 10K resistor

6. 4.7Kohm resistor

7. Wires and jumpers

Step 2: Understanding the Basic Operation

I have used namely DHT22,DS18B20 and LM35. You can try out any other temp sensor too.This is just a comparative study.

The DHT and LM35 connections are shown separately in the pics attached.For the DS18B20, check out the following link.

Every detail is given there, you can check out the pdfs

Connect them on a breadboard. After connecting it will look somehow as in the pic attached.

Step 3: Uploading Code and Opening the Serial Monitor

Now upload the code given here and open the serial monitor and observe. You can find 3 columns with the 3 devices and the temperatures measured by them. Now bring some ice and fire near it successively and observe the variations. Keep it as your homework. If the temperatures are not showing, check the connections again, also remove power immediately if temp are not showing (the ICs become hot if not connected properly).So everything is ready now,. You can even use a SD Card module for storing the temperatures and can even bring out a chart in excel. You can watch this too

Please comment here for any problems.

Be the First to Share


    • Big and Small Contest

      Big and Small Contest
    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • For the Home Contest

      For the Home Contest



    5 years ago

    To make the LM35 a lot more accurate, you can use AnalogReference(). So you can put your reading to 100°C (1V output) compared with 1.1V not 5.0V.

    I made an instructable about this :


    Reply 5 years ago

    Thanks bro..I'll check your instructable


    5 years ago

    You miss to talk about TMP36 ;)