UNIT - V
MICROPROCESSOR BASED SYSTEM
 DESIGN, DIGITAL INTERFACING



           Prepared By,
    R-THANDAIAH PRABU M.E.,
          Lecturer - ECE
       thandaiah@gmail.com
Interfacing Output Peripherals
 •   Commonly used output peripherals in embedded systems are
      – LEDs, seven-segment LEDs, and LCDs; the simplest is LED

 •   Two ways of connecting LEDs to I/O ports:
      – LED cathodes are grounded and logic 1 from the I/O port turns on the
        LEDs - The current is supplied by the I/O port called current sourcing.
      – LED anodes are connected to the power supply and logic 0 from the I/O
        port turns on the LEDs - The current is received by the chip called current
        sinking.




                      Common Cathode        Common Anode

                        Active high          Active low
Interfacing Seven-Segment
        LEDs as an Output
• Seven-segment LEDs
   – Often used to display BCD numbers (1 through 9) and
   a few alphabets

   – A group of eight LEDs physically mounted in the shape of
     the number eight plus a decimal point

   – Each LED is called a segment and labeled as ‘a’ through
     ‘g’.
Interfacing Seven-Segment
    LEDs as an Output
               • Two types of seven-segment
                 LEDs
                  – Common anode
                  – Common cathode




          decimal point
Interfacing Seven-Segment
    LEDs as an Output
             •   In a common anode seven-
                 segment LED
                  – All anodes are connected
                    together to a power supply and
                    cathodes are connected to data
                    lines
             •   Logic 0 turns on a segment.

             •   Example: To display digit 1, all
                 segments except b and c should
                 be off.
             •   Byte 11111001 = F9H will display
                 digit 1.
BCD            pgfedcba             he
                                             7_seg              x
                            0000           001111 11            3f
                            0001           00110000             30
                            0010           0101101 1            5b
                            0011           010011 11            4f
                            0100           011001 10            66
                            0101           01101101             6d
                            0110           01111101             7d
                            0111           00000111             07
                            1000           01111111             7f
                            1001           01101111             6f
    a               a        a                          a           a        a           a           a
f       b   f           b          b   f        b   f           f                b   f       b   f           b
                    g        g              g           g            g                   g               g
e       c   e   e                  c            c           c   e        c       c   e       c               c
    d               d        d                          d            d                   d               d



                                            SJCET
Interfacing Seven-Segment
    LEDs as an Output
             •   In a common cathode seven-
                 segment LED
                  – All cathodes are connected
                    together to ground and the
                    anodes are connected to data
                    lines
             •   Logic 1 turns on a segment.

             •   Example: To display digit 1, all
                 segments except b and c should
                 be off.
             •   Byte 00000110 = 06H will display
                 digit 1.
Seven-Segment Chips




ALPHA/NUMERIC C/A
DISPLAY
Interfacing to Multiple 7-Segments
Following is a list of semiconductor materials and the corresponding colors:
• Aluminium gallium arsenide (AlGaAs) — red and infrared
• Aluminium gallium phosphide (AlGaP) — green
• Aluminium gallium indium phosphide (AlGaInP) — high-brightness orange-red,
orange, yellow, and green
• Gallium arsenide phosphide (GaAsP) — red, orange-red, orange, and yellow
• Gallium phosphide (GaP) — red, yellow and green
• Gallium nitride (GaN) — green, pure green (or emerald green), and blue also
white (if it has an AlGaN Quantum Barrier)
• Indium gallium nitride (InGaN) — 450 nm - 470 nm — near ultraviolet,
     bluishgreen and blue
• Silicon carbide (SiC) as substrate — blue
• Silicon (Si) as substrate — blue (under development)
• Sapphire (Al2O3) as substrate — blue
• Zinc selenide (ZnSe) — blue
• Diamond (C) — ultraviolet
• Aluminium nitride (AlN), aluminium gallium nitride (AlGaN), aluminium
gallium indium nitride (AlGaInN) — near to far ultraviolet (down to 210 nm)



                              SJCET
Typical LED Characteristics
LED Displays
Interfacing Dip Switches and
      Interfacing LEDs
Interfacing Push-Button Keys
Key Debouncing Circuits
Interfacing To Alphanumeric
          Displays




          SJCET
LCD Display Characteristics
•   Numeric, text and/or graphic displays
•   Extremely low power
•   Passive
•   Temperature sensitive
•   Complex drivers required to create
    segment waveforms
LCD Technology
• Natural state
   – Molecules are arranged in a loosely ordered fashion
     with their long axes parallel.
• Aligned state
   – When coming into contact with a finely grooved surface
     (alignment layer), molecules line up in parallel along
     the grooves.
LCD Technology
• When liquid crystals are sandwiched between upper and
  lower plates, they line up with grooves pointing in
  directions 'a' and 'b,' respectively. The molecules along
  the upper plate point in direction 'a' and those along the
  lower plate in direction 'b,' thus forcing the liquid
  crystals into a twisted structural arrangement. (figure
  shows a 90-degree twist) (TN type liquid crystal)
LCD Technology
• Light passes through liquid
  crystals, following the
  direction in which the
  molecules are arranged. When
  the molecule arrangement is
  twisted 90 degrees as shown in
  the figure, the light also twists
  90 degrees as it passes
  through the liquid crystals.
LCD Technology
• The molecules in liquid
  crystals are easily
  rearranged by applying
  voltage or another
  external force. When
  voltage is applied,
  molecules rearrange
  themselves vertically
  (along the electric field)
  and light passes straight
  through.
LCD Technology
• Light passes when
  two polarizing filters
  are arranged with
  their axes aligned
  (left).
• Light is blocked when
  two polarizing filters
  are arranged with
  their axes
  perpendicular (right).
LCD Technology
• A combination
  of polarizing
  filters and
  twisted liquid
  crystal is used to
  create a liquid
  crystal display.
LCD Character Modules
• Based on Hitachi LCD-II controller protocol

  –   1 to 4 lines, 8-20 characters per line
  –   4 or 8 bit parallel interface
  –   control signals
  –   Controllable cursor
  –   2 read/write registers
       • Instruction/status
       • data
LCD Interfacing

• Liquid Crystal Displays (LCDs)
• cheap and easy way to display text
• Various configurations (1 line by 20 X char upto 8 lines
  X 80 ).
• Integrated controller
• The display has two register
   – command register
   – data register
• By RS you can select register
• Data lines (DB7-DB0) used to transfer data and
  commands
Alpha numeric LCD Interfacing
                                 Microcontrolle
                                       r

•   Pin out                                               E                         communications
                                                                                        bus
     – 8 data pins D7:D0                                  R/W

     – RS: Data or Command                                RS
       Register Select                                    DB7–DB0
     – R/W: Read or Write
                                                   8
     – E: Enable (Latch data)                                   LCD
                                                              controller


•   RS – Register Select                                                   LCD Module
     – RS = 0 → Command Register
     – RS = 1 → Data Register
•   R/W = 0 → Write ,          R/W = 1 → Read
•   E – Enable
     – Used to latch the data present on the data pins.

•   D0 – D7
     – Bi-directional data/command pins.
     – Alphanumeric characters are sent in ASCII format.
LCD Commands

• The LCD’s internal controller can accept several
  commands and modify the display accordingly. These
  commands would be things like:
   – Clear screen
   – Return home
   – Decrement/Increment cursor


• After writing to the LCD, it takes some time for it to
  complete its internal operations. During this time, it
  will not accept any new commands or data.
   – We need to insert time delay between any two commands or
     data sent to LCD
Pin Description
Command Codes
Interfacing LCD with 8051

8051

                                   LM015
    P3.4
                                   RW
    P3.5                           E


    P3.3                           RS



P1.7-P1.0                          D7-D0
Interfacing LCD
•   Hardware
    – 20 x 2-line LCD displays (two lines
      with 20 characters per line)
    – LCD has a display Data RAM
      (registers) that stores data in 8-bit
      character code.
    – Each register in Data RAM has its own
      address that corresponds to its position
      on the line.                                PICDEMO
        • The address range for Line 1 is 00 to
          13H and Line 2 is 40H to 53H.
Interfacing LCD
• Driver HD77480
   – Three control signals:
      • RS – Register Select (RA3)
      • R/W – Read/Write (RA2)
      • E – Enable (RA1)
   – Three power connections
      • Power, ground, and the variable register to control the
        brightness
Interfacing LCD
• Can be interfaced either in the 8-bit mode or the 4-bit
  mode
   – In the 8-bit mode, all eight data lines are connected for data
     transfer
   – In the 4-bit mode, only four data lines (DB7-DB4 or DB3-
     DB0) are connected and two transfers per character (or
     instruction) are needed
• Driver (HD77480) has two 8-bit internal registers
   – Instruction Register (IR) to write instructions to set up LCD
   – Data Register (DR) to write data (ASCII characters)

  IR REGISTER
  DR REGISTER
Interfacing LCD
• LCD Operation

  – When the MPU writes an instruction to IR or data to DR,
    the controller:
      • Sets the data line DB7 high as a flag indicating that the
        controller is busy completing the operation
      • Sets the data line DB7 low after the completion of the
        operation

  – The MPU should always check whether DB7 is low before
    sending an instruction or a data byte

  – After the power up, DB7 cannot be checked for the first two
    initialization instructions.
LCD Interfacing
• Simple parallel interface – similar to LED:

                 VDD        7-segment
                            LCD
                            Driver/Decoder       Separate Front Planes
    8051                                     a
                                             b
                                             c
                        A                    d
      port              B                    e
      pins              C                    f
                        D                    g
                                                 Common Back Plane

           60 Hz
           Oscillator
TEMPERATURE CONTROLLER
USING 8085 MICROPROCESSOR




          SJCET
AIM:
• The aim of the project is to control/maintain temperature of a plant
   within a desired limit.

PROJECT DESCRIPTION:

•   Industrial and control application/may require automation of the
    process such as temperature, pressure, liquid flow, etc., in order to
    minimize manual intervention. To automate any application an
    intelligent processor plays a major role. One such processor proposed
    for the project is 8085, an 8-bit microprocessor.
•   The temperature controller can be used to control the temperature of
    any plant. Typically it contains a Processor unit, Temperature input
    unit and Control output unit. The 8085 based motherboard forms the
    processing unit. The Analog-to-Digital unit together with temperature
    sensor forms the temperature input unit. The relay driver forms the
    control output unit. Electric power to the heating element (coil) is
    supplied through relay contacts. The switching ON/OFF of the relay
    controls the heat supplied to the plant.

                                SJCET
Tem p                                                        C o n tro l
                         M PU                                                P la n t
In p u t                                                      o u tp u t




           S im p le s c h e m a tic o f te m p e ra tu re c o n tro lle r


                                 SJCET
•   Operationally, the system requires two set points-upper and lower, to be
    entered by the user. Whenever the temperature of the plant exceeds the
    upper limit or recede the lower limit relay is turned-off, so that a
    temperature is maintained within limits. The software for the
    temperature controller is developed in 8085 assembly language
    programs.

HARDWARE DESCRIPTION:

•   The hardware consists of 8085 microprocessor motherboard, ADC
    interface board, and relay and driver unit.

Block Diagram of 8085 Microprocessor based Temperature Controller

•   The motherboard consists of 8085 MPU, 8KB EPROM, 8KB RAM
    keyboard and display controller 8279, programmable peripheral
    interface 8255, 21 key hex-keypad and six numbers of seven segment
    LED’s. Ports Expansion connector parallel port connectors are
    provided for external interfacing.

                                 SJCET
d riv e r                                                                                                                                                                                +V




                     2 6 p in c o n n e c to r
                        P a ra lle l p o rt
                                                         8255              8085                       LATCH
                                                         PPI               CPU
                                                                                                                                                                                            AD         TEM PERATU
                                                                                                                                                                                            590           SEN SO R




                                                                                                                             5 0 p in E x p a n s io n c o n n e c to r
                                                                                                                        15
    NC




                                                                                           7




                                                                                                                     A 8-A
                                                                                       D 0- D
                                                                                                                                                                               ADC
P                                                                                                   SY STEM BU S
                                                                                                                                                                          IN T E R FA C E
                                                                                                                                                                               BOARD


                                                 EPROM          RAM                   8279
                                                  8K B          8K B              KEYBOARD
                                                                                   D IS P L A Y
                                                                                                              D IS P L A Y



                                                                       C          D    E        F     in t

                                                                       8          9    A        B

                                                                       4          5    6        7     N xt

                                                                       0          1    2        3     Sub

                                                                             KEYBOARD

                                                                                      SJCET
•   The temperature input board or ADC interface board consists of
    ADC 0809, which is an 8-bit converter with eight channels of
    input. It is interfaced with the motherboard through 50-pin bus
    expansion connector. The temperature sensor ADC590 is used
    to sense the temperature of the plant and its analog output is
    applied to the channel-0 of ADC.

•   Relay is switched ON/OFF by driving the transistor to
    saturation/cut-off which is connected to port A of 8255.




                              SJCET
Temperature measurement
the most frequently measured value in industry
                                                 Protection and
                                                 head assembly


                                                 Extension Assemblies



                                                  Thermowell
Temperature measurement
Thermistance (RTD - resistance temperature detector):
   metal whose resistance depends on temperature:
+ cheap, robust, high temperature range ( -180ºC ..600ºC),
   - require current source, non-linear.
   Thermistor (NTC - negative temperature coefficient):
       semiconductor whose resistance depends on temperature:
       + very cheap, sensible,
       - low temperature, imprecise, needs current source, strongly non-linear, fragile,
   self-heating
 Thermo-element (Thermoelement, thermocouple):
     pair of dissimilar metals that generate a voltage proportional to the
              temperature difference between warm and cold junction (Seebeck effect)
     + high precision, high temperature, punctual measurement
     - low voltage, requires cold junction compensation, high amplification, linearization
        Spectrometer:
           measures infrared radiation by photo-sensitive semiconductors
           + highest temperature, measures surfaces, no contact
           - highest price
     Bimetal (Bimetall, bilame):
       mechanical (yes/no) temperature indicator using the difference in the dilatation
       coefficients of two metals, very cheap, widely used (toasters...)
Cold junction box
SHAFT ENCODERS




      SJCET
• The optical motor shaft encoders are
  used to get the information about the
  position, direction of rotation, and speed
  of rotation of various motor shafts.
• Provide digital information
• 2 types:
• Absolute and Incremental

                   SJCET
Shaft Encoder Attaching
Adjustable screw       Mechanism
onnected to the platform




                                    Shaft Encoder
                                    Opto-swtich
Encoder Wheel




48 Segment Wheel             Encoder Wheel with more Segments
      Alternating slots make reflecting and non-reflecting surfaces.
      More stripes give greater resolution to measurements.
      The stripes cannot be narrow than the field of view of the slotted
      optical switch.
Shaft Encoder Design
Wheel Shaft encoder connected to
         the DC motor
Designed Shaft Encoder
Absolute Optical Encoders
• Used when loss of reference is not possible.
• Gray codes: only one bit changes at a time ( less uncertainty).
• The information is transferred in parallel form (many wires are necessary).


                                                          Binar       Gray
                                                            y         Code
                                                                       000
                                                           000
                                                                       001

                                                                       011
                                                           001
                                                                       010

                                                           010         110

                                                                       111
                                                           011         101

                                                                       100
53                                                         100
Incremental Optical Encoders
• Relative position
                                   light
                                   sensor
                                     decode
                         light       circuitry
                 grating emitter




 54
Incremental Optical Encoders
• Incremental Encoder:
                                                  light
                                                  sensor
                                                  Decode
                            light emitter         circuitry
                  grating
              • It generates pulses proportional to the rotation speed of the
              shaft.
              • Direction can also be indicated with a two phase encoder:
              A




          B                        A leads B
 55
INCREMENTEL ENCODER




        SJCET
Other Odometry Sensors
   • Resolver
It has two stator windings
positioned at 90 degrees.
The output voltage is
proportional to the sine or
cosine function of the
rotor's angle. The rotor is
made up of a third winding,
winding C
 Potentiometer
 = varying
 resistance
    57
ROBOT




 SJCET
Embedded Control
• Microcontrollers are placed in devices, or
  embedded, for operation and control.
What is a Robot?
• A robot is a machine that gathers information
  about its environment (senses) and uses that
  information (thinks) to follow instructions to
  do work (acts)
  – The “sensing” part provides input to the robot
    through switches, light sensors,
  – The thinking part is the microcontroller brain
  – The acting part could be through lights, motors,
    actuators, sounds, etc
Robots and Applications
• Robots come in many shapes and sizes
                        1. Ka
                               w
                       2. Fa ada's HRP-
                              nuc A          3P hu
                                    rcMat
                          speed           e 100 manoid rob
                                  weldin         i               o
                      3. MI
                            NI-RO        g and precision, h t
                                   BOT R        cutting        igh-
                         Sandi             ESEA          robot
                     4. Mi      a Nati             RCH —
                           ni-rob     onal L
                                            abora
                        the blo ot that can         tories
                               odstre         travel
                                       am             throug
                                                            h
High-Tech and Aerospace use




    Ecological      Undersea Research   JP Aerospace
  Data Collection    Harbor Branch       Test Launch
  EME Systems           Institute

Microprocessor based system design

  • 1.
    UNIT - V MICROPROCESSORBASED SYSTEM DESIGN, DIGITAL INTERFACING Prepared By, R-THANDAIAH PRABU M.E., Lecturer - ECE thandaiah@gmail.com
  • 2.
    Interfacing Output Peripherals • Commonly used output peripherals in embedded systems are – LEDs, seven-segment LEDs, and LCDs; the simplest is LED • Two ways of connecting LEDs to I/O ports: – LED cathodes are grounded and logic 1 from the I/O port turns on the LEDs - The current is supplied by the I/O port called current sourcing. – LED anodes are connected to the power supply and logic 0 from the I/O port turns on the LEDs - The current is received by the chip called current sinking. Common Cathode Common Anode Active high Active low
  • 3.
    Interfacing Seven-Segment LEDs as an Output • Seven-segment LEDs – Often used to display BCD numbers (1 through 9) and a few alphabets – A group of eight LEDs physically mounted in the shape of the number eight plus a decimal point – Each LED is called a segment and labeled as ‘a’ through ‘g’.
  • 4.
    Interfacing Seven-Segment LEDs as an Output • Two types of seven-segment LEDs – Common anode – Common cathode decimal point
  • 5.
    Interfacing Seven-Segment LEDs as an Output • In a common anode seven- segment LED – All anodes are connected together to a power supply and cathodes are connected to data lines • Logic 0 turns on a segment. • Example: To display digit 1, all segments except b and c should be off. • Byte 11111001 = F9H will display digit 1.
  • 6.
    BCD pgfedcba he 7_seg x 0000 001111 11 3f 0001 00110000 30 0010 0101101 1 5b 0011 010011 11 4f 0100 011001 10 66 0101 01101101 6d 0110 01111101 7d 0111 00000111 07 1000 01111111 7f 1001 01101111 6f a a a a a a a a f b f b b f b f f b f b f b g g g g g g g e c e e c c c e c c e c c d d d d d d d SJCET
  • 7.
    Interfacing Seven-Segment LEDs as an Output • In a common cathode seven- segment LED – All cathodes are connected together to ground and the anodes are connected to data lines • Logic 1 turns on a segment. • Example: To display digit 1, all segments except b and c should be off. • Byte 00000110 = 06H will display digit 1.
  • 9.
  • 10.
  • 11.
    Following is alist of semiconductor materials and the corresponding colors: • Aluminium gallium arsenide (AlGaAs) — red and infrared • Aluminium gallium phosphide (AlGaP) — green • Aluminium gallium indium phosphide (AlGaInP) — high-brightness orange-red, orange, yellow, and green • Gallium arsenide phosphide (GaAsP) — red, orange-red, orange, and yellow • Gallium phosphide (GaP) — red, yellow and green • Gallium nitride (GaN) — green, pure green (or emerald green), and blue also white (if it has an AlGaN Quantum Barrier) • Indium gallium nitride (InGaN) — 450 nm - 470 nm — near ultraviolet, bluishgreen and blue • Silicon carbide (SiC) as substrate — blue • Silicon (Si) as substrate — blue (under development) • Sapphire (Al2O3) as substrate — blue • Zinc selenide (ZnSe) — blue • Diamond (C) — ultraviolet • Aluminium nitride (AlN), aluminium gallium nitride (AlGaN), aluminium gallium indium nitride (AlGaInN) — near to far ultraviolet (down to 210 nm) SJCET
  • 12.
  • 13.
  • 14.
    Interfacing Dip Switchesand Interfacing LEDs
  • 15.
  • 16.
  • 17.
  • 18.
    LCD Display Characteristics • Numeric, text and/or graphic displays • Extremely low power • Passive • Temperature sensitive • Complex drivers required to create segment waveforms
  • 19.
    LCD Technology • Naturalstate – Molecules are arranged in a loosely ordered fashion with their long axes parallel. • Aligned state – When coming into contact with a finely grooved surface (alignment layer), molecules line up in parallel along the grooves.
  • 20.
    LCD Technology • Whenliquid crystals are sandwiched between upper and lower plates, they line up with grooves pointing in directions 'a' and 'b,' respectively. The molecules along the upper plate point in direction 'a' and those along the lower plate in direction 'b,' thus forcing the liquid crystals into a twisted structural arrangement. (figure shows a 90-degree twist) (TN type liquid crystal)
  • 21.
    LCD Technology • Lightpasses through liquid crystals, following the direction in which the molecules are arranged. When the molecule arrangement is twisted 90 degrees as shown in the figure, the light also twists 90 degrees as it passes through the liquid crystals.
  • 22.
    LCD Technology • Themolecules in liquid crystals are easily rearranged by applying voltage or another external force. When voltage is applied, molecules rearrange themselves vertically (along the electric field) and light passes straight through.
  • 23.
    LCD Technology • Lightpasses when two polarizing filters are arranged with their axes aligned (left). • Light is blocked when two polarizing filters are arranged with their axes perpendicular (right).
  • 24.
    LCD Technology • Acombination of polarizing filters and twisted liquid crystal is used to create a liquid crystal display.
  • 25.
    LCD Character Modules •Based on Hitachi LCD-II controller protocol – 1 to 4 lines, 8-20 characters per line – 4 or 8 bit parallel interface – control signals – Controllable cursor – 2 read/write registers • Instruction/status • data
  • 26.
    LCD Interfacing • LiquidCrystal Displays (LCDs) • cheap and easy way to display text • Various configurations (1 line by 20 X char upto 8 lines X 80 ). • Integrated controller • The display has two register – command register – data register • By RS you can select register • Data lines (DB7-DB0) used to transfer data and commands
  • 27.
    Alpha numeric LCDInterfacing Microcontrolle r • Pin out E communications bus – 8 data pins D7:D0 R/W – RS: Data or Command RS Register Select DB7–DB0 – R/W: Read or Write 8 – E: Enable (Latch data) LCD controller • RS – Register Select LCD Module – RS = 0 → Command Register – RS = 1 → Data Register • R/W = 0 → Write , R/W = 1 → Read • E – Enable – Used to latch the data present on the data pins. • D0 – D7 – Bi-directional data/command pins. – Alphanumeric characters are sent in ASCII format.
  • 28.
    LCD Commands • TheLCD’s internal controller can accept several commands and modify the display accordingly. These commands would be things like: – Clear screen – Return home – Decrement/Increment cursor • After writing to the LCD, it takes some time for it to complete its internal operations. During this time, it will not accept any new commands or data. – We need to insert time delay between any two commands or data sent to LCD
  • 29.
  • 30.
  • 31.
    Interfacing LCD with8051 8051 LM015 P3.4 RW P3.5 E P3.3 RS P1.7-P1.0 D7-D0
  • 32.
    Interfacing LCD • Hardware – 20 x 2-line LCD displays (two lines with 20 characters per line) – LCD has a display Data RAM (registers) that stores data in 8-bit character code. – Each register in Data RAM has its own address that corresponds to its position on the line. PICDEMO • The address range for Line 1 is 00 to 13H and Line 2 is 40H to 53H.
  • 33.
    Interfacing LCD • DriverHD77480 – Three control signals: • RS – Register Select (RA3) • R/W – Read/Write (RA2) • E – Enable (RA1) – Three power connections • Power, ground, and the variable register to control the brightness
  • 34.
    Interfacing LCD • Canbe interfaced either in the 8-bit mode or the 4-bit mode – In the 8-bit mode, all eight data lines are connected for data transfer – In the 4-bit mode, only four data lines (DB7-DB4 or DB3- DB0) are connected and two transfers per character (or instruction) are needed • Driver (HD77480) has two 8-bit internal registers – Instruction Register (IR) to write instructions to set up LCD – Data Register (DR) to write data (ASCII characters) IR REGISTER DR REGISTER
  • 35.
    Interfacing LCD • LCDOperation – When the MPU writes an instruction to IR or data to DR, the controller: • Sets the data line DB7 high as a flag indicating that the controller is busy completing the operation • Sets the data line DB7 low after the completion of the operation – The MPU should always check whether DB7 is low before sending an instruction or a data byte – After the power up, DB7 cannot be checked for the first two initialization instructions.
  • 36.
    LCD Interfacing • Simpleparallel interface – similar to LED: VDD 7-segment LCD Driver/Decoder Separate Front Planes 8051 a b c A d port B e pins C f D g Common Back Plane 60 Hz Oscillator
  • 37.
  • 38.
    AIM: • The aimof the project is to control/maintain temperature of a plant within a desired limit. PROJECT DESCRIPTION: • Industrial and control application/may require automation of the process such as temperature, pressure, liquid flow, etc., in order to minimize manual intervention. To automate any application an intelligent processor plays a major role. One such processor proposed for the project is 8085, an 8-bit microprocessor. • The temperature controller can be used to control the temperature of any plant. Typically it contains a Processor unit, Temperature input unit and Control output unit. The 8085 based motherboard forms the processing unit. The Analog-to-Digital unit together with temperature sensor forms the temperature input unit. The relay driver forms the control output unit. Electric power to the heating element (coil) is supplied through relay contacts. The switching ON/OFF of the relay controls the heat supplied to the plant. SJCET
  • 39.
    Tem p C o n tro l M PU P la n t In p u t o u tp u t S im p le s c h e m a tic o f te m p e ra tu re c o n tro lle r SJCET
  • 40.
    Operationally, the system requires two set points-upper and lower, to be entered by the user. Whenever the temperature of the plant exceeds the upper limit or recede the lower limit relay is turned-off, so that a temperature is maintained within limits. The software for the temperature controller is developed in 8085 assembly language programs. HARDWARE DESCRIPTION: • The hardware consists of 8085 microprocessor motherboard, ADC interface board, and relay and driver unit. Block Diagram of 8085 Microprocessor based Temperature Controller • The motherboard consists of 8085 MPU, 8KB EPROM, 8KB RAM keyboard and display controller 8279, programmable peripheral interface 8255, 21 key hex-keypad and six numbers of seven segment LED’s. Ports Expansion connector parallel port connectors are provided for external interfacing. SJCET
  • 41.
    d riv er +V 2 6 p in c o n n e c to r P a ra lle l p o rt 8255 8085 LATCH PPI CPU AD TEM PERATU 590 SEN SO R 5 0 p in E x p a n s io n c o n n e c to r 15 NC 7 A 8-A D 0- D ADC P SY STEM BU S IN T E R FA C E BOARD EPROM RAM 8279 8K B 8K B KEYBOARD D IS P L A Y D IS P L A Y C D E F in t 8 9 A B 4 5 6 7 N xt 0 1 2 3 Sub KEYBOARD SJCET
  • 42.
    The temperature input board or ADC interface board consists of ADC 0809, which is an 8-bit converter with eight channels of input. It is interfaced with the motherboard through 50-pin bus expansion connector. The temperature sensor ADC590 is used to sense the temperature of the plant and its analog output is applied to the channel-0 of ADC. • Relay is switched ON/OFF by driving the transistor to saturation/cut-off which is connected to port A of 8255. SJCET
  • 43.
    Temperature measurement the mostfrequently measured value in industry Protection and head assembly Extension Assemblies Thermowell
  • 44.
    Temperature measurement Thermistance (RTD- resistance temperature detector): metal whose resistance depends on temperature: + cheap, robust, high temperature range ( -180ºC ..600ºC), - require current source, non-linear. Thermistor (NTC - negative temperature coefficient): semiconductor whose resistance depends on temperature: + very cheap, sensible, - low temperature, imprecise, needs current source, strongly non-linear, fragile, self-heating Thermo-element (Thermoelement, thermocouple): pair of dissimilar metals that generate a voltage proportional to the temperature difference between warm and cold junction (Seebeck effect) + high precision, high temperature, punctual measurement - low voltage, requires cold junction compensation, high amplification, linearization Spectrometer: measures infrared radiation by photo-sensitive semiconductors + highest temperature, measures surfaces, no contact - highest price Bimetal (Bimetall, bilame): mechanical (yes/no) temperature indicator using the difference in the dilatation coefficients of two metals, very cheap, widely used (toasters...)
  • 45.
  • 46.
  • 47.
    • The opticalmotor shaft encoders are used to get the information about the position, direction of rotation, and speed of rotation of various motor shafts. • Provide digital information • 2 types: • Absolute and Incremental SJCET
  • 48.
    Shaft Encoder Attaching Adjustablescrew Mechanism onnected to the platform Shaft Encoder Opto-swtich
  • 49.
    Encoder Wheel 48 SegmentWheel Encoder Wheel with more Segments Alternating slots make reflecting and non-reflecting surfaces. More stripes give greater resolution to measurements. The stripes cannot be narrow than the field of view of the slotted optical switch.
  • 50.
  • 51.
    Wheel Shaft encoderconnected to the DC motor
  • 52.
  • 53.
    Absolute Optical Encoders •Used when loss of reference is not possible. • Gray codes: only one bit changes at a time ( less uncertainty). • The information is transferred in parallel form (many wires are necessary). Binar Gray y Code 000 000 001 011 001 010 010 110 111 011 101 100 53 100
  • 54.
    Incremental Optical Encoders •Relative position light sensor decode light circuitry grating emitter 54
  • 55.
    Incremental Optical Encoders •Incremental Encoder: light sensor Decode light emitter circuitry grating • It generates pulses proportional to the rotation speed of the shaft. • Direction can also be indicated with a two phase encoder: A B A leads B 55
  • 56.
  • 57.
    Other Odometry Sensors • Resolver It has two stator windings positioned at 90 degrees. The output voltage is proportional to the sine or cosine function of the rotor's angle. The rotor is made up of a third winding, winding C Potentiometer = varying resistance 57
  • 58.
  • 59.
    Embedded Control • Microcontrollersare placed in devices, or embedded, for operation and control.
  • 60.
    What is aRobot? • A robot is a machine that gathers information about its environment (senses) and uses that information (thinks) to follow instructions to do work (acts) – The “sensing” part provides input to the robot through switches, light sensors, – The thinking part is the microcontroller brain – The acting part could be through lights, motors, actuators, sounds, etc
  • 61.
    Robots and Applications •Robots come in many shapes and sizes 1. Ka w 2. Fa ada's HRP- nuc A 3P hu rcMat speed e 100 manoid rob weldin i o 3. MI NI-RO g and precision, h t BOT R cutting igh- Sandi ESEA robot 4. Mi a Nati RCH — ni-rob onal L abora the blo ot that can tories odstre travel am throug h
  • 62.
    High-Tech and Aerospaceuse Ecological Undersea Research JP Aerospace Data Collection Harbor Branch Test Launch EME Systems Institute