Professional Documents
Culture Documents
Lecture 03 - Introduction To Data Acquisition and Microcontroller
Lecture 03 - Introduction To Data Acquisition and Microcontroller
Introduction to Microcontroller
Lecture 03
Introduction to Data acquisition and
Microcontroller
Dr. Osama Mohamady
Assistant Professor
o.mohamady@eng.cu.edu.eg
CONTENTS
• Data Acquisition
• Signal Conditioning
• Analog to Digital (A/D) Converter
• Data Acquisition Software
• Microprocessor and Microcontroller
• Digital in / digital out experiment
1
Analog Signals vs. Digital Signals
2
Data Acquisition
• Data acquisition and control hardware
generally performs one or more of the
following functions:
– analog input,
– analog output,
– digital input,
– digital output and
– counter/timer functions.
3
Data Acquisition System
Block Diagram
Signal Conditioning
Electrical signals are conditioned so they
can be used by an analog input board. The
following features may be available:
Amplification Filtering
Isolation Linearization
4
Signal Conditioning
• Signal conditioning circuits improve the quality of
signals generated by transducers before they are
converted into digital signals by the PC's data-
acquisition hardware.
Signal Conditioning
• One of the most common signal conditioning
functions is amplification.
5
Analog to Digital (A/D)
Converter
• Analog to digital (A/D) conversion changes
analog voltage or current levels into digital
information. The conversion is necessary to
enable the computer to process or store the
signals.
6
A/D Converter:
Input Signal
• Analog
Signal is continuous
Example: strain gage. Most of transducers
produce analog signals
Digital
Signal is either ON or OFF
Example: light switch.
A/D Converter:
Sampling Rate
16 Samples/cycle
Analog 8 Samples/cycle
Input 4 Samples/cycle
7
A/D Converter:
Sampling Rate
• Aliasing.
Acquired signal gets distorted if sampling
rate is too small.
A/D Converter:
Throughput
Effective rate of each individual channel is
inversely proportional to the number of
channels sampled.
Example:
– 100 KHz maximum.
– 16 channels.
100 KHz/16 = 6.25 KHz per channel.
8
A/D Converter:
Range
• Minimum and maximum voltage levels that
the A/D converter can quantize
A/D Converter:
Resolution
9
Analog Inputs (A/D)
• The most significant criteria when selecting
A/D hardware are:
1. Number of input channels
2. Single-ended or differential input signals
3. Sampling rate (in samples per second)
4. Resolution (usually measured in bits of resolution)
5. Input range (specified in full-scale volts)
6. Noise and nonlinearity
10
Analog Outputs (D/A)
• Analog output signals may directly control process
equipment. The process can give feedback in the
form of analog input signals. This is referred to as a
closed loop control system with PID control.
11
Programmable Software
• Involves the use of a programming language, such
as:
– C++, visual C++
– BASIC, Visual Basic + Add-on tools (such as
VisuaLab with VTX)
– Fortran
– Pascal
Advantage: flexibility
Disadvantages: complexity and steep learning
curve
12
Designing a DAS:Factors to
Consider
Is it a fixed or a mobile application?
Type of input/output signal: digital or analog?
Frequency of input signal ?
Resolution, range, and gain?
Continuous operation?
Compatibility between hardware and software. Are the
drivers available?
Overall price.
13
General-purpose microprocessor:
• CPU for Computers
• Commonly no RAM, ROM, I/O on CPU chip itself
Microcontroller
• A single-chip computer
• On-chip RAM, ROM, I/O ports...
• Example:Motorola’s 6811, Intel’s 8051, Zilog’s Z8 and PIC
16X
14
Microprocessor vs. Microcontroller
Microprocessor Microcontroller
• CPU is stand-alone, RAM, • CPU, RAM, ROM, I/O and timer are
ROM, I/O, timer are separate all on a single chip
• designer can decide on the • fixed amount of on-chip ROM, RAM,
amount of ROM, RAM and I/O I/O ports
ports.
• for applications in which cost, power
• expensive
and space are critical
• versatility
• single-purpose (control-oriented)
• general-purpose
• High processing power • Low processing power
• High power consumption • Low power consumption
• Instruction sets focus on • Bit-level operations
processing-intensive operations • Instruction sets focus on control and
bit-level operations
• 8051
• Microchip Technology PIC
• Atmel AVR
• Texas Instruments MSP430 (16-bit)
15
Digital in / digital out experiment
16