Вы находитесь на странице: 1из 56

DHANALAKSHMI SRINIVASAN COLLEGE OF ENGINEERING

Coimbatore – 641 105

Regulation-2013

DEPARTMENT OF MECHANICAL ENGINEERING

Mechatronics Laboratory Manual

NAME : ____________________________________

REG NO : ____________________________________

DEPT : ____________________________________
2

CONTENTS

S.NO NAME OF THE EXPERIMENT Page No

1. Study of 8051 microcontroller and stepper motor 5

2. Stepper motor interfacing with 8051 microcontroller for full step resolution 10

3. Stepper motor interfacing with 8051 microcontroller for half step resolution 13

4. Study of PID controller and servo motor 16

5. Servo motor speed control using open loop system 20

6. Servo motor speed control using closed loop system 21

7. Speed control of ac motor using PID controller 22

8. Study of hydraulic and pneumatic system 24

9. Design simple pneumatic circuit using single acting cylinder 28

10. Design simple pneumatic circuit using double acting cylinder 29

11. Design a pneumatic circuit for the sequence A+B+A-B- 30

12. Electro pneumatic control of double acting cylinder using SPDT 32

13. PLC control of double acting cylinders on and off delay timer 33

14. Design and simulation fluid power circuits using automation studio 34

15. Addition of two 8 – bit numbers, sum of 8 – bits 35

16. Addition of two 8 – bit numbers, sum of 16 – bits 37

17. Subtraction of two 8-bit numbers without borrow 39

18. Multiplication of two 8-bit numbers 41

19. Division of two 8-bit numbers 43

20. Study of plc and its applications 46

21. Study of image processing techniques 52

Mechatronics Laboratory Manual


3

INDEX

Page
S.NO DATE NAME OF EXPERIMENT Remarks SIGN*
No

Mechatronics Laboratory Manual


4

INDEX

Page
S.NO DATE NAME OF EXPERIMENT Remarks SIGN*
No

Mechatronics Laboratory Manual


5

STUDY OF 8051 MICROCONTROLLER AND STEPPER MOTOR

MICROCONTROLLER:

A microcontroller is an integration of a microprocessor with memory and input,


output interfaces and other peripherals such as timers on a single chip. A microcontroller may
take an input from the device it is controlling and control the device by sending signals to
different components in the device.

A microcontroller is often small and low cost. The components may be chosen to
minimize size and to be as inexperience as possible. Another name for a microcontroller is
embedded controller. They can control features or action of the product.

Register in microcontroller:

A microcontroller contains a group of registers each type of register having a different


functions.

Accumulator:

The accumulator (A) is an 8 bit register where data for an input to the arithmetic and
logic unit is temporarily stored. So the accumulator register is a temporary handling register
for data to be operated on by the arithmetic and logic unit also after the operation the register
for holding the result.

B Register:

In addition to accumulator an 8 bit B-register is available as a general purpose register


when it is not used for the hardware multiply/divide operation.

Data pointer (DPTR):

The data pointer consists of a high byte (DPH) and a low byte (DPL). Its function is to
hold a 16 bit address. It may be manipulated as a 16 bit data register. It serves as a base
register in direct jumps, lookup table instructions and external data transfer.

Stack pointer:

The stack refers to an area of internal RAM that is used in conjunction with certain
opcode data to store and retrieve data quickly. The stack pointer register is used, by the 8051
to hold as internal RAM that is called top of stock. The stack pointer register is 8 bit wide. It
is increased before data is stored during PUSH and CALL instructions and decremented after
data is restored during POP and RET instruction. The stack pointer is initialized to 07H after
a reset. This causes the stack to begin at location 08H.

Program counter:

The 8051 has 16 bit program counter. It is used to hold the address of memory
location from which the instruction to be fetched. 8051 is a 16 bit hence it can be address up

Mechatronics Laboratory Manual


6

to 216 byte i.e. 64k of memory. The PC is the only register that does not have an internal
address.

Internal RAM:

The 8051 has 128 bytes internal RAM. It is addressed using RAM address
register.First thirty two bytes from address 00H to 1FH of internal RAM constitute 32
working registers. They organized into four banks of eight registers each. The four register
banks are numbered 0 to 3 and consist of eight registers named R0 toR7. Each register can be
addressed by name or by its RAM address.Only one register bank is in use at a time. Bits Rs0
and Rs1 in the PSW determine which bank of register is currently in use.Register banks when
not selected can be used as general purpose RAM.

PIN diagram of microcontroller:

The 8051 microcontroller is available in a 40 pin dual in-line (DIL) package


arrangement.It is important to note that many pins of 8051 are used for more than one
function. The function of each of the pins is as follows.

PORT 0 (pins 32-39):

Port 0 pins can be used as I/O pins. The output drives and input buffers of port 0 are
used to access external memory address, time multiplexed with the data being written or read.
Thus port 0 can be used as multiplexed address data bus.

PORT 1 (pins 1-8):

Port 1 pins can be used only as I/O pins.

PORT 2 (pins 21-28):

The output drives of port 2 are used to access external memory. Port 2 outputs the
high order byte of the external memory address when the address is 16 bits wide otherwise
port 2 is used as I/O ports.

PORT 3 (pins 10-17):

All ports pins of port-3 are multifunctional. They have special functions including two
external interrupts two counter two special data lines and two timing control strobes. Power
supply pins Vcc and ground to pin Vcc with rated power supply current of 125mA.

Oscillator Pins XTA2 (pin 18) and XTA1 (pin 19):

For generating an internal clock signal the external oscillator is connected at these two
pins.

ALE (address latch enable) Pin 30:

AD0 to AD7 lines are multiplexed. To determine these lines and for obtaining lower
half of an address, an external latch and ALE of 8051 is used.

Mechatronics Laboratory Manual


7

RST (Reset pin 9):

This pin is used to reset 8051. For proper reset operation, reset signal must be held
highat least for two machine cycles, while oscillator is running.

PSEN (Program Store Enable pin29):

It is the active low output control signal used to activate the enable signal if the
external ROM/EPROM. It is activated every six oscillator periods while reading the external
memory. Thus this signal acts as the read store to external program memory.

STEPPER MOTOR

A motor in which the rotor is able to assume only discrete stationary angular position
is a stepper motor. The rotary motion occurs in a stepwise manner from one equilibrium
position to the next.

Construction features:

A stepper motor could be either of the reluctance type of or permanent magnet type. A
PM motor consists of multiphase stator and two part permanent magnet rotor variable
reluctance motor has magnetized rotor. PM stepper motor is the most commonly used type.
The basic two phase stepper motor consists of two pairs of stator poles. Each of four poles
has its own winding. The excitation of any one winding generates a north pole and a South
Pole gets attracted and the torque induced at the diametrically opposite side. The rotor
magnetic system has two end faces. The left face is permanently magnetized as south and the
right face as North Pole faces. The north pole structure is twisted with respect to the south
pole structure so that south pole precisely between two north poles. In an arrangement where
there are four stator poles and three pairs of rotor poles, there exist 12 possible stable position
in which a south pole if the rotor can lock with a north pole of the stator.

From this is can be noted that the step size is

= 360 (Ns*Nr)

Ns number of stator pole

Mechatronics Laboratory Manual


8

Nr number of pairs of rotor poles

Generally step size of the stepper motor depends up on rotor poles. There are three different
schemes available for stepping a motor. They are

1. wave scheme

2. 2 phase scheme

3. half stepping or missed scheme

Operational features of stepper motor:

There are many kinds of stepper motor like unipolar type, bipolar type, single phase
type, multiphase type; single phase stepper motor is often used for quartz watch. In PM type
stepper motor, a permanent magnet is used for motor and coils are put on stator.

The stepper motor model which has 4 poles at top and bottom and at either sides. X
coil, X¯ coil, r coil and r¯ coil are put to the upper side and the lower pole. r coil and r¯ coil
are rolled up for the direction of the pole becomes opposite when applying an electric current
to the r¯ coil. It is similar about X and X¯ too. The turn of the motor is controlled by the
electric current which pairs into X, X¯, r, r¯. The rotor rotational speed and the direction of
turn can be controlled by this control.

Speed control of a stepper motor:

The requirement is to use a microcontroller to drive a stepper motor in both forward


and reverse directions of shaft rotation and to implement a two speed arrangement switches
are to be used to produce the two speeds and a reversal of shaft rotation. Generally a stepper
motor has four sets of coils; one end of each coil may be connected together and then
connected to DC supply. The remaining four ends may be driven through transistors either
separately or in integrated circuit form. A four bit code sequence continuously applied to the
drive circuit from the microcontroller port causes the motor shaft to rotate in angular steps.

Mechatronics Laboratory Manual


9

Stepper motors have step angles of 1.8 degree step revolution and turning force may
be improved by using a step down gear box. The stepping code sequence may be obtained
from the motor manufacturer or distributor. The program in this example was a common four
step sequence of A,9,5,6 that it sent continuously would cause the motor shaft to rotate

Mechatronics Laboratory Manual


10

EX.NO: STEPPER MOTOR INTERFACING WITH 8051


DATE : MICROCONTROLLER FOR FULL STEP RESOLUTION

AIM:

To interface and control the forward and reverse rotation of stepper motor with full
step resolution using microcontroller 8051

APPARATUS REQUIRED:

 Stepper motor
 8051-Microcontroller Kit
 Interfacing Bus card

ALGORITHM:

Step 1: Move the data to data pointer


Step 2: Move the number of movements required to register R0
Step 3: Move the content 1 to the accumulator
Step 4: Then move the available data in the data pointer to stack by using push instruction
Step 5:Load the external memory address to the data pointer as data
Step 6:Then call the required time delay
Step 7:Move the accumulator value to the external memory which is available in data pointer
Step 8:By using POP instructions retrieve data in the data pointer which is available in stack
Step 9: Increment the data pointer to repeat the procedure
Step 10: Then stop the process.

PROCEDURE:

 Connect the power chord to the kit.


 50 core cables connected to 50 pin connector and other end of 50 core cables
connected to the interface stepper motor.
 Stepper motor power chord should be connected such that visible side facing inside.
 Connect the keyboard chord such that it is facing upward.

Mechatronics Laboratory Manual


11

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE


4100 START MOV DPTR,#4500H 90 45 00
4103 MOV R0,#04 78 04
4105 CALL MOVX A,@DPTR E0
4106 PUSH DPH C0 83
4108 PUSH DPL C0 82
410A MOV DPTR,#FFCOH 90 FF C0
410D MOV R2,04H 7A 04
410F MOV R1,0FH 79 0F
4111 DLY1 MOV R3,0FH 7B 0F
4113 DLY DJNZ R3,DLY DB FE
4115 DJNZ R1,DLY1 D9 FA
4117 DJNZ R2,DLY1 DA F8
4119 MOVX @DPTR,A F0
411A POP DPL D0 82
411C POP DPH D0 83
411E INC DPTR A3
411F DJNZ R0,CALL D8 E4
4121 SJMP START 80 DD
END

INPUT

FORWARD

4500 09, 05, 06, 0A

REVERSE

4500 0A, 06, 05, 09

Mechatronics Laboratory Manual


12

 LCD display default micro 5


 #SD 4100 (enter)
 Edit data memory
 Go 4100 (enter)

RESULT:

Mechatronics Laboratory Manual


13

EX.NO: STEPPER MOTOR INTERFACING WITH 8051


DATE : MICROCONTROLLER FOR HALF STEP RESOLUTION

AIM:

To interface and control the forward and reverse rotation of stepper motor with half
step resolution using microcontroller 8051.

APPARATUS REQUIRED:

 Stepper motor
 8051-Microcontroller Kit
 Interfacing Bus card

ALGORITHM:

Step 1: Move the data to data pointer


Step 2: Move the number of movements required to register R0
Step 3: Move the content 1 to the accumulator
Step 4: Then move the available data in the data pointer to stack by using push instruction
Step 5: Load the external memory address to the data pointer as data
Step 6: Then call the required time delay
Step 7: Move the accumulator value to the external memory which is available in data
pointer
Step 8: By using POP instructions retrieve data in the data pointer which is available in stack
Step 9: Increment the data pointer to repeat the procedure

Step 10: Then stop the process.

PROCEDURE:

 Connect the power chord to the kit.


 50 core cables connected to 50 pin connector and other end of 50 core cables
connected to the interface stepper motor.
 Stepper motor power chord should be connected such that visible side facing inside.
 Connect the keyboard chord such that it is facing upward.

Mechatronics Laboratory Manual


14

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE


4100 START MOV DPTR,#4500H 90 45 00
4103 MOV R0,#04 78 04
4105 CALL MOVX A,@DPTR E0
4106 PUSH DPH C0 83
4108 PUSH DPL C0 82
410A MOV DPTR,#FFCOH 90 FF C0
410D MOV R2,04H 7A 04
410F MOV R1,02H 79 0F
4111 DLY1 MOV R3,02H 7B 0F
4113 DLY DJNZ R3,DLY DB FE
4115 DJNZ R1,DLY1 D9 FA
4117 DJNZ R2,DLY1 DA F8
4119 MOVX @DPTR,A F0
411A POP DPL D0 82
411C POP DPH D0 83
411E INC DPTR A3
411F DJNZ R0,CALL D8 E4
4121 SJMP START 80 DD
END

INPUT

FORWARD

4500 09, 05, 06, 0A

REVERSE

4500 0A, 06, 05, 09

Mechatronics Laboratory Manual


15

 LCD display default micro 5


 #SD 4100 (enter)
 Edit data memory
 Go 4100 (enter)

RESULT:

Mechatronics Laboratory Manual


16

STUDY OF PID CONTROLLER AND SERVO MOTOR

A servomotor is a rotary actuator that allows for precise control of angular position. It
consists of a motor coupled to a sensor for position feedback, through a reduction gearbox. It
also requires a relatively sophisticated controller, often a dedicated module designed
specifically for use with servomotors.

Servomotors are used in applications such as robotics, CNC machinery or automated


manufacturing.

As the name suggests, a servomotor is a servomechanism. More specifically, it is a


closed-loop servomechanism that uses position feedback to control its motion and final
position. The input to its control is some signal, either analogue or digital, representing the
position commanded for the output shaft.

The motor is paired with some type of encoder to provide position and speed
feedback. In the simplest case, only the position is measured. The measured position of the
output is compared to the command position, the external input to the controller. If the output
position differs from that required, an error signal is generated which then causes the motor to
rotate in either direction, as needed to bring the output shaft to the appropriate position. As
the positions approach, the error signal reduces to zero and the motor stops.

Servomotors vs. stepper motors

Servomotors are generally used as a high performance alternative to the stepper


motor. Stepper motors have some inherent ability to control position, as they have built-in
output steps. This often allows them to be used as an open-loop position control, without any
feedback encoder, as their drive signal specifies the number of steps of movement to rotate.
This lack of feedback though limits their performance, as the stepper motor can only drive a
load that is well within its capacity, otherwise missed steps under load may lead to
positioning errors. The encoder and controller of a servomotor are an additional cost, but they
optimize the performance of the overall system (for all of speed, power and accuracy) relative
to the capacity of the basic motor. With larger systems, where a powerful motor represents an
increasing proportion of the system cost, servomotors have the advantage.

A reference input (typically called a velocity input) is sent to the servo amplifier,
which controls the speed of the servomotor. Directly mounted to the machine (or to the
servomotor) is a feedback device (either an encoder or resolver). This device changes
mechanical motion into electrical signals and is used as a feedback loop. This feedback loop
is then sent to the error detector, which compares the actual operation with that of the

Mechatronics Laboratory Manual


17

reference input. If there is an error, that error is fed directly to the amplifier, which makes the
necessary corrections.

In many servo systems, both velocity and position are monitored. (Note: In servo
systems, the word "velocity" is often used to describe speed control. Velocity indicates a rate
of change of position, with respect to time. It also indicates a rate of motion in a particular
direction, with respect to time.) The velocity loop control may take its command from the
velocity loop feedback device-a resolver or tachometer mounted directly to the motor. The
position loop control may take its command from the position feedback device-an encoder.
Depending on the system, both devices may be mounted to the actual machine or controlled
device.

The stability of the entire system is dependent upon the tuning of the components in
the system and how well those components are matched. Tuning the system involves working
with a PID (proportional integral derivative) control. This type of closed loop control is
standard on all high accuracy systems. The main factors in this closed loop system are the
gain, integration time, and derivative time of the loop.

The amplifier gain must be set satisfactorily. The gain sets how responsive the
amplifier will be during changes in error signal. A high gain will cause the motor to
overshoot the intended speed target. Too low of a gain may mean that the target is reached
late in the cycle, or possibly not at all.

The integration time allows the amplifier to respond to changes in the error signal,
mostly at zero speed. The zero speed error signal is multiplied by the gain setting, and results
in increased motor responsiveness (stiffness) and accuracy.

The derivative function is the most difficult to accurately adjust. This controls the
dampening or oscillations of the system. This function basically dictates the amount of
correction given per unit of error. The error signal can be corrected immediately (in
milliseconds), or throughout a longer period of time (seconds).

If there is a difficult part to the tuning task, it would be during the derivative setup.
The gain and integration time is interactive. One setting affects the other. Proper setup of the
derivative function involves multiplying the position error by the position error rate (how
much correction should take place per unit of time). If the system components are not
matched, oscillations, overshoot, or undershoot of velocity can result, which means unstable
operation.

Servomotors are special electromechanical devices that operate in precise degrees of


rotation. This type of motor quickly responds to positive or negative signals from a servo
amplifier. Fast and accurate speed, torque, and direction control are the mark of a
servomotor's characteristics. Very high starting torque must be obtained from the servomotor.
The standard AC induction motor's torque is measured in pound-feet. By contrast, the
servomotor's torque is measured in inch-pounds.

In today's servo systems, three basic types of servomotors are used: AC, DC, and AC
brushless. As one might expect, the AC design is based on AC induction motor
characteristics. The DC design is based on the design of a DC motor. The brushless DC
design is based on that of a synchronous motor. The basic principles of the DC and brushless

Mechatronics Laboratory Manual


18

DC servomotor have already been reviewed. We will therefore review the general
characteristics of the AC servomotor. Linear devices will also be reviewed, since most of the
position systems operate on linear technology.

PID controller

A proportional-integral-derivative controller (PID controller) is a generic control


loopfeedback mechanism (controller) widely used in industrial control systems. A PID
controller calculates an "error" value as the difference between a measured process variable
and a desired set point. The controller attempts to minimize the error by adjusting the process
control inputs.

The PID controller calculation algorithm involves three separate constant parameters,
and is accordingly sometimes called three-term control: the proportional, the integral and
derivative values, denoted P,I, and D. Simply put, these values can be interpreted in terms of
time: P depends on the presenterror, I on the accumulation of past errors, and D is a
prediction of future errors, based on current rate of change. The weighted sum of these three
actions is used to adjust the process via a control element such as the position of a control
valve, a damper, or the power supplied to a heating element.

In the absence of knowledge of the underlying process, a PID controller has


historically been considered to be the best controller. By tuning the three parameters in the
PID controller algorithm, the controller can provide control action designed for specific
process requirements. The response of the controller can be described in terms of the
responsiveness of the controller to an error, the degree to which the controller overshoots the
set point, and the degree of system oscillation. Note that the use of the PID algorithm for
control does not guarantee optimal control of the system or system stability.

Some applications may require using only one or two actions to provide the
appropriate system control. This is achieved by setting the other parameters to zero. A PID
controller will be called a PI, PD, P or I controller in the absence of the respective control
actions. PI controllers are fairly common, since derivative action is sensitive to measurement
noise, whereas the absence of an integral term may prevent the system from reaching its
target value due to the control action.

Mechatronics Laboratory Manual


19

The PID control scheme is named after its three correcting terms, whose sum
constitutes the manipulated variable (MV). The proportional, integral, and derivative terms
are summed to calculate the output of the PID controller. Defining the controller output, the
final form of the PID algorithm is:

where

: Proportional gain, a tuning parameter


: Integral gain, a tuning parameter
: Derivative gain, a tuning parameter
: Error
: Time or instantaneous time (the present)
: Variable of integration; takes on values from time 0 to the present .

Mechatronics Laboratory Manual


20

EX.NO:
SERVO MOTOR SPEED CONTROL USING OPEN LOOP SYSTEM
DATE :

AIM:
To study the performance of servomotor speed control for open loop system

APPARATUS REQUIRED:

 DC motor setup
 Micro-4011 kit
 PEC16M7 Module
 34 pin FRC cable
 RS 232 cable
 15 pin Connector

PROCEDURE:

 Connect the 34 pin FRC cable to PWM inputs of PEC16M7 Module and the P6 of
micro-4011 kit
 Connect the 15 pin connector to the PEC16M7 power module to the motor setup
 Connect the RS 232 cable to display input of PEC16M7 module & P34 of micro-4011
kit.
 Select the desired option from the display (open loop).
 Select direction of rotor (either forward or reverse).
 Set the duty cycle now the motor will start to run corresponding to the duty cycle.

RESULT:

Mechatronics Laboratory Manual


21

EX.NO:
SERVO MOTOR SPEED CONTROL USING
DATE : CLOSED LOOP SYSTEM

AIM:
To study the performance of servomotor speed control for closed loop system

APPARATUS REQUIRED:

 DC motor setup
 Micro-4011 kit
 PEC16M7 Module
 34 pin FRC cable
 RS 232 cable
 15 pin Connector

PROCEDURE:

 Connect the 34 pin FRC cable to PWM inputs of PEC16M7 Module and the P6 of
micro-4011 kit
 Connect the 15 pin connector to the PEC16M7 power module to the motor setup
 Connect the RS 232 cable to display input of PEC16M7 module & P34 of micro-4011
kit.
 Select the desired option from the display (closed loop).
 Select PID control using respective keys.
 Enter the Kp value then press the enter key(press the both keys at a time)
 Again enter the Ki and Kd values
 Then set the speed of the motor by varying RPM using first and second key, now the
motor will start to run in the set speed.
 Actual speed PID control waveform will be displayed using graphical LCD.

RESULT:

Mechatronics Laboratory Manual


22

EX.NO:
SPEED CONTROL OF AC MOTOR USING PID CONTROLLER
DATE :

AIM:
To study the performance of ac motor speed control using PID controller

APPARATUS REQUIRED:

 Ac motor setup
 VSPM-LCD-01 unit
 Patch chord

PROCEDURE:

 Connect ac motor terminals to the R ,Y and B on front panel of VSPM-LCD-01


 Switch on the power supply
 After select ac motor than press enter
 Select closed loop after press enter
 Select default setting after select any one of PWM method
 Speed can be set to particular value and then long press the RUN key

Mechatronics Laboratory Manual


23

TABULATION

S.NO SPEED(rpm) INPUT CURRENT (A)

RESULT:

Mechatronics Laboratory Manual


24

STUDY OF HYDRAULIC AND PNEUMATIC SYSTEM

AIM:

To study the various components used in pneumatic systems and to understand the
working of them.

COMPONENTS:

 air tank(reservoir)
 air compressor
 electric motor
 air conditioners and control valves
 actuator
 air hoses

DESCRIPTION:

1. AIR TANK(RESERVOIR):
An air tank is used to store a given volume of compressed air. It consists of air filter and
air pressure indicator .In small compressor units it is fitted on the air tank.
2. AIR COMPRESSOR:

It is a machine that compresses air from a low inlet pressure (usually atmospheric) to a
higher desired pressure level. This is accomplished by reducing the volume of the air.
Generally they are positive displacement types and are of different type’s namely
reciprocating and rotary screw or rotary vane types.

3. ELECTRIC MOTOR:

An electric motor is used to drive the compressor. Then the compressor compresses air
from a low inlet pressure to a higher desired pressure level. This compressed air pressure
used to do the useful work.

4. AIR CONDITIONING UNIT AND CONTROL VALVES :

The conditioning of air is done by the FRL unit. The filter removes the unwanted
contaminants from the compressed air and the regulator is used to regulate the pressure to the
required level from the higher level. The lubricator adds the lubricating oil to the air so that
the air gains some lubricating properties to minimize friction during movement of
components. Control components such as directional control valves, flow control valves are
also used in the Pneumatic circuits.

Mechatronics Laboratory Manual


25

5. ACTUATORS :

Compressor performs the function of adding pressure energy to the atmospheric air in the
pneumatic system. Pneumatic actuators and motors do just the opposite. They extract energy
from the compressed air and convert it into Mechanical energy to perform useful work. They
are three types of actuators: 1. Linear actuators (Pneumatic cylinders) 2. Rotary Actuators
(Air motors) 3. Oscillators (Partial Rotary movement)

6. AIR HOSES :

Air hoses are used to carry the pressurized air from one location to another location.
Steel, Copper pipes, PU tubing are normally used air hoses.

AIM:
To study the components of a typical hydraulic system and understand various
Hydraulic components.

COMPONENTS:
 Tank
 Pump
 Electric motor
 Control valves
 Actuators
 Pipes and hoses

DESCRIPTION:

1. Tank

The tank or reservoir is used to store the hydraulic fluid. The components like oil filter,
oil level indicator, filler breather, return line filter and strainer are also mounted in the tank.
The size of the reservoir to be selected by the rule of the thumb: approximately three times of
actual flow rate required for the system in liters per minute. Large tanks are provided with
baffle plates to have slow movement of oil from return line to the suction.

2. PUMP

The pump, the heart of any hydraulic system converts mechanical energy into hydraulic
energy. The mechanical energy is delivered to the pump via a prime mover such as electric
motor. Due to the mechanical action, the pump creates a partial vacuum at its inlet. This
permits atmospheric pressure to force the fluid through the inlet line and into the pump. The
pump then pushes the fluid into the hydraulic system. Types of pumps used in hydraulic
system are gear pump, vane pump and piston pump.

Mechatronics Laboratory Manual


26

3. ELECTRIC MOTOR

An electric motor is used as a prime mover to the hydraulic system. Pump is coupled to
the electric motor using any of the coupling techniques. Commonly used are bell housing,
Oldham’s coupling etc.

4. CONTROL VALVES

Mainly used control valve is the pressure relief valve, fitted immediately after the pump.
This prevents the pump from any damage due to overloading. Apart from relief valve, other
types of pressure control valves also may be used. Direction control valves and flow control
valves also present in all hydraulic circuits to change the direction of motion of actuators and
the speed of actuators respectively.

5. ACTUATORS

Hydraulic actuators convert the hydraulic energy into mechanical energy. Based on the
motion produced, the actuators are classified into following types: 1. linear actuators
(hydraulic cylinders) which produce straight line motion, 2. Rotary actuator (hydraulic
motors) which produce rotary motion, 3.Oscillators which produce partial rotary motion.

6. PIPING AND HOSES

Piping which carries a liquid from one location to another. If the pipe line of the hydraulic
system having more bends which leads to more frictional losses in the hydraulic system.

HYDRAULIC POWER PACK

The hydraulic tank fitted with pump, motor, relief valve and accessories are generally
called as power pack. The accessories generally incorporated in a power pack are:

 Oil level indicator


 Couplings
 Pressure gauge and gauge isolator
 Manifold block
 Filler breather
 Return line filter
 Suction line with required filters strainer.

Mechatronics Laboratory Manual


27

HYDRAULIC AND PNEUMATICSYMBOLS

Mechatronics Laboratory Manual


28

EX.NO: DESIGN SIMPLE PNEUMATIC CIRCUIT USING


SINGLE ACTING CYLINDER
DATE :

AIM:
To design a simple pneumatic circuit using Single acting cylinder

APPARATUS REQUIRED:

 single acting cylinder


 FRL unit
 Direction control valve
 Connecting tubes

PROCEDURE:

 Draw the circuit diagram.


 Connect the compressor air to FRL unit
 Air both outputs of FRL unit connected to all components.
 Test your all circuits.
 Open the hand slide valve.
 Observe the working of cylinders.

RESULT:

Mechatronics Laboratory Manual


29

EX.NO: DESIGN SIMPLE PNEUMATIC CIRCUIT USING


DOUBLE ACTING CYLINDER
DATE :

AIM:
To design a simple pneumatic circuit using double acting cylinder

APPARATUS REQUIRED:

 double acting cylinder


 FRL unit
 Direction control valve
 Connecting tubes

PROCEDURE:

 Draw the circuit diagram.


 Connect the compressor air to FRL unit
 Air both outputs of FRL unit connected to all components.
 Test your all circuits.
 Open the hand slide valve.
 Observe the working of cylinders.

RESULT:

Mechatronics Laboratory Manual


30

EX.NO: DESIGN A PNEUMATIC CIRCUIT FOR THE SEQUENCE A+B+A-B-


DATE :

AIM:

To design a circuit for the sequence A+B +A-B-

APPARATUS REQUIRED:

 Double acting cylinder


 FRL unit
 Connecting tubes

PROCEDURE:

 Draw the circuit diagram.


 Connect the compressor air to FRL unit
 Air both outputs of FRL unit connected to all components.
 Test your all circuits.
 Open the hand slide valve.
 Observe the working of cylinders.

Mechatronics Laboratory Manual


31

RESULT:

Mechatronics Laboratory Manual


32

EX.NO:
ELECTRO PNEUMATIC CONTROL OF DOUBLE ACTING
DATE : CYLINDER USING SPDT

AIM:

To develop an electro-pneumatic circuit for extension and retraction of double acting


cylinder

APPARATUS REQUIRED:

 Double acting cylinder


 Direction control valve
 FRL unit
 Relay
 SPDT Switch
 Connecting tubes & wires
PROCEDURE:

 Provide power supply to the pneumatic trainer from control trainer by


interfacing24+vand-v
 Using the SPDT switch energize the corresponding solenoid valve to get the
desiredmovement in the cylinder.
 Supply the Air to FRL unit.
 Assemble all the components.
 Check all the connections carefully.
 Test the circuit. Observe the working of the cylinder using the direction control valve.

RESULT:

Mechatronics Laboratory Manual


33

EX.NO: PLC CONTROL OF DOUBLE ACTING CYLINDERS ON AND


DATE : OFF DELAY TIMER

AIM:

To design a circuit to extend and retract the double acting cylinder with the help of
delay timer controlled by PLC.

APPARATUS REQUIRED:

 Double acting cylinder


 RS 232 cable
 direction control valve
 FRL unit
 PLC
 Connecting wires and tube
PROCEDURE:

 Draw the circuit diagram


 Provide +24V and –24V from PLC trainer to panel.
 Interface PLC with PC using RS 232 cable.
 Write a ladder diagram.
 Output of PLC is directly connected to input of solenoid coil.
 Following the opening procedure of software.
 Check the ladder diagram.
 Connect the air supply to FRL unit.
 Run the PLC. After some delay the cylinder will be activated

RESULT:

Mechatronics Laboratory Manual


34

EX.NO: DESIGN AND SIMULATION FLUID POWER CIRCUITS USING


DATE : AUTOMATION STUDIO

AIM:

Todesign and simulation fluid power circuits using automation studio software

APPARATUS REQUIRED:

 PC
 Automation studio software

PROCEDURE:

 Open the automation studio software and open the new project
 pick the hydraulic and pneumatic components from the Main library
 Make corresponding connection as per requirement
 After Completion of circuits
 Check for proper closer of circuit
 Save and then run the file

RESULT:

Mechatronics Laboratory Manual


35

EX.NO: ADDITION OF TWO 8 – BIT NUMBERS, SUM OF 8 – BITS


DATE :

Aim:
To perform addition of two 8 bit numbers whose sum is also an 8-bit, done it by using
8085 trainer kit.

Tools / Apparatus Required:


8085 Microprocessor kit, Keyboard.

Algorithm:
Step1. : Initialize H-L pair with memory address X (say: 4200).
Step2. : Clear accumulator.
Step3. : Add contents of memory location M to accumulator.
Step4. : Increment memory pointer (i.e. X=X+1).
Step5. : Add the contents of memory indicated by memory pointer to accumulator.
Step6. : Store the contents of accumulator in 4202.
Step7. : Halt.

Flow chart:

Mechatronics Laboratory Manual


36

PROGRAM:

Address Hex Label Mnemonics Comments


of the code Op-code Operand
memory
location
4100 21 LXI H, 4200 Initialize memory pointer to point the first data
location 4200.
4101 00
4102 42
4103 3E MVI A,00 Clear accumulator
4104 00
4105 86 ADD M The first number is added to accumulator [A] [A]+M

4106 23 INX H Increment the memory pointer to next location of the


Data.
4107 86 ADD M The 2nd number is added to contents of accumulator

4108 32 STA 4202 The contents of accumulator are stored in memory


4109 02 location 4202.
410A 42
410B 76 HLT Stop the execution

Observation:
Ex: Input: Ex:(i) 4200 – 29 H Ex:(ii) 4200 –49 H

4201 – 16 H 4201 –32 H

Output: Ex :(i) 4202 – 3F H Ex:(ii) 4202 – 7B

Result:

Mechatronics Laboratory Manual


37

EX.NO:
ADDITION OF TWO 8 – BIT NUMBERS, SUM OF 16 – BITS
DATE :
Aim:
To perform addition of two 8 bit numbers whose sum is a 16-bit, done it by using 8085
trainer kit.

Tools / Apparatus Required:


8085 Microprocessor kit, Keyboard.

Algorithm:
Step1. : Initialize H-L pair with memory address X (say: 4200).
Step2. : Clear accumulator.
Step3. : Add contents of memory location M to accumulator.
Step4. : Increment memory pointer (i.e. 4201).
Step5. : Add the contents of memory indicated by memory pointer to accumulator.
Step6. : Check for Carry
Step7 : Store the sum in 4202.
Step8 : Store the Carry in 4203 location
Step9 : Halt
Flow chart:

Mechatronics Laboratory Manual


38

Program:

Address Hex Label Mnemonics Comments


of the code Op-code Operand
memory
location
4000 21 LXI H, 4200 H Initialize memory pointer to point the first
4001 00 data location 4200.
4002 42
4003 3E MVI A,00 Clear accumulator
4004 00
4005 86 ADD M The first number is added to accumulator
[A] [A]+M
4006 0E MVI C,00 Initial value of Carry is 0
4007 00
4008 23 INX H Increment the memory pointer to next
location of the Data.
4009 86 ADD M The 2nd number is added to contents of
accumulator
400A 32 JNC FWD Is Carry exists? No, go to the label FWD
400B 0E
400C 40
400D 0C INR C Make carry =1
400E 32 FWD STA 4202 H The contents of accumulator are stored in
400F 02 memory location 4202.
4010 42
4011 79 MOV A,C
4012 32 STA 4203 H
4013 03
4014 42
4015 76 HLT Stop the execution

Observation:
Input: Ex: 4200 – 97 H Output: 4202 – 2F H
4201 – 98H 4203 – 01 H

Result:

Mechatronics Laboratory Manual


39

EX.NO:
SUBTRACTION OF TWO 8-BIT NUMBERS WITHOUT
DATE : BORROW
Aim:
To perform subtraction of two 8 bit numbers by using 8085 trainer kit.

Tools / Apparatus Required:


8085 Microprocessor kit, Keyboard.

Algorithm:
Step1. : Initialize H-L pair with the address of minuend.
Step2. : Move the minuend into accumulator
Step3. : Increment H-L pair
Step4. : Subtract the subtrahend in memory location M from the minuend.
Step5. : Store the result in 4202.
Step6. : Stop the execution

Flow chart:

Mechatronics Laboratory Manual


40

PROGRAM:

ADDR- HEX CODE LABEL MNEMONIC COMMENTS


ESS OPCODE OPERAND
4100 21 LXI H,4200 Initialise H-L pair and get the First
number in to 4200 location
4101 00
4102 42
4103 7E MOV A,M [A] [M]
4104 23 INX H [M+1] [M]
4105 96 SUB M A [A] – [M]
4106 23 INX H Next memory location
4107 77 MOV M,A Store the result in the location 4202
4108 76 HLT Stop the execution

Observation:

INPUT: Ex : 4200- 59H 4201-30H


Output: 4202 – 29H

Result:

Mechatronics Laboratory Manual


41

EX.NO: MULTIPLICATION OF TWO 8-BIT NUMBERS


DATE :

Aim:
To perform the multiplication of two 8-bit numbers by using 8085 trainer kit.

Tools / Apparatus Required:


8085 Microprocessor kit, Keyboard.

Algorithm:
Step 1 : Initialize H-L pair with the address of multiplicand.(say 4200)
Step 2 : Exchange the H-L pair by D-E pair.so that multiplicand is in D-E pair.
Step 3 : Load the multiplier in Accumulator.
Step 4 : Shift the multiplier left by one bit.
Step 5 : If there is carry add multiplicand to product.
Step 6 : Decrement the count.
Step 7 : If count 0; Goto step 4
Step 8 : Store the product i.e result in memory location.
Step 9 : Stop the execution
Flow chart:

Mechatronics Laboratory Manual


42

PROGRAM :

ADDR- HEX – LABEL MNEMONIC COMMENTS


ESS CODE OPCODE OPERAND
4100 16 MVI D, 00 Initialize register D to 00
4101 00
4102 3E MVI A, 00 Initialize Accumulator content to 00
4103 00
4104 21 LXI H, 4200
4105 00
4106 42
4107 46 MOV B,M Get the first number in B-reg
4108 23 INX H
4109 4E MOV C,M Get the second number in C-reg
410A 80 LOOP : ADD B Add content of A-register to register-B.
410B D2 JNC NEXT Jump on no carry to NEXT.
410C 0F
410D 41
410E 14 INR D Increment content of register D.
410F 0D NEXT : DCR C Decrement content of register C.
4110 C2 JNZ LOOP Jump on no zero to address
4111 0A
4112 41
4113 32 STA 4202 Store the LSB of result in Memory
4114 02
4115 42
4116 7A MOV A,D
4117 32 STA 4203 Store the MSB of result in Memory
4118 03
4119 42
411A 76 HLT Terminate the program

Observation: INPUT :

Address Data
4200 10 H – LSB of Multiplicand
4201 15 H – MSB of Multiplicand
Output:
4202 50 H – LSB of Product
4203 01 H – MSB of Product

Result:

Mechatronics Laboratory Manual


43

EX.NO: DIVISION OF TWO 8-BIT NUMBERS


DATE :

Aim:
To perform the multiplication of two 8-bit numbers by using 8085 trainer kit.

Tools / Apparatus Required:


8085 Microprocessor kit, Keyboard.

Algorithm:
STEP1. : Initialize H-L pair with address of dividend.
STEP2. : Get the divisor from 4202 to register A & then to Reg.B
STEP3. : Make count C=08
STEP4. : Shift dividend and divisor left by one bit
STEP 5: Subtract divisor from dividend.
STEP6. : If carry = 1 : goto step 8 else step7.
STEP7. : Increment quotient register.
STEP8. : Decrement count in C
STEP9. : If count not equal to zero go to step 4
STEP10: Store the quotient in 4203
STEP11. : Store the remainder in 4204
STEP12. : Stop execution.

Flow chart:

Mechatronics Laboratory Manual


44

Mechatronics Laboratory Manual


45

PROGRAM :

ADDR- HEX – LABEL MNEMONIC COMMENTS


ESS CODE OPCODE OPERAND
4100 21 LXI H, 4200 Initialize the H-L pair for dividend
4101 00
4102 42
4103 46 MOV B,M Get the dividend in B- register
4104 0E MVI C,00 Clear C- register for Quotient
4105 00
4106 23 INX H
4107 7E MOV A,M Get the divisor in A - register
4108 B8 NEXT CMP B Compare A- register with B-register
4109 DA JC LOOP Jump on carry to loop
410A 11
410B 41
410C 90 SUB B
410D 0C INR C
410E C3 JMP NEXT
410F 08
4110 41
4111 32 LOOP STA 4202 Remainder
4112 02
4113 42
4114 79 MOV A,C
4115 32 STA 4203 Quotient
4116 03
4117 42
4118 76 HLT Stop execution

Ex: INPUT :

Address Data
4200 02
4201 09
4202 01 Remainder
4203 04 Quotient

RESULT:

Mechatronics Laboratory Manual


46

EX.NO: STUDY OF PLC AND ITS APPLICATIONS


DATE :

INTRODUCTION
A programmable logic controller (PLC) is a solid state computerizes industrial
controller that performs discrete or sequential logic in a factory environment. It was original
develops for replacement of mechanical relays, timers and counters. PLC is used successfully
to execute complicated control operations in a plant. A sequence of instruction is
programmed by the user to the correct operating specifications.

BASIC STRUCTURE OF PLC


The block diagram of a PLC is given in figure the six major section of a PLC are

 Sensing input or controlling hardware


 Input sections
 CPU
 Handheld programming device or personal computer
 Output section
 Output devices
Sensing section
These are usually made up of sensors and switches which transmit the signals from
the input devices.
Input section
This contains two major are the physical terminals when the input signal from the
input devices are attached to the PLC and the internal conversion electronics. The internal

Mechatronics Laboratory Manual


47

conversions electronics converts and isolates the high voltage input level from field devices,
into +5v dc which is necessary from the microprocessor and the others solid state circuitry.
Controller
This is the processor which processes the signals from input section and generates
controlling signals for the system.
Programmer
This is usually a PC which is used to enter the program to the PLC.
Output section
This receives the signals from the PLC which are used to control the system to which
the PLC is connected.
Field Hardware devices
This is the system which is controlled by the PLC. As mentioned before, it may be a
motor which controls the movement of a conveyor or a lift, it may be metal cutting machine
whose outputs are to be precision made, etc.

APPLICATION OF PLC

1. Extending and Retracting a pneumatic piston using Latches:


The task of the PLC is here is to move the piston in and out of the cylinder as shown
in the arrangement of figure, when switch SW1 is closed, piston A will extend out of cylinder
(A+). When switch SW2 is momentarily closed, Piston A is to retract into the cylinder (A-).
The ladder program solution to the above problem can be achieved using two latch circuits as
shown in figure.

Mechatronics Laboratory Manual


48

Mechatronics Laboratory Manual


49

When the inputs switch X100 (SW1) is actuated, Rung 1 is latched instantaneously
and the output device Y100 is energized. The output relay Y100 is connected to the solenoid,
Y1 and thus the piston is extended. The solenoid Y2 is De-energized during the forward
motion of piston by an NC contact of X100 via output device Y200. When switch X200 is
pressed, Rung 2 is latched providing the output to energies solenoid Y2 via relay coil Y200.
The NC contact X200 (SW2) in the Rung 1 will now deactivate the solenoid Y1 via relay
contact Y100 in Rung 1, thus the piston retracts.

2. Control of Two Pneumatic Pistons:


The task of PLC is to extend the piston A, then piston B and retract A and B
sequentially using the arrangement shown in figure,

The sequence of motion required can be annotated as A+B+A-B- and the cycle will
be started when the switch SW1 (X100) is closed. Pneumatic pistons are controlled using two
5/2 directional control valves.
The PLC diagram sown in figure represents the control of piston movement entirely
with the help of time delay between the strokes, the electrical limit switches LS11, LS12, LS21
and LS22 are activated at the end positions of the strokes.
The sequential operations of pistons is obtained with time delays with the use of
timers. The relay contact Y100 and timer coil T100 are latched when press button X100 is
pressed, giving forward strokes of piston A. it is essential that solenoid Y2 be de-energized
for activating the left hand switch of the solenoid operated 5/2 control valve. The unlatching
of the circuit is achieved with succeeding timer contact.

Mechatronics Laboratory Manual


50

The timer contact T100 is energized 5 s after A+, providing an energy signal to Y300
via an NC contact of T200. Thus, piston B extends. The reverse sequence of cylinders A and
B is obtained after a delay of 5 s each.

Control of a Process Motor

Mechatronics Laboratory Manual


51

A process motor which drives a compressor is monitored and controlled for its
operation. The start and stop push buttons are used to start and stop the motor. A thermostat
switch is incorporated to monitor the thermal overload and the process motor stops once the
preset temperature is reached which is set with the thermostat. A red alarm light indicates the
thermal overload on the other hand a green light ensures a smooth operation.

Pressing start pushbutton X100 in the ladder diagram shown in the figure, latches the
internal relay coil M100 via relay contact until stop pushbutton X200 is operated. The output
devices connected to Y100 and Y200 with the motor and the green lamp are ON through the
relay contact M200 provided that the thermostat switch is not energized such that temperature
of the motor does not reach above the threshold value. Thermal overload would be indicated
by output device Y300 with a red light through an NC thermal switch.

Mechatronics Laboratory Manual


52

EX.NO: STUDY OF IMAGE PROCESSING TECHNIQUES


DATE :

IMAGE PROCESSING AND ANALYSIS


 Image data reduction
 Smoothing
 Segmentation
Thresholding
Region growing
Edge detection
 Feature extraction
 Objects recognition

IMAGE DATA REDUCTION


Digital conversion
Windowing
Digital conversion
Image data reduction is achieved by number of bits of A/D converter. For example,
with 8 bit number of gray levels will be 28= 256 whereas with 4 bits it will be 24 = 16. This
will considerably reduce the magnitude of image processing problem.
Grey scale system requires higher degree of image refinement, huge storage
processing capability. For analysis 256 x 256 pixels image array up to 256 different pixel
values will require 65000-8-bit storage locations at a speed of 30 images per second.
Techniques windowing and image restoration are involved.

Mechatronics Laboratory Manual


53

Histogram of images: A histogram is a representation of the total number of pixels of an


image at each gray level. Histogram information can help in determining a cutoff point when
an image is to be transformed into binary values.
Windowing
Processing is the desired area of interest and ignores non-interested part of image.
Windowing involves using only a portion of the total image stored in the frame buffer
for image processing and analysis.

NOISE REDUCTION OPERATIONS


 Convolution masks
 Image averaging
 Frequency domain
 Median flters
Convolution masks
The noise is reduced by using masks. Create mask that behave like a lowpass filter,
such that the higher frequencies of an image are attended while the lower frequencies are not
changed very much.
Image averaging
A number of image of the exact same scene are averaged together. This technique is
time consuming. This technique is not suitable for operations that are dynamic and change
rapidly. It is more effective with an increased number of images. It is useful for random
noise.
Frequency domain
When the fourier transform of an image is calculated the frequency spectrum might
show a clear frequency for the noise, which in any cases can be selectively eliminated by
proper filtering.
Median filters
In image processing it is usually necessary to perform a high degree of noise
reduction in an image before performing higher level processing steps, such as edge
detection.
The median filter is a non linear digital filtering technique, often used to remove noise
from image or other signal. The idea is to examine a sample of the input and decide if it is
representative of the signal.This is performed using a window consisting of an odd number of
samples. The values in the window are sorted into numerical order, median value, sample in
the centre of the window is selected as the output. The oldest sample is discarded, a new
sample acquired and the calculation repeats.
Median filtering is a common step in image processing. It is particularly useful to
reduce speckle noise, salt and pepper noise. Its edge preserving nature makes it useful in
cases where edge blurring is undesirable.

SEGMENTATION

Mechatronics Laboratory Manual


54

Segmentation is the method to group area of an image having similar characteristics


or features into distinct entities representing part of the image. Segmentation is the various
methods of data reduction. In computer vision segmentation refers to the process of
partitioning a digital image into multiple regions. The goal of segmentation is to simplify and
change the representation of an image into something that is more meaningful and easier to
analyze.
Image segmentation is typically used to locate objects and boundaries in images. The
result of image segmentation is a set of regions that collectively cover the entire image or a
set of contours extracted from the image.
Methods of segmentation
 Histogram based methods
 Multi-scale segmentation
 Semi automatic segmentation
 Neural network segmentation
 Image segmentation technique
Histogram based methods
Histogram based methods are very efficient when compared to other image
segmentation methods, because they typically require only one pass through the pixels. In
this technique, a histogram is computed from all of the pixels in the image, and the peaks and
valleys in the histogram are used to locate the clusters in the image. Color or intensity can be
used as the measure.
A refinement of this technique is to recursively apply the histogram seeking method
to clusters in the image in order to divide them into smaller clusters. This is repeated with
smaller and smaller clusters until no more clusters are formed.

Mechatronics Laboratory Manual


55

Multi-scale segmentation
Image segmentation are computed at multiple scales in scale-space and sometimes
propagated from coarse to fine scales. Segmentation criteria can be arbitrarily complex and
may take into account global as well as local criteria. A common requirement is that each
region must be connected in some sense.
Semi-Automated segmentation
In this kind of segmentation the user outlines region of interest with the mouse clicks
and algorithms are applied. Techniques like livewire or intelligent scissors are used in this
kind of segmentation.
Neural networks segmentation
Neural network segmentation relies on processing small areas of an image using a
neural network or a set of neural networks. After such processing the decision making
mechanism marks the areas of an image accordingly to the category recognized by the neural
network.
GIMP & VXL

Mechatronics Laboratory Manual


56

FEATURE EXTRACTION
Transforming the input data into set of feature is called feature extraction.
In vision application distinguishing one object from another is accomplished by
means of features that uniquely characterize the object. A feature is a single parameter that
permits ease of comparison and identification. An important objective in selecting these
features is that the features should not depend on position or orientation.

Mechatronics Laboratory Manual

Вам также может понравиться