Chapter 2: Introduction to MicroprocessorBased Control - PowerPoint PPT Presentation

1 / 42
About This Presentation
Title:

Chapter 2: Introduction to MicroprocessorBased Control

Description:

Chapter 2: Introduction to Microprocessor-Based Control. Adapted from: ... Introduction. Microprocessors ushered in a whole new era for control systems electronics. ... – PowerPoint PPT presentation

Number of Views:106
Avg rating:3.0/5.0
Slides: 43
Provided by: MH52
Category:

less

Transcript and Presenter's Notes

Title: Chapter 2: Introduction to MicroprocessorBased Control


1
Chapter 2Introduction to Microprocessor-Based
Control
  • Adapted fromKilian, C. T. (2001), Modern
    Control Technology Components and SystemsDelmar

2
Objectives
  • Understand what a microprocessor is, what it
    does, and how it works.
  • Understand the concepts of RAM and ROM computer
    memory and how memory is accessed via the address
    and data buses.
  • Understand how parallel and serial data
    interfaces work.
  • Perform relevant calculations pertaining to
    analog-to-digital converters and
    digital-to-analog converters.
  • Understand the principles of digital controller
    software.
  • Recognize and describe the characteristics of the
    various types of available digital controllers,
    that is, microcontrollers, single-board
    computers, programmable logic controllers, and
    personal computers.

3
Introduction
  • Microprocessors ushered in a whole new era for
    control systems electronics.
  • Microprocessors require additional components to
    be useful RAM, ROM, etc.

4
  • Microcontrollers are essentially microprocessors
    with built-in features to be used independently.

5
Reasons for Microprocessor Control
  • Low-level signals converted to digital can be
    transmitted long distances error free.
  • Micro can handle complex calculations.
  • Memory is available for tracking and storage.
  • Loading new programs for control change is easy.
  • Easily connected to networks.

6
  • A computer is made up of four basic blocks
  • Central Processing Unit (CPU)
  • Does the actual computing.
  • Arithmetic Unit performs math and logic
  • Control Manages flow of data
  • Memory Data is contained in memory locations at
    specified addresses.
  • RAM volatile, read/write memory
  • ROM nonvolatile, read only
  • EPROM/EEPROM/Flash Erasable ROM

7
  • Input/Output ports Used for connections to
    devices.
  • Busing
  • Devices are multiplexed using 3 major buses
  • Address Bus To specify the device or memory
    location to communicate with.
  • Data Bus To transfer data between the CPU and
    device.
  • Control Bus Timing and event control, such as
    read and write operations.

8
(No Transcript)
9
Microprocessor Instructions Op-Codes
  • Each processor has its own instruction set of
    commands to control its operation.
  • Move data
  • Perform math operations
  • Perform logical operations
  • Each instruction has a unique Op-code, a binary
    value associated to it.01001101 or 4Dh.
  • An Accumulator is staging area for data data is
    moved into it, and operations are performed on
    that data.

10
Machine Code/Mnemonics/PC
  • Machine Code
  • The program the CPU follows represented in binary
    or hex.
  • Mnemonics
  • Abbreviations representing an op-code. Programs
    written in assembly language use mnemonics.
  • Program counter
  • Used to point to the memory address of the
    instruction to be performed.
  • Fetch-execute cycles
  • Performed to bring an instruction into memory and
    execute it.

11
(No Transcript)
12
  • From another text

13
DAC - Parallel
  • Parallel Interface Transfers 8-bits (or more) at
    once.
  • Digital-to-Analog Converter (DAC) converts
    8-digital data to analog.

14
DAC Formula Resolution
  • Vout Input x Vref 256 (for
    8-bit)
  • Vout DAC output analog voltage
  • Input Decimal value of binary input
  • Vref Reference DC voltage
  • Resolution
  • The worst case error introduced when converting.
    In an 8-bit DAC, there are 255 possible steps.
    The resolution is the smallest step size, or
    1/255, 0.39.

15
(No Transcript)
16
  • A DAC has a 5V reference with a binary input of
    10010100, calculate the voltage output.
  • If the binary input were 11111111?

17
ADC
  • Analog-to-Digital converter (ADC)A circuit that
    converts an analog voltage to digital.

18
ADC
  • Conversion Time The time required to convert an
    analog voltage to digital.
  • For an 8-bit ADC
  • Output Vin x 255 Vref
  • Resolution in is 1/255 x 100 (for an 8-bit
    ADC).

19
(No Transcript)
20
  • The smallest step change in voltage for a DAC or
    ADC is the voltage resolution how closely a
    voltage can be resolved due to the digital
    quantization
  • With a 5V reference, 1 LSB 5V/255 19.5mV
    5V x .39 .00195V)
  • ADCs and DACs have a resolution error of ½ LSB.
  • ½ LSB 9.7 mV
  • In a ADC, the input voltage could be /- 9.7mV.

21
  • Given a 10-Bit ADC with a 5V reference,
    calculate
  • The Resolution
  • The LSB Value (volts)
  • The ½ LSB Value (volts)
  • The digital output for an input of voltage of
    3.2V

22
  • A 0 to 2000 PSI pressure sensor has an output of
    0 to 5V. This voltage feeds an 8-bit ADC with a
    Vref of 5V.
  • Draw a diagram and a graph.
  • What would be the resolution of the ADC in PSI?
  • What would be the transfer function from the
    input pressure to the digital output?
  • Given an input of 1250PSI, what would be the
    output of the ADC?
  • What equation would convert the ADC back to PSI
    in the controller?

23
(No Transcript)
24
Serial Interface
  • Data is sent 1 bit at a time.
  • Reduces number of cables or lines
  • More easily shielded from noise.
  • Existing data lines may be used (phone).
  • Parallel data must be converted to serial to
    transmit, and vice-versa on receive.
  • A UART (Universal Asynchronous Transmitter
    Receiver) is a device which performs this
    conversion.

25
(No Transcript)
26
Asynchronous Transmission
  • Data is sent with defined timing, termed a BAUD
    rate. 2400,9600, 19200, etc. Start Bit Stop
    Bit are used to frame the signal.
  • A parity bit is used optionally for error
    detection.
  • Common settings 9600 Baud, 8 bits, no parity, 1
    stop-bit -- 9600 8-N-1

27
RS-232
  • RS-232 is a specification which defines standard
    for serial interfaces between DTEs (Data Terminal
    Equipment Computers), and DCEs (Data
    Communication Equipment Modems, etc).
  • DTE to DTE communications can be performed
    serially using a cross-over or Null-Modem cable.

28
(No Transcript)
29
Synchronous Communications
  • Unlike asynchronous, which relies on the timing
    of the data, with synchronous communications the
    clocks of the 2 devices are locked together.
  • One means is to use a separate clock line to
    indicate individual bit positions.

30
(No Transcript)
31
Networking
  • Multiple devices are connected together.
  • Serial data is passed between devices.
  • Devices are provided individual address numbers
    to send data to a particular device.

32
Controller Programmer
  • Real Time control Program runs in a loop,
    sensing the current condition and calculating new
    output to the actuator.
  • Each pass through the program is an iteration or
    scan.

33
  • The frequency at which new data is collected is
    the sampling rate (scan time).
  • Time-delay loops may be inserted to slow the
    execution or scan time.
  • Programs can be written at the lowest level
    (machine code, assembler) or high level languages
    (C), BASIC, etc.

34
Microcontrollers
  • A single-chip computer specifically designed for
    I/O control.
  • On board RAM, ROM, possibly timers and ADCs.
  • High speed is not required due to low complexity
    of tasks.
  • Very large cost savings over microcomputers.
  • Motorola 68HC11, Intel 8051, PIC 16C72, Atmel
    AVR, BASIC Stamp

35
(No Transcript)
36
(No Transcript)
37
(No Transcript)
38
  • BASIC Stamp

39
Single-Board Computers
  • A computer on a single board. Programmable for
    I/O control and the ability to use high level
    peripherals.

40
Programmable Logic Controllers
  • Self-contained microprocessor based controller.
  • Designed for fast connection and control of
    processes.
  • Used extensively in industrial control
    environments.
  • Programs in relay-logic to be compatible to the
    more traditional electrical workforce.

41
Personal Computers
  • PCs with dedicated I/O and data acquisition cards
    and specialized software may be used as
    controllers.

42
Objectives Review
  • Understand what a microprocessor is, what it
    does, and how it works.
  • Understand the concepts of RAM and ROM computer
    memory and how memory is accessed via the address
    and data buses.
  • Understand how parallel and serial data
    interfaces work.
  • Perform relevant calculations pertaining to
    analog-to-digital converters and
    digital-to-analog converters.
  • Understand the principles of digital controller
    software.
  • Recognize and describe the characteristics of the
    various types of available digital controllers,
    that is, microcontrollers, single-board
    computers, programmable logic controllers, and
    personal computers.
Write a Comment
User Comments (0)
About PowerShow.com