You are on page 1of 6

TEMPERATURE DETECTOR

Using TMP36 temperature sensor ,Arduino and Lcd screen

ASHISH KUMAR SINGH


Ashishks2336@gmail.com
Introduction:
In this project I have made a temperature detector using Arduino and TMP36 temperature
sensor and it displays the temperature on the lcd screen connected to the Arduino.and I have
made this project on tinkercad.
Temperature sensors and LCD can serve as a simple mechanism in different situations such
as room temperature monitoring and even plant monitoring or any place that considers
temperature as an important element!
The TMP36 temperature sensor is an easy way to measure temperature using an Arduino!
The sensor can measure a fairly wide range of temperature (-40°C to 125°C), is fairly precise
(0.1°C resolution), and is very low cost, making it a popular choice.

How It Works:
Unlike a thermistor, the TMP36 does not have a temperature sensitive resistor. Instead this
sensor uses the property of diodes; as a diode changes temperature the voltage changes with
it at a known rate. The sensor measures the small change and outputs an analog voltage
between 0 and 1.75VDC based on it. To get the temperature we just need to measure the
output voltage and a little bit of math!

Lest start making the project:


Step 1: List of Required Components
List of Components :

1. Arduino Uno R3 (1)

2. Temperature Sensor (TMP36) (1)

3. LCD 16x2 (1)

4. 250kΩ Potentiometer (1)

5. 220Ω Resistor (1)


Step 2: Circuit Connection 
Connect all the components as shown in the figure and double check the connections

Step 3: Lets Do Some Coding!


Initially, there will be a code in the code editor found in Tinkercad.

This is because we used a starter circuit from Tinkercad, loading its code along with it to
allow new users to explore and simulate the output.

We can delete all of that and design our code.

For any Arduino code that we are about to design, we need to ensure that the libraries related
to the project is included.
Which in this case, we require Library for LCD (LiquidCrystal.h)

Now the code:

// include the library code:

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //connecting the pins rs,en,d4,d5,d6,d7 to the arduino at
pin 12 11 5 4 3 2

int sensorPin = 0;

void setup()

lcd.begin(16, 2);

void loop()

lcd.clear();

int reading = analogRead(sensorPin);

float voltage = reading * 5.0;

voltage /= 1024.0;

float temperatureC = (voltage - 0.5) * 100 ;

float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0;

lcd.print(temperatureF);

lcd.println(" degrees F ");

lcd.setCursor(0,1);

lcd.print(temperatureC);

lcd.println(" degrees C ");

delay(1000); }
Step 4: Starting the simulation and compiling the code
After writing the code click on start simulation button to compile the code and start the
simulation.

If the code has compiled without errors then it will start to show the temperature on the lcd
screen.

You can change the readings by using the slider in tinkercad lab.
Applications:
 These less expensive sensors can generate interrupts in microprocessor
applications.
 The TMP36 chip measures the average temperature in industrial and
environmental control applications.
 Fire Alarms detect the rise in temperature through this device and start
operating when the temperature reaches a certain threshold limit.
 Different applications implement thermal protection mechanisms using this chip
 Monitors, CPU and other power systems provide thermal management by
measuring temperature through TMP36.

You might also like