Temperature Sensor Interfacing with 8051
Sensor is any device capable of sensing physical parameters (like temperature, pressure, proximity, etc) and then convert into electrical signals so that it can be used for processing.
So, robots have Camera, piezoelectric sensors, acoustic sensors, accelerometer, etc.
Now let’s move on to some of the fundamentals of sensors. We can measure Light, motion, temperature, magnetic fields, gravity, humidity, vibration, pressure, electrical fields, sound, and other physical aspects of the external environment can be measured using them. Of course there are different sensors for each purpose like IR sensors, proximity sensors, temperature sensors, tilt sensors, accelerometers, ultrasonic sensors, RADAR, SONAR, etc.
Every sensor in this world has three terminals:
- Vcc – to power up the sensor
- GND – to provide a fixed negative reference
- Output – analog output of the sensor (in some sensors, there may be more than one output terminals)
The following block diagram demonstrates it.
The sensor senses the physical parameters and gives a corresponding output. In most cases the output is analog.
LM35 Temperature Sensor
LM35 is a precision centigrade temperature sensor.
- It has three terminals – Vcc, Ground and Output – as shown in the adjoining diagram.
- It has a sensitivity of 10mV/°C. This means that for every degree rise in temperature, the output voltage increases by 10mV.
- In general, it gives a voltage of 0V at 0°C. Hence, say for an output of 450mV, the temperature is 45°C.
Assembly Language Program for Interfacing
ALE BIT P2.6
OE BIT P2.5
SOC BIT P2.6
EOC BIT P2.7
ADDR_A BIT P2.0
ADDR_B BIT P2.1
ADDR_C BIT P2.2
MYDATA EQU P1
- Created and developed by Prof.S.M.Wagh,SKNCOE
- Interfacing diagram by Jayesh Gopal, Wikinote volunteer, SKNCOE
- WikiNote Foundation