Microcontroller Notes Final 2016 April June
Microcontroller Notes Final 2016 April June
Fundamentals of Robots
ELECTRICAL AND ELECTRONICS ENGINEERING DEPARTMENT a) Definition of a robot
b) Types of robots
DIPLOMA IN ELECTRICAL & ELECTRONICS ENGINEERING c) Elements of robotic system
(POWER OPTION) d) Need for using robots
e) Functions of control systems in robots
MICROCONTROLLER TECHNOLOGY f) Robot’s Performance, capabilities and specifications
COURSE OUTLINE g) Key features of robots
h) Programming methods
1. Introduction to Microcontroller Technology
a) Elements of Microcontroller Architecture 6. Robots Programming
b) Microcontroller Series a) Programming methods
c) Microcontroller Family Members b) Robot programming functions
c) Robot programming environment
2. Process Control System d) Programming activities
a) Need for Process Control e) Basic types of robot programming languages
b) Process Control Terms f) On-line and off-line programming languages
c) Block Diagram of Process Control
d) Control Modes Books
e) Implementation of Controllers 1. Practical process control: tuning and troubleshooting by Cecil
f) Functions of Actuators L. Smith.
g) Types of Actuators 2. Practical Process Control: Fundamentals of Instrumentation
and Process Control by Control Station, Inc
3. Sequential Control Systems 3. Programmable Logic Controllers: Programming Methods and
a) Sequential Control Applications by John R. Hackworth and Frederick D. Hackworth,
b) Time Delay Unit Jr.
c) Application of Decoder/Encoder 4. Programmable Logic Controllers by W. Bolton 4th Edition
d) Practical Interlock System 5. Programmable Controllers: Theory and Implementation by L.A.
e) Internal Architecture of PLC Bryan and E.A. Bryan. 2nd Ed.
f) Applications of Flow Chart and Ladder Diagram Programming 6. Industrial Automation by Srinivas Medida Vol. 6
Methods 7. Practical SCADA for Industry by David Bailey, Edwin Wright
g) Application of PLCs in functional and practical systems 8. Micro-processors and Micro-controllers by Stefan Hollenthoner
9. Introduction to Microcontrollers by Aaron Striegel & Diane Rover
4. Digital Control Systems 10. Controllers and Controlled Systems by Samson AG
a) Basic digital methods 11. Fundamentals of Industrial Instrumentation and Process
b) Computer data logging Control by William C. Dunn
c) Human Machine Interface (HMI)
d) Application of Digital Computer
- Registers are a little like internal memory storage areas. These are
useful for interim calculation results (this reduces the number of
reads/writes to external memory which is usually slower). Some
registers have special functions such keeping track of where the
next instruction is supposed to come from in memory.
- The arithmetic logic unit is responsible for carrying out
calculations. In some CPU's this can be quite simple; perhaps only
supporting add, subtract and basic logical operations.
- In more sophisticated CPU's, there may be several arithmetic units,
some/all capable performing advanced floating point operations.
The instruction decoder's job is to translate numeric opcodes into
sequences of actions.
Disadvantages of Microcontrollers
- Microcontrollers have got more complex architecture than that of
microprocessors.
- Only perform limited number of executions simultaneously.
- Mostly used in micro-equipments.
- Cannot interface high power devices directly.
[email protected] Microcontroller notes@MNP 2016 6
Classification of Microcontrollers c) The 32-Bit Microcontroller
- Microcontrollers can be classified on the basis of internal bus width, - When the ALU performs arithmetic and logical operations on a double word
architecture, memory and instruction set. (32bits) at an instruction, the microcontroller is a 32-bit microcontroller. The
internal bus width of 32-bit microcontroller is of 32-bit.
- Examples of 32-bit microcontrollers are Intel 80960 family and Motorola
M683xx and Intel/Atmel 251 family. The performance and computing
capability of 32 bit microcontrollers are enhanced with greater precision as
compared to the 16-bit microcontrollers
- I/O Ports: All 8051 microcontrollers have 4 I/O ports each comprising 8
bits which can be configured as inputs or outputs. Accordingly, in total of 32
input/output pins enabling the microcontroller to be connected to peripheral
devices are available for use.
- Memory Organization: The 8051 has two types of memory and these are
Program Memory and Data Memory. Program Memory (ROM) is used to
permanently save the program being executed, while Data Memory (RAM)
is used for temporarily storing data and intermediate results created and -
used during the operation of the microcontroller.
- All 8051 microcontrollers have a 16-bit addressing bus and are capable of
addressing 64 kb memory.
- Counters and Timers: The 8051 microcontroller has 2 timers/counters
called T0 and T1. As their names suggest, their main purpose is to
measure time and count external events. Besides, they can be used for
generating clock pulses to be used in serial communication, so called Baud
Rate.
Physical Addressing
-
[email protected] Microcontroller notes@MNP 2016 11
-
-
[email protected] Microcontroller notes@MNP 2016 12
-
- The 8051 has the widest range of variants of any embedded controller on
the market.
- The smallest device is the Atmel 89c1051, a 20 Pin FLASH variant with 2
timers, UART, 20mA.
- The fastest parts are from Dallas, with performance close to 10 MIPS.
- The most powerful chip is the Siemens 80C517A, with 32 Bit ALU, 2
UARTS, 2K RAM, PLCC84 package, 8 x16 Bit PWM’s, and other features.
- Among the major manufacturers are:
• AMD Enhanced 8051 parts (no longer producing 80x51 parts)
• Atmel FLASH and semi-custom parts
• Dallas Battery backed, program download, and fastest variants
• Intel 8051 through 80C51gb / 80C51sl
• Matra 80C154, low voltage static variants
• OKI 80c154, mask parts
• Philips 87C748 through 89Cc588 - more variants than anyone else
• Siemens 80C501 through 80C517a, and SIECO cores
• SMC COM20051 with ARCNET token bus network engine
• SSI 80x52, 2 x HDLC variant for MODEM use
80ºC
T (ºC) Set Point
70ºC
Load
Time
0 1 2 3 4 5 6
- When the process water temperature is less than the set point of 80 ºC,
the steam valve opens fully and when the process water reaches or
exceeds 80 ºC, the controller signals the control valve to close fully.
- This type of control requires the least expensive equipment and is
suitable when there is a large process “capacity”, e.g., when there is
[email protected] Microcontroller notes@MNP 2016 19
Control Modes in closed loop/feedback control Proportional control (P)
- Most Closed loop Controllers are capable of controlling with three - This is the principal means of control. The controller produces action
control modes which can be used separately or together that is proportional to the error E. That is, the proportional component
o Proportional Control (P): Determines the speed of response Mp of the controller output M is equal to a coefficient times the current
of the loop. value of the control error E
o Integral or Reset Control (I): Forces the controller to line out -
at its set point.
o Derivative, or Rate Control (D): Enhances stability margin,
which permits the gain to be increased
Mode Characteristics
- The controller output M can be seen as the sum of the outputs of the
individual modes:
Where
- The derivative mode enhances the stability margin for the control loop,
which reduces the overshoot and degree of oscillations.
- When used effectively, the derivative mode permits the controller gain
to be increased, thereby providing a faster response to set - point
- When the controller contains only the proportional mode, the controlled changes and disturbances.
variable is not necessarily equal to the set point when the loop lines out. - Since the rate of change of noise can be large, using D-Control as a
- This behavior, known as droop or offset. When the integral or reset means of enhancing the stability of a control loop is done at the
mode is present, the controlled variable must equal the set point when expense of amplifying noise.
the loop lines out. - But this is achieved only when proper tuning procedures are followed.
- This type of behavior is desirable in most loops, so the integral or reset - As D-Control on its own has no purpose, it is always used in
mode is usually present. combination with P-Control or PI-Control. This results in a PD-Control or
- Integral action is used to control towards no offset in the output signal. PID-Control. PID Control is mostly used if D-Control is required.
This means that it controls towards no error (E = 0). Integral control is
normally used to assist proportional control. The combination of both is
called as PI-control.
Electrical Actuators
- The electric actuator has a motor drive that provides torque to operate a
valve.
- Electric actuators are frequently used on multi-turn valves such as gate
or globe valves. With the addition of a quarter-turn gearbox, they can be
utilized on ball, plug, or other quarter-turn valves. - As mentioned before, inductive devices can create voltage spikes and
may need snubbers circuits, although most industrial applications have
Electromagnetic Actuators low enough voltage and current ratings they can be connected directly
- This exploits the mutual attraction of soft ferrous materials in a magnetic to the PLC outputs.
field. The device has one coil which provides the field energy and the - Most industrial solenoids will be powered by 24Vdc and draw a few
energy to be transformed. The attractive force is unidirectional such that hundred mA.
the return device of some type is needed, often a spring.
- Relays or solenoids are based on this principle which is widely used in
cars to switch a range of electrical equipment with a current demand of
[email protected] Microcontroller notes@MNP 2016 30
Motors Brushless Motor – This type of motor produce a magnetic field in
- Electrical Motors are continuous actuators that convert electrical the rotor by using permanent magnets attached to it and
energy into mechanical energy. commutation is achieved electronically. They are generally smaller
- There are basically three types of conventional electrical motor but more expensive than conventional brushed type DC motors
available: DC type Motors, Stepper Motors and AC type Motors. because they use “Hall effect” switches in the stator to produce the
- The DC motor achieves this by producing a continuous angular rotation required stator field rotational sequence but they have better
that can be used to rotate pumps, fans, compressors, wheels, etc. torque/speed characteristics, are more efficient and have a longer
- As well as conventional rotary motors, linear motors are also available operating life than equivalent brushed types.
which are capable of producing a continuous liner movement. Servo Motor – This type of motor is basically a brushed DC motor
- AC Motors are generally used in high power single or multi-phase with some form of positional feedback control connected to the rotor
industrial applications were a constant rotational torque and speed is shaft. They are connected to and controlled by a PWM type
required to control large loads such as fans or pumps. controller and are mainly used in positional control systems and
radio controlled models.
- Normal DC motors have almost linear characteristics with their speed of
rotation being determined by the applied DC voltage and their output
torque being determined by the current flowing through the motor
windings.
- The speed of rotation of any DC motor can be varied from a few
revolutions per minute (rpm) to many thousands of revolutions per
minute making them suitable for electronic, automotive or robotic
applications.
- By connecting them to gearboxes or gear-trains their output speed can
be decreased while at the same time increasing the torque output of the
motor at a high speed.
- The motors wound stator is an electromagnet circuit which consists of
The Basic DC Motor electrical coils connected together in a circular configuration to produce
- DC Motor is most commonly used actuator for producing continuous the required North-pole then a South-pole then a North-pole etc, type
movement and whose speed of rotation can easily be controlled, stationary magnetic field system for rotation, unlike AC machines whose
making them ideal for use in applications were speed control, servo stator field continually rotates with the applied frequency.
type control, and/or positioning is required. - The current which flows within these field coils is known as the motor
- It consists of two parts, a “Stator” which is the stationary part and a field current.
“Rotor” which is the rotating part. The result is that there are basically - These electromagnetic coils which form the stator field can be
three types of DC Motor available. electrically connected in series, parallel or both together (compound)
Brushed Motor – This type of motor produces a magnetic field in a with the motors armature.
wound rotor (the part that rotates) by passing an electrical current - A series wound DC motor has its stator field windings connected in
through a commutator and carbon brush assembly, hence the term series with the armature. Likewise, a shunt wound DC motor has its
“Brushed”. The stators (the stationary part) magnetic field is stator field windings connected in parallel with the armature as shown.
produced by using either a wound stator field winding or by
permanent magnets. Generally brushed DC motors are cheap,
small and easily controlled.
[email protected] Microcontroller notes@MNP 2016 31
to produce the feedback signals required to control the semiconductor
switching devices.
- The most common position/pole sensor is the “Hall Effect Sensor”, but
some motors also use optical sensors.
- Using Hall effect sensors, the polarity of the electromagnets is switched
by the motor control drive circuitry. Then the motor can be easily
- The rotor or armature of a DC machine consists of current carrying synchronized to a digital clock signal, providing precise speed control.
conductors connected together at one end to electrically isolated copper - Brushless DC motors can be constructed to have, an external
segments called the commutator. permanent magnet rotor and an internal electromagnet stator or an
- The commutator allows an electrical connection to be made via carbon internal permanent magnet rotor and an external electromagnet stator.
brushes (hence the name “Brushed” motor) to an external power supply - Advantages of the Brushless DC Motor are is higher efficiencies, high
as the armature rotates. reliability, low electrical noise, good speed control and more importantly,
- The magnetic field setup by the rotor tries to align itself with the no brushes or commutator to wear out producing a much higher speed.
stationary stator field causing the rotor to rotate on its axis, but can not - However their disadvantage is that they are more expensive and more
align itself due to commutation delays. complicated to control.
- The rotational speed of the motor is dependent on the strength of the
rotors magnetic field and the more voltage that is applied to the motor DC Servo Motor
the faster the rotor will rotate. By varying this applied DC voltage the - DC Servo motors are used in closed loop type applications were the
rotational speed of the motor can also be varied. position of the output motor shaft is fed back to the motor control circuit.
- Although DC brushed motors are very efficient and cheap, problems - Typical positional “Feedback” devices include Resolvers, Encoders and
associated with the brushed DC motor is that sparking occurs under Potentiometers as used in radio control models such as aero-planes
heavy load conditions between the two surfaces of the commutator and and boats etc.
carbon brushes resulting in self generating heat, short life span and - A servo motor generally includes a built-in gearbox for speed reduction
electrical noise due to sparking, which can damage any semiconductor and is capable of delivering high torques directly.
switching device such as a MOSFET or transistor. - The output shaft of a servo motor does not rotate freely as do the shafts
- To overcome these disadvantages, Brushless DC Motors were of DC motors because of the gearbox and feedback devices attached.
developed.
Brushless DC motor
- The brushless DC motor is very similar to a permanent magnet DC
motor, but does not have any brushes to replace or wear out due to
commutator sparking.
- Therefore, little heat is generated in the rotor increasing the motors life.
The design of the brushless motor eliminates the need for brushes by
using a more complex drive circuit were the rotor magnetic field is a
permanent magnet which is always in synchronization with the stator
field allows for a more precise speed and torque control.
- The control of the brushless DC motors is very different from the normal
brushed DC motor, in that it this type of motor incorporates some
means to detect the rotors angular position (or magnetic poles) required
[email protected] Microcontroller notes@MNP 2016 32
- Then for this linear type of control, power is delivered constantly to the
- A servo motor consists of a DC motor, reduction gearbox, positional motor as shown below.
feedback device and some form of error correction.
- The speed or position is controlled in relation to a positional input signal
or reference signal applied to the device.
- The error detection amplifier looks at this input signal and compares it
with the feedback signal from the motors output shaft and determines if
the motor output shaft is in an error condition and, if so, the controller
makes appropriate corrections either speeding up the motor or slowing
it down.
- This response to the positional feedback device means that the servo
motor operates within a “Closed Loop System”.
- As well as large industrial applications, servo motors are also used in
small remote control models and robotics, with most servo motors being
able to rotate up to about 180 degrees in both directions making them
ideal for accurate angular positioning.
- However, these RC type servos are unable to continually rotate at high
speed like conventional DC motors unless specially modified.
- A servo motor consist of several devices in one package, the motor,
gearbox, feedback device and error correction for controlling position, - A continuous logic 1 or logic 0 is applied to the input of the circuit to turn
direction or speed. They are widely used in robotics and small models the motor ON (saturation) or OFF (cut-off) respectively.
as they are easily controlled using just three wires, Power, Ground and - A flywheel diode is connected across the motor terminals to protect the
Signal Control. switching transistor or MOSFET from any back emf generated by the
motor when the transistor turns the supply OFF.
- As well as the basic ON/OFF control the same circuit can also be used
to control the motors rotational speed.
DC Motor Switching and Control - By repeatedly switching the motor current ON and OFF at a high
- Small DC motors can be switched On or Off” by means of switches, enough frequency, the speed of the motor can be varied between stand
relays, transistors or MOSFET circuits with the simplest form of motor still (0 rpm) and full speed (100%).
control being “Linear” control. - This is achieved by varying the proportion of ON time (tON) to the OFF
- This type of circuit uses a bipolar Transistor as a Switch (A Darlington time (tOFF) and this can be achieved using a process known as Pulse
transistor may also be used were a higher current rating is required) to Width Modulation.
control the motor from a single power supply. - With PWM, the motor voltage is controlled by applying pulses of
- By varying the amount of base current flowing into the transistor the variable frequency for example, at a low frequency or with very few
speed of the motor can be controlled for example, if the transistor is pulses the average voltage applied to the motor is low, and therefore
turned on “half way”, then only half of the supply voltage goes to the the motor speed is slow.
motor. - At a higher frequency or with many pulses, the average motor terminal
- If the transistor is turned “fully ON” (saturated), then all of the supply voltage is increased and the motor speed will also increase.
voltage goes to the motor and it rotates faster.
D1N4004 D1N4004
D1 D3 C
A
Q3
Q1
M M1
Q_2N2222
Q_2N2222
D1N4004
D1N4004 D4
D2 D
B
Q4
Q2
DC Stepper Motor
- Stepper Motors are also electromechanical actuators that convert a - There are three basic types of stepper motor, Variable Reluctance,
pulsed digital input signal into a discrete (incremental) mechanical Permanent Magnet and Hybrid (a sort of combination of both). For the
movement are used widely in industrial control applications. diagram above, variable reluctance stepper motor is shown.
Hydraulic Actuators
- The most common type of hydraulic actuator is the hydraulic cylinder. A
cylinder uses pressurized fluid to create a linear force/motion.
- Single acting cylinders apply force when extending and typically use a
spring to retract the cylinder. Double acting cylinders apply force in both
directions.
- For the motor, fluid is pumped in the left side of the case, putting that
area under pressure. Within the pressurized area, all surfaces receive a
force, but only those three surfaces indicated with arrow will effect
rotation.
- The pressure on the teeth next to the case will case the gears to rotate.
The pressure on the meshing teeth in the centre would cause the gears
to turn in the opposite direction, but this torque is overpowered because
two teeth are pushing the other way.
Pneumatic Actuators
- They convert air pressure into mechanical motion. There are two basic
- In the figure below, a fluid is pumped into one side of the cylinder under types: Linear actuators (cylinder/piston or diaphragm types) and rotary
pressure causing that side of the cylinder to expand, and advancing the actuators.
piston. - Piston and rotary actuators are functionally similar to their hydraulic
counterparts.
- Pneumatic cylinder consists of a piston in a cylinder in one of two basic
internal configurations.
- The double acting cylinder connects to the valve with two tubes and can
be driven in either direction.
- The single acting cylinder can only be driven in one direction with air
pressure and is returned by a spring.
- The fluid on the other side of the piston must be allowed to escape
freely - if the incompressible fluid was trapped the cylinder could not
advance. The force the cylinder can exert is proportional to the cross
sectional area of the cylinder.
- Under normal operating conditions, both ends of the cylinder are filled
with fluid. If additional fluid enters port A, the piston will move toward the
right, but the fluid must be able to escape through port B
- Some actuators can create rotary motion and are very similar to the
pump designs. The figure below shows a gear motor rotary actuator. - Rotary actuators convert air pressure into rotary mechanical motion.
One common design is the vane motor.
[email protected] Microcontroller notes@MNP 2016 37
- The choice regarding type of valve is based on factors such as cost,
pressure recovery, minimum pressure within the valve, tendency to leak
when closed.
- A control valve requires an actuator that is capable of positioning the
movable part to any value between the two extremes of fully open and
fully closed. Positioning actuators are generally classified as to the
source of power — pneumatic, electric, and occasionally hydraulic.
- The figure below shows the means by which valves can be switched
between positions.
- The motor consist of a rotor that is offset in housing. Protruding from the
rotor are spring-loaded vanes that seal against the housing and slide in
and out of the rotor as it turns.
- Motion is achieved because the vanes on the top have more exposed
surface area than on the bottom and hence receive more force, causing
the rotor to turn clockwise.
- In most cases rotary actuators are not chosen for their efficiencies, but
for their power, speed and torque
Flow-Control Valves
- One common type of actuator used in process control system is the
flow-control valve, which regulates the flow of fluids.
- The control valve has a built-in valve-operating mechanism, allowing it Questions
to be controlled remotely by a signal from the controller. Usually, this 1. Describe controller ON/OFF action.
signal is either electric or pneumatic. 2. What is the difference between simple ON/OFF action and differential
- Figure (a) shows a solenoid–actuated, on-off valve. When the solenoid ON/OFF action?
is energized, the valve is pulled open, and the fluid flows. 3. Give a list of applications for ON/OFF controller action.
- When the solenoid is de-energized, a spring returns the valve to the 4. Why is the gain setting critical in proportional action?
closed position. On-off valves are used in batch processes (for 5. What is the difference between an error signal and a measured variable
example, a washing machine where the tank is filled to a specified level signal?
as quickly as possible, agitated for a while, then emptied). 6. What is the difference between lag time and dead time?
- Many processes require the ability to vary the flow of a fluid in a pipe on 7. What is the difference between offset and error signal?
a continuous basis. To do this, the valve stem must be controlled with a 8. What are some of the actions that can be taken to reduce correction
linear actuator of some type. time?
- Figure (b) shows an electrically operated valve. In this case, an electric 9. What is a dead-band?
motor drives a lead screw-type valve stem, so it can be put in any 10. What would be the effect of time constants on correction time?
position. 11. What types of control do not normally require derivative action?
- Pneumatically operated valves use air pressure as the control signal. 12. Why is ON/OFF action not normally suitable for control of a process?
Shown in figure(c), you can see that as the air pressure is increased,
the diaphragm will move down (against a spring) and close the valve.
This type of valve could be used in an on-off or a variable-flow
application.
Advantages of an Encoder
- Highly reliable and accurate
- Low-cost feedback
- High resolution
- Integrated electronics
Note
- Programs always need a start block, but PLC programs rarely stop so
the stop block is rarely used. Other important blocks include operations
and decisions. The other functions may be used but are not necessary
for most PLC applications.
[email protected] Microcontroller notes@MNP 2016 46
Example 1
- A flowchart is shown in below for a control system for a large water
tank.
- When a start button is pushed the tank will start to fill, and the flow out
will be stopped.
- When full, or the stop button is pushed the outlet will open up, and the
flow in will be stopped.
- In the flowchart the general flow of execution starts at the top. The first
operation is to open the outlet valve and close the inlet valve.
- Next, a single decision block is used to wait for a button to be pushed.
When the button is pushed the yes branch is followed and the inlet
valve is opened, and the outlet valve is closed.
- Then the flow chart goes into a loop that uses two decision blocks to
wait until the tank is full, or the stop button is pushed.
- If either case occurs the inlet valve is closed and the outlet valve is
opened. The system then goes back to wait for the start button to be
pushed again.
- When the controller is on the program should always be running, so
only a start block is needed.
- Many beginners will neglect to put in checks for stop buttons.
7. A controlled car park has 4 spaces in the packing lot. Cars are detected
and allowed to enter into the parking space if available. If NO space a
“Full” indicator lamp should be lit, otherwise individual indicator lamps
8. With the aid of a flowchart and ladder program, explain how a converter
can be used in a machine to direct 6 products to a packaging box and
12 products to another box simultaneously.
10.
- The error signal is discretized and fed to the computer by using an A/D
(analog to digital) converter.
- The controller output is again a discrete signal which is applied to the
plant after using a D/A (digital to analog) converter.
- Error signal e(t) is sampled at intervals of T. In the context of control
- However, digital control systems employ a computer as a and communication, sampling is a process by which a continuous time
fundamental component in the controller. signal is converted into a sequence of numbers at discrete time
- It can be viewed from different perspectives including control intervals.
algorithm, computer program, conversion between analog and - One of the most important aspects is the sampling process level.
digital domains, system performance etc. - It is a fundamental property of digital control systems because of the
- In a digital control system, the control algorithm is implemented in a discrete nature of operation of digital computer.
digital computer.
Analog to Digital converter (ADC)
- ADC is an electronic device that converts an input analog voltage (or
current) to a digital number proportional to the magnitude of the voltage
or current.
- With introduction of digital computers the data or physical quantity taken
in analogue form must be converted to digital form in order to be
computed.
- In order to covert an analogue quantity to a digital number, three
processes takes place; sampling, quantization and binary encoding.
this comparison using the lower half of the input range. If the voltage
4
had been in the upper half, the first digit would have been 1.
2 - This dividing of the remaining fraction of the input range in half and
comparing to the input voltage continues until the specified number of
t bits of accuracy has been obtained. It is obviously important that the
T input signal does not change when the conversion process is underway.
8 Quantizing
Digital to analog conversion
Amplitude
6
- Today microcomputers are widely used for industrial control. The output
4 of the microcomputer is a digital quantity.
- In many applications the digital output of the microcomputer has to be
2 converted into analog quantity which is used for the control of relay,
small motor, actuator etc.
t - In communication system digital transmission is faster and convenient
encoding but the digital signals have to be converted back to analog signals at
101 111 111 110 011 001 001 011110 111 111 110 011 001 001 011 the receiving terminal.
- DAC converters are also used as a part of the circuitry of several ADC
converters.
- Thus, digital to analog converter is used to convert digital quantity into
analog quantity. DAC converter produces an output current of voltage
Integrating (or dual slope) A/Ds proportional to digital quantity (binary word) applied to its input.
- These are used for very low frequency applications (a few hundred - It functions as a zero-order hold, holding its output at a constant value
hertz maximum) and may have very high accuracy and precision (e.g. until it receives the next discrete input.
22 bit). - There are several ways of making a digital to analog converter. Some of
- They are found in thermocouple and RTD modules. Other advantages them are given as under.
include very low cost, noise and mains pickup tend to be reduced by the 1. Binary weighted resistor DAC
integrating and dual slope nature of the A/D converter. 2. R-2R Ladder network
- The A/D procedure essentially requires a capacitor to be charged with 3. Serial DAC converter
the input signal for a fixed time, and then uses a counter to calculate
[email protected] Microcontroller notes@MNP 2016 53
Binary weighted Resistor DAC mode for the purpose of summing so that it performs as an excellent
- It consists of the following four major components. current to voltage converter.
1. n switches one for each bit applied to the input
2. a weighted resistor ladder network, where the resistance are The Data Acquisition System
inversely proportional to the numerical significance of the - This is electronic instrument, or group of interconnected electronic
corresponding binary digital hardware items, dedicated to the measurement and quantization of
3. a reference voltage Vref and analog signals for digital analysis or processing.
4. A summing amplifier that adds the current flowing in the resistive - Once the parameter to be measure is translated into the analog-
network to develop a signal that is proportional to the digital input. electrical domain, the DAS performs the translation to the digital-
electrical domain.
- In some cases the DAS simply records, or stores the digital data. While
more sophisticated systems may be capable of analysis or further
processing.
- For instance, a DAS may be as simple as a digital voltmeter (DVM)
which displays its output as a decimal readout, or it may be complex
enough to contain a large-scale computer as part of its hardware.
- Output buffer: The output buffer acts as the data collector for the DAS./
In an ordered sequence, it gathers up such data as the multiplexer
channel number, the signal conditioner gain, A/D converter data,
manual data, clock information, and discrete events.
- The buffer combines the data with the proper format for entry into the
recording or processing system. It also provides the proper buffering
and control to interface with the recording or processing device.
- If the processing device were a minicomputer, the output buffer might
be called a “Peripheral controller”.
- Analog-to-Digital (A/D) Converter: The analog-to-digital converter
- Recording / processing device: A number of different equipment
actually translates the analog signal into an encoded digital format.
types can fill the role of the recording or processing device. Some of
- Of the numerous ways to perform this function, only about half dozen
the equipment types commonly used are paper tape punches,
techniques have found wide acceptance. Most notable are the dual-
teleprinters (TTY), magnetic tape units, line printers, cathode-ray tube
slope integrating and the successive approximation converters.
displays, floppy disks, general-purpose digital computers, and special-
- A/D converters are often referred to by the number of output digits they
purpose digital processors.
produce. In a binary system, the range is from 4 to 16 bits, while in a
binary-coded decimal system, 5 to 4 digits are normal.
- In recent years, all these components of the data acquisition system
have become more automated; a typical block diagram can be found
- Digital clock: The digital clock provides the master timing for the data
with the exception of manual entry, which is accomplished directly the
acquisition system.
computer through the keyboard display.
- It may be as simple as a multiphased crystal controlled oscillator, or it
- Clock Information is supplied by the computer, and timing is generated
may provide the user with a wide selection of multiplexer rates and
in the input/output (I/O) controller.
modes of operation. Some systems also contain both time-of-day and
- This system configuration has two distinct advantages: first, on-line
day-of-year clocks.
programmable processing is possible; and second, a host of storage
[email protected] Microcontroller notes@MNP 2016 55
media is available. The rapid expansion of the data acquisition field is - The latest trend in test instrumentation is to embed a micro processor in
directly attributable to the advent of low-cost computer hardware, which the heart of the equipment. This places tremendous programming
makes systems like that of figure below a reality. power and flexibility in the hands of the user.
- Yet we should not overlook the dotted-line box in the lower right-hand - The data acquisition system potential uses are:-
corner of the figure. Software can easily become a more costly burden 1. Data logging
than the hardware. 2. Signal analysis
3. Automated factory testing, and
4. Process control
Data Logging
- The data logger is a data acquisition system that measures the analog
inputs, translates the results into the digital domain, and stores the data
for future processing or analysis.
- From the earliest days of recorded data, scientists have set up
experiments with appropriate analog measuring devices at critical points
in the operation.
- They have tabulated their data either by visual observation at set
intervals or by recording it on another analog device, such as a pen
recorder.
- In either case, they had to spend many hours analyzing the results.
The data logger provides an automated method of making the
measurements and recording the data.
- It can perform these functions at precise intervals and with a degree of
accuracy beyond any person’s physical capability.
- Because the data is store in digital format, the data analysis is easily
performed by an off-line computer.
- Since many data loggers are highly portable, data-taking can be
automated even in very remote locations.
Alarm System
- In industrial plants and installations, control systems are used to monitor
and control processes.
- Control Systems, whether a conventional Control Desk or a
Computer/PLCs System with SCADA or a Distributed Control System
(DCS), provides a man-machine-interface to monitor and control the
plant equipment and processes.
- Alarm Systems are an integral part of man-machine interface. An alarm
system consists of both hardware and software including; field signal
sensors, transmitters, alarm generators & handlers, alarm processors,
Controller
- The controller is the part of a robot that coordinates all movements of
the mechanical system.
- It also receives input from the immediate environment through various
sensors.
- The heart of the robot’s controller is generally a microprocessor linked
to input/output and monitoring devices.
- The commands issued by the controller activate the motion control
mechanism, consisting of various controllers, amplifiers, and actuators.
- An actuator is a motor or valve that converts power into robot
movement.
- This movement is initiated by a series of instructions, called a program,
stored in the controller’s memory.
- The controller has three levels of hierarchical control. Hierarchical
control assigns levels of organization to the controllers within a robotic
system.
- Each level sends control signals to the level below and feedback signals
to the level above. The levels become more elemental as they progress Manipulator
toward the actuator. Each level is dependent on the level above it for - The manipulator consists of segments that may be jointed and that
instructions. move about, allowing the robot to do work.
- The three levels are: - The manipulator is the arm of the robot which must move materials,
o Level I—Actuator Control. The most elementary level at which parts, tools, or special devices through various motions to provide
separate movements of the robot along various planes, such as useful work.
the X, Y, and Z axes are controlled. - A manipulator can be identified by method of control, power source,
o Level II—Path Control. The path control (intermediate) level actuation of the joints, and other factors. These factors help identify the
coordinates the separate movements along the planes best type of robot for the task at hand.
determined in Level I into the desired trajectory or path. - For example, you would not use an electric robot in an environment
o Level III—Main Control. The primary function of this highest where combustible fumes exist and a spark could cause an explosion.
control level is to interpret the written instructions from the - The manipulator is made up of a series of segments and joints much
human programmer regarding the tasks required. The like those found in the human arm.
instructions are then combined with various environmental - Joints connect two segments together and allow them to move relative
signals and translated by the controller into the more elementary to one another. The joints provide either linear (straight line) or rotary
instructions that Level II can understand. (circular) movement.
- The muscles of the human body supply the driving force that moves the
various body joints. Similarly, a robot uses actuators to move its arm
[email protected] Microcontroller notes@MNP 2016 61
along programmed paths and then to hold its joints rigid once the - A robot movement can be divided into two general categories: arm and
correct position is reached. body (shoulder and elbow) motions and wrist motions.
- Manipulation is carried out using mechanical devices such as linkages, - The individual joint motions associated with these categories are
gears, actuators, and feedback devices. There are two basic types of referred to as degree of freedom. Each axis is equal to one degree of
motion provided by actuators: linear and rotary. freedom. typically an industrial robots are equipped with 4-6 degrees of
- Linear actuators provide motion along a straight line; they extend or freedom
retract their attached loads. - The wrist can reach a point in space with specific orientation by any of
- Rotary actuators provide rotation, moving their loads in an arc or circle. three motions: a pitch, or up-and-down-motion; a yaw, or side-to-side
Rotary motion can be converted into linear motion using a lead screw or motion; and a roll, or rotating motion. The joint labeled pitch, yaw, and
other mechanical means of conversion. roll are called orientation axes.
- These types of actuators are also used outside the robot to move - The points that manipulator bends, slides, or rotates are called joints or
workpieces and provide other kinds of motion within the work envelope. position axes. Position axes are called as world coordinates, is
identified as being fixed location within the manipulator that serves as
absolute frame of reference.
o The x-axis travel moves the manipulator in an in-and-out
motion.
o The y-axis motion causes the manipulator to move side-to-side.
o The z axis motion causes the manipulator to move in and up
and-down motion.
- The mechanical design of a robot manipulator relates directly to its work
envelope and motion characteristics.
- A tachometer is a device used to measure the speed of an object. In the
case of robotic systems, a tachometer is used to monitor acceleration
and deceleration of the manipulator’s movements
End Effector
- The end effector is the robot’s hand, or the end-of-arm tooling on the
robot.
- It is a device attached to the wrist of the manipulator for the purpose of
grasping, lifting, transporting, maneuvering, or performing operations on
a workpiece.
- The end effector is one of the most important components of a robot
system. The robot’s performance is a direct result of how well the end
effector meets the task requirements.
- The area within reach of the robot’s end effector is called its work
envelope.
Power Supply
- The power supply provides the energy to drive the controller and
actuators. It may convert ac voltage to the dc voltage required by the
[email protected] Microcontroller notes@MNP 2016 62
robot’s internal circuits, or it may be a pump or compressor providing
hydraulic or pneumatic power.
- The three basic types of power supplies are electrical, hydraulic, and
pneumatic. The most common energy source available, where industrial
robots are used, is electricity. The second most common is compressed
air, and the least common is hydraulic power.
- These primary sources of energy must be converted into the form and
amount required by the type of robot being used.
- The electronic part of the control unit, and any electric drive actuator,
requires electrical power.
- A robot containing hydraulic actuators requires the conversion of
electrical power into hydraulic energy through the use of an electric,
motor-driven, hydraulic pump.
- A robot with pneumatic actuators requires compressed air, which is - These tasks require three joints, or three degrees of freedom.
usually supplied by a compressor driven by an electric motor. - The three degrees of freedom in the robot arm are the rotational
traverse, the radial traverse, and the vertical traverse.
o The rotational traverse (x-axis travel) is movement on a
Degrees of Freedom vertical axis. This is the side-to-side swivel of the robot’s arm on
- Although robots have a certain amount of dexterity, it does not compare its base.
to human dexterity. o The radial traverse (y-axis motion)is the extension and
- The movements of the human hand are controlled by 35 muscles. retraction of the arm, creating in-and-out motion relative to the
Fifteen of these muscles are located in the forearm. The arrangement of base.
muscles in the hand provides great strength to the fingers and thumb for o The vertical traverse (z-axis motion) provides up-and-down
grasping objects. motion.
- Each finger can act alone or together with the thumb. This enables the - For applications that require more freedom, additional degrees can be
hand to do many intricate and delicate tasks. In addition, the human obtained from the wrist, which gives the end effector its flexibility.
hand has 27 bones. - The three degrees of freedom in the wrist have aeronautical names:
- Figure below shows the bones found in the hand and wrist. This bone, pitch, yaw, and roll.
joint, and muscle arrangement gives the hand its dexterity. o The pitch, or bend, is the up-and-down movement of the wrist.
- Degrees of freedom (DOF) is a term used to describe a robot’s o The yaw is the side-to-side movement.
freedom of motion in three dimensional space—specifically, the ability o The roll, or swivel, involves rotation.
to move forward and backward, up and down, and to the left and to the
right.
- For each degree of freedom, a joint is required. A robot requires six
degrees of freedom to be completely versatile.
- Its movements are clumsier than those of a human hand, which has 22
degrees of freedom.
- The number of degrees of freedom defines the robot’s configuration.
For example, many simple applications require movement along three
axes: X, Y, and Z.
[email protected] Microcontroller notes@MNP 2016 63
- The second classification is the servo robot. These robots are classified
as either intelligent or highly intelligent. The primary difference between
an intelligent and highly intelligent robot is the level of awareness of its
environment.
Non-Servo Robots
- Non-servo robots are the simplest robots and are often referred to as
“limited sequence,” “pick-and-place,” or “fixed-stop robots.”
- The non-servo robot is an open-loop system. In an open-loop system,
no feedback mechanism is used to compare programmed positions to
actual positions.
- A good example of an open-loop system is the operating cycle of a
washing machine
- Non-servo robots are also limited in their movement and these
limitations are usually in the form of a mechanical stop. This form of
robot is excellent in repetitive tasks, such as material transfer.
- One may question if the non-servo robots qualify as a robot based on
the definition provided by the Robot Institute of America.
- A robot requires a total of six degrees of freedom to locate and orient its - However, if these robots are equipped with a programmable logic
hand at any point in its work envelope. controller (PLC) they easily meet the requirement of a reprogrammable
- Although six degrees of freedom are required for maximum flexibility, device, thus allowing them to be classified as a robot.
most applications require only three to five. - The diagram in Figure below represents a pneumatic (air-controlled),
- When more degrees of freedom are required, the robot’s motions and non-servo robot.
controller design become more complex.
- Some industrial robots have seven or eight degrees of freedom. These
additional degrees are achieved by mounting the robot on a track or
moving base. This addition also increases the robot’s reach
Classifying Robots
- Robots can be classified in various ways, depending on their
components, configuration, and use.
- Three common methods of classifying robots are by the types of
control system used, the type of actuator drive used, and the shape
of the work envelope.
At the beginning of the cycle, the controller sends a signal to the
Type of Control System control valve of the manipulator.
- Robots may use one of two control systems—non-servo and servo. As the valve opens, air passes into the air cylinder, causing the rod
- The earliest type of robot was non-servo, which is considered a non- in the cylinder to move. As long as the valve remains open, this rod
intelligent robot. continues to move until it is restrained by the end stop.
- By appropriate movements of these slides, the robot is capable of - These robots are commonly used for:
moving its arm at any point within its three dimensional rectangularly • handling at die-casting machines
spaced work space. Gantry robots are Cartesian robots (LLL). • assembly operations
- These robots are commonly used for: • handling machine tools
• pick and place work • spot welding
• assembly operations
• handling machine tools Advantages:
• arc welding • can reach all around itself
• rotational axis easy to seal
Advantages: • relatively easy programming
• Ability to do straight line insertions into furnaces. • rigid enough to handle heavy loads through large working space
• Easy computation and programming. • good access into cavities and machine openings
• Most rigid structure for given length.
3. Polar configuration:
- This configuration also goes by the name “spherical coordinate”
because the workspace within which it can move its arm is a partial
sphere.
- Thus, the polar robots have a work space of spherical shape and the
arm is connected to the base with a twisting (T) joint and rotatory (R)
and linear (L) joints follow. - They are commonly used for:
- Robot with 1 prismatic joint and 2 rotary joints – the axes consistent with • assembly operations
a polar coordinate system. • welding
• weld sealing
• spray painting
• handling at die casting or fettling machines
Advantages:
• all rotary joints allows for maximum flexibility
• any point in total volume can be reached.
• all joints can be sealed from the environment.
Disadvantages:
• Extremely difficult to visualize, control, and program.
- The designation of the arm for this configuration can be TRL or TRR. • Restricted volume coverage.
Robots with the designation TRL are also called spherical robots. This • low accuracy
robots are commonly used for:
• handling at die casting or fettling machines 4. Jointed-arm configuration
• handling machine tools - This is combination of cylindrical and
• arc/spot welding articulated configurations. This is similar in
Advantages: appearance to the human arm.
• Large working envelope. - The arm consists of several straight members
• Two rotary drives are easily sealed against liquids/dust. connected by joints which are analogous to
Disadvantages: the human shoulder, elbow, and wrist.
• Complex coordinates more difficult to visualize, control, and - The robot arm is mounted to a base which
program. can be rotated to provide the robot with the
• Exposed linear drive. capacity to work within a quasi-spherical
• low accuracy. space.
[email protected] Microcontroller notes@MNP 2016 69
5. SCARA (Selective Compliance Articulated Robot Arm) Robots
- This is similar to jointed-arm robot except that vertical axes are used for
shoulder and elbow joints to be compliant in horizontal direction for
vertical insertion tasks.
- The robot has at least 2 parallel rotary joints.
- They are commonly used for:
• pick and place work
• assembly operations
Advantages:
• high speed.
• height axis is rigid
• large work area for floor space
• moderately easy to program.
Disadvantages:
• limited applications.
• 2 ways to reach point
• difficult to program off-line
• highly complex arm a) LRL robot, b) RRL robot, c) TRL robot, d) LVL robot
Question
Sketch following manipulator configurations
(a) TRT:R, (b) TVR:TR, (c) RR:T.
Solution:
R
R
T T R
R T
R
R V
T T
3. Controlled-path robot
- In controlled-path robots, the control equipment can generate paths of
different geometry such as straight lines, circles, and interpolated
curves with a high degree of accuracy.
- Good accuracy can be obtained at any point along the specified path.
- All controlled-path robots have a servo capability to correct their path.
- Only the start and finish points and the path definition function must be
stored in the robot's control memory.
- It is important to mention that all controlled-path robots have a servo
capability to correct their path.