LM35 temperature sensor interfacing with Arduino board



Temperature measurement using LM35 temperature sensor and Arduino is all about the measuring Room temperature using LM35 Precision Centigrade Temperature Sensors
and Arduino board. I’ll explain how it works and how to interface with Arduino and circuit simulation using proteus.






LM35 Sensor:

                               The LM35 series 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. The LM35 device does not require any external calibration or trimming to provide typical accuracies of ±¼°C at room temperature and ±¾°C over a full −55°C to 150°C temperature range. Lower cost is assured by trimming and calibration at the
wafer level. The low-output impedance, linear output,and precise inherent calibration of the LM35 device makes interfacing to readout or control circuitry especially easy. 
            The device is used with single power supplies, or with plus and minus supplies. As the LM35 device draws only 60 μA from the supply, it has very low self-heating of less than 0.1°C in still air. The LM35 device is rated to operate over a −55°C to 150°C temperature range, while the LM35C device is rated for a −40°C to 110°C range (−10° with improved accuracy).



The only functional mode of the LM35 is that it has an analog output directly proportional to temperature. The accuracy specifications of the LM35 are given with respect to a simple linear transfer function: 

                                    Vout = 10 mv/°C × T 

                                    where ==> Vout is the LM35 output voltage 
                                               ==>  T is the temperature in °C


Circuit diagram:





As shown in the image connect a LM35 sensor pin to Arduino-uno pin as Vcc to +5V, Out to A0, ground to Ground.

Now open the Serial terminal and check the result.when you touch the LM35 Sensor the temperature will go up and display in serial port. you can do much more thing with LM35 sensor like ON/OFF your Room Fan according to room temperature.


Arduino Code:


-----------------------------------------------------------------------------------------------------------------------

//initializes/defines the output pin of the LM35 temperature sensor

#define INPUT_PIN  A0 // use analog Read pin-A0.

//

void setup()
{
Serial.begin(115200);
        Serial.println("LM35 Reading Start");
}

//main loop
void loop()
{
int rawvoltage = analogRead(INPUT_PIN);
float millivolts = (rawvoltage/1024.0) * 5000; // convert raw value in to voltage.
float celsius= millivolts/10;
Serial.print(celsius);
Serial.print(" degrees Celsius, "); // print value in degrees Celsius

Serial.print((celsius * 9)/5 + 32);
Serial.println(" degrees Fahrenheit"); //  // print value in degrees Fahrenheit

delay(1000);
}

-----------------------------------------------------------------------------------------------------------------------------

Tutorial Video:

          here you can see the ISIS Protuse simulation with LM35 and Arduino-Uno board.serial terminal print the live room temperature value as you Chang sensor value.
see more about this tutorial and simulation using ISIS - Proteus. if this tutorial helpful for you then like and subscribe to my you-tube channel for more helpful tutorials, thank you.

Post a Comment

0 Comments