Biological Engineering


Concepts Measurement and Control Systems



Yüklə 202,98 Kb.
Pdf görüntüsü
səhifə2/16
tarix07.01.2024
ölçüsü202,98 Kb.
#212070
1   2   3   4   5   6   7   8   9   ...   16
Concepts
Measurement and Control Systems
Let’s talk about measurement and control systems first. As shown in Figure 2.1.1, signals
can be generated by mechanical actuators and measured by sensors, for example, the
voltage signal from a flow rate sensor. The signal is then input to a central control unit, such
as a microcontroller, for signal processing, analysis, and decision making. For example, to
see if the flow rate is in the desired range or not. Finally, the microcontroller outputs a signal
to control the actuator, e.g., adjust the valve opening, and/or at the same time display the
system status to users. Then the actuator is measured again. This forms an endless loop
that runs continuously until interrupted by the user or time out. If we view the system from
the signal’s point of view, the signal generated by the actuators and measured by the
sensors are usually analog signals which are continuous and infinite. They are often pre-
processed to be amplified, filtered, or converted to a discrete and finite digital format in
order to be processed by the central control unit. If the actuator only accepts analog signals,
the output signal to control the actuator from the central control unit needs to be converted
back to the analog format. As you can tell, the central control unit plays a critical role in the
measurement and control loop. Microcontroller is one of the most commonly used central
control units. We will focus on microcontrollers in the rest of the chapter.
Outcomes
Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js
How can we help you?





Figure 
2.1.1
: Main components in a measurement and control system (adapted from figure 1.1
in Alciatore and Histand, 2012).
Microcontrollers
A microcontroller is a type of computer. A computer is usually thought of as a general-
purpose device configured as a desktop computer (personal computer; PC or workstation),
laptop, or server. The “invisible” type of computer that is widely used in industry and our
daily life is the microcontroller. A microcontroller is a miniature computer, usually built as a
single integrated circuit (IC) with limited memory and processing capability. They can be
embedded in larger systems to realize complex tasks. For example, an ordinary car can have
25 to 40 electronic control units (ECUs), which are built around microcontrollers. A modern
tractor can have a similar number of ECUs with microcontrollers handling power, traction,
and implement controls. Environmental control in greenhouses and animal houses, and
process control in food plants all rely on microcontrollers. Each microcontroller for these
applications has a specific task to measure and control, such as air flow (ventilation,
temperature) or internal pressure, or to perform higher-level control of a series of
microcontrollers. Understanding the basic components of a microcontroller and how it works
will allow us to design a measurement and control system.
A microcontroller mainly consists of a central processing unit (CPU), memory units, and
input/output (I/O) hardware (Figure 2.1.2). Different components interact with each other
and with external devices through signal paths called buses. Each of these parts will be
discussed below.
The 
CPU
is also called a microprocessor. It is the brain of the microcontroller, in charge of
the primary computation and system internal control There are three types of information
Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js
How can we help you?





the primary computation and system internal control. There are three types of information
that the CPU handles: (1) the data, which are the digital values to be computed or sent out;
(2) the instructions, which indicate which data are required, what calculations to impose,
and where the results are to be stored; and (3) the addresses, which indicate where a data
or an instruction comes from or is sent to. An arithmetic logic unit (ALU) within the CPU
executes mathematical functions on the data structured as groups of binary digits, or “bits.”
The value of a bit is either 0 or 1. The more bits a microcontroller CPU can handle at a time,
the faster the CPU can compute. Microcontroller CPUs can often handle 8, 16, or 32 bits at a
time.
Figure 
2.1.2
: Microcontroller architecture.

memory unit
(often simply called memory) stores data, addresses, and instructions, which
can be retrieved by the CPU during processing. There are generally three types of memory:
(1) random-access memory (RAM), which is a volatile memory used to hold the data and
programs being executed that can be read from or written to at any time as long as the
power is maintained; (2) read-only memory (ROM), which is used for permanent storage of
system instructions even when the microcontroller is powered down. Those instructions or
data cannot be easily modified after manufacture and are rarely changed during the life of
the microcontroller; and (3) erasable-programmable read only memory (EPROM), which is
semi-permanent memory that can store instructions that need to be changed occasionally,
such as the instructions that implement the specific use of the microcontroller. 
Firmware
is a
program usually permanently stored in the ROM or EPROM, which provides for control of the
hardware and a standardized operating environment for more complex software
programmed by users. The firmware remains unchanged until a system update is required to
fix bugs or add features. Originally, EPROMS were erased using ultraviolet light, but more
recently the flash memory (electrically erasable programmable read-only memory; EEPROM)
Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js
How can we help you?





recently the flash memory (electrically erasable programmable read-only memory; EEPROM)
has become the norm. The amount of RAM (described in bytes, kilobytes, megabytes, or
gigabytes) determines the speed of operation, the amount of data that can be processed
and the complexity of the programs that can be implemented.
Digital input and output (I/O) ports
connect the microcontroller with external devices using
digital signals only. The high and low voltage in the signal correspond to on and off states.
Each digital port can be configured as an input port or an output port. The input port is used
to read in the status of the external device and the output port is used to send a control
instruction to an external device. Most microcontrollers operate over 0 to +5V with limited
current because the voltage signal is not used directly, only the binary status. If the voltage
and current are to be used to directly drive a device, a relay or voltage digital analog
convertor is required between the port and device. Usually digital I/O ports communicate or
“talk” with external devices through standard communication protocols, such as 
serial
communication protocols
. For example, a microcontroller can use digital I/O pins to form
serial communication ports to talk to a general-purpose computer, external memory, or
another microcontroller. Common protocols for serial communication are UART (universal
asynchronous receiver-transmitter), USB (universal serial bus), I C (inter-integrated circuit),
and SPI (serial peripheral interface). 
Analog input and output (analog I/O)
ports can be
connected directly to the microcontroller. Many sensors (e.g., temperature, pressure, strain,
rotation) output analog signals and many actuators require an analog signal. The analog
ports integrate either an 
analog to digital (A/D) converter
or 
digital to analog (D/A)
converter
.
The CPU, memory, and I/O ports are connected through electrical signal conductors known
as 
buses
. They serve as the central nervous system of the computer allowing data,
addresses, and control signals to be shared among all system components. Each component
has its own bus controller. There are three types of buses: the data bus, the address bus,
and the control bus. The data bus transfers data to and from the data registers of various
system components. The address bus carries the address of a system component that a CPU
would like to communicate with or a specific data location in memory that a CPU would like
to access. The control bus transmits the operational signal between the CPU and system
components such as the read and write signals, system clock signal, and system interrupts.
Finally, 
clock/counter/timer
signals are used in a microcontroller to synchronize operations
among components. A clock signal is typically a pulse sequence with a known constant
frequency generated by a quartz crystal oscillator. For example, a CPU clock is a high
frequency pulse signal used to time and coordinate various activities in the CPU. A system
clock can be used to synchronize many system operations such as the input and output data
transfer, sampling, or A/D and D/A processes.

Yüklə 202,98 Kb.

Dostları ilə paylaş:
1   2   3   4   5   6   7   8   9   ...   16




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©www.azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin