I am really new to electronics and I am just experimenting at the moment with a breadboard.
My question here is related to the LM35 temperature sensor and Arduino micro controller. I am getting a very high reading through the sensor of 448 degrees Celsius. Obviously this is way off. The conversion formula I am using is:
inputvoltage = (5.0*inputvoltage*100.0)/1024.0;
I am feeding 5V into the sensor from the Arduino and I am getting a 0.50 voltage reading on my multimeter between 5V in and output. Do you think the sensor might be faulty? Any help on this issue would be great!
EDIT: Some people have asked for my code from the arduino so here it is:
int tempPin = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
float temp = (5.0 * analogRead(tempPin) * 100.0) / 1024;
Serial.print(temp,1);
Serial.println(" degrees C ");
delay(1000);
}
This schematic shows the really simple configuration I have.
I have added a picture of my setup if anybody can spot something I can't.
Best Answer
4.15V from Vout to GND with short wires and 5V supply is totally wrong. Either you have the connections wrong or the LM35 is toast. Please double-check the connection vs. the datasheet.
I suspect just because of that particular voltage reading that you may have the connections mixed up.
Edit: Thanks for the photo. Looking at the part from the front (the part with the markings) from left to right, the pin order is:
Vs, Vout, GND = +5, Vout, GND
In your photo I see +5, Vout, GND as it should be. So it it's reading more than 10mV/°C at Vout with the blue wire disconnected from the Arduino (and 5V/0V on the orange and black wires respectively) I would say it's dead. Perhaps the power got momentarily reversed on it?