SlideShare a Scribd company logo
Microcontroller
to Sensor
Interfacing
Techniques
GROUP MEMBERS
 IRFAN
AHMAD
 MUHAMMAD
JUNAID
 MUHAMMAD
ISHAQ
 ALAM NASIR
Micro-controllers are useful to the extent that they communicate
with other devices, such as sensors,
motors, switches, keypads, displays, memory and even other
micro-controllers
 Many microcontroller designs typically
mix multiple interfacing methods. In a
very simplistic form, a microcontroller
 system can be viewed as a system
that reads from (monitors) inputs,
performs processing and
 writes to ( controls ) outputs.
Input Devices Microcontroller Output
Devices
Microcontroller Interfaces
Analog Interface
Analog Inputs/Outputs
Sensor Types Temperature
Sensors
Thermistors
LM34 and LM35 Temperature Sensors
 The sensors of the LM34/LM35 series
 are good integrated-circuit
 temperature sensors whose output
 voltage is linearly proportional to the
 Fahrenheit/Celsius temperature
 􀂾 The LM34/LM35 requires no external
 calibration since it is inherently calibrated
 􀂾 It outputs 10 mV for each degree of
 Fahrenheit/Celsius temperature
Semiconductor Temperature
Sensors
8051 Connection to ADC0848 and
Temperature Sensor
 ADC0804 is a very commonly used 8-bit analog to
digital convertor. It is a single channel IC, i.e., it can
take only one analog signal as input. The digital
outputs vary from 0 to a maximum of 255. The step
size can be adjusted by setting the reference voltage at
pin9. When this pin is not connected, the default
reference voltage is the operating voltage, i.e., Vcc.
The step size at 5V is 19.53mV (5V/255), i.e., for every
19.53mV rise in the analog input, the output varies by 1
unit. To set a particular voltage level as the reference
value, this pin is connected to half the voltage. For
example, to set a refer ence of 4V (Vref), pin9 is
connected to 2V (Vref/2), thereby reducing the step
size to 15.62mV (4V/255).
QUESTION?
Q1
Q2
ADC808 has 8 analog inputs
 􀂾 It allows us to monitor up to 8 different
 transducers using only a single chip
 􀂾 The chip has 8-bit data output just like
the
 ADC804
 􀂾 The 8 analog input channels are
 multiplexed and selected according to
table
 below using three address pins, A, B,
and C
8051 Connection to ADC804
and Temperature Sensor
Getting Data From the Analog
World
Noise considerations
 Many sensors, such as
thermocouples, generate a relatively
small voltage so noise is always an
issue.
 The most common source of noise is
the utility power lines (50 Hz or 60
Hz).
 Typically, the bandwidth for
temperature sensors is much lower
than 50 or 60 Hz so a simple low-pass
FOR GROUNDING
Program:Code to read temp from ASC0848,convert it to
decimal,and put it on P0 with some delay?.
 #include<reg51.h>
 bit RD=P2^5;
 Sbit WR=P2^6;
 sbit E=P2^7;
 Sfr MYDATA=P1;
 Void
ConvertAndDisplay(unsigne
d char value);
 Void MSDelay(unsigned int
value);
 Void main()
 {
 MYDATA =0xFF;
 E=1;
 RD=1;
 WR=1;
 While(1)
 {
 WR=0;
 WR=1;
 While(INTR==1);
RD=0;
Value=MYDATA;
ConvertAndDisplay(value);
RD=1;
}
}
Id ConvertAndDisplay(unsigned char value)
{
Unsigned char x,d1,d2,d3;
X=value/10;
d1=value%10;
d2=X/10;
d3=X/10;
P0=d1;
MSDelay(250);
P0=d2;
MSDelay(250);
P0=d3;
MSDelay(250);
}
Void MSDelay(unsigned int value)
{
unsigned char x,y;
For(x=0;x<value;x++)
For(y=0;y<1275;y++);
}
Sensor interfacing in 8051

More Related Content

What's hot

8251 USART
8251 USART8251 USART
8251 USART
ShivamSood22
 
8051 timer counter
8051 timer counter8051 timer counter
8051 timer counter
vishalgohel12195
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051Muthu Manickam
 
Interfacing adc
Interfacing adcInterfacing adc
Interfacing adcPRADEEP
 
Relay interfacing with 8051
Relay interfacing with 8051Relay interfacing with 8051
Relay interfacing with 8051
Pratik Phadte
 
R-2R Ladder DAC
R-2R Ladder DACR-2R Ladder DAC
R-2R Ladder DAC
Chandul4y
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
Rahul Kumar
 
Intel 8051 - pin description
Intel 8051  - pin descriptionIntel 8051  - pin description
Intel 8051 - pin description
DEPARTMENT OF PHYSICS
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
Poojith Chowdhary
 
(D/A) and (A/D)conversion
(D/A) and (A/D)conversion(D/A) and (A/D)conversion
(D/A) and (A/D)conversion
Praveen Kumar
 
Interrupts in 8051
Interrupts in 8051Interrupts in 8051
Interrupts in 8051
Sudhanshu Janwadkar
 
7 segment led interfacing with 8051
7 segment led interfacing with 80517 segment led interfacing with 8051
7 segment led interfacing with 8051
Sam Patel
 
Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051
Pantech ProLabs India Pvt Ltd
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
Pantech ProLabs India Pvt Ltd
 
Timing diagram 8085 microprocessor
Timing diagram 8085 microprocessorTiming diagram 8085 microprocessor
Timing diagram 8085 microprocessor
Velalar College of Engineering and Technology
 
Sensors and microcontroller interfacing
Sensors and microcontroller interfacingSensors and microcontroller interfacing
Sensors and microcontroller interfacing
mohamed albanna
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingMicrocontroller 8051 and its interfacing
Microcontroller 8051 and its interfacing
Ankur Mahajan
 
DAC-digital to analog converter
DAC-digital to analog converterDAC-digital to analog converter
DAC-digital to analog converter
Shazid Reaj
 
Arm Development Tools
Arm Development ToolsArm Development Tools
Arm Development Tools
PriyangaKR1
 
Pic 18 microcontroller
Pic 18 microcontrollerPic 18 microcontroller
Pic 18 microcontroller
Ashish Ranjan
 

What's hot (20)

8251 USART
8251 USART8251 USART
8251 USART
 
8051 timer counter
8051 timer counter8051 timer counter
8051 timer counter
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051
 
Interfacing adc
Interfacing adcInterfacing adc
Interfacing adc
 
Relay interfacing with 8051
Relay interfacing with 8051Relay interfacing with 8051
Relay interfacing with 8051
 
R-2R Ladder DAC
R-2R Ladder DACR-2R Ladder DAC
R-2R Ladder DAC
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
 
Intel 8051 - pin description
Intel 8051  - pin descriptionIntel 8051  - pin description
Intel 8051 - pin description
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
 
(D/A) and (A/D)conversion
(D/A) and (A/D)conversion(D/A) and (A/D)conversion
(D/A) and (A/D)conversion
 
Interrupts in 8051
Interrupts in 8051Interrupts in 8051
Interrupts in 8051
 
7 segment led interfacing with 8051
7 segment led interfacing with 80517 segment led interfacing with 8051
7 segment led interfacing with 8051
 
Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
 
Timing diagram 8085 microprocessor
Timing diagram 8085 microprocessorTiming diagram 8085 microprocessor
Timing diagram 8085 microprocessor
 
Sensors and microcontroller interfacing
Sensors and microcontroller interfacingSensors and microcontroller interfacing
Sensors and microcontroller interfacing
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingMicrocontroller 8051 and its interfacing
Microcontroller 8051 and its interfacing
 
DAC-digital to analog converter
DAC-digital to analog converterDAC-digital to analog converter
DAC-digital to analog converter
 
Arm Development Tools
Arm Development ToolsArm Development Tools
Arm Development Tools
 
Pic 18 microcontroller
Pic 18 microcontrollerPic 18 microcontroller
Pic 18 microcontroller
 

Similar to Sensor interfacing in 8051

MPC of TWT based Transmitter
MPC of TWT based TransmitterMPC of TWT based Transmitter
MPC of TWT based TransmitterAbhishek Sutrave
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
ragupathi90
 
UNIT 4 & 5 - I nterfacing_Lecture7.pptx
UNIT 4 & 5 - I         nterfacing_Lecture7.pptxUNIT 4 & 5 - I         nterfacing_Lecture7.pptx
UNIT 4 & 5 - I nterfacing_Lecture7.pptx
naveen088888
 
AUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCY
AUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCYAUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCY
AUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCY
Gaurav Singh
 
File 1389427052
File 1389427052File 1389427052
File 1389427052
Aman_preet
 
Quickly design infrared body temperature detector
Quickly design infrared body temperature detectorQuickly design infrared body temperature detector
Quickly design infrared body temperature detector
Vinsion Chan
 
Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)
Daman Singh
 
Monitoring and data logging system for a generator
Monitoring and data logging system for a generatorMonitoring and data logging system for a generator
Monitoring and data logging system for a generatorMoon Shahzad
 
Microprocessor project
Microprocessor projectMicroprocessor project
Microprocessor project
prapyapokharel
 
ELECTRICAL ENGINEERING PROJECT
ELECTRICAL ENGINEERING PROJECTELECTRICAL ENGINEERING PROJECT
ELECTRICAL ENGINEERING PROJECT
vasav2204
 
electrical engineering project
electrical engineering projectelectrical engineering project
electrical engineering project
vasav2204
 
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERDIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
Chirag Lakhani
 
digitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdfdigitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdf
satyamsinha37
 
Microprocessor based Temperature Controller
Microprocessor based Temperature ControllerMicroprocessor based Temperature Controller
Microprocessor based Temperature Controller
Revanth Reddy
 
A Unique Approach to Developing Sensor Signal Path Solutions
A Unique Approach to Developing Sensor Signal Path SolutionsA Unique Approach to Developing Sensor Signal Path Solutions
A Unique Approach to Developing Sensor Signal Path SolutionsHarold Joseph
 
Speed control of motor
Speed control of motorSpeed control of motor
Speed control of motor
Pankaj Kumar Nayak
 
Embedded systems optimization memory requirments.pptx
Embedded systems optimization memory requirments.pptxEmbedded systems optimization memory requirments.pptx
Embedded systems optimization memory requirments.pptx
satheeshKumar750
 
A PROJECT ON scada.pptx
A PROJECT ON scada.pptxA PROJECT ON scada.pptx
A PROJECT ON scada.pptx
AshhadRaza1
 
Temperature Sensors – Types
Temperature Sensors – TypesTemperature Sensors – Types
Temperature Sensors – Types
elprocus
 
Unit iv microcontrollers final
Unit iv microcontrollers finalUnit iv microcontrollers final
Unit iv microcontrollers final
SARITHA REDDY
 

Similar to Sensor interfacing in 8051 (20)

MPC of TWT based Transmitter
MPC of TWT based TransmitterMPC of TWT based Transmitter
MPC of TWT based Transmitter
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
 
UNIT 4 & 5 - I nterfacing_Lecture7.pptx
UNIT 4 & 5 - I         nterfacing_Lecture7.pptxUNIT 4 & 5 - I         nterfacing_Lecture7.pptx
UNIT 4 & 5 - I nterfacing_Lecture7.pptx
 
AUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCY
AUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCYAUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCY
AUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCY
 
File 1389427052
File 1389427052File 1389427052
File 1389427052
 
Quickly design infrared body temperature detector
Quickly design infrared body temperature detectorQuickly design infrared body temperature detector
Quickly design infrared body temperature detector
 
Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)
 
Monitoring and data logging system for a generator
Monitoring and data logging system for a generatorMonitoring and data logging system for a generator
Monitoring and data logging system for a generator
 
Microprocessor project
Microprocessor projectMicroprocessor project
Microprocessor project
 
ELECTRICAL ENGINEERING PROJECT
ELECTRICAL ENGINEERING PROJECTELECTRICAL ENGINEERING PROJECT
ELECTRICAL ENGINEERING PROJECT
 
electrical engineering project
electrical engineering projectelectrical engineering project
electrical engineering project
 
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERDIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
 
digitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdfdigitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdf
 
Microprocessor based Temperature Controller
Microprocessor based Temperature ControllerMicroprocessor based Temperature Controller
Microprocessor based Temperature Controller
 
A Unique Approach to Developing Sensor Signal Path Solutions
A Unique Approach to Developing Sensor Signal Path SolutionsA Unique Approach to Developing Sensor Signal Path Solutions
A Unique Approach to Developing Sensor Signal Path Solutions
 
Speed control of motor
Speed control of motorSpeed control of motor
Speed control of motor
 
Embedded systems optimization memory requirments.pptx
Embedded systems optimization memory requirments.pptxEmbedded systems optimization memory requirments.pptx
Embedded systems optimization memory requirments.pptx
 
A PROJECT ON scada.pptx
A PROJECT ON scada.pptxA PROJECT ON scada.pptx
A PROJECT ON scada.pptx
 
Temperature Sensors – Types
Temperature Sensors – TypesTemperature Sensors – Types
Temperature Sensors – Types
 
Unit iv microcontrollers final
Unit iv microcontrollers finalUnit iv microcontrollers final
Unit iv microcontrollers final
 

Recently uploaded

weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 

Recently uploaded (20)

weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 

Sensor interfacing in 8051

  • 1.
  • 2. Microcontroller to Sensor Interfacing Techniques GROUP MEMBERS  IRFAN AHMAD  MUHAMMAD JUNAID  MUHAMMAD ISHAQ  ALAM NASIR
  • 3. Micro-controllers are useful to the extent that they communicate with other devices, such as sensors, motors, switches, keypads, displays, memory and even other micro-controllers  Many microcontroller designs typically mix multiple interfacing methods. In a very simplistic form, a microcontroller  system can be viewed as a system that reads from (monitors) inputs, performs processing and  writes to ( controls ) outputs.
  • 9.
  • 11. LM34 and LM35 Temperature Sensors  The sensors of the LM34/LM35 series  are good integrated-circuit  temperature sensors whose output  voltage is linearly proportional to the  Fahrenheit/Celsius temperature  􀂾 The LM34/LM35 requires no external  calibration since it is inherently calibrated  􀂾 It outputs 10 mV for each degree of  Fahrenheit/Celsius temperature
  • 12.
  • 14. 8051 Connection to ADC0848 and Temperature Sensor  ADC0804 is a very commonly used 8-bit analog to digital convertor. It is a single channel IC, i.e., it can take only one analog signal as input. The digital outputs vary from 0 to a maximum of 255. The step size can be adjusted by setting the reference voltage at pin9. When this pin is not connected, the default reference voltage is the operating voltage, i.e., Vcc. The step size at 5V is 19.53mV (5V/255), i.e., for every 19.53mV rise in the analog input, the output varies by 1 unit. To set a particular voltage level as the reference value, this pin is connected to half the voltage. For example, to set a refer ence of 4V (Vref), pin9 is connected to 2V (Vref/2), thereby reducing the step size to 15.62mV (4V/255).
  • 16. ADC808 has 8 analog inputs  􀂾 It allows us to monitor up to 8 different  transducers using only a single chip  􀂾 The chip has 8-bit data output just like the  ADC804  􀂾 The 8 analog input channels are  multiplexed and selected according to table  below using three address pins, A, B, and C
  • 17. 8051 Connection to ADC804 and Temperature Sensor
  • 18. Getting Data From the Analog World
  • 19. Noise considerations  Many sensors, such as thermocouples, generate a relatively small voltage so noise is always an issue.  The most common source of noise is the utility power lines (50 Hz or 60 Hz).  Typically, the bandwidth for temperature sensors is much lower than 50 or 60 Hz so a simple low-pass
  • 21. Program:Code to read temp from ASC0848,convert it to decimal,and put it on P0 with some delay?.  #include<reg51.h>  bit RD=P2^5;  Sbit WR=P2^6;  sbit E=P2^7;  Sfr MYDATA=P1;  Void ConvertAndDisplay(unsigne d char value);  Void MSDelay(unsigned int value);  Void main()  {  MYDATA =0xFF;  E=1;  RD=1;  WR=1;  While(1)  {  WR=0;  WR=1;  While(INTR==1); RD=0; Value=MYDATA; ConvertAndDisplay(value); RD=1; } } Id ConvertAndDisplay(unsigned char value) { Unsigned char x,d1,d2,d3; X=value/10; d1=value%10; d2=X/10; d3=X/10; P0=d1; MSDelay(250); P0=d2; MSDelay(250); P0=d3; MSDelay(250); } Void MSDelay(unsigned int value) { unsigned char x,y; For(x=0;x<value;x++) For(y=0;y<1275;y++); }