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

Project Overview

Temperature monitoring is a critical requirement in various fields, ranging from environmental sensing and smart home automation to industrial process control and human health monitoring. This project demonstrates how to interface the LM35, a high-precision analog temperature sensor, with an Arduino UNO. Unlike digital sensors that require complex communication protocols (like I2C or OneWire), the LM35 provides a simple linear voltage output that is directly proportional to the Celsius temperature, making it an ideal entry point for learning analog-to-digital conversion (ADC).

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

Technical Working Principle

The LM35 operates on the principle of the bandgap voltage variation with temperature.

  • Linearity and Sensitivity: The most significant engineering advantage of the LM35 is its sensitivity of 10mV/°C. This means that at 25.0°C, the output voltage will be exactly 250mV. At 100°C, it will be 1,000mV (1.0V).
  • ADC Resolution: The Arduino UNO features a 10-bit ADC, which divides the reference voltage (usually 5V) into 1,024 discrete steps. This gives a resolution of approximately 4.88mV per unit. Since the LM35 changes 10mV per degree, the theoretical resolution of this system is approximately 0.48°C.
  • Mathematics of Conversion: To convert the raw ADC value into a temperature reading, the following logic is applied:
    1. Calculate Voltage: Voltage (mV) = (raw_adc / 1024.0) * 5000.0
    2. Calculate Temperature: Temperature (°C) = Voltage (mV) / 10.0
  • Self-Heating Considerations: The LM35 has very low current draw (<60μA), which keeps self-heating to a minimum (around 0.08°C in still air). This ensures that the sensor maintains higher accuracy compared to higher-current alternatives.

Implementation and Calibration

To achieve professional-grade results, it is recommended to implement Oversampling in the software. By taking the average of 10 to 50 readings in rapid succession, you can filter out random electrical noise from the Arduino's power rail. Additionally, for maximum precision, using the Arduino's internal 1.1V Analog Reference (analogReference(INTERNAL)) instead of the default 5V can increase the resolution of the LM35 readings by a factor of nearly five, allowing for sub-0.1°C detection.

ข้อมูล 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"