You are on page 1of 60

MECHATRONIC SYSTEMS

- EXAMPLES
By

Prof.C.S.P. RAO
H.O.D (M.E.D)
N.I.T, Warangal
MECHATRONICS - DEFINITION
Mechatronics is synergistic integration of
electronic engineering, electrical engineering,
computer technology and control engineering
with mechanical engineering.
STAGES IN DESIGN PROCESS
The need

Analysis of problem

Preparation of Specification

Generation of possible solutions

Selection of a suitable solution

Production of a detailed design

Production of working drawings


TRADITIONAL DESIGN
VS
MECHATRONICS DESIGN
:
TRADITIONAL DESIGN The temperature control for a domestic
central heating system has been the bi-metallic thermostat of a
closed loop control system. The bending of bi-metallic strip
changes as the temperature changes and is used to operate an
on/off switch for the heating system.
The bi-metallic thermostat is comparatively crude and the
temperature is not accurately controlled; also devising a method
for having different temperatures at different times of the day is
complex and not easily achieved.

MECHATRONIC DESIGN: A mechatronic solution to the problem


might be to use a microprocessor controlled system employing
perhaps a thermo-diode as the sensor

The microprocessor-controlled system can, however, cope easily


with giving precision and programmed control. The system is
much more flexible. This improvement in flexibility is a common
characteristic of mechotronics systems when compared with
traditional systems.
THERMOSTAT

TRADITIONAL DESIGN MECHATRONICS DESIGN


TRADITIONAL THERMOSTAT DESIGN
SECTIONAL VIEW COMPONENTS OF THERMOSTAT
CONVERSION TO MECHATRONIC DESIGN
ADVANTAGES OF MECHATRONICS DESIGN

HIGH RESOLUTION & ACCURACY

REDUCES HOUSE HOLD HEATING COST

SELF CALIBRATING

FLEXIBLE DESIGN

ENVIRONMENTAL FRIENDLY
TINY MCUs IN SWITCHES & POTENTIOMETERS
TIMED SWITCH
Consider a simple requirement for a device which
switches on some actuator, e.g. a motor, for some
prescribed time.
A mechanical solution could involve a rotating cam
The cam would be rotated at a constant rate and the
cam follower used to actuate a switch, the length of
time for which the switch is closed depends on the
shape of cam.
MECHATRONICS SOLUTION

A PLC arrangement could


involve the arrangement shown
in figure with the given ladder
program. This would have the
advantage over the rotating cam
of having off and on times which
can be adjusted by purely
changing the timer preset values
in the program where as
different cam is needed if the
times have to be changed with
the mechanical solution.
MECHATRONICS SOLUTION
A microprocessor-based solution could involve a microprocessor
with a memory chip and input/output interfaces. The program is
then used to switch an output on and off after some time delay
with the time delay being produced by a block of program in which
there is a timing loop. This generates a time delay by branching
round a loop the number of cycles required to generate the
requisite time, in assembly language:

DELAY LDX #F424 F424 is number of


loops
LOOP DEX
BNE LOOP
RTS
o DEX decrements the index register, and this and BNE, branch if not
equal, each take 4 clock cycles. The loop thus takes 8 cycles
and there will be n such loops until 8n+3+5 gives the number F424
(LDX takes 3 cycles and RTS takes 5 cycles). In C we would write
the program lines using the while function.
An alternative to using a loop is to
use a timer module, e.g. 555, with the
microprocessor.

With the 555 timer the timing


intervals are set by external resistors
and capacitors.

Figure shows the timer and the


external circuitry needed to give an
on-output when triggered, the
duration of the on-output being
1.1RC.

Large times need large values of R


and C. R is limited to about 1 Mc
otherwise leakage becomes a
problem, and C is limited to about 10
μF if electrolytic capacitors with
problems of leakage and low
accuracy are to be avoided. Thus the
circuit shown is limited to times less
than about 10 s. the lower limit is
about R= 1 kc and C= 100pF, i.e.
times of a fraction of a millisecond.
For longer times, from 16 ms to
days, an alternative timer such as
the ZN1034E can be used. 555 timer
(a) Generating 2 MHz internal clock
Another possibility is to use the timer system in a
microcontroller such as MC68HC11.

The timer system is based on a 16-bit counter TCNT


operating from the system E-clock signal (Figure (a)).

The system E-clock can be pre-scaled by setting bits in


the timer interrupt mask register 2 (TMSK 2), address
$1024 (Figure (b)).

The TCNT register starts at $0000 when the processor


is reset and counts continuously until it reaches the
maximum count of $FFFF.

On the next pulse it overflows and reads $0000 again.


When it overflows it sets the timer overflow flag TOF
(bit 7 in miscellaneous timer interrupt flag register 2, (b) Pre-scaled factor
TFLG2 at address $1025).

Thus with a pre-scale factor of 1 and an E-clock


frequency of 2 MHz, over flow occurs after 32.768

One way of using this for timing is for the TOF flag to
be watched by polling. When the flag is set, the
program increments its counter. The program then
resets the flag, by writing a 1 to bit 7 in the TFLG2
register. Thus the timing operation just consists of the
program waiting for the required number of overflag
settings.
A better way of timing involves the use of the
output-compare function.

Port A of the microcontroller can be used for


general inputs or outputs or timing functions.

The timer has output pins, OC1,OC2,OC3,OC4 and


OC5, with internal registers TOC1, TOC2, TOC3,
TOC4 and TOC5.

We can use the output-compare function to


compare the values in the TOC1 to TOC5 registers
with value in the free running counter TCNT. This
counter starts at 0000 when the CPU is reset and
then runs continuously.

When a match occurs between register and the


counter then the corresponding OCx flag bit is set
and output occurs through the relevant output pin.

The Figure shown illustrates this. Thus by


programming the TOCx register, so the times at OUTPUT COMPARE
which output occur can be set. The output-compare
function can generate timing delays with much
higher accuracy than the timer overflag.
WINDSCREEN-WIPER MOTION
Consider a requirement for a device which will
oscillate an arm back and forth in an arc like a
wind screen wiper. A mechanical solution is shown
in the Figure below . Rotation of arm 1 causes arm
2 to impart an oscillatory motion to arm 3.

WIPER MECHANISM
MECHATRONICS SOLUTION
An alternative solution is to
use a stepper motor.

Figure below shows how a


microprocessor with a PIA, or
a microcontroller, might be
used with a stepper.

The input to the stepper is


required to cause it to rotate a
number of steps in one
direction and then reverse to
rotate the same number of
steps in one direction and
then reverse to rotate the
same number of steps in the
other direction.
If the stepper is to be in the ‘ full-step’ configuration then the outputs need to be as
shown in Table below. Thus to start and rotate the motor in a forward direction
involves the sequence A, 9, 5, 6 and then back to the beginning with 1 again. To
reverse we would use the sequence 6, 5, 9, A and then back to begin with 6 again.
Step Bit 3 Bit 2 Bit 1 Bit 0 Code
1 1 0 1 0 A
2 1 0 0 1 9
3 0 1 0 1 5
4 0 1 1 0 6
1 1 0 1 0 1

If ‘ half-step’ configuration is used then the outputs need to be as


shown in Table below.
Step Bit 3 Bit 2 Bit 1 Bit 0 Code
1 1 0 1 0 A
2 1 0 0 0 8
3 1 0 0 1 9
4 0 0 0 1 1
5 0 1 0 1 5
6 0 1 0 0 4
7 0 1 1 0 6
8 0 0 1 0 2
1 1 0 1 0 A
Where there are many steps involved a simpler program is to increment a
counter with each step and loop until the counter value reaches the
required number. Such program would have the basic form of:

 Advance a step

 Jump to time delay routine to give time for the step to be completed.

 Increment the counter.

 Loop or repeat the above with successive steps until the counter indicates
the requisite number of steps completed in the forward direction.

 Reverse direction

 Repeat the above for the same number of steps in reverse directi
Integrated circuit SAA 1027 for stepper motor
Integrated circuits are available for
step motor control and their use can
simplify the interfacing and the
software.

Figure shows how such a circuit can


be used.

All that is then needed is the requisite


number of input pulses to the trigger,
the motor stepping on the low-to-high
transition of a high-low-high pulse.

A high on the rotation input causes


the motor to step counter-clockwise
while a low gives clockwise rotation.

Thus we just need one output from


the microcontroller for output pulses
to the trigger and one output to
rotation. An output to set is used to
reset the motor back to its original
position.
BATHROOM SCALES or
SIMPLE WEIGHING MACHINE
The main requirements are that a person can
stand on a platform and the weight of that
person will be displayed on some form of
readout. The weight should be given with
reasonable speed and accuracy and be
independent of where on the platform the
person stands.

One possible solution is to use the weight of


the person on the platform to deflect an
arrangement of two parallel leaf springs
(Figure (a)). With such an arrangement the
deflection is virtually independent of where
on the platform the person stands.

The deflection can be transformed into


movement of a pointer across a scale by
using the arrangement shown in Figure (b). A
rack-and-pinion is used to transform the
linear motion into a circular motion about a
horizontal axis. This is then transformed into
a rotation about a vertical axis, and hence
movement of a pointer across a scale, by
means of a bevel gear.
MECHATRONICS SOLUTION
It involves the use of a microprocessor.

The platform can be mounted on load


cells employing electrical resistance
strain gauges. When the person stands
on the platform the gauges suffer strain
and change resistance.

If the gauges are mounted in a four-


active-arm Wheatstone bridge then the
out-of-balance voltage output from the
bridge is a measure of the weight of the
person.

This can be amplified by a differential


operational amplifier. The resulting
analog signal can then be fed through a
latched analog-to-digital converter for
inputting to the microprocessor, e.g. the
Motorola 6820.

The adjacent Figure shows the input


interface. There will also be a need to
provide a non-erasable memory and this
can be provided by an EPROM chip, e.g.
Motorola 2716. The output to the display
can then be taken through a PIA, e.g.
Motorola 6821.
If a microcontroller is used then memory is present within the single
microprocessor chip, and by a suitable choice if a microcontroller, e.g.
M68HC11, the analog-to-digital conversion can be obtained for the inputs.
The system then becomes: strain gauges feeding through an operational
amplifier a voltage to the port E (the ADC input) of the microcontroller,
with the output passing through suitable drives to output through ports B
and C to a decoder and hence a LED display (Figure below).
A PICK-AND-PLACE ROBOT
The basic form of a Pick-and-Place robot unit is
shown in the Figure (a).

The robot has three axes, about which the motion can
occur i.e. rotation in a clockwise or counter clockwise
direction of the unit on its base, arm extension or
contraction and arm up and down; also the gripper
can open and close.

These movements can be actuated by the use of


pneumatic cylinders operated by solenoid-controlled
valves with limit switches to indicate when a motion
is completed.
Figure (a)
Thus the clockwise rotation of the unit might result
from the piston in a linear cylinder being extended
and the counter clockwise direction by its retraction.
Likewise the upward movement of the arm might
result from the piston in a linear cylinder being
extended and the downward motion from it retracting;
the extension of the arm by the piston in another
cylinder extending and its return movement by the
piston retracting.

The gripper can be opened or closed by the piston in


a linear cylinder extending or retracting. Figure (b)
shows a basic mechanism that could be used

Figure (b)
MECHATRONICS SOLUTION
Figure below shows how a micro controller could be used to control
the solenoid valves and hence the movements of the robot unit.
CAR PARK BARRIERS
As an illustration of a PLC, consider the
coin-operated barriers for a car park.

The in-barrier is to open when the correct


money is inserted in the collection box and
the out-barrier is to open when a car is
detected at the car park side of the barrier.

The Figure shows the types of valve


systems that can be used to lift and lower
the pivoted barriers.

When a current flows through the solenoid


of valve A, the piston in a cylinder moves
upwards and causes the barrier to rotate
about its pivot and raise to a let a car
through. When the current through solenoid
of valve A ceases, the return spring of the
valve results in the valve position changing
back to its original position.

When the current is switched to through the


solenoid of valve B the pressure is applied
to lower the barrier. Limit switches are used
to detect when the barrier is down and also
when fully up.
MECHATRONICS SOLUTION
PLC connections Ladder diagram
AUTOMATIC CAMERA
The basic features of the Canon EOS model, automatic, auto-
focus, reflex cameras is shown in the Figure (a) .

The cameras have interchangeable lenses.

There is a main microcontroller in the lens housing, the two


communicating with each other when a lens is attached to the
camera body.
BLOCK DIAGRAM OF THE ELECTRONIC SYSTEM
The metering sensor has six light
sensors as shown in the Figure.

Signal conditioning is used to obtain the


average value of C1, C2, C3, and C4; the
A, B and average C value are then
analysed to find the required exposure
value. This, for example, reveals whether
the scene is a scene with a relatively
constant luminosity or perhaps a close
up of a person so that there is bright
central zone surrounded by a dark
background.

The type of program that is used is:

If B is equal to A and C minus B is


less than 0

then exposure set on value of A

if B is equal to A and C minus B is 0

then exposure set on value of C


For the main microcontroller

Send start command to lens microcontroller


Take input from range sensor
Calculate lens movement required
Send lens movement data to lens microcontroller
Wait for verification of lens movement from microcontroller
Send in-focus signal to viewfinder display

For the lens microcontroller

Wait for start command from main microcontroller


Determine the initial lens position
Wait for lens movement data from main microcontroller
Read lens movement data
Calculate new lens position
While lens is not in new position drive the motor
Send verification signal of in-focus to main microcontroller
This information is translated by the
microcontroller into an appropriate
shutter speed and aperture value. If the
camera is operated with the shutter
speed preselected by the photographer
then only the aperture value is
supplied; similarly if the aperture is
preselected then only the shutter speed
is supplied.

The range sensor has two 48-bit linear


arrays of photo detectors. The light
from the object, after passing through
the camera lens, falls on this array
(Figure). When the image is in focus
the spacing of the images on the
detector array is a particular value, the
spacing deviating from this when the
image is out of focus.

The amount of this deviation is used to


give an error signal, which is fed to the
lens microcontroller and used to give
an output to adjust the focusing of the
lens. An encoder is used to provide
feed back of this adjustment so that the
microcontroller knows when the Automatic focusing
focusing has been completed. The
program is thus of the form:
The diaphragm drive system is a stepper motor,
which opens or closes a set of diaphragm blades.

The focusing involves two forms of drive, the arc


form drive and the ultrasonic motor. The arc form
drive uses a brushless permanent magnet
d.c.motor, Hall sensors being used to detect the
position of the rotor.

The drive from the motor is transmitted through


gears to move the focusing lens along the optical
axis. The ultrasonic motor has a series of
piezoelectric elements in the form of a ring (Figure
(a). When a current is supplied to the piezoelectric
element it expands or contracts according to the
polarity of the current.

By switching the current to the piezoelectric


elements in the appropriate sequence a
displacement wave can be made to travel around
the piezoelectric ring of elements in either a
clockwise or counter-clockwise direction and
consequently rotate a rotor which is in contact with
its surface, hence driving the focusing element

The control system for the ultrasonic motor is


of the form shown in Figure (b)
CAR ENGINE MANAGEMENT

The modern car is


likely to include
many electronic
control systems
involving micro
controllers, the
engine control
system being one.
Figure below shows a generalized block diagram of such a system, its
aim being to ensure that the engine is operated at its optimum
settings.
The system consists of sensors supplying, after suitable signal
conditioning, the input signals via drivers to actuate actuators.
Figure below shows some of these elements in relation to an
engine; only one cylinder is being shown.
BAR CODE ENCODER
The familiar scene at the check-out of a supermarket is of the
purchases being passed in front of a light beam or a hand-held
wand being passed over the goods so that the bar code can be
read and the nature of the purchase and hence its price
automatically determined. The code consists of a series of
black and white bars of varying widths.
The bar code represents a series of numbers.

There is a prefix which identifies the coding scheme being used; this is
a single digit for the regular Universal Product Coding (UPC) used in
the United States and two digit for the European Article Number (EAN)
scheme used in Europe.

The UPC uses a 0 prefix for grocery and a 3 for pharmaceuticals. The
EAN prefix is from 00 to 09 and is such that the UPC code can be read
within the EAN code.

This is followed by five digits to represent the manufacturer, each


manufacturer having been assigned a unique number.
This brings up the center of the code pattern, which is identified by two
taller bar patterns.

The five-digit number that then follows represents the product. The final
number is a check digit, which is used to check that the code has been
correctly read.

A guard pattern of two taller bars at the start and end of the bar pattern
is used to frame the bars.
Each number is coded as seven 0 or 1 digits.

The codes used on either side of the centerline are different so that the direction of
the scan can be determined.

To the right the characters have an even number of 1s and so even parity; for UPC,
to the left an odd number of 1s and so odd parity; the EAN coding for the left being
a mixture.

Table below shows the UPC and EAN codings, UPC being the left A coding and the
EAN using both left A and left B character codes.

Decimal number Left A Left B Right


Characters Characters Characters

0 0001101 0100111 1110010


1 0011001 0110011 1100110
2 0010011 0011011 1101100
3 0111101 0100001 1000010
4 0100011 0011101 0011100
5 0110001 0111001 0001110
6 0101111 0000101 1010000
7 0111011 0010001 1000100
8 0110111 0001001 1001000
9 0001011 0010111 1110100
Each 1 is entered as a dark bar and
thus the right-hand character 2
would be represented 1101100
and, with the adjacent dark bars
run together, it appears as a
double-width dark wide bar
followed by a narrow space and
then another double-width dark
wide bar followed by a double-
width space. This is illustrated in
Figure below.

The guard pattern at the ends of


the code represents 101 and the
central band of bars is 01010.
PROCEDURE FOR USING CHECK CODE DIGIT

Starting at the left, sum all the characters, excluding the check
digit, in the odd positions, i.e. first, third, fifth, etc. and then
multiply the sum by 3.

Starting at the left, sum all the characters in the even positions.

Add the results of steps 1 and 2. The check character is the


smallest number which when added to this sum produces a
multiple of 10
INVERTED PENDULUM SYSTEM: ROTARY AND
ARM-DRIVEN

The inverted pendulum is a popular mechatronic application that


exists in many different forms. The common thread among these
systems is their goal:
 to balance a link on end using feedback control.

 Two rather challenging inverted pendulum systems are the


rotational and the arm-driven systems.

These use a link rotating about an axis to balance a second link on


end. In the rotary (horizontal) configuration, the first link, driven
by a motor, rotates in the horizontal plane to balance a
pendulum link, which rotates freely in the vertical plane. The
arm-driven (vertical) or “stick-on-a-stick” configuration uses a
driven link rotating in the vertical plane to balance the
pendulum link, which also rotates in the vertical plane.
The inverted pendulum system is unique in that it can be
transformed from the horizontal to vertical configuration by replacing
the links and setting the base on its side, as shown in Figure

(a) (b)

Figure: Inverted Pendulum System Configurations: (a) Horizontal and (b) Vertical
Rotary inverted pendulum dynamic system investigation:

Physical System : It consists of two links: a


motordriven horizontal link and an un-actuated vertical
pendulum link. The horizontal link is driven by a
permanent-magnet, brushed DC motor. A DC power
supply together with a pulse-width-modulated (PWM)
servo-amplifier, operating in the current mode, supply
power to the motor.

Angular position and velocity of the two links are


measured with two rotary incremental optical encoders
having a resolution with quadrature decoding of 2048
pulses per revolution.
A slip-ring assembly, mounted between the housing and
the motor shaft, is used to connect power to the
pendulum optical encoder and read the signal from the
three channels of the encoder. The horizontal link is
counter-weighted and there are leveling screws on the
housing base. System testing for parameter identification
and control system design is performed in a MatLab /
Simulink / dSpace real-time control environment. This
allows for rapid control system development and testing.

Physical Model
Several simplifying assumptions were made in
developing a physical model:
1. rigid links
2. two degrees of freedom
3. negligible sensor dynamics
Control System design: Balancing and swing-up

The swing-up control is based on the work of Astrom and


Furuta and the balancing controller is a full state-
feedback regulator. The swing up controller calculates
the total system energy based on the kinetic energy of
both links, and the potential energy of the pendulum.

This calculated value is compared to a defined quantity


of energy when the pendulum is balanced. The
difference between desired energy and actual energy is
multiplied by an "aggressivity" gain and applied to the
motor.
Figure : MatLab/Simulink Block Diagram of Control System Design
Figure : MatLab/Simulink Block Diagram of Control Selection Subsystem

The objective of the swing-up control exercise is to move the system from the
stable equilibrium position to the unstable equilibrium position. Hence, energy
has to be added to the system to achieve this swing-up action. The
manipulated input to realize the above idea is given by the following control
law:

V = KA (E – EO) sign(ɑcos ɑ)
The velocity term causes the
input to change directions when
the pendulum stops and begins
to swing in the opposite direction.
The cosine term is negative when
the pendulum is below horizontal
and positive above horizontal. This
helps the driven link to get under
the pendulum and catch it as shown
in Figure below. By controlling on
energy feedback, the system
automatically stops inputting excess
energy and allows the system to
coast to a balanced position.
Figure : Sign function effect on swing up
From Figure below, when the remaining potential energy
required is equal to the kinetic energy, the feedback will
become very small and the pendulum will coast to
vertical position.

Figure : Swing up diagram


Figures below show the simulation results for the swing-up and balance
controllers. The angles plotted are normalized angles.

Figure : Normalized Pendulum angle Versus Time Figure : Normalized Driven Link angle Versus Time
DESIGN OF AN ATOMIC FORCE MICROSCOPE
The atomic force microscope (AFM) is a mechatronic instrument
that has had a revolutionary impact in the last decade on the ability
to image the topography of surfaces in the micron to subnanometer
range. AFM’s form images of surface properties by scanning a
cantilevered probe with a sharp tip over the surface of a sample in
an x-y raster pattern.
The deflection of the probe caused by repulsive (or
attractive) forces between atoms of the tip and
sample is used to quantitatively map the topography
or determine other properties of the surface .

AFM’s are used extensively by researchers across


the disciplines of physics, chemistry, biology,
material science, and others to image surface
properties, measure fundamental force interactions,
and understand mechanical properties of materials.

AFM’s are also being used as metrology instruments


particularly in the semiconductor industry.
The main subsystems that
comprise an AFM are:

 the cantilever probe,

 the scanner,

 the deflection sensing


system,

 the controller,

 the data acquisition

 the processing system, and

 the mechanical assembly

Figure : Schematic diagram of an atomic force microscope (AFM).


Figure (a) shows AFM
cantilevers: shows typical
rectangular or triangular
shapes of cantilevers.
The rectangular
cantilever on the left is
200-_m long and 20-_m
wide.

Figure (b) and (c) shows


a close-up view of the tip
of a cantilever. AFM
cantilevers are made
using IC fabrication and
silicon micromachining
processes
Figure : Cantilever deflection
measurement approaches:
(a) shows the optical lever
approach, where deflection of
the cantilever causes the
reflected laser beam to
illuminate one photodetector
cell more than the other. The
motion of the beam, hence the
deflection of the cantilever, can
be quantified by taking the
difference of the photocurrents
from the two cells and
(b) shows the piezoresistive
cantilever approach, where a
specially fabricated cantilever
is connected as one leg of a
Wheatstone bridge. The
deflection of the cantilever is
sensed by a change in the
output voltage of the bridge.
Mechatronic Design of the Hewlett-Packard DESKJET
560C Printer
The mechatronic related design objectives for
this printer are shown in Table below.
MECHATRONIC DESIGN

Figure illustrates the


mechatronic design of the
printer.

The printer uses three


motors: a dc motor drives
the scanning carriage, one
permanent magnet
“tin-can” stepper motor
drives the paper feed
system, and a second
permanent magnet stepper
Figure : HP deskjet Mechatronic System
motor actuates the print
cartridge service station.
All three of these motors
are controlled with less
than 10% of the
bandwidth of an
inexpensive 8-bit Z-80
microprocessor

Figure : Control System Block Diagram

You might also like