It is commonly used as a temperature measurement sensors. It includes thermocouples, platinum resistance, thermal resistance and temperature semiconductor chips, which commonly used in high temperature measurement thermocouples. Platinum resistance temperature used in the measurement of 800 degrees Celsius, while the thermal resistance and semiconductor temperature sensor suitable for measuring the temperature of 100-200 degrees or below, in which the application of a simple semiconductor temperature sensor has good linearity and high sensitivity.
The output of LM35 has a linear relationship to the temperature in degree Celsius. When the temperature is 0 degree Celsius, the output is 0V, and when the temperature rises for 1 degree Celsius, the output voltage will increase 10mV.
The equation is as follows:
V (T)=10 mV * T
In this post, we look at how to use LM35 on a pcDuino.
Step 1: BOM
2. 1 x LM35 temperature sensor
3. 1 x Red LED, 1x Green LED, 1 x Blue LED
4. Resistor of value 220 ohm
5. Jumper wire
Step 2: Wire Diagram
Step 3: How It Works
From the principle of LM35, we know that when the temperature rises for 1 degree Celsius, the output voltage will increase 10mW.
When the voltage is 0.2v to 0.3V (which means temperature is between 20 degree Celsius to 30 degree Celsius), the reading of ADC will be 248 to 372. The green LED will turn on at this time. It means the environment is comfortable.
When the voltage is 0.3v to 0.4V (which means temperature is between 30 degree Celsius to 40 degree Celsius), the reading of ADC will be 372 to 496. The yellow LED will turn on at this time. It means the environment is uncomfortable.
When temperature is below 20 degree Celsius or higher than 40 degree Celsius, red LED will turn on to indicate that the environment is extremely uncomfortable.
Step 4: Code
The code is shown below:
int sensorPin =A5;
printf("I am here");