Electronics

Temperature Sensor LM35

AED 5.25

1

Description

The LM35 is a highly precise integrated-circuit temperature sensor known for its linear output voltage directly proportional to Centigrade temperature. It's favored in temperature measurement due to its accuracy, user-friendliness, and cost-effectiveness. With typical accuracy levels of ±¼°C at room temperature and ±¾°C across a wide temperature range from -55°C to 150°C, it eliminates the need for external calibration. The LM35 boasts a low output impedance, linear output, and built-in calibration, simplifying its integration with readout or control circuits.

 

Package Includes:

  • 1x LM35 Temperature Sensor IC

Features:

  • Centigrade Calibration: The LM-35 sensor is calibrated in Centigrade (Celsius) rather than Kelvin, enhancing its practicality for temperature measurement applications.
  • Cost-Effective Wafer-Level Calibration: Calibration and trimming are meticulously conducted at the wafer level, contributing to its affordability.
  • Linear Scale Factor: With a linear scale factor of 10 mV per degree Celsius, the LM-35 provides a straightforward and easily interpretable output.
  • Low Self-Heating: The LM-35 exhibits minimal self-heating, measuring just 0.08°C in still air, ensuring accurate temperature readings.
  • No External Calibration: It eliminates the need for external calibration or trimming while maintaining a typical accuracy level of ±¼°C.
  • Single Power Supply Compatibility: Designed to operate with single power supplies, making it versatile and convenient for various applications.

 

Description:

The LM35 temperature sensor, a noteworthy advancement in the field of temperature measurement. What distinguishes the LM35 is its innovative methodology for generating an analog signal that mirrors temperature variations with a precision linear scale factor of 10 mV per degree Celsius. This departure from the conventional Kelvin calibration sets it apart as a versatile and practical choice. Its compact form factor and cost-effectiveness make it accessible to a wide array of applications, bridging the gap between precision and affordability. Beyond its core functionality, the LM35 boasts a suite of features that enhance its utility. These include low impedance, a linear analog output, and meticulous Centigrade calibration. These attributes not only ensure accurate temperature readings but also facilitate seamless integration with microcontroller units. As a result, the LM35 becomes a vital tool for temperature monitoring and control applications in various industries. Whether employed in consumer electronics, industrial automation, or experimental projects, the LM35 stands as a dependable and efficient solution for achieving precise temperature measurement and management. Its ability to provide accurate data and simplify interfacing with control systems makes it a go-to choice for engineers, hobbyists, and professionals alike, further underscoring its significance in the realm of temperature sensing technology.

 

Principle of Work:

The LM35 temperature sensor operates on a straightforward yet effective principle, making it easy to comprehend both its internal workings and its interaction with microcontroller units.

Internal Operation: Internally, the LM35 relies on its precision silicon bandgap temperature-sensing element. This element generates a voltage output that is linearly proportional to the temperature it senses. Specifically, it produces an output voltage of 10 mV for every degree Celsius change in temperature. For instance, if the temperature rises by 1°C, the LM35's output voltage increases by 10 mV, and if it decreases by 1°C, the output voltage decreases by 10 mV. This linear relationship simplifies temperature measurement considerably.

Integration with Microcontroller: When interfacing with a microcontroller, the LM35's linear output voltage makes the process straightforward. The microcontroller can read the LM35's output voltage using its analog-to-digital converter (ADC). Once the voltage is obtained, it can be easily converted to temperature using the provided formula:

Temperature (°C) = Vout * 100

For instance, if the LM35's output voltage (Vout) is 0.5V, applying the formula yields:

Temperature (°C) = 0.5 * 100 = 50°C

This direct correlation between voltage and temperature simplifies the programming and data processing required to obtain accurate temperature measurements in digital form.

 

Pinout of the Board:

Pin Name Function
VCC
Positive supply pin
OUT
Analog Output pin
Ground Ground pin

 


Applications:

  1. Climate Control Systems: LM35 is commonly used in heating, ventilation, and air conditioning (HVAC) systems to monitor and regulate indoor temperatures.
  2. Industrial Automation: It is employed in industrial settings to monitor temperature conditions in machinery, ensuring optimal operation and preventing overheating.
  3. Weather Stations: LM35 sensors are utilized in weather stations to measure and report temperature data for meteorological purposes.
  4. Medical Devices: They are integrated into medical equipment like incubators and fever monitoring systems for accurate temperature measurements.
  5. Home Appliances: LM35 is used in household appliances like refrigerators and ovens to control temperature settings and ensure safe operation.
  6. Environmental Monitoring: It finds application in environmental monitoring systems to measure temperature changes in ecosystems, helping researchers and conservationists track climate-related trends.
  7. Automotive: LM35 sensors are used in vehicles to monitor engine temperatures and provide input for engine management systems to prevent overheating.
  8. Energy Efficiency: In energy-efficient buildings, LM35 sensors help regulate heating and cooling systems, contributing to reduced energy consumption.
  9. Food Processing: The food industry utilizes LM35 sensors for temperature control during food processing and storage, ensuring product quality and safety.
  10. Scientific Research: Researchers use LM35 sensors in laboratories to measure temperature variations in experiments and studies.
  11. Agriculture: LM35 sensors are employed in agricultural applications such as greenhouse climate control and soil temperature monitoring.

 

Circuit:

we will connect the LM35 sensor to the A0 input of the Arduino Uno board and then read the temperature and show it on the serial monitor.

Library: 

No Library is needed.

Code:

The code is designed to read temperature data from an LM35 temperature sensor connected to analog pin A0 and display it in both Celsius and Fahrenheit on the serial monitor:

#define sensorPin A0

void setup() {
  // Initialize serial communication at 9600 baud rate
  Serial.begin(9600);
}

void loop() {
  // Read the analog voltage from the LM35 sensor
  int rawValue = analogRead(sensorPin);

  // Convert raw reading to voltage (0-5V)
  float voltage = (rawValue / 1023.0) * 5.0;

  // Convert voltage to temperature in Celsius
  float temperatureC = (voltage - 0.5) * 100.0;

  // Print temperature in Celsius
  Serial.print("Temperature: ");
  Serial.print(temperatureC);
  Serial.print("\xC2\xB0C  |  ");

  // Convert Celsius to Fahrenheit
  float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0;
  Serial.print(temperatureF);
  Serial.print("\xC2\xB0F");

  // Print a newline for better readability
  Serial.println();

  delay(1000); // Wait for a second before the next reading
}
  1. Initialization:

    • It begins by initializing serial communication with a baud rate of 9600, allowing the Arduino to communicate with a computer through the USB port.
  2. Loop:

    • Inside the loop() function, it repeatedly performs the following steps:
  3. Analog Reading:

    • Reads the analog voltage from the LM35 sensor connected to pin A0 using analogRead(). This reading represents the LM35's output voltage, which is proportional to the temperature.
  4. Voltage Conversion:

    • Converts the raw analog reading (rawValue) to a voltage value (voltage) within the 0-5V range. This conversion is necessary because the LM35 sensor provides an output voltage that is linearly proportional to temperature.
  5. Temperature Calculation:

    • Calculates the temperature in Celsius (temperatureC) by subtracting 0.5V from the voltage reading (since the LM35 outputs 0.5V at 0°C) and then multiplying by 100. This step results in the temperature reading in degrees Celsius.
  6. Serial Output:

    • Print the temperature in Celsius to the serial monitor, including the degree symbol (°C).
  7. Fahrenheit Conversion:

    • Converts the temperature in Celsius (temperatureC) to Fahrenheit (temperatureF) using the standard conversion formula (Celsius to Fahrenheit).
  8. Serial Output (Fahrenheit):

    • Prints the temperature in Fahrenheit to the serial monitor, including the degree symbol (°F).
  9. Newline:

    • Prints a newline character (\n) to improve the readability of the serial monitor output.
  10. Delay:

    • Waits for 1000 milliseconds (1 second) using delay(1000) before taking the next temperature reading. This delay ensures that the readings are not too frequent and provides a reasonable update rate.

Technical Details:

  • Operational Voltage: 4 – 30 Volts
  • Output Voltage:-1 – 6 Volts
  • Output Current: 10 mA
  • Operating Temperature: -550C -1500C
  • Output Impedance: 0.1 ohms for 1mA load
  • Drain Current: > 60 uA
  • Sink Current: 1 uA
  • Accuracy: 0.50C at 250C

 

Resources:

Comparisons:

The LM35 and NTC (Negative Temperature Coefficient) thermistors are both temperature sensors, the difference and the choice between the LM35 and NTC thermistors depends on your application. If you need accurate and linear temperature readings, the LM35 is a straightforward choice. However, if you require cost-effective solutions or are dealing with relative temperature changes, NTC thermistors can be suitable with the understanding that they may require calibration for precision:

LM35 Temperature Sensor:

  • Type: The LM35 is a linear temperature sensor, meaning its output voltage changes linearly with temperature. It provides a direct temperature reading in degrees Celsius.
  • Accuracy: LM35 sensors are known for their good accuracy, often within ±0.5°C under ideal conditions.
  • Calibration: LM35 sensors come pre-calibrated from the factory, eliminating the need for additional calibration.
  • Voltage Output: The LM35 produces a voltage output that's easy to read with an analog input on a microcontroller or other measuring device.
  • Linearity: It has excellent linearity, making it straightforward to convert the output voltage to temperature.
  • Power Consumption: LM35 sensors typically have low power consumption.

NTC Thermistor:

  • Type: NTC thermistors are non-linear temperature sensors. Their resistance decreases as temperature increases, following a curve.
  • Accuracy: NTC thermistors can be accurate but often require calibration to achieve high precision.
  • Calibration: NTC thermistors may require calibration to achieve accurate temperature readings, especially if high precision is needed.
  • Resistance: They are resistive devices, and the resistance-temperature curve varies between different NTC thermistors.
  • Voltage Output: NTC thermistors don't provide a direct voltage output like the LM35. Instead, you need to measure their resistance and use a lookup table or mathematical formula to convert it to temperature.
  • Linearity: NTC thermistors are non-linear, so temperature-to-resistance conversion is more complex than with linear sensors like the LM35.
  • Power Consumption: NTC thermistors can have varying power consumption, depending on their design and usage.

Applications:

  • LM35: LM35 sensors are commonly used when precise and linear temperature measurements are required. They are ideal for applications where direct temperature readings in degrees Celsius are needed, such as climate control systems, industrial automation, and medical devices.

  • NTC Thermistors: NTC thermistors are often used in applications where relative temperature changes need to be monitored, rather than precise temperature values. They are suitable for temperature-compensation circuits, temperature control systems, and situations where the cost of calibration is acceptable.