กลับไปหน้ารวมไฟล์
monitoring-temperature-using-a-temperature-sensor-c753f3.md

Step 1: Introduction about the Analog Temperature Sensor

The LM35 series are precision integrated-circuit temperature devices with an output voltage linearly proportional to the Centigrade temperature. LM35 is a three-terminal linear temperature sensor from National Semiconductor. It can measure temperature from -55 degree Celsius to +150 degree Celsius. The voltage output of the LM35 increases 10mV per degree Celsius rise in temperature. LM35 can be operated from a 5V supply and the stand by current is less than 60uA. The pin out of LM35 is shown in the figure below.

Features:

  • Calibrated directly in Celsius (Centigrade)
  • Linear + 10-mV/°C scale factor
  • 0.5°C ensured accuracy (at 25°C)
  • Rated for full −55°C to 150°C range
  • Suitable for remote applications
  • Low-cost due to wafer-level trimming
  • Operates from 4 V to 30 V
  • Less than 60-μA current drain
  • Low self-heating, 0.08°C in still air
  • Non-linearity only ±¼°C typical
  • Low-impedance output, 0.1 Ω for 1-mA load

You can download the datasheet from the below file.

Step 2: Hardware Required and Circuit Diagram

  • Arduino board (any)
  • LM35 sensor
  • Breadboard

Step 3: Connection to be done


🛠️ เจาะลึกเบื้องหลังการทำงาน (Deep Dive / Technical Analysis)

A digital DHT11 sensor hides all the electrical physics inside a microchip. The Monitoring Temperature Using a Temperature Sensor project using a physical TMP36 Analog Temp Sensor (or a generic 10k Thermistor) forces the programmer to learn the absolute mathematical fundamentals of Analog-to-Digital Conversion (ADC) and Voltage Mapping to measure raw environmental heat!

The Analogue ADC Voltage Trap (Math Mapping)

The TMP36 sensor is a tiny black transistor-looking chip with 3 legs (5V, Data, GND).

  1. As the room gets hotter, the physical silicon inside it allows mathematically more voltage to flow across the Data leg!
  2. The Arduino Uno’s analogRead(A0) function reads this voltage.
  3. The ADC Raw Integers: It does NOT output 32 Degrees. It outputs a massive integer block exactly mapped from 0 Volts = 0 up to 5 Volts = 1023.
  4. The C++ code must aggressively calculate the TRUE Voltage first!
int sensorVal = analogRead(A0);
float voltage = (sensorVal / 1024.0) * 5.0; // Converts 0-1023 instantly back to exactly 2.5V!

Calculating Celsius from Resistance

Because every analog sensor is built differently, the programmer must read the physical hardware datasheet!

  • The TMP36 datasheet explicitly states: Every 10 Millivolts (0.01V) is exactly 1 degree Celsius. The offset starts critically at 0.5 Volts.
  • The Execution Formula:
float tempC = (voltage - 0.5) * 100; // Subtract the 0.5V offset, multiply by 100!
float tempF = (tempC * 9.0 / 5.0) + 32.0; // The standard Fahrenheit physics conversion!
  • The code then simply prints the exact, floating-point decimal calculation into the Arduino IDE Serial Monitor! This is the absolute foundation for every HVAC system on Earth!

Basic Thermal Data Needs

  • Arduino Uno/Nano (Standard execution speeds are perfectly sufficient).
  • TMP36 Analog Temperature Sensor (Ensure you plug the 5V and GND legs in correctly. If backward, the tiny plastic chip will physically melt instantly!).
  • Generic Breadboard & 3 Jumper Wires (The simplest, purest circuit required).

ข้อมูล Frontmatter ดั้งเดิม

title: "Monitoring Temperature Using a Temperature Sensor"
description: "How to monitor temperature using a temperature sensor."
author: "SURYATEJA"
category: ""
tags:
  - "weather"
  - "environmental sensing"
  - "human welfare"
  - "health"
  - "data collection"
  - "monitoring"
views: 23720
likes: 1
price: 435
difficulty: "Easy"
components:
  - "1x Arduino UNO"
  - "1x Temperature Sensor"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "d9282a446fd8ca397babb8f2e9cb103a58fd61bce39cbf3b8c1d10be7eea3428"
encryptedPayload: "U2FsdGVkX1+rBmu/171ILolVEL/bvpM97AGLIycNoz2w/Byd3cHzRHNXADMeO8AKOtqf6akTKGsX5aww1OvINuI1y3bq1Yxk8epIQ+sdwJ0="
seoDescription: "Learn how to monitor Temperature using a Temperature Sensor in your Arduino projects. Quick and easy tutorial."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/monitoring-temperature-using-a-temperature-sensor-c753f3_cover.jpg"
lang: "en"