7/23/2019 Mechatronics Systems - Examp
1/60
MECHATRONIC SYSTEMSMECHATRONIC SYSTEMS
- EXAMPLES- EXAMPLESByBy
Prof.C.S.P. RAOProf.C.S.P. RAOH.O.D (M.E.D)H.O.D (M.E.D)
N.I.T, WarangalN.I.T, Warangal
7/23/2019 Mechatronics Systems - Examp
2/60
MECHATRONICS - DEFINITIONMECHATRONICS - DEFINITION
MechatronicsMechatronics is synergistic integration ofis synergistic integration ofelectronic engineering, electrical engineering,electronic engineering, electrical engineering,computer technology and control engineeringcomputer technology and control engineeringwith mechanical engineering.with mechanical engineering.
7/23/2019 Mechatronics Systems - Examp
3/60
STAGES IN DESIGN PROCESSSTAGES IN DESIGN PROCESS
The needThe need
Analysis of problemAnalysis of problem
Preparation of SpecificationPreparation of Specification
Generation of possible solutionsGeneration of possible solutions
Selection of a suitable solutionSelection of a suitable solution
Production of a detailed designProduction of a detailed design
Production of working drawingsProduction of working drawings
7/23/2019 Mechatronics Systems - Examp
4/60
TRADITIONAL DESIGNTRADITIONAL DESIGNVSVS
MECHATRONICS DESIGNMECHATRONICS DESIGN
TRADITIONAL DESIGNTRADITIONAL DESIGN:: The temperature control for a domesticThe temperature control for a domesticcentral heating system has been thecentral heating system has been the bi-metallic thermostatbi-metallic thermostat of aof aclosed loop control systemclosed loop control system. The bending of bi-metallic strip. The bending of bi-metallic stripchanges as the temperature changes and is used to operate anchanges as the temperature changes and is used to operate anon/off switch for the heating system.on/off switch for the heating system.
TheThe bi-metallic thermostatbi-metallic thermostat is comparatively crude and theis comparatively crude and thetemperature is not accurately controlled; also devising a methodtemperature is not accurately controlled; also devising a methodfor having different temperatures at different times of the day isfor having different temperatures at different times of the day is
complex and not easily achievedcomplex and not easily achieved..
MECHATRONIC DESIGN:MECHATRONIC DESIGN: A mechatronic solution to the problemA mechatronic solution to the problem
might be to use amight be to use a microprocessor controlled systemmicroprocessor controlled system employingemployingperhaps aperhaps a thermo-diodethermo-diode as the sensoras the sensor
TheThe microprocessor-controlledmicroprocessor-controlled system can, however, cope easilysystem can, however, cope easilywith giving precision and programmed control. The system iswith giving precision and programmed control. The system ismuch more flexible. This improvement inmuch more flexible. This improvement in flexibilityflexibility is a commonis a commoncharacteristic of mechotronics systems when compared withcharacteristic of mechotronics systems when compared with
traditional systems.traditional systems.
7/23/2019 Mechatronics Systems - Examp
5/60
THERMOSTATTHERMOSTAT
TRADITIONAL DESIGN MECHATRONICS DESIGN
7/23/2019 Mechatronics Systems - Examp
6/60
TRADITIONAL THERMOSTAT DESIGNTRADITIONAL THERMOSTAT DESIGN
SECTIONAL VIEW COMPONENTS OF THERMOSTAT
7/23/2019 Mechatronics Systems - Examp
7/60
CONVERSION TO MECHATRONIC DESIGNCONVERSION TO MECHATRONIC DESIGN
7/23/2019 Mechatronics Systems - Examp
8/60
ADVANTAGES OF MECHATRONICS DESIGNADVANTAGES OF MECHATRONICS DESIGN
HIGH RESOLUTION & ACCURACYHIGH RESOLUTION & ACCURACY
REDUCES HOUSE HOLD HEATING COSTREDUCES HOUSE HOLD HEATING COST
SELF CALIBRATINGSELF CALIBRATING
FLEXIBLE DESIGNFLEXIBLE DESIGN
ENVIRONMENTAL FRIENDLYENVIRONMENTAL FRIENDLY
7/23/2019 Mechatronics Systems - Examp
9/60
TINY MCUs IN SWITCHES & POTENTIOMETERSTINY MCUs IN SWITCHES & POTENTIOMETERS
7/23/2019 Mechatronics Systems - Examp
10/60
TIMED SWITCHTIMED SWITCH
Consider a simple requirement for a device whichConsider a simple requirement for a device which
switches on some actuator, e.g. a motor, for someswitches on some actuator, e.g. a motor, for someprescribed time.prescribed time.
A mechanical solution could involve a rotating camA mechanical solution could involve a rotating camThe cam would be rotated at a constant rate and theThe cam would be rotated at a constant rate and the
cam follower used to actuate a switch, the length ofcam follower used to actuate a switch, the length oftime for which the switch is closed depends on thetime for which the switch is closed depends on the
shape of cam.shape of cam.
7/23/2019 Mechatronics Systems - Examp
11/60
MECHATRONICS SOLUTIONMECHATRONICS SOLUTION
A PLC arrangement couldA PLC arrangement could
involve the arrangement showninvolve the arrangement shown
in figure with the given ladderin figure with the given ladder
program. This would have theprogram. This would have the
advantage over the rotating camadvantage over the rotating camof having off and on times whichof having off and on times which
can be adjusted by purelycan be adjusted by purely
changing the timer preset valueschanging the timer preset values
in the program where asin the program where as
different cam is needed if thedifferent cam is needed if thetimes have to be changed withtimes have to be changed with
the mechanical solution.the mechanical solution.
7/23/2019 Mechatronics Systems - Examp
12/60
A microprocessor-based solution could involve a microprocessorA microprocessor-based solution could involve a microprocessor
with a memory chip and input/output interfaces. The program iswith a memory chip and input/output interfaces. The program is
then used to switch an output on and off after some time delaythen used to switch an output on and off after some time delaywith the time delay being produced by a block of program in whichwith the time delay being produced by a block of program in which
there is a timing loop. This generates a time delay by branchingthere is a timing loop. This generates a time delay by branching
round a loop the number of cycles required to generate theround a loop the number of cycles required to generate the
requisite time,requisite time, in assembly language:
DELAYDELAY LDX #F424 F424 is number ofLDX #F424 F424 is number of
loopsloops
LOOPLOOP DEXDEX
BNE LOOPBNE LOOP RTSRTS
o DEX decrements the index register, and this and BNE, branch if notDEX decrements the index register, and this and BNE, branch if not
equal, each take 4 clock cycles. The loop thus takes 8 cyclesequal, 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 F424and 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(LDX takes 3 cycles and RTS takes 5 cycles). In C we would writethe program lines using the while function.the program lines using the while function.
MECHATRONICS SOLUTIONMECHATRONICS SOLUTION
7/23/2019 Mechatronics Systems - Examp
13/60
An alternative to using a loop is toAn alternative to using a loop is touse a timer module, e.g. 555, with theuse a timer module, e.g. 555, with themicroprocessor.microprocessor.
With the 555 timer the timingWith the 555 timer the timing
intervals are set by external resistorsintervals are set by external resistorsand capacitors.and capacitors.
Figure shows the timer and theFigure shows the timer and theexternal circuitry needed to give anexternal circuitry needed to give anon-output when triggered, theon-output when triggered, theduration of the on-output beingduration of the on-output being
1.1RC.1.1RC.
Large times need large values of RLarge times need large values of Rand C. R is limited to about 1 Mcand C. R is limited to about 1 Mc otherwise leakage becomes aotherwise leakage becomes aproblem, and C is limited to about 10problem, and C is limited to about 10F if electrolytic capacitors withF if electrolytic capacitors with
problems of leakage and lowproblems of leakage and lowaccuracy are to be avoided. Thus theaccuracy are to be avoided. Thus thecircuit shown is limited to times lesscircuit shown is limited to times lessthan about 10 s. the lower limit isthan about 10 s. the lower limit isabout R= 1 kc and C= 100pF, i.e.about R= 1 kc and C= 100pF, i.e.times of a fraction of a millisecond.times of a fraction of a millisecond.For longer times, from 16 ms toFor longer times, from 16 ms to
days, an alternative timer such asdays, an alternative timer such asthe ZN1034E can be used.the ZN1034E can be used. 555 timer
7/23/2019 Mechatronics Systems - Examp
14/60
Another possibility is to use the timer system in aAnother possibility is to use the timer system in amicrocontroller such as MC68HC11.microcontroller such as MC68HC11.
The timer system is based on a 16-bit counter TCNTThe timer system is based on a 16-bit counter TCNToperating from the system E-clock signal (Figure (a)).operating from the system E-clock signal (Figure (a)).
The system E-clock can be pre-scaled by setting bits inThe system E-clock can be pre-scaled by setting bits inthe timer interrupt mask register 2 (TMSK 2), addressthe timer interrupt mask register 2 (TMSK 2), address$1024 (Figure (b)).$1024 (Figure (b)).
The TCNT register starts at $0000 when the processorThe TCNT register starts at $0000 when the processoris reset and counts continuously until it reaches theis reset and counts continuously until it reaches themaximum count of $FFFF.maximum count of $FFFF.
On the next pulse it overflows and reads $0000 again.On the next pulse it overflows and reads $0000 again.When it overflows it sets the timer overflow flag TOFWhen it overflows it sets the timer overflow flag TOF(bit 7 in miscellaneous timer interrupt flag register 2,(bit 7 in miscellaneous timer interrupt flag register 2,TFLG2 at address $1025).TFLG2 at address $1025).
Thus with a pre-scale factor of 1 and an E-clockThus with a pre-scale factor of 1 and an E-clockfrequency of 2 MHz, over flow occurs after 32.768frequency of 2 MHz, over flow occurs after 32.768
One way of using this for timing is for the TOF flag toOne way of using this for timing is for the TOF flag tobe watched by polling. When the flag is set, thebe watched by polling. When the flag is set, theprogram increments its counter. The program thenprogram increments its counter. The program thenresets the flag, by writing a 1 to bit 7 in the TFLG2resets the flag, by writing a 1 to bit 7 in the TFLG2register. Thus the timing operation just consists of theregister. Thus the timing operation just consists of theprogram waiting for the required number of overflagprogram waiting for the required number of overflagsettings.settings.
(a) Generating 2 MHz internal clock
(b) Pre-scaled factor
7/23/2019 Mechatronics Systems - Examp
15/60
A better way of timing involves the use of theA better way of timing involves the use of theoutput-compare function.output-compare function.
Port A of the microcontroller can be used forPort A of the microcontroller can be used forgeneral inputs or outputs or timing functions.general inputs or outputs or timing functions.
The timer has output pins, OC1,OC2,OC3,OC4 andThe timer has output pins, OC1,OC2,OC3,OC4 andOC5, with internal registers TOC1, TOC2, TOC3,OC5, with internal registers TOC1, TOC2, TOC3,TOC4 and TOC5.TOC4 and TOC5.
We can use the output-compare function toWe can use the output-compare function tocompare the values in the TOC1 to TOC5 registerscompare the values in the TOC1 to TOC5 registerswith value in the free running counter TCNT. Thiswith value in the free running counter TCNT. This
counter starts at 0000 when the CPU is reset andcounter starts at 0000 when the CPU is reset andthen runs continuously.then runs continuously.
When a match occurs between register and theWhen a match occurs between register and thecounter then the corresponding OCx flag bit is setcounter then the corresponding OCx flag bit is setand output occurs through the relevant output pin.and output occurs through the relevant output pin.
The Figure shown illustrates this. Thus bThe Figure shown illustrates this. Thus byprogramming the TOCx register, so the times atprogramming the TOCx register, so the times atwhich output occur can be set. The output-comparewhich output occur can be set. The output-comparefunction can generate timing delays with muchfunction can generate timing delays with muchhigher accuracy than the timer overflag.higher accuracy than the timer overflag.
OUTPUT COMPARE
7/23/2019 Mechatronics Systems - Examp
16/60
WINDSCREEN-WIPER MOTIONWINDSCREEN-WIPER MOTION
Consider a requirement for a device which willConsider a requirement for a device which willoscillate an arm back and forth in an arc like aoscillate an arm back and forth in an arc like a
wind screen wiper. A mechanical solution is shownwind screen wiper. A mechanical solution is shown
in the Figure below . Rotation of arm 1 causes armin the Figure below . Rotation of arm 1 causes arm
2 to impart an oscillatory motion to arm 3.2 to impart an oscillatory motion to arm 3.
WIPER MECHANISM
7/23/2019 Mechatronics Systems - Examp
17/60
MECHATRONICS SOLUTIONMECHATRONICS SOLUTION
An alternative solution is toAn alternative solution is to
use a stepper motor.use a stepper motor.
Figure below shows how aFigure below shows how a
microprocessor with a PIA, ormicroprocessor with a PIA, or
a microcontroller, might bea microcontroller, might be
used with a stepper.used with a stepper.
The input to the stepper isThe input to the stepper is
required to cause it to rotate arequired to cause it to rotate a
number of steps in onenumber of steps in one
direction and then reverse todirection and then reverse to
rotate the same number ofrotate the same number of
steps in one direction andsteps in one direction and
then reverse to rotate thethen reverse to rotate the
same number of steps in thesame number of steps in the
other direction.other direction.
7/23/2019 Mechatronics Systems - Examp
18/60
If the stepper is to be in the full-step configuration then the outputs need to be asIf the stepper is to be in the full-step configuration then the outputs need to be asshown in Table below. Thus to start and rotate the motor in a forward directionshown in Table below. Thus to start and rotate the motor in a forward directioninvolves the sequence A, 9, 5, 6 and then back to the beginning with 1 again. Toinvolves the sequence A, 9, 5, 6 and then back to the beginning with 1 again. Toreverse we would use the sequence 6, 5, 9, A and then back to begin with 6 again.reverse we would use the sequence 6, 5, 9, A and then back to begin with 6 again.
1 1 0 1 0 A2 1 0 0 1 93 0 1 0 1 54 0 1 1 0 61 1 0 1 0 1
Step Bit 3 Bit 2 Bit 1 Bit 0 Code
If half-step configuration is used then the outputs need to be asIf half-step configuration is used then the outputs need to be as
shown in Table below.shown in Table below.
1 1 0 1 0 A
2 1 0 0 0 83 1 0 0 1 94 0 0 0 1 15 0 1 0 1 56 0 1 0 0 47 0 1 1 0 68 0 0 1 0 2
1 1 0 1 0 A
Step Bit 3 Bit 2 Bit 1 Bit 0 Code
7/23/2019 Mechatronics Systems - Examp
19/60
Where there are many steps involved a simpler program is to increment aWhere there are many steps involved a simpler program is to increment acounter with each step and loop until the counter value reaches thecounter with each step and loop until the counter value reaches therequired number. Such program would have the basic form of:required number. Such program would have the basic form of:
Advance a stepAdvance a step
Jump to time delay routine to give time for the step to be completed.Jump to time delay routine to give time for the step to be completed.
Increment the counter.Increment the counter.
Loop or repeat the above with successive steps until the counter indicatesLoop or repeat the above with successive steps until the counter indicatesthe requisite number of steps completed in the forward direction.the requisite number of steps completed in the forward direction.
Reverse directionReverse direction
Repeat the above for the same number of steps in reverse directiRepeat the above for the same number of steps in reverse directi
7/23/2019 Mechatronics Systems - Examp
20/60
Integrated circuit SAA 1027 for stepper motorIntegrated circuit SAA 1027 for stepper motor
Integrated circuits are available forIntegrated circuits are available for
step motor control and their use canstep motor control and their use cansimplify the interfacing and thesimplify the interfacing and thesoftware.software.
Figure shows how such a circuit canFigure shows how such a circuit canbe used.be used.
All that is then needed is the requisiteAll that is then needed is the requisitenumber of input pulses to the trigger,number of input pulses to the trigger,the motor stepping on the low-to-highthe motor stepping on the low-to-hightransition of a high-low-high pulse.transition of a high-low-high pulse.
A high on the rotation input causesA high on the rotation input causesthe motor to step counter-clockwisethe motor to step counter-clockwisewhile a low gives clockwise rotation.while a low gives clockwise rotation.
Thus we just need one output fromThus we just need one output fromthe microcontroller for output pulsesthe microcontroller for output pulsesto the trigger and one output toto the trigger and one output torotation. An output to set is used torotation. An output to set is used to
reset the motor back to its originalreset the motor back to its originalposition.position.
7/23/2019 Mechatronics Systems - Examp
21/60
BATHROOM SCALES orBATHROOM SCALES or
SIMPLE WEIGHING MACHINESIMPLE WEIGHING MACHINE
TheThe main requirementsmain requirements are that a person canare that a person canstand on a platform and the weight of thatstand on a platform and the weight of that
person will be displayed on some form ofperson will be displayed on some form ofreadout. The weight should be given withreadout. The weight should be given withreasonable speed and accuracy and bereasonable speed and accuracy and beindependent of where on the platform theindependent of where on the platform theperson stands.person stands.
One possible solution is to use the weight ofOne possible solution is to use the weight of
the person on the platform to deflect anthe person on the platform to deflect anarrangement of two parallel leaf springsarrangement of two parallel leaf springs(Figure (a)). With such an arrangement the(Figure (a)). With such an arrangement thedeflection is virtually independent of wheredeflection is virtually independent of whereon the platform the person stands.on the platform the person stands.
The deflection can be transformed intoThe deflection can be transformed into
movement of a pointer across a scale bymovement of a pointer across a scale byusing the arrangement shown in Figure (b). Ausing the arrangement shown in Figure (b). Arack-and-pinion is used to transform therack-and-pinion is used to transform thelinear motion into a circular motion about alinear motion into a circular motion about ahorizontal axis. This is then transformed intohorizontal axis. This is then transformed intoa rotation about a vertical axis, and hencea rotation about a vertical axis, and hencemovement of a pointer across a scale, bymovement of a pointer across a scale, by
means of a bevel gear.means of a bevel gear.
7/23/2019 Mechatronics Systems - Examp
22/60
It involves the use of a microprocessor.It involves the use of a microprocessor.
The platform can be mounted on loadThe platform can be mounted on load
cells employing electrical resistancecells employing electrical resistancestrain gauges. When the person standsstrain gauges. When the person standson the platform the gauges suffer strainon the platform the gauges suffer strainand change resistance.and change resistance.
If the gauges are mounted in a four-If the gauges are mounted in a four-active-arm Wheatstone bridge then theactive-arm Wheatstone bridge then theout-of-balance voltage output from theout-of-balance voltage output from thebridge is a measure of the weight of thebridge is a measure of the weight of theperson.person.
This can be amplified by a differentialThis can be amplified by a differentialoperational amplifier. The resultingoperational amplifier. The resultinganalog signal can then be fed through aanalog signal can then be fed through alatched analog-to-digital converter forlatched analog-to-digital converter for
inputting to the microprocessor, e.g. theinputting to the microprocessor, e.g. theMotorola 6820.Motorola 6820.
The adjacent Figure shows the inputThe adjacent Figure shows the inputinterface. There will also be a need tointerface. There will also be a need toprovide a non-erasable memory and thisprovide a non-erasable memory and thiscan be provided by an EPROM chip, e.g.can be provided by an EPROM chip, e.g.Motorola 2716. The output to the displayMotorola 2716. The output to the display
can then be taken through a PIA, e.g.can then be taken through a PIA, e.g.Motorola 6821.Motorola 6821.
MECHATRONICS SOLUTIONMECHATRONICS SOLUTION
7/23/2019 Mechatronics Systems - Examp
23/60
If aIf a microcontroller is usedmicrocontroller is used then memory is present within the singlethen memory is present within the singlemicroprocessor chip, and by a suitable choice if a microcontroller, e.g.microprocessor chip, and by a suitable choice if a microcontroller, e.g.M68HC11, the analog-to-digital conversion can be obtained for the inputs.M68HC11, the analog-to-digital conversion can be obtained for the inputs.
The system then becomes: strain gauges feeding through an operationalThe system then becomes: strain gauges feeding through an operationalamplifier a voltage to the port E (the ADC input) of the microcontroller,amplifier a voltage to the port E (the ADC input) of the microcontroller,
with the output passing through suitable drives to output through ports Bwith the output passing through suitable drives to output through ports Band C to a decoder and hence a LED display (Figure below).and C to a decoder and hence a LED display (Figure below).
7/23/2019 Mechatronics Systems - Examp
24/60
A PICK-AND-PLACE ROBOTA PICK-AND-PLACE ROBOT
The basic form of a Pick-and-Place robot unit isThe basic form of a Pick-and-Place robot unit isshown in the Figure (a).shown in the Figure (a).
The robot has three axes, about which the motion canThe robot has three axes, about which the motion canoccur i.e. rotation in a clockwise or counter clockwiseoccur i.e. rotation in a clockwise or counter clockwisedirection of the unit on its base, arm extension ordirection of the unit on its base, arm extension orcontraction and arm up and down; also the grippercontraction and arm up and down; also the grippercan open and close.can open and close.
These movements can be actuated by the use ofThese movements can be actuated by the use ofpneumatic cylinders operated by solenoid-controlledpneumatic cylinders operated by solenoid-controlled
valves with limit switches to indicate when a motionvalves with limit switches to indicate when a motionis completed.is completed.
Thus the clockwise rotation of the unit might resultThus the clockwise rotation of the unit might resultfrom the piston in a linear cylinder being extendedfrom the piston in a linear cylinder being extendedand the counter clockwise direction by its retraction.and the counter clockwise direction by its retraction.Likewise the upward movement of the arm mightLikewise the upward movement of the arm mightresult from the piston in a linear cylinder beingresult from the piston in a linear cylinder beingextended and the downward motion from it retracting;extended and the downward motion from it retracting;
the extension of the arm by the piston in anotherthe extension of the arm by the piston in anothercylinder extending and its return movement by thecylinder extending and its return movement by thepiston retracting.piston retracting.
The gripper can be opened or closed by the piston inThe gripper can be opened or closed by the piston ina linear cylinder extending or retracting. Figure (b)a linear cylinder extending or retracting. Figure (b)shows a basic mechanism that could be usedshows a basic mechanism that could be used
Figure (a)
Figure (b)
MECHATRONICS SOLUTIONMECHATRONICS SOLUTION
7/23/2019 Mechatronics Systems - Examp
25/60
Figure below shows how a micro controller could be used to controlFigure below shows how a micro controller could be used to control
the solenoid valves and hence the movements of the robot unit.the solenoid valves and hence the movements of the robot unit.
MECHATRONICS SOLUTIONMECHATRONICS SOLUTION
7/23/2019 Mechatronics Systems - Examp
26/60
CAR PARK BARRIERSCAR PARK BARRIERSAs an illustration of a PLC, consider theAs an illustration of a PLC, consider thecoin-operated barriers for a car park.coin-operated barriers for a car park.
The in-barrier is to open when the correctThe in-barrier is to open when the correctmoney is inserted in the collection box andmoney is inserted in the collection box andthe out-barrier is to open when a car isthe out-barrier is to open when a car isdetected at the car park side of the barrier.detected at the car park side of the barrier.
The Figure shows the types of valveThe Figure shows the types of valve
systems that can be used to lift and lowersystems that can be used to lift and lowerthe pivoted barriers.the pivoted barriers.
When a current flows through the solenoidWhen a current flows through the solenoidof valve A, the piston in a cylinder movesof valve A, the piston in a cylinder movesupwards and causes the barrier to rotateupwards and causes the barrier to rotateabout its pivot and raise to a let a carabout its pivot and raise to a let a carthrough. When the current through solenoidthrough. When the current through solenoidof valve A ceases, the return spring of theof valve A ceases, the return spring of the
valve results in the valve position changingvalve results in the valve position changingback to its original position.back to its original position.
When the current is switched to through theWhen the current is switched to through thesolenoid of valve B the pressure is appliedsolenoid of valve B the pressure is appliedto lower the barrier. Limit switches are usedto lower the barrier. Limit switches are usedto detect when the barrier is down and alsoto detect when the barrier is down and alsowhen fully up.when fully up.
7/23/2019 Mechatronics Systems - Examp
27/60
MECHATRONICS SOLUTIONMECHATRONICS SOLUTION
PLC connections Ladder diagram
7/23/2019 Mechatronics Systems - Examp
28/60
AUTOMATIC CAMERAAUTOMATIC CAMERA
The basic features of the Canon EOS model, automatic, auto-The basic features of the Canon EOS model, automatic, auto-
focus, reflex cameras is shown in the Figure (a) .focus, reflex cameras is shown in the Figure (a) .
The cameras have interchangeable lenses.The cameras have interchangeable lenses.
There is a main microcontroller in the lens housing, the twoThere is a main microcontroller in the lens housing, the two
communicating with each other when a lens is attached to thecommunicating with each other when a lens is attached to thecamera body.camera body.
7/23/2019 Mechatronics Systems - Examp
29/60
BLOCK DIAGRAM OF THE ELECTRONIC SYSTEMBLOCK DIAGRAM OF THE ELECTRONIC SYSTEM
7/23/2019 Mechatronics Systems - Examp
30/60
The metering sensor has six lightThe metering sensor has six lightsensors as shown in the Figure.sensors as shown in the Figure.
Signal conditioning is used to obtain theSignal conditioning is used to obtain the
average value of C1, C2, C3, and C4; theaverage value of C1, C2, C3, and C4; theA, B and average C value are thenA, B and average C value are thenanalysed to find the required exposureanalysed to find the required exposurevalue. This, for example, reveals whethervalue. This, for example, reveals whetherthe scene is a scene with a relativelthe scene is a scene with a relativelyconstant luminosity or perhaps a closeconstant luminosity or perhaps a closeup of a person so that there is brightup of a person so that there is brightcentral zone surrounded by a darkcentral zone surrounded by a darkbackground.background.
The type of program that is used is:The type of program that is used is:
If B is equal to A and C minus B isIf B is equal to A and C minus B is
less than 0less than 0
then exposure set on value of Athen exposure set on value of A
if B is equal to A and C minus B is 0if B is equal to A and C minus B is 0
then exposure set on value of Cthen exposure set on value of C
7/23/2019 Mechatronics Systems - Examp
31/60
For the main microcontrollerFor the main microcontroller
Send start command to lens microcontrollerSend start command to lens microcontroller
Take input from range sensorTake input from range sensor
Calculate lens movement requiredCalculate lens movement required
Send lens movement data to lens microcontrollerSend lens movement data to lens microcontroller
Wait for verification of lens movement from microcontrollerWait for verification of lens movement from microcontrollerSend in-focus signal to viewfinder displaySend in-focus signal to viewfinder display
For the lens microcontrollerFor the lens microcontroller
Wait for start command from main microcontrollerWait for start command from main microcontroller
Determine the initial lens positionDetermine the initial lens position
Wait for lens movement data from main microcontrollerWait for lens movement data from main microcontrollerRead lens movement dataRead lens movement data
Calculate new lens positionCalculate new lens position
While lens is not in new position drive the motorWhile lens is not in new position drive the motor
Send verification signal of in-focus to main microcontrollerSend verification signal of in-focus to main microcontroller
This information is translated by theThis information is translated by the
7/23/2019 Mechatronics Systems - Examp
32/60
This information is translated by theThis information is translated by themicrocontroller into an appropriatemicrocontroller into an appropriateshutter speed and aperture value. If theshutter speed and aperture value. If thecamera is operated with the shuttercamera is operated with the shutterspeed preselected by the photographerspeed preselected by the photographerthen only the aperture value isthen only the aperture value issupplied; similarly if the aperture issupplied; similarly if the aperture is
preselected then only the shutter speedpreselected then only the shutter speedis supplied.is supplied.
The range sensor has two 48-bit linearThe range sensor has two 48-bit lineararrays of photo detectors. The lightarrays of photo detectors. The lightfrom the object, after passing throughfrom the object, after passing throughthe camera lens, falls on this arraythe camera lens, falls on this array(Figure). When the image is in focus(Figure). When the image is in focusthe spacing of the images on thethe spacing of the images on thedetector array is a particular value, thedetector array is a particular value, thespacing deviating from this when thespacing deviating from this when theimage is out of focus.image is out of focus.
The amount of this deviation is used toThe amount of this deviation is used togive an error signal, which is fed to thegive an error signal, which is fed to thelens microcontroller and used to givelens microcontroller and used to givean output to adjust the focusing of thean output to adjust the focusing of thelens. An encoder is used to providelens. An encoder is used to providefeed back of this adjustment so that thefeed back of this adjustment so that themicrocontroller knows when themicrocontroller knows when thefocusing has been completed. Thefocusing has been completed. The
program is thus of the form:program is thus of the form:
Automatic focusing
7/23/2019 Mechatronics Systems - Examp
33/60
The diaphragm drive system is a stepper motor,The diaphragm drive system is a stepper motor,which opens or closes a set of diaphragm blades.which opens or closes a set of diaphragm blades.
The focusing involves two forms of drive, the arcThe focusing involves two forms of drive, the arcform drive and the ultrasonic motor. The arc formform drive and the ultrasonic motor. The arc formdrive uses a brushless permanent magnetdrive uses a brushless permanent magnet
d.c.motor, Hall sensors being used to detect thed.c.motor, Hall sensors being used to detect theposition of the rotor.position of the rotor.
The drive from the motor is transmitted throughThe drive from the motor is transmitted throughgears to move the focusing lens along the opticalgears to move the focusing lens along the opticalaxis. The ultrasonic motor has a series ofaxis. The ultrasonic motor has a series ofpiezoelectric elements in the form of a ring (Figurepiezoelectric elements in the form of a ring (Figure
(a). When a current is supplied to the piezoelectric(a). When a current is supplied to the piezoelectricelement it expands or contracts according to theelement it expands or contracts according to thepolarity of the current.polarity of the current.
By switching the current to the piezoelectricBy switching the current to the piezoelectricelements in the appropriate sequence aelements in the appropriate sequence adisplacement wave can be made to travel arounddisplacement wave can be made to travel aroundthe piezoelectric ring of elements in either athe piezoelectric ring of elements in either a
clockwise or counter-clockwise direction andclockwise or counter-clockwise direction andconsequently rotate a rotor which is in contact withconsequently rotate a rotor which is in contact withits surface, hence driving the focusing elementits surface, hence driving the focusing element
The control system for the ultrasonic motor isThe control system for the ultrasonic motor isof the form shown in Figure (b)of the form shown in Figure (b)
7/23/2019 Mechatronics Systems - Examp
34/60
CAR ENGINE MANAGEMENTCAR ENGINE MANAGEMENT
The modern car isThe modern car islikely to includelikely to include
many electronicmany electronic
control systemscontrol systems
involving microinvolving microcontrollers, thecontrollers, the
engine controlengine control
system being one.system being one.
7/23/2019 Mechatronics Systems - Examp
35/60
Figure below shows a generalized block diagram of such a system, itsFigure below shows a generalized block diagram of such a system, itsaim being to ensure that the engine is operated at its optimumaim being to ensure that the engine is operated at its optimumsettings.settings.
Th t i t f l i ft it bl i lTh t i t f l i ft it bl i l
7/23/2019 Mechatronics Systems - Examp
36/60
The system consists of sensors supplying, after suitable signalThe system consists of sensors supplying, after suitable signal
conditioning, the input signals via drivers to actuate actuators.conditioning, the input signals via drivers to actuate actuators.
Figure below shows some of these elements in relation to anFigure below shows some of these elements in relation to an
engine; only one cylinder is being shown.engine; only one cylinder is being shown.
7/23/2019 Mechatronics Systems - Examp
37/60
BAR CODE ENCODERBAR CODE ENCODER
The familiar scene at the check-out of a supermarket is of theThe familiar scene at the check-out of a supermarket is of the
purchases being passed in front of a light beam or a hand-heldpurchases being passed in front of a light beam or a hand-held
wand being passed over the goods so that the bar code can bewand being passed over the goods so that the bar code can be
read and the nature of the purchase and hence its priceread and the nature of the purchase and hence its price
automatically determined. The code consists of a series ofautomatically determined. The code consists of a series of
black and white bars of varying widths.black and white bars of varying widths.
7/23/2019 Mechatronics Systems - Examp
38/60
The bar code represents a series of numbers.The bar code represents a series of numbers.
There is a prefix which identifies the coding scheme being used; this isThere is a prefix which identifies the coding scheme being used; this isa single digit for the regular Universal Product Coding (UPC) used ina single digit for the regular Universal Product Coding (UPC) used in
the United States and two digit for the European Article Number (EAN)the United States and two digit for the European Article Number (EAN)scheme used in Europe.scheme used in Europe.
The UPC uses a 0 prefix for grocery and a 3 for pharmaceuticals. TheThe UPC uses a 0 prefix for grocery and a 3 for pharmaceuticals. TheEAN prefix is from 00 to 09 and is such that the UPC code can be readEAN prefix is from 00 to 09 and is such that the UPC code can be readwithin the EAN code.within the EAN code.
This is followed by five digits to represent the manufacturer, eachThis is followed by five digits to represent the manufacturer, eachmanufacturer having been assigned a unique number.manufacturer having been assigned a unique number.
This brings up the center of the code pattern, which is identified by twoThis brings up the center of the code pattern, which is identified by twotaller bar patterns.taller bar patterns.
The five-digit number that then follows represents the product. The finalThe five-digit number that then follows represents the product. The finalnumber is a check digit, which is used to check that the code has beennumber is a check digit, which is used to check that the code has beencorrectly read.correctly read.
A guard pattern of two taller bars at the start and end of the bar patternA guard pattern of two taller bars at the start and end of the bar pattern
is used to frame the bars.is used to frame the bars.
Each number is coded as seven 0 or 1 digits.Each number is coded as seven 0 or 1 digits.
7/23/2019 Mechatronics Systems - Examp
39/60
gg
The codes used on either side of the centerline are different so that the direction ofThe codes used on either side of the centerline are different so that the direction ofthe scan can be determined.the scan can be determined.
To the right the characters have an even number of 1s and so even parity; for UPC,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 beingto the left an odd number of 1s and so odd parity; the EAN coding for the left beinga mixture.a mixture.
Table below shows the UPC and EAN codings, UPC being the left A coding and theTable below shows the UPC and EAN codings, UPC being the left A coding and theEAN using both left A and left B character codes.EAN using both left A and left B character codes.
0 0001101 0100111 11100101 0011001 0110011 11001102 0010011 0011011 1101100
3 0111101 0100001 10000104 0100011 0011101 00111005 0110001 0111001 00011106 0101111 0000101 10100007 0111011 0010001 10001008 0110111 0001001 1001000
9 0001011 0010111 1110100
Decimal number Left A Left B RightCharacters Characters Characters
7/23/2019 Mechatronics Systems - Examp
40/60
Each 1 is entered as a dark bar andEach 1 is entered as a dark bar and
thus the right-hand character 2thus the right-hand character 2
would be represented 1101100would be represented 1101100
and, with the adjacent dark barsand, with the adjacent dark bars
run together, it appears as arun together, it appears as a
double-width dark wide bardouble-width dark wide bar
followed by a narrow space andfollowed by a narrow space and
then another double-width darkthen another double-width dark
wide bar followed by a double-wide bar followed by a double-width space. This is illustrated inwidth space. This is illustrated in
Figure below.Figure below.
The guard pattern at the ends ofThe guard pattern at the ends of
the code represents 101 and thethe code represents 101 and thecentral band of bars is 01010.central band of bars is 01010.
7/23/2019 Mechatronics Systems - Examp
41/60
PROCEDURE FOR USING CHECK CODE DIGITPROCEDURE FOR USING CHECK CODE DIGIT
Starting at the left, sum all the characters, excluding the checkStarting at the left, sum all the characters, excluding the checkdigit, in the odd positions, i.e. first, third, fifth, etc. and thendigit, in the odd positions, i.e. first, third, fifth, etc. and then
multiply the sum by 3.multiply the sum by 3.
Starting at the left, sum all the characters in the even positions.Starting at the left, sum all the characters in the even positions.
Add the results of steps 1 and 2. The check character is theAdd the results of steps 1 and 2. The check character is the
smallest number which when added to this sum produces asmallest number which when added to this sum produces a
multiple of 10multiple of 10
INVERTED PENDULUM SYSTEM ROTARY ANDINVERTED PENDULUM SYSTEM ROTARY AND
7/23/2019 Mechatronics Systems - Examp
42/60
INVERTED PENDULUM SYSTEM: ROTARY ANDINVERTED PENDULUM SYSTEM: ROTARY AND
ARM-DRIVENARM-DRIVEN
The inverted pendulum is a popular mechatronic application thaThe inverted pendulum is a popular mechatronic application thatexists in many different forms. The common thread among theseexists in many different forms. The common thread among these
systems is their goal:systems is their goal:
to balance a link on end using feedback control.to balance a link on end using feedback control.
Two rather challenging inverted pendulum systems are theTwo rather challenging inverted pendulum systems are the
rotational and the arm-driven systems.rotational and the arm-driven systems.
These use a link rotating about an axis to balance a second linkThese use a link rotating about an axis to balance a second link onon
end. In the rotary (horizontal) configuration, the first link, drivenend. In the rotary (horizontal) configuration, the first link, driven
by a motor, rotates in the horizontal plane to balance aby a motor, rotates in the horizontal plane to balance a
pendulum link, which rotates freely in the vertical plane. Thependulum link, which rotates freely in the vertical plane. Thearm-driven (vertical) or stick-on-a-stick configuration uses aarm-driven (vertical) or stick-on-a-stick configuration uses a
driven link rotating in the vertical plane to balance thedriven link rotating in the vertical plane to balance the
pendulum link, which also rotates in the vertical plane.pendulum link, which also rotates in the vertical plane.
Th i d d l i i i h i b
7/23/2019 Mechatronics Systems - Examp
43/60
The inverted pendulum system is unique in that it can beThe inverted pendulum system is unique in that it can be
transformed from the horizontal to vertical configuration by replacingtransformed from the horizontal to vertical configuration by replacing
the links and setting the base on its side, as shown in Figurethe links and setting the base on its side, as shown in Figure
Figure: Inverted Pendulum System Configurations: (a) Horizontal and (b) Vertical
(a) (b)
R t i t d d l d i t i ti tiR t i t d d l d i t i ti ti
7/23/2019 Mechatronics Systems - Examp
44/60
Rotary inverted pendulum dynamic system investigationRotary inverted pendulum dynamic system investigation::
Physical SystemPhysical System :: It consists of two links: aIt consists of two links: a
motordriven horizontal link and an un-actuated verticalmotordriven horizontal link and an un-actuated verticalpendulum link. The horizontal link is driven by apendulum link. The horizontal link is driven by a
permanent-magnet, brushed DC motor. A DC powerpermanent-magnet, brushed DC motor. A DC power
supply together with a pulse-width-modulated (PWM)supply together with a pulse-width-modulated (PWM)
servo-amplifier, operating in the current mode, supplyservo-amplifier, operating in the current mode, supply
power to the motor.power to the motor.
Angular position and velocity of the two links areAngular position and velocity of the two links are
measured with two rotary incremental optical encodersmeasured with two rotary incremental optical encoders
having a resolution with quadrature decoding of 2048having a resolution with quadrature decoding of 2048pulses per revolution.pulses per revolution.
7/23/2019 Mechatronics Systems - Examp
45/60
A slip-ring assembly, mounted between the housing andA slip-ring assembly, mounted between the housing and
the motor shaft, is used to connect power to thethe motor shaft, is used to connect power to the
pendulum optical encoder and read the signal from thependulum optical encoder and read the signal from the
three channels of the encoder. The horizontal link isthree channels of the encoder. The horizontal link iscounter-weighted and there are leveling screws on thecounter-weighted and there are leveling screws on the
housing base. System testing for parameter identificationhousing base. System testing for parameter identification
and control system design is performed in a MatLab /and control system design is performed in a MatLab /
Simulink / dSpace real-time control environment. ThisSimulink / dSpace real-time control environment. This
allows for rapid control system development and testing.allows for rapid control system development and testing.
Physical ModelPhysical Model
Several simplifying assumptions were made inSeveral simplifying assumptions were made indeveloping a physical model:developing a physical model:
1. rigid links1. rigid links
2. two degrees of freedom2. two degrees of freedom
3. negligible sensor dynamics3. negligible sensor dynamics
C SC t l S t d i B l i d i
7/23/2019 Mechatronics Systems - Examp
46/60
Control System design: Balancing and swing-upControl System design: Balancing and swing-up
The swing-up control is based on the work of Astrom andThe swing-up control is based on the work of Astrom and
Furuta and the balancing controller is a full state-Furuta and the balancing controller is a full state-
feedback regulator. The swing up controller calculatesfeedback regulator. The swing up controller calculates
the total system energy based on the kinetic energy othe total system energy based on the kinetic energy of
both links, and the potential energy of the pendulum.both links, and the potential energy of the pendulum.
This calculated value is compared to a defined quantityThis calculated value is compared to a defined quantity
of energy when the pendulum is balanced. Theof energy when the pendulum is balanced. The
difference between desired energy and actual energy isdifference between desired energy and actual energy is
multiplied by an "aggressivity" gain and applied to themultiplied by an "aggressivity" gain and applied to the
motor.motor.
7/23/2019 Mechatronics Systems - Examp
47/60
Figure : MatLab/Simulink Block Diagram of Control System Design
7/23/2019 Mechatronics Systems - Examp
48/60
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 )
7/23/2019 Mechatronics Systems - Examp
49/60
The velocity term causes theThe velocity term causes the
input to change directions wheninput to change directions when
the pendulum stops and beginsthe pendulum stops and begins
to swing in the oppositeto swing in the opposite direction.direction.The cosine term is negative whenThe cosine term is negative when
the pendulum is below horizontalthe pendulum is below horizontal
and positive above horizontal. Thisand positive above horizontal. This
helps the driven link to get underhelps the driven link to get under
the pendulum and catch it as shownthe pendulum and catch it as shownin Figure below. By controlling onin Figure below. By controlling on
energy feedback, the systemenergy feedback, the system
automatically stops inputting excessautomatically stops inputting excess
energy and allows the system toenergy and allows the system to
coast to a balanced position.coast to a balanced position.
Figure : Sign function effect on swing up
7/23/2019 Mechatronics Systems - Examp
50/60
From Figure below, when the remaining potential energyFrom Figure below, when the remaining potential energy
required is equal to the kinetic energy, the feedback willrequired is equal to the kinetic energy, the feedback will
become very small and the pendulum will coast tobecome very small and the pendulum will coast to
vertical position.vertical position.
Figure : Swing up diagram
7/23/2019 Mechatronics Systems - Examp
51/60
Figures below show the simulation results for the swing-up and balanceFigures below show the simulation results for the swing-up and balance
controllers. The angles plotted are normalized angles.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
7/23/2019 Mechatronics Systems - Examp
52/60
DESIGN OF AN ATOMIC FORCE MICROSCOPEDESIGN OF AN ATOMIC FORCE MICROSCOPE
TheThe atomic force microscope (AFM)atomic force microscope (AFM) is ais a mechatronic instrumenmechatronic instrumentthat has had a revolutionary impact in the last decade on the abilitythat has had a revolutionary impact in the last decade on the ability
to image the topography of surfaces in the micron to subnanometerto image the topography of surfaces in the micron to subnanometerrange. AFMs form images of surface properties by scanning arange. AFMs form images of surface properties by scanning acantilevered probe with a sharp tip over the surface of a sample incantilevered probe with a sharp tip over the surface of a sample inan x-y raster pattern.an x-y raster pattern.
7/23/2019 Mechatronics Systems - Examp
53/60
The deflection of the probe caused by repulsive (orThe deflection of the probe caused by repulsive (or
attractive) forces between atoms of the tip andattractive) forces between atoms of the tip and
sample is used to quantitatively map the topographysample is used to quantitatively map the topography
or determine other properties of the surface .or determine other properties of the surface .
AFMs are used extensively by researchers acrossAFMs are used extensively by researchers across
the disciplines of physics, chemistry, biology,the disciplines of physics, chemistry, biology,
material science, and others to image surfacematerial science, and others to image surface
properties, measure fundamental force interactions,properties, measure fundamental force interactions,
and understand mechanical properties of materials.and understand mechanical properties of materials.
AFMs are also being used as metrology instrumentsAFMs are also being used as metrology instruments
particularly in the semiconductor industry.particularly in the semiconductor industry.
7/23/2019 Mechatronics Systems - Examp
54/60
The main subsystems thatcomprise 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).
Fi ( )( ) h AFM
7/23/2019 Mechatronics Systems - Examp
55/60
FigureFigure (a)(a) showsshows AFMAFM
cantilevers: shows typicalcantilevers: shows typical
rectangular or triangularrectangular or triangular
shapes of cantilevers.shapes of cantilevers.The rectangularThe rectangular
cantilever on the left iscantilever on the left is
200-200-__m long and 20-m long and 20-__mm
wide.wide.
Figure (b) and (c)Figure (b) and (c) showsshows
a close-up view of the tipa close-up view of the tip
of a cantilever. AFMof a cantilever. AFM
cantilevers are madecantilevers are made
using IC fabrication andusing IC fabrication and
silicon micromachiningsilicon micromachining
processesprocesses
FigureFigure :: Cantilever deflectionCantilever deflection
7/23/2019 Mechatronics Systems - Examp
56/60
FigureFigure :: Cantilever deflectionCantilever deflectionmeasurement approaches:measurement approaches:
(a) shows the optical lever(a) shows the optical leverapproach, where deflection ofapproach, where deflection of
the cantilever causes thethe cantilever causes thereflected laser beam toreflected laser beam toilluminate one photodetectorilluminate one photodetectorcell more than the other. Thecell more than the other. Themotion of the beam, hence themotion of the beam, hence thedeflection of the cantilever, candeflection of the cantilever, can
be quantified by taking thebe quantified by taking thedifference of the photocurrentsdifference of the photocurrentsfrom the two cells andfrom the two cells and
(b) shows the piezoresistive(b) shows the piezoresistivecantilever approach, where acantilever approach, where a
specially fabricated cantileverspecially fabricated cantileveris connected as one leg of ais connected as one leg of aWheatstone bridge. TheWheatstone bridge. Thedeflection of the cantilever isdeflection of the cantilever issensed by a change in thesensed by a change in theoutput voltage of the bridge.output voltage of the bridge.
Mechatronic Design of the Hewlett Packard DESKJETMechatronic Design of the Hewlett Packard DESKJET
7/23/2019 Mechatronics Systems - Examp
57/60
Mechatronic Design of the Hewlett-Packard DESKJETMechatronic Design of the Hewlett-Packard DESKJET
560C Printer560C Printer
The mechatronic related design objectives forThe mechatronic related design objectives for
this printer are shown in Table below.this printer are shown in Table below.
MECHATRONIC DESIGNMECHATRONIC DESIGN
7/23/2019 Mechatronics Systems - Examp
58/60
Figure illustrates theFigure illustrates the
mechatronic design of themechatronic design of theprinter.printer.
The printer uses threeThe printer uses three
motors: a dc motor drivesmotors: a dc motor drivesthe scanning carriage, onethe scanning carriage, onepermanent magnetpermanent magnettin-can stepper motortin-can stepper motordrives the paper feeddrives the paper feed
system, and a secondsystem, and a secondpermanent magnet stepperpermanent magnet steppermotor actuates the printmotor actuates the printcartridge service station.cartridge service station.
MECHATRONIC DESIGNMECHATRONIC DESIGN
Figure : HP deskjet Mechatronic System
7/23/2019 Mechatronics Systems - Examp
59/60
All three of these motorsAll three of these motors
are controlled with lessare controlled with less
than 10% of thethan 10% of the
bandwidth of anbandwidth of an
inexpensive 8-bit Z-80inexpensive 8-bit Z-80
microprocessormicroprocessor
Figure : Control System Block Diagram
7/23/2019 Mechatronics Systems - Examp
60/60