top of page

LM35 Temperature Sensor complete Guide with Arduino Programming

Updated: Mar 4


Introduction





  • LM35 is a temperature measuring device having an analog output voltage proportional to the temperature.

  • It provides output voltage in Centigrade (Celsius). It does not require any external calibration circuitry.

  • The sensitivity of LM35 is 10 mV/degree Celsius. As temperature increases, output voltage also increases.

          E.g. 250 mV means 25°C.


  • It is a 3-terminal sensor used to measure surrounding temperature ranging from -55 °C to 150 °C.

  • LM35 gives temperature output which is more precise than thermistor output.

 

LM35 Temperature Sensor Pinout:



VCC: Supply Voltage (4V – 30V)


Out: It gives analog output voltage which is proportional to the temperature (in degree Celsius).


GND: Ground

 

Specification of LM35 Temperature Sensor


  • Operating Voltage: 4 V to 30 V

  • Output Voltage: 10mV/°C

  • Sensitivity: 10mV/°C

  • Linearity Error: ±1°C (for 0°C to +100°C)

  • Operating Temperature: -55°C to +150°C

  • Output Impedance: 100 Ω

  • Power Consumption: 60 μA (typical)

  • Package Type: TO-92, TO-220, SOIC

  • Output Type: Analog

  • Accuracy: ±1°C (typical)

 

Alternate options for LM35 Sensor


  • TMP36

  • DHT11

  • DS18B20

  • LM34

  • RTD PT100

 

Application Setup



LM35 temperature sensor interfacing with Arduino



LM35 Temperature Sensor Code for Arduino Uno


const int lm35_pin = A1;      /* LM35 O/P pin */

void setup(){
	Serial.begin(9600);
}

void loop(){
  int temp_adc_val;
  float temp_val;
  temp_adc_val = analogRead(lm35_pin);  /* Read Temperature */
  temp_val = (temp_adc_val * 4.88);      /* Convert adc value to equivalent voltage */
  temp_val = (temp_val/10);  /* LM35 gives output of 10mv/°C */
  Serial.print("Temperature = ");
  Serial.print(temp_val);
  Serial.print(" Degree Celsius\n");
  delay(1000);
}

 

The output of the code is a continuous stream of temperature values read from an LM35 temperature sensor connected to the analog input pin A1 of the microcontroller. The temperature is displayed in degrees Celsius on the serial monitor with a delay of 1 second between each reading. The LM35 sensor provides an output of 10mV per degree Celsius, so the code first reads the ADC value from the sensor, then converts it to an equivalent voltage, and finally converts that voltage value to a temperature value in degrees Celsius.


 

Examples of LM35 interfacing

1 view0 comments

Comments


bottom of page