These are precision integrated-circuit temperature devices with an output voltage linearly-proportional to the Centigrade temperature. The LM35 device has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large constant voltage from the output to obtain convenient Centigrade scaling.
Specifications:
Operating voltage 4.0V ~ 20V
Temperature range 0 ~ +100
Power single 5V supply, 0 when the output is 0 V, and is increased by 1, the output voltage increases 10 mV.
Output leads: Red (VCC), yellow (DATA), black (GND)
Stainless steel housing (6 * 50mm), lead length 100cm
Note: Operating voltage 4 ~ 30V, the current drawn from the power chip is almost constant (about 50A), so that the chip itself has almost no issues with heat dissipation. Using such a small current draw also makes this chip is particularly suitable for battery powered applications, the output can be removed by the third pin, no need for calibration.
Hardware required
1. Arduino Uno
2.Waterproof Digital Thermal Probe LM35DZ
3. Jumper wires
Connecting the Hardware
Connect the LM35 Temperature Sensor to the arduino UNO as shown below
Arduino UNO Waterproof Digital Thermal Probe LM35DZ Temperature sensor
VCC Red wire
GND Black wire
A1 Yellow wire
Upload the sample sketch
int val;
int tempPin = 1;
void setup()
{
Serial.begin(9600);
}
void loop()
{
val = analogRead(tempPin);
float mv = ( val/1024.0)*5000;
float cel = mv/10;
float farh = (cel*9)/5 + 32;
Serial.print(“TEMPRATURE = “);
Serial.print(cel);
Serial.print(“*C”);
Serial.println();
delay(1000);
/* uncomment this to get temperature in farenhite
Serial.print(“TEMPRATURE = “);
Serial.print(farh);
Serial.print(“*F”);
Serial.println();
*/
}
NOTE: IF you get stray ‘223’ errors The problem is with your “and ” characters. Replace them with ordinary quotes, ” , and you should be fine.
Testing the circuit
Finally, you should open the Arduino IDE serial monitor at a 9600 baud rate