Mechatronics Lab
Mechatronics Lab
Assembly language programming of Addition, Subtraction, Multiplication and Division using 8051
Micro controller
Expt No: 1
Date
Aim:
To write an assembly language program for addition, subtraction, multiplication and division of two 8
bit no’s using 8051 micro controller.
Apparatus Required:
1. 8051 Microprocessor kit-1
2. DC power supply 5v-1
PROCEDURE:
1. C reg is to be cleared for carry
2. Get data immediately
3. Addition, Subtraction, Multiplication and Division can be done
4. Store the result in memory pointer
5. End the program.
C PROGRAM:
ADDITION:
ADD OPCODE LABEL MNEMONICS COMMENTS
3100 74 05 MOV A, # DATA 1 MOV data to A reg
3102 24 04 ADD A, # DATA 2 Add data 2 to A reg
3104 90 45 00 MOV DPTR, #3500 MOV data add to data pt
3107 F0 MOV X@DPTR, A MOV A reg to data pt
3108 80 FE HERE SIMP HERE JUMP on HERE
SUBTRACTION:
DIVISION:
FLOW CHART:
2 Department of Mechanical Engineering
ME6712 Mechatronics Laboratory
Start
Clear PSW
Select register
Stop
OUTPUT:
ADDITION:
SUBTRACTION:
DIVISION:
1. What is microcontroller?
2. How many I/O ports are placed in microcontroller 8051?
3. Define DPTR.
4. What is the purpose of PSW register?
5. What is use of EA pin?
RESULT:
Thus the program for 8 bit Addition, Subtraction, Multiplication and Division using 8051 was executed and
verified successfully.
STEPPER MOTOR INTERFACING USING 8051 MICRO-CONTROLLER FOR 360˚ CLOCKWISE
ROTATION
AIM
To write an assembly language program for driving the stepper motor in 360˚ clockwise rotation.
APPARATUS REQUIRED:
Stepper Motor
8051 Micro Controller Kit
PROGRAM
4500 09 05 06 0A TABLE DB 09 05 06 0A
1. What is microprocessor?
2. What is microcontroller?
3. What is full speed rotation?
4. What is half speed rotation?
5. What is stepper motor?
6. 6. How many bit addressable location are placed in internal RAM?
7. 7. What is interrupts signal?
8. 8. Name the types of 8051 interrupts signals.
RESULT
Thus the stepper motor interfacing using 8051 microcontroller for 3600 run at a different speed
successfully.
STEPPER MOTOR INTERFACING USING 8051 MICRO CONTROLLER FOR FORWARD AND REVERSE
DIRECTION
RESULT
Thus the program is successfully for forward and reverse rotation in 8051 microcontroller
APPARATUS REQUIRED
Traffic light interface
8051 Microcontroller kit
PROGRAM
305E 22 RET
306B 22 RET
VIVA QUESTION
RESULT
Thus the traffic light interfacing experiment done sucessfully
SPEED CONTROL OF DC SERVO MOTOR USING PID CONTROLLER
EXPT NO: 5
DATE:
AIM:
To study the speed control DC motor using open loop and closed loop system
APPARATUS REQUIRED:
DC Servo Motor
PEC16M7 Module
Micro-4011 kit
34-pin FRC cable
RS-232 cable
15 pin connector
PROCEDURE:
11 Department of Mechanical Engineering
ME6712 Mechatronics Laboratory
TABULATION:
GRAPH:
Load VS Speed
Load VS Speed
RESULT:
Thus the DC servo motor speed control using open loop and closed loop interfacing was done
and the characteristics curves are obtained
14 Department of Mechanical Engineering
ME6712 Mechatronics Laboratory
Date :
AIM:
APPARATUS REQUIRED:
4. FRL unit
5. Relay
6. SPDT Switch
7. Pushbutton switch
PROCEDURE
: SPDT
SWITCH
2. using the SPDT switch energize the corresponding solenoid valve to get
the desired movement in the cylinder.
3. Supply the Air to FRL unit.
6. Test the circuit. Observe the working of the cylinder using the 3/2 and 5/2
solenoid valve.
CIRCUIT DIAGRAM-PUSH BUTTON
PUSHBUTTON SWITCH:
1. Draw the circuit diagram and connect the air supply to FRL unit.
4. When the solenoid is given a signal solenoid are cut and the solenoids are
de- energized and the DCV activated to single and double acting cylinder
RESULT:
Thus the movement of double acting cylinder was carried out using switches
using timer.
APPARATUS REQUIRED
3. Slide valve
4. FRL unit
1. Provide P o w e r s u p p l y t o p n e u m a t i c t r a i n e r f r o m e l e
c t r i c a l c o n t r o l l e r by interfacing +24V and -24V
2. Provide 24V power supply to
timer
3. Any one of the outputs of FRL unit is directly connected to 3/2 single
solenoid valve.
RESULT:
Expt No: 8
Date:
AIM:
To design a circuit to extend and retract the single acting cylinder
APPARATUS REQUIRED:
2. RS 232 cable
5. FRL unit
6. PLC
PROCEDURE:
ON DELAY TIMER:
10. Run the PLC. After some delay the cylinder will be activated.
10. Run the PLC and observe the working of single acting cylinder.
3. What is a timer?
RESULT:
Thus the actuation of single acting cylinder with ON and OFF delay
timer was done using PLC.
25 Department of Mechanical Engineering
ME6712 Mechatronics Laboratory
Expt No: 9
Date:
AIM:
To simulate the automatic sequence of double acting cylinder using PLC
APPARATUS REQUIRED
2. RS 232 cable
5. FRL unit
6. PLC
CIRCUIT DIAGRAM
PROCEDURE:
6. Both outputs of PLC (q1 and q2) are directly connected to inputs of
solenoid coils.
10. Run the PLC and observe the working of double acting cylinder.
1. What is a PLC?
2. What are the features of PLC as a controller'?
3. What is meant by FCV?
4. What are the types of Cylinders?
5. What are opto isolators'?
RESULT:
REQUIREMENTS:
1. Personal Computer
2. PHEUMOSIM Software
PROCEDURE:
3. Click on the supply elements and then select, copy, paste the compressor.
4. Click the attenuator and then select copy, paste the single and double
acting cylinder.
5. Then select, copy, paste the 3/2, 5/2 single and double solenoid valve.
Double Acting:
Single Acting:
RESULT:
Thus the Pneumatic circuit for single acting, double acting cylinder
was simulated using FLUIDSIM software.
30 Department of Mechanical Engineering
ME6712 Mechatronics Laboratory
Expt No: 11
Date:
AIM:
simulation software
REQUIREMENTS:
1. Personal Computer
2. FLUIDSIM Software
PROCEDURE:
3. Click on the supply elements and then select, copy, paste the pump
and tanks.
4. Click the attenuator and then select, copy, paste the single and
double acting cylinder.
5. Then select, copy, paste the 3/2, 5/2 single and double solenoid valve.
RESULT:
DATE:
A I M:
To simulate the automatic sequence of single acting cylinder using PLC
APPARATUS REQUIRED:
1. Compressor
2. FRL Unit
3. 3/2 Solenoid Operated DCV
4. Single Acting Cylinder
5. PLC
6. Versa Pro Software.
PROCEDURE:
RESULT:
APPARATUS REQUIRED:
1. Compressor
2. FRL Unit
3. 3/2 Solenoid Operated DCV
4. Single Acting Cylinder
5. PLC
6. Versa Pro Software.
PROCEDURE:
1. What the operations that is carried out with a PLC on data words?
2. What is meant by OR logic?
3. What is an internal relay?
4. Name different types of timers used in PLC.
RESULT:
Thus the single acting cylinder is actuated with OR logic using PLC.
EXPT NO: 14
DATE:
AIM:
To simulate the single acting cylinder with AND logic using PLC
APPARATUS REQUIRED:
1. Compressor
2. FRL Unit
3. 3/2 Solenoid Operated DCV
4. Single Acting Cylinder
5. PLC
6. Versa Pro Software.
PROCEDURE:
RESULT:
Thus the single acting cylinder is actuated with AND logic using PLC.
41 Department of Mechanical Engineering
ME6712 Mechatronics Laboratory
EXT.NO:15
DATE:
AIM
To learn the fundamental concepts of image processing using MATLAB Software
APPARATUS REQUIRED:
MATLAB software
INTRODUCTION
The purpose of this lab experiment is for you to understand some fundamental
concepts of image processing using MATLAB. This lab experiment consists of four parts.
In part 1, you will learn some basic MATLAB commands for image processing. After
getting yourself familiar with MATLAB commands, you may proceed to the part 2 of this
lab.
In part 2, you are required to enhance a corrupted image using filtering. Peak signal to
noise ratio (PSNR) will be used to measure the quality of the enhanced image.
In part 3 of the lab, you are required to write a simple MATLAB program to segment the
characters from plate number image. Segmentation is one of the important processes in
automatic plate number recognition.
The final part (part 4) of this lab is to calculate mean square error (MSE) of images and
to relate the MSE value with subjective quality.
PROCEDURES
Part 1: Introduction to MATLAB for image processing