Professional Documents
Culture Documents
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!
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.
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)
#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();
voltage /= 1024.0;
lcd.print(temperatureF);
lcd.setCursor(0,1);
lcd.print(temperatureC);
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.