SlideShare uma empresa Scribd logo
1 de 22
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

Mais conteúdo relacionado

Mais procurados

Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051SARITHA REDDY
 
(D/A) and (A/D)conversion
(D/A) and (A/D)conversion(D/A) and (A/D)conversion
(D/A) and (A/D)conversionPraveen Kumar
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerSudhanshu Janwadkar
 
Interrupts for PIC18
Interrupts for PIC18Interrupts for PIC18
Interrupts for PIC18raosandy11
 
Modulo n counter
Modulo n counterModulo n counter
Modulo n counterManoj Guha
 
Pulse Modulation ppt
Pulse Modulation pptPulse Modulation ppt
Pulse Modulation pptsanjeev2419
 
Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...NimeshSingh27
 
Vlsi lab viva question with answers
Vlsi lab viva question with answersVlsi lab viva question with answers
Vlsi lab viva question with answersAyesha Ambreen
 
Interfacing methods of microcontroller
Interfacing methods of microcontrollerInterfacing methods of microcontroller
Interfacing methods of microcontrollerDiwaker Pant
 
4.4 diversity combining techniques
4.4   diversity combining techniques4.4   diversity combining techniques
4.4 diversity combining techniquesJAIGANESH SEKAR
 
Microprocessor based Temperature Controller
Microprocessor based Temperature ControllerMicroprocessor based Temperature Controller
Microprocessor based Temperature ControllerRevanth Reddy
 

Mais procurados (20)

8051 timer counter
8051 timer counter8051 timer counter
8051 timer counter
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 
(D/A) and (A/D)conversion
(D/A) and (A/D)conversion(D/A) and (A/D)conversion
(D/A) and (A/D)conversion
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 Microcontroller
 
waveshaping ckts
 waveshaping ckts waveshaping ckts
waveshaping ckts
 
Interrupts for PIC18
Interrupts for PIC18Interrupts for PIC18
Interrupts for PIC18
 
Embedded System Basics
Embedded System BasicsEmbedded System Basics
Embedded System Basics
 
VLSI
VLSIVLSI
VLSI
 
Modulo n counter
Modulo n counterModulo n counter
Modulo n counter
 
Magic tee
Magic tee  Magic tee
Magic tee
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
 
Pulse Modulation ppt
Pulse Modulation pptPulse Modulation ppt
Pulse Modulation ppt
 
Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
 
Vlsi lab viva question with answers
Vlsi lab viva question with answersVlsi lab viva question with answers
Vlsi lab viva question with answers
 
Interfacing methods of microcontroller
Interfacing methods of microcontrollerInterfacing methods of microcontroller
Interfacing methods of microcontroller
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
4.4 diversity combining techniques
4.4   diversity combining techniques4.4   diversity combining techniques
4.4 diversity combining techniques
 
Microprocessor based Temperature Controller
Microprocessor based Temperature ControllerMicroprocessor based Temperature Controller
Microprocessor based Temperature Controller
 

Semelhante a Sensor interfacing in 8051

MPC of TWT based Transmitter
MPC of TWT based TransmitterMPC of TWT based Transmitter
MPC of TWT based TransmitterAbhishek Sutrave
 
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.pptxnaveen088888
 
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 FREQUENCYGaurav Singh
 
File 1389427052
File 1389427052File 1389427052
File 1389427052Aman_preet
 
Quickly design infrared body temperature detector
Quickly design infrared body temperature detectorQuickly design infrared body temperature detector
Quickly design infrared body temperature detectorVinsion 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 projectprapyapokharel
 
ELECTRICAL ENGINEERING PROJECT
ELECTRICAL ENGINEERING PROJECTELECTRICAL ENGINEERING PROJECT
ELECTRICAL ENGINEERING PROJECTvasav2204
 
electrical engineering project
electrical engineering projectelectrical engineering project
electrical engineering projectvasav2204
 
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERDIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERChirag Lakhani
 
digitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdfdigitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdfsatyamsinha37
 
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
 
Embedded systems optimization memory requirments.pptx
Embedded systems optimization memory requirments.pptxEmbedded systems optimization memory requirments.pptx
Embedded systems optimization memory requirments.pptxsatheeshKumar750
 
A PROJECT ON scada.pptx
A PROJECT ON scada.pptxA PROJECT ON scada.pptx
A PROJECT ON scada.pptxAshhadRaza1
 
Temperature Sensors – Types
Temperature Sensors – TypesTemperature Sensors – Types
Temperature Sensors – Typeselprocus
 
Unit iv microcontrollers final
Unit iv microcontrollers finalUnit iv microcontrollers final
Unit iv microcontrollers finalSARITHA REDDY
 
03 analog control_sp17
03 analog control_sp1703 analog control_sp17
03 analog control_sp17John Todora
 
Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)Chintan Patel
 

Semelhante a Sensor interfacing in 8051 (20)

MPC of TWT based Transmitter
MPC of TWT based TransmitterMPC of TWT based Transmitter
MPC of TWT based Transmitter
 
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
 
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
 
03 analog control_sp17
03 analog control_sp1703 analog control_sp17
03 analog control_sp17
 
Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)
 

Último

Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Communityprachaibot
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfalene1
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxStephen Sitton
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfBalamuruganV28
 
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithmComputer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithmDeepika Walanjkar
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosVictor Morales
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.elesangwon
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingBootNeck1
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewsandhya757531
 
Industrial Applications of Centrifugal Compressors
Industrial Applications of Centrifugal CompressorsIndustrial Applications of Centrifugal Compressors
Industrial Applications of Centrifugal CompressorsAlirezaBagherian3
 
OOP concepts -in-Python programming language
OOP concepts -in-Python programming languageOOP concepts -in-Python programming language
OOP concepts -in-Python programming languageSmritiSharma901052
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfChristianCDAM
 
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdfAkritiPradhan2
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Romil Mishra
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Coursebim.edu.pl
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Sumanth A
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionSneha Padhiar
 

Último (20)

Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Community
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptx
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdf
 
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithmComputer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitos
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overview
 
Industrial Applications of Centrifugal Compressors
Industrial Applications of Centrifugal CompressorsIndustrial Applications of Centrifugal Compressors
Industrial Applications of Centrifugal Compressors
 
OOP concepts -in-Python programming language
OOP concepts -in-Python programming languageOOP concepts -in-Python programming language
OOP concepts -in-Python programming language
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdf
 
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
 

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++); }