Interfacing temperature sensor (LM35) with arduino:
In this post, we will learn how to interface temperature sensor (LM35) with arduino uno.
Arduino Uno is an open-source electronic prototype board used by beginners, hobbyists and developers across the globe, Arduino have so many forums, if you need any help, guidance.
Arduino uno is based on atmega 328p microcontroller. Arduino uno comes in two pckages:
Through-hole package and SMD package.
For the time being, we are considering through-hole package. It's a 28-pin DIP (dual inline package) IC. There are 14-digital I/O pins and 6-analog input pins.
Arduino has a rich library support. For example: led blinking, lcd interfacing, etc. all these program can br found in library.
In order to display data received from temperature esnsor, we need display device like seven segment display or lcd or alternatively we can use serial monitor.
LM-35 is a temperature sensor. It's sensitivity is 10mV/°C which literally means with rise in temperature by 1° Celsius the voltage is increased by 1 millivolts. It's graph is linear.
It's range is from -55° Celsius to +150° Celsius.
Arduino have 6-adc channels viz, A0-A5. These are 10-bit adc means 0-5 analog volt is converted into digital count ranging from 0-1023
Resolution = Vref/((2^10)-1) = Vref/1023
We are taking Vref as 5 volt. Now, the resolution comes out to be 4.887 mV
In order to convert digital count into voltage, we have to multiply it by 4.887. Now we have voltage. We have to convert this voltage into temperature. This is known as calibration.
Temperature in ° C = 4.887 * digital count (0-1023) /10.0
Here are the screenshots of prteus simulation and code:
Download arduino code and simulation from the link given below:
https://drive.google.com/file/d/0B4Px6Drl6Zz_RFB2MEM4YUdPRGM/view?usp=sharing
Stay tuned for more updates !!
In this post, we will learn how to interface temperature sensor (LM35) with arduino uno.
Arduino Uno is an open-source electronic prototype board used by beginners, hobbyists and developers across the globe, Arduino have so many forums, if you need any help, guidance.
Arduino uno is based on atmega 328p microcontroller. Arduino uno comes in two pckages:
Through-hole package and SMD package.
For the time being, we are considering through-hole package. It's a 28-pin DIP (dual inline package) IC. There are 14-digital I/O pins and 6-analog input pins.
Arduino has a rich library support. For example: led blinking, lcd interfacing, etc. all these program can br found in library.
In order to display data received from temperature esnsor, we need display device like seven segment display or lcd or alternatively we can use serial monitor.
LM-35 is a temperature sensor. It's sensitivity is 10mV/°C which literally means with rise in temperature by 1° Celsius the voltage is increased by 1 millivolts. It's graph is linear.
It's range is from -55° Celsius to +150° Celsius.
Arduino have 6-adc channels viz, A0-A5. These are 10-bit adc means 0-5 analog volt is converted into digital count ranging from 0-1023
Resolution = Vref/((2^10)-1) = Vref/1023
We are taking Vref as 5 volt. Now, the resolution comes out to be 4.887 mV
In order to convert digital count into voltage, we have to multiply it by 4.887. Now we have voltage. We have to convert this voltage into temperature. This is known as calibration.
Temperature in ° C = 4.887 * digital count (0-1023) /10.0
Here are the screenshots of prteus simulation and code:
Proteus simulation |
Download arduino code and simulation from the link given below:
https://drive.google.com/file/d/0B4Px6Drl6Zz_RFB2MEM4YUdPRGM/view?usp=sharing
Stay tuned for more updates !!