Creative Ideas EEE
The TMP36 temperature sensor is an easy way to measure temperature using an Arduino! The sensor can measure a fairly wide range of temperature (-50°C to 125°C), is fairly precise (0.1°C resolution), and is very low cost, making it a popular choice. In this tutorial we will go over the basics of hooking the TMP36 up and writing some basic code to read the analog input it is connected to.
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!
We are dealing with the TMP36 from Analog Devices - here is the datasheet.
First, we clarify the questions of whether a sensor can also be tested without a device. First of all: yes ;-)Then we look at the method of how to convert the voltage into the temperature.
Apply 2.7-5.5V to the left leg via batteries or another power source. Connect the right leg to GND (2-4 AA batteries work fantastic). The writing on the sensor is facing you. The semicircular circle lies on the floor.
The voltage is measured over the middle leg: use a multimeter and connect GND with GND and use the red reading head of the multimeter to read the voltage on the middle leg.
My comfortable room temperature is apparently 0.718 volts.
You can safely touch the sensor with your fingers or hold it under a heat-emitting lamp: the voltage value changes immediately.
And how can we convert the voltage into a temperature?If you're using a 5V Arduino, and connecting the sensor directly into an Analog pin, you can use these formulas to turn the 10-bit analog reading into a temperature:
Voltage at pin in milliVolts = (reading from ADC) * (5000/1024)This formula converts the number 0-1023 from the ADC into 0-5000mV (= 5V)
Arduino code For Temperature TMP36 Click Here
YouTube: https://www.youtube.com/channel/UCcwnTKWxSlkv_iarGQ_zbPg/featured
Instagram:
https://www.instagram.com/?hl=en
Facebook:
https://www.facebook.com/Creative-ideas-EEE-110709481470623/?ref=pages_you_manage
No comments:
Post a Comment