LM35 temperature sensor burns my arduinos

Hi there,
I am trying to measure ambient temperature with a LM35 sensor. As shown on the datasheet and on many tutorials around the internet, I connect the Vcc pin to 5 volts, the Gnd pin to ground and the Out pin to A0.

I previously uploaded the basic analog input program to make the D13 led blink.

This assembly burned out my arduino nano in seconds.

Then, I have tried with caution with my arduino uno, and the power led goes off the moment I connect Vcc and Gnd. I disconnect it immediately to not burn out my second and last available arduino board. I have tried with the 3.3v instead of the 5v. It does not burn the arduino, but both the voltage regulator on the board and the LM35 sensor start to heat up. Has anyone an idea on what is going on ?

/*
  Analog Input
 Demonstrates analog input by reading an analog sensor on analog pin 0 and
 turning on and off a light emitting diode(LED)  connected to digital pin 13. 
 The amount of time the LED will be on and off depends on
 the value obtained by analogRead(). 
 
 The circuit:
 * Potentiometer attached to analog input 0
 * center pin of the potentiometer to the analog pin
 * one side pin (either one) to ground
 * the other side pin to +5V
 * LED anode (long leg) attached to digital output 13
 * LED cathode (short leg) attached to ground
 
 * Note: because most Arduinos have a built-in LED attached 
 to pin 13 on the board, the LED is optional.
 
 
 Created by David Cuartielles
 modified 30 Aug 2011
 By Tom Igoe
 
 This example code is in the public domain.
 
 http://arduino.cc/en/Tutorial/AnalogInput
 
 */

int sensorPin = A0;    // select the input pin for the potentiometer
int ledPin = 13;      // select the pin for the LED
int sensorValue = 0;  // variable to store the value coming from the sensor

void setup() {
  // declare the ledPin as an OUTPUT:
  pinMode(ledPin, OUTPUT);  
}

void loop() {
  // read the value from the sensor:
  sensorValue = analogRead(sensorPin);    
  // turn the ledPin on
  digitalWrite(ledPin, HIGH);  
  // stop the program for <sensorValue> milliseconds:
  delay(sensorValue);          
  // turn the ledPin off:        
  digitalWrite(ledPin, LOW);   
  // stop the program for for <sensorValue> milliseconds:
  delay(sensorValue);                  
}
1 Like

Assuming it's wired up correctly, it sounds like your sensor is broken.

There have been reports of fake LM35s, where did you buy them?

History of fake components and cultures are old as old the human history. Therefore if the components are from an open source, always connect the Vcc (Power Supply line) via 1k series resistor as a precautionary measure. If your judgement allows you to say that the component is not internally shorted, remove the series resistor from the Vcc line. (I usually do this practice.)

Personally, I prefer to buy known good components.

Thank you guys for the answer. I always have the bad habit to put the blame on the material and not on myself (am I the only one ?), but this time, I think the component carries the blame.

JCA34F:
There have been reports of fake LM35s, where did you buy them?

Well, I live in Colombia, in a medium city, and I buy my electronics in the very few shops that exist. I would not be surprised that their supply is not the highest quality.