Temperature Sensor – Introduction, Types and Interfacing with Arduino

temperature using Arduino is a popular project amongst beginners.

Temperature measurement is very
common and useful in many applications, including small household to huge industrial

Generally, they are found in,

  1. Automobiles
  2. Computers
  3. Home appliances
  4. Medical devices
  5. And more….

This sensor is
responsible for maintaining the device’s temperature at a rated value, thereby assuring
the system’s safety and long life.

Although I will say that
temperature sensors are prevalent and quite necessary in engineering
applications, it would help if you understand them in detail.

So in this article, we will
start with the basics of temperature sensors, understand its types, and finally
interfacing with Arduino.

Electronics beginners can do
this project to measure the room temperature.

What is a Temperature Sensor?

It is a device that measures the
surrounding temperature and converts that into the data understandable by the
electronic devices. They work on the principle of resistance or voltage change
in response to the temperature change.

A temperature sensor needs to be
very precise and accurate to maintain the device’s temperature.

Types of Temperature Sensors

1. Contact Temperature Sensor

Contact Type Temperature Sensor - DS18B20Contact Type Temperature Sensor - DS18B20

This type of temperature sensor
is in direct contact with the material under observation. It works on the
principle of Heat Conduction.

Useful in distinguishing solids,
liquids, and gases over a broad scope of temperature.

2. Non-contact Temperature Sensor

AMG8833 Non-contact Type Temperature Sensor - Robu.inAMG8833 Non-contact Type Temperature Sensor - Robu.in

This type of sensor helps
determine the temperature of liquids and gases that radiates energy as the heat

It works on the principle of
convection and radiation.

Interfacing of Temperature Sensor with Arduino

We will be using PT100-S to
illustrate the temperature sensor interfacing with Arduino.

What is PT100-S Temperature Sensor?

PT100-S Interfacing with Arduino NewPT100-S Interfacing with Arduino New

The PT100-S is a Thermistor that
changes the resistance value in response to the surrounding temperature
changes. It has good response time, accuracy, and repeatability.

The resistor is a strip of
platinum with the resistance of 100-138.4 Ω.

It has gained the reputation for
being useful in laboratories and industries to measure the temperature with
excellent precision.

The PT100-S is equipped with a
316L stainless steel shield that makes it compatible with the temperature
ranges up to 420°C.

PT100-S Connection with Arduino

Connection Diagram - PT100-S Interfacing with Arduino - Robu.inConnection Diagram - PT100-S Interfacing with Arduino - Robu.in

Connecting PT100-S
with Arduino will take only 5-10 minutes.

Note: Ensure
you have connected everything properly before supplying power to the setup.

Follow the steps below,

Step 1 – Connect one end of the PT100-S temperature sensor to the analog pin on Arduino.

Step 2 – Now, we need to connect the same end of the sensor to 5V on Arduino through a resistor.

Note: Resistor is added
here to avoid heating problems. You can calculate it using the formula below,

R2 = R1*1/(Vin/Vout-1)

The value of R2 should be low
enough to avoid a low signal to noise ratio. Here we are using a 150Ω resistor
in this project.

Step 3 – Connect the other end of the sensor to the “GND” pin on Arduino.


Try keeping the PT100-S sensor
near hot (candle) or cold (ice cube) material. You will see the change is


Hope this article helped you to
learn the basics of temperature sensor and interfacing with Arduino. If you
have any doubts, then don’t forget to comment below.

Also, we will love to see the
prototype of your project; temperature sensor interfacing with Arduino.

Note that all of the products
used in this project are available at Robu.in. Do not forget to check them as