ME8781 Lab
ME8781 Lab
ME8781 Lab
LAB MANUAL
(2017 Regulation)
ME8781 MECHATRONICS LABORATORY
REGULATION
2017
OBJECTIVES
To know the method of programming the microprocessor and also the
design, modeling &analysis of basic electrical, hydraulic & pneumatic
Systems which enable the students to understand the concept of
mechatronics.
LIST OF EXPERIMENTS
1. Assembly language programming of 8085 – Addition – Subtraction-
Multiplication – Division –Sorting – Code Conversion.
2. Stepper motor interface.
3. Traffic light interface.
4. Speed control of DC motor.
5. Study of various types of transducers.
6. Study of hydraulic, pneumatic and electro-pneumatic circuits.
7. Modeling and analysis of basic hydraulic, pneumatic and electrical
circuits using Software.
8. Study of PLC and its applications.
9. Study of image processing technique.
TOTAL: 60 PERIODS
OUTCOMES
Upon the completion of this course the students will be able to
CO2 Demonstrate the functioning of control systems with the help of PLC and
microcontrollers.
CONTENT
SIGNATUR E
Exp DATE NAME OF THE EXPERIMENT
STAFF
No.
PAGE No.
STEPPER MOTOR INTERFACING WITH 8051
MICROCONTROLLER (CLOCKWISE) 13
1.
CODE CONVERSIONS
37
Ex.No: Date:
AIM:
To study about the important features in Mechatronics system.
Mechatronics is one of the new and existing fields on the engineering landscape,
subsuming parts of traditional engineering fields and requiring a broader approach to the
design of system that we can formally call as Mechatronics system.
Many industries improving their works through automation which is based on the inter
connection between the electronic control systems and mechanical engineering. Such control
systems generally use microprocessors as controllers and have electrical sensors extracting
information from mechanical inputs through electrical actuators to mechanical systems. This
can be considered to be application of computer based digital control techniques through
electronic and electric interfaces to mechanical engineering problems. Successful design of
Mechatronics can lead to products that are extremely attractive to customer in quality cost-
effectiveness.
Control System:
A control system can be defined as a block box which can be used to control its
output to some particular value.
Example: a domestic central heating control system.
We can set the required temperature on the thermostat or controller and the pump
can be adjusted to supply water through radiators. So the required temperature can be
maintained in the house.
Measurement Systems:
Measurement System can be considered to be made up of three elements as
shown in figure
closed-loop systems. The difference between these can be illustrated by a simple example.
a 2kW
heating element to be selected. If a person used the heating element to heat a room, he or she
might just switch on the 1 kW element if the room is not required to be at too high a
temperature. The room will heat up and reach a temperature which is only determined by the
fact the 1 kW element was switched on, and not the 2 kW elements. If there are changes in
the conditions perhaps someone opening a window, there is no way the heat output is adjusted
to compensate.
Basic elements of a closed-loop system:
The following figure shows the general form of a basic closed-loop system.
EX.No: Date:
AIM:
To write an assembly language program for driving the stepper motor in clockwise
direction.
APPARATUS REQUIRED:
Stepper Motor
8051 Micro Controller Kit
Program:
SD space 4100 press enter
.
4123 enter SD 4500 enter
Clockwise :
4500 0A enter 4501 06 enter 4502 05 enter 4503 09 enter
Press INT key in 8051 microcontroller kit
GO space 4100 enter
Result:
APPARATUS REQUIRED:
Stepper Motor
8051 Micro Controller Kit
Program:
.
4123 enter SD 4500 enter
Clockwise :
4500 09 enter 4501 05 enter 4502 06 enter 4503 0A enter
Press INT key in 8051 microcontroller kit
GO space 4100 enter
Result:
Thus stepper motor was driven in anti-clockwise direction.
MODELING AND ANALYSIS OF PNEUMATIC CIRCUIT
MODELING AND ANALYSIS OF PNEUMATIC CIRCUIT
EX.No: Date:
AIM:
APPARATUS REQUIRED:
Automation studio 7.0 Software
PC
Pneumatic trainer kit
PROCEDURE:
MODELING:
Install the Automation studio 7.0
Go to hierarchical view to get the components.
Draw the pneumatic circuit according to the given option.
Run the circuit.
OPERATION:
The various components are connected as per the given circuit diagram.
Result:
Thus the modeling and operation of the given Pneumatic circuit has been done.
MODELING AND ANALYSIS OF ELECTRO PNEUMATIC CIRCUIT
MODELING AND ANALYSIS OF ELECTRO PNEUMATIC CIRCUIT
EX.No: Date:
AIM:
APPARATUS REQUIRED:
Automation studio 7.0 Software
PC
Electro Pneumatic trainer kit
PROCEDURE:
MODELING:
Install the Automation studio 7.0
Go to hierarchical view to get the components.
Draw the pneumatic circuit according to the given option.
Run the circuit.
OPERATION:
The various components are connected as per the given circuit diagram.
Result:
Thus the modeling and operation of the given Electro Pneumatic circuit has been done.
MODELING AND ANALYSIS OF ELECTRO PNEUMATIC CIRCUIT WITH PLC
MODELING AND ANALYSIS OF ELECTRO PNEUMATIC CIRCUIT WITH PLC
EX.No: 06 Date:
AIM:
To design and operate the given Electro Pneumatic circuit with PLC.
APPARATUS REQUIRED:
Automation studio 7.0 Software
PC
Electro Pneumatic trainer kit
PLC
PROCEDURE:
MODELING:
Install the Automation studio 7.0
Go to hierarchical view to get the components.
Draw the pneumatic circuit according to the given option.
Run the circuit.
OPERATION:
The various components are connected as per the given circuit diagram.
Result:
Thus the modeling and operation of the given Electro Pneumatic circuit has been done.
MODELING AND ANALYSIS OF HYDRAULIC CIRCUIT
MODELING AND ANALYSIS OF HYDRAULIC CIRCUIT
EX.No: Date:
AIM:
APPARATUS REQUIRED:
Automation studio 7.0 Software
PC
PROCEDURE:
Install the Automation studio 7.0
Go to hierarchical view to get the components.
Draw the pneumatic circuit according to the given option.
Run the circuit.
Result:
EX.No: Date:
AIM
To study the circuits of hydraulic, pneumatic and electro pneumatic drives.
DESCRIPTION
HYDRAULIC CIRCUITS
A hydraulic circuit is a group of components such as pumps, actuators, control valves, conductors
and fittings arranged to perform useful work. There are three important considerations in designing a
hydraulic circuit:
RESULT:
DESIGN AND TESTING FOR ACTUATION OF HYDRUALIC CYLINDER
EX.No: Date:
AIM:
To actuate the hydraulic cylinder and find out the Speed Vs Discharge.
APPARATUS REQUIRED:
1. Oil tank
2. Single phase motor
3. Gear pump.
4. Pressure relief valve
5. 4/3 double acting solenoid valve
6. Flow control valve.
7. Double acting cylinder
8. Load cell
9. Data activation card than lab view software.
PROCEDURE:
Switch on the electrical power supply with motor.
Switch on the power supply to the control unit
Open the lab view software in the system.
Interface hydraulic trainer with system using RS-232
Open the speed, go to operate, click the run then power on
Now regulate the flow control valve contract the system by pressing down position.
After seen monitor in velocity cm/sec.
Now regulate the flow control valve and set the maximum flow to find the up and
velocity
Repeat the velocity values for different flows.
RESULT:
The Actuation of Hydraulic Cylinder Was Carried Out.
SPEED CONTROL OF DC MOTOR
EX.NO: Date:
AIM:
To control the speed of DC motor by using PID controller.
Apparatus Required:
1. Permanent Magnet D.C Motor
2. D.C Motor Speed control Trainer
3. Digital PID controller
4. Patch Cords
Procedure:
Switch on power supply
Select normal PID
Set Auto mode
Set maximum range 1500 (rpm)
Give set point (0 to 1500)
Enter kp value = 2.0 (use up & down arrow key)
Enter ki value = 0.01
Enter kd value = 0.01
Press enter
Result :
Thus the speed of Dc motor has been controlled by using PID controller.
DATA CHECK MAP FOR 8 BIT ADDITION:
MEMORY
ADDRESS DATA
INPUT
OUTPUT
ADDITION OF TWO 8-BIT DATA
EX.No: Date:
AIM:
To write and execute an assembly language program for addition of two 8 bit numbers
using 8085 microprocessor kit.
APPARATUS REQUIRED:
2. Power supply -
RESULT:
Thus the addition of two 8 bit data was written and executed successfully by using 8085
microprocessor trainer kit.
DATA CHECK MAP FOR 8 BIT SUBTRACTION:
INPUT
OUTPUT
SUBTRACTION OF TWO 8-BIT DATA
EX.No: Date:
AIM:
To write and execute an assembly language program for subtraction of two 8 bit
numbers using 8085 microprocessor kit.
APPARATUS REQUIRED:
RESULT:
Thus the subtraction of two 8 bit data was written and executed successfully by using 8085
microprocessor trainer kit.
DATA CHECK MAP FOR 8 BIT MULTIPLICATION:
MEMORY
DATA
ADDRESS
INPUT
OUTPUT
MULTIPLICATION OF TWO 8 BIT DATA
EX.No: Date:
AIM:
To write and execute an assembly language program for multiplication of two 8 bit
numbers using 8085 microprocessor kit.
APPARATUS REQUIRED:
RESULT:
Thus an ALP for multiplication of two 8 bit data was written and executed successfully by
using 8085 microprocessor trainer kit.
DATA CHECK MAP FOR 8 BIT DIVISION:
MEMORY DATA
INPUT
OUTPUT
DIVISION OF TWO 8 BIT DATA
EX.No: Date:
AIM:
To write and execute an assembly language program for division of two 8 bit
numbers using 8085 microprocessor kit.
APPARATUS REQUIRED:
S.No Apparatus Required Quantity
1. 8085 Microprocessor kit 1
2. Power supply -
OPCODE
MEMORY LABEL MNEMONICS COMMENTS
INPUT OUTPUT
(Hexadecimal) (Decimal)
Memory Data Memory Data
address address
CODE CONVERSIONS
EX.No: Date:
AIM:
To write an assembly language program to convert, Hex to decimal conversion
APPARATUS REQUIRED:
RESULT:
Thus an assembly language program to convert, Hexadecimal to decimal conversion.
TRAFFIC LIGHT CONTROLLER
EX.No: Date:
AIM:
To write an ALP to control the traffic light by interfacing traffic light controller unit with
8085 microprocessor.
APPARATUS REQUIRED:
S.NO NAME OF ITEMS QUANTITY
1. 8085-Microprocessor kit 1
2 Traffic light interfacing kit 1
3 FRC Connector 1
4 Power chord 1
5 CRO 1
6 Probe 1
PROGRAM :
MEMORY OPCODE
LABEL MNEMONICS COMMENTS
ADDRESS
4100 SATRT MVI A,80 H Move data to A register
OUT
4102 CONTROL Control the output
LXI, DATA-
4104 REPEAT SQ Move the data to register
4107 LXI,DATA-E Move the data to register
410A CALL OUT Call to subroutine
410D XCHG Save 1st data in DE pair
Move the data from memory
410E MOV A,M
to accumulator
410F OUT PORTA Send mode control port A
4111 CALL DELAY Delay the some value
4114 XCHG Save the 2nd data in DE pair
4115 INX D Increment D
4116 INX H Increment H
4117 CALL OUT Call to subroutine
411A XCHG Save the 3rd data in DE pair
Move the data from memory
411B MOV A,M
to accumulator
411C OUT PORTB Send mode control port B
CALL
411E Delay the some value
DELAY1
4121 XCHG Save the 4th data in DE pair
4122 INX D Increment D
4123 INX H Increment H
4124 CALL OUT Call OUT subroutine
4127 XCHG Save 1st data in DE pair
4128 MOV A,M Move the data from memory
to accumulator
4129 OUT PORTC Send mode control port C
412B CALL DELAY Delay the some value
412E XCHG Save the 2nd data in DE pair
4130 INX D Increment D
4131 INX H Increment H
4134 CALL OUT Call OUT subroutine
4135 XCHG Save 2nd data in DE pair
Move the data from memory
4136 MOV A,M
to accumulator
4138 OUT PORTC Read mode control portC
4139 INX H Increment H
CALL
413C DELAY1 Delay the some value
413F JMP REPEAT Jump to REPEAT
Move the data from memory
4142 OUT MOV A,M
toaccumulator
4143 OUT PORTC Send mode control port C
4145 INX H Increment H
Move the data from memory
4146 MOV A,M
to accumulator
4147 OUT PORT B Send mode control port B
4149 INX H Increment H
Move the data from memory
414A MOV A,M
to accumulator
414B OUT PORTA Send mode control port A
414D CALL DELAY Delay the some value
4150 RET Return to main program
16 bit content is pushed to the
4151 DELAY PUSH H stack
4152 LXI H,001F Load the data to H
4155 L1 LXI B,FFFF Load the data to B
4158 LOOP DCX B Decrement B
Move the data from B to
4159 MOV A,B
accumulator
415A ORA C
415B JNZ LOOP Jump if no zero to LOOP
415E DCX H Decrement H
Move the data from L to
415F MOV A,L accumulator
4160 ORA H
4161 JNZ LOOP1 Jump if no zero to LOOP1
The content of stack memory
4164 POP H is printed
4165 RET
4166 DELAY PUSH H Return to main program
4167 LXI H,001F Load the data to H
416A L2 LXI B,FFFF Load the data to B
416D LOOP2 DCX B Decrement B
Move the data from B to
416E MOV A,B accumulator
416F ORA C
4170 JNZ LOOP2 Jump if no zero to LOOP2
4173 DCX H Decrement H
Move the data from L to
4174 MOV A,L
accumulator
4175 ORA H
4176 JNZ LOOP2 Jump if no zero to LOOP2
The content of stack memory
4179 POPH is printed
417A RET Return to main program
417B DATA-SQ DB Data from sequentially
4180 DATA-SQ DB Data from sequentially
4185 DATA-SQ DB Data from sequentially
4187 DATA-E DB Data from sequentially
418C END End of the program
RESULT:
Thus an ALP to control the traffic light by interfacing traffic light controller unit with 8085
microprocessor was written.
STUDY OF IMAGE PROCESSING TECHNIQUE
Ex.No : DATE :
AIM:
To study image processing techniques.
IMAGE PROCESSING:
Image processing is a method to convert an image into digital form and perform some
operations on it, in order to get an enhanced image or to extract some useful
information from it.
It is a type of signal dispensation in which input is image, like video frame or
photograph and output may be image or characteristics associated with that image.
Usually Image Processing system includes treating images as two dimensional signals
while applying already set signal processing methods to them.
It is among rapidly growing technologies today, with its applications in various
aspects of a business. Image Processing forms core research area within engineering
and computer science disciplines too.
STEPS:
Importing the image with optical scanner or by digital photography.
Analyzing and manipulating the image which includes data compression and image
enhancement and spotting patterns that are not to human eyes like satellite
photographs.
Output is the last stage in which result can be altered image or report that is based on
image analysis.
TYPES
Analog Image Processing
Analog or visual techniques of image processing can be used for the hard copies like
printouts and photographs. Image analysts use various fundamentals of interpretation while
using these visual techniques. The image processing is not just confined to area that has to be
studied but on knowledge of analyst. Association is another important tool in image
processing through visual techniques. So analysts apply a combination of personal knowledge
and collateral data to image processing.
Digital Processing techniques help in manipulation of the digital images by using
computers. As raw data from imaging sensors from satellite platform contains deficiencies.
To get over such flaws and to get originality of information, it has to undergo various phases
of processing. The three general phases that all types of data have to undergo while using
digital technique are Pre- processing, enhancement and display, information extraction.
Transducers
The transducer can be defined as a device which is used for converting one form of
energy into another form.
In general, transducers deal with different energy types such as electrical energy,
mechanical energy, chemical energy, light energy, electromagnetic energy, thermal
energy, acoustic energy, and so on.
For example, consider mic (mic of telephone or mobile phone or audio set mic) we
use in our day-to-day life converts the audio signals into electrical signals and then
amplifies it into the desired range (depends on system and settings of the user).
Then, converts the electrical signals into audio signals at the output of the speakers or
loudspeaker.
The fluorescent bulbs we use for lighting, converts the electrical energy into light
energy. The mic, speaker, and fluorescent bulb can be considered as transducers.
Similarly, there are different types of transducers used in practical applications.
Types of Transducers
Piezoelectric transducer
Pressure transducer
Temperature transducer
Ultrasonic transducer
Piezoelectric Transducer
In Piezoelectric transducers, mechanical energy can be converted into electrical
energy and similarly, electrical energy can be converted into mechanical energy.
Application
Piezoelectric transducers are used for detecting the drummer’s sticks impact in
electronic drum pads.
These are also used for the detection of muscle movements which can be termed as
acceleromyography.
The engine load can be determined by measuring manifold absolute pressure, which
can be done by using piezoelectric transducers in fuel injection systems as MAP
sensors.
Piezoelectric sensors can be used as knock sensors in automotive engine management
systems for detecting engine knock.
Pressure Transducer
Pressure transducer converts the pressure imposed into electrical signals. Pressure
transducers are also termed as pressure indicators, transmitters, manometers, piezometers, and
pressure sensors.
Application
Pressure transducers are specially used for measuring the pressure of the particular
quantity such as gas or liquid by converting the pressure into electrical energy.
There are different types of pressure transducers such as a millivolt pressure
transducer, amplified voltage pressure transducer, 4-20mA pressure transducer, and
strain-gage base pressure transducer.
The pressure transducers are used in numerous applications such as pressure sensing,
altitude sensing, flow sensing, level or depth sensing, and leak testing.
The pressure transducers can be used for electrical power generation by using these
sensors under the speed breakers of the roads or highways where the pressure of the
vehicles can be converted into electrical energy.
Temperature Transducer
Temperature transducer converts temperature of a system or device into other quantity
such as electrical energy or mechanical energy or pressure, which is then sent to the control
system for controlling the temperature of the system.
Application
Temperature transducers are majorly used for measuring air temperature such that to
control the temperature of many control systems such as heating, air-conditioning,
ventilation, and so on. There are different types of transducers used for measuring
temperature of various systems.
Result:
AIM:
i).PLC
A PLC (Programmable Logic Controllers) is an industrial computer used to monitor
inputs, and depending upon their state make decisions based on its program or logic, to
control (turn on/off) its outputs to automate a machine or a process.
System Busses
The internal paths along which the digital signals flow within the PLC are called
busses.
The system has four busses:
– The CPU uses the data bus for sending data between the different elements,
– The address bus to send the addresses of locations for accessing stored data,
– The control bus for signals relating to internal control actions,
– The system bus is used for communications between the I/O ports and the I/O unit.
Memory
System (ROM) to give permanent storage for the operating system and the fixed data
used by the CPU.RAM for data. This is where information is stored on the status of input and
output devices and the values of timers and counters and other internal devices. EPROM for
ROM’s that can be programmed and then the program made permanent.
I/O Sections
Inputs monitor field devices, such as switches and sensors. Outputs control other
devices, such as motors, pumps, solenoid valves, and lights.
Power Supply
Most PLC controllers work either at 24 VDC or 220 VAC. Some PLC controllers
have electrical supply as a separate module, while small and medium series already contain
the supply module.
Programming Device
The programming device is used to enter the required program into the memory of the
processor.The program is developed in the programming device and then transferred to
the memory unit of the PLC.
i) Programming Console
ii) PC
iii) Hand Programmer
iii).PLC operation
Input Relays
These are connected to the outside world. They physically exist and receive signals
from switches, sensors, etc. Typically they are not relays but rather they are transistors.
Counters
These do not physically exist. They are simulated counters and they can be programmed
to count pulses.Typically these counters can count up, down or both up and down. Since they
are simulated they are limited in their counting speed.Some manufacturers also include
highspeed counters that are hardware based.
Timers
These also do not physically exist. They come in many varieties and increments.The
most common type is an on-delay type.Others include off-delay and both retentive and non-
retentive types. Increments vary from 1ms through 1s.
Output Relays
These are connected to the outside world. They physically exist and send on/off signals
to solenoids, lights, etc.They can be transistors, relays, or triacs depending upon the model
chosen.
Data Storage
Typically there are registers assigned to simply store data. Usually used as temporary
storage for math or data manipulation. They can also typically be used to store data when
power is removed from thePLC.
Programming Languages
A program loaded into PLC systems in machine code, a sequence of binary code
numbers to represent the program instructions. Assembly language based on the use of
mnemonics can be used, and a computer program called an assembler is used to translate the
mnemonics into machine code.High level Languages (C, BASIC, etc.) can be used.
Result:
Thus the programmable logic circuit and its applications were studied.
OPCODES TABLE OF INTEL 8085