How Can Interface LM35, LM34 And LM335 Into Arduino....?
In this 3rd article .I will show ,that "How Can Interface LM35, LM34 And LM335 Temperature Sensors Into Arduino....?"Before this ,i have published two posts.If you want to visit for more information about Arduino projects.
1.LED BLINK ON ARDUINO BOARD WITH SIMPLE ARDUINO PROGRAMMING.
2.Anti Theft Detection From IR Sensor Using Arduino.
I will tell you, How to interface the LM35,LM34 or LM335 temperature sensors and write the code to receive the temperature readings and show on serial monitor.
What is LM35/LM34 Or LM335 Temperature Sensors?
The LM35, LM34 and LM335 are temperature measuring sensors.
That output analog voltage proportional to the temperature.
S.N. Temperature Sensor Output Voltage Linearity
1. LM35 Analog Output Voltage 10-mv/C
Proportional to Temperature
In
Celsius( C )
2. LM34 Analog Output Voltage 10-mv/F
Proportional to Temperature
In
Fahrenheit(F)
3. LM335 Analog Output Voltage 10-mv/K
Proportional to Temperature
In
Kelvin(K)
The LM35 Temperature sensor is output voltage provide in centigrade (0C) in temperature and also LM34 analog output voltage in Fahrenheit (0F) and LM335 is output voltage provide in Kelvin unit, all these temperature sensor are different different output voltage provide in unit. These sensors are not need any external circuit for calibration.
For Example:- If the LM35 analog output voltage is 100-mv/c, That means 10C of Temperature value .
If you want to know more information about this Temperature sensor. You can read their data sheet.
Pin out of LM35/LM34
There are Three pins Vcc , Vout and GND of LM35 And LM34 Temperature sensor.
LM35/LM34
VCC - Supply Voltage (5v - 40v)
Vout - It gives analog output voltage who proportional to the temperature in (0C)
GND - Common
Here LM35/LM34 Interface to Arduino.
LM35/LM34 ArduinoUno
Vcc - 5v
GND - GND Or Common
Vout - Analog Pin
Here the LM335 temperature sensor is different from LM35 and LM35 sensor.
Here LM335 Interface to Arduino.
LM335 ArduinoUno
Adj - No Connect
GND - GND Or Common
Vout - Analog Pin with Pull up resistor 2k Ohm
Here Adj can be used calibrated for more accuracy temperature.But here Adj pin of LM335 is not connect. I am only using Vout pin of LM335 with 2k ohm pull up resistor.
Schematic Diagram Of Temperature Sensor From the Frizzing
Code:-
int LM35 = A0;
float LM35_var;
float Vout;
float TempC;
float TempF;
//float TempK; //uncomment When you will use LM335
void setup()
{
Serial.begin( 9600 );
pinMode( LM35, INPUT );
}
void loop()
{
LM35_var = analogRead( LM35 );
Vout = ( LM_var * 5000 )/1023;
//For LM35
TempC = Vout/10;
TempF = (TempC * 1.8) + 32;
//For LM34
// TempF = Vout/10;
// TempC = (TempF - 31.0) * (5.0/9.0);
//For LM335
// TempK = Vout/10;
// TempC = TempK - 272;
// TempF = ( TempC * 1.8 ) + 32;
Serial.Print(" Vout = ");
Serial.println( Vout );
Serial.Print(" Temperature = ");
Serial.println( TempC );
Serial.Print("Fahrenheit= ");
Serial.println( TempF);
delay(500);
}
0 Comments