Professional Documents
Culture Documents
LAB Manuals FINAL
LAB Manuals FINAL
LAB Manuals FINAL
Group Members:
ROHAN ALI KHAN (180867)
SUBMITTED TO
SYED ALI USAMA
ENGINEERING
LAB# 01
Introduction to Mechatronics System
Objectives:
Pre-Lab
To read the material provided and familiarize with the terminology used in the
document for better understanding of the task during the lab.
o Sensing
o Control
o Action
Engineering Design
Engineering is the discipline, art, skill and profession of acquiring and applying
scientific, mathematical, economic, social, and practical knowledge, in order to design
and build structures, machines, devices, systems, materials and processes.
Engineering can be defined as following a methodical process using available
resources and experien ce to solve complex problem.
Figure.0.1
Case Study:
To design a coin separating machine which separate different coins count the number
of coins calculates its total amount and display it on a screen
Following are the criteria and the constraint to build the model.
1. Time: 6 weeks
2. Currency
3. Sizes
4. Weight of Coins
5. Material of coin
Generate Ideas
1. Weight Based Coin Sorter in weight based coin sorter, load cells are used the
coins are aligned or sorted by the weight of the coin and are placed in the
irrespective coin’s portions.
2. Size based Coin Sorter in size based coin sorter, by knowing the various sizes
of the coins, the coins are placed in their respective coin’s portions.
Explore Possibilities
All of the above mentioned ideas are the possible ways to implement and solve the
given problem but on the basis of given criteria and constraints the idea choose must
be confined to the constraints and criteria’s. On the basis of given criteria’s and
constraints the best idea is to implement the Inclined Slotted Sheet Coin Sorter.
Select an approach
1. Coin Slotted Sheet (The Sorting Portion Take a wooden or any slippery material
sheet and make slots (holes) of various coins having different sizes in order of
increasing sizes. Each hole will be connected with the respective coin chambers.
When a coin is slide on the sheet, then depending upon its size, it will go in the hole
of its respective size and will be drop in the respective coin chamber. This is the
easiest way to place or sort the coins in the chambers.
2. The Monitoring System: The number of coins can be monitored by using 7
segments display modules on the respective chamber. Once we calculate the
number of coins in each chamber, it can be display using a Microcontroller.
Selecting approach of one disc and a straight belt having 3 different sized holes
according to the sizes of coins I ‘ll design my system.
Conclusion:
Objectives
Introduction:
Mathematical Model
To build the simulation model, open Simulink and open a new model window. Then
follow the steps listed below:
Figur2 simulink
11. Add In1 and Out1 blocks from the Simulink/Ports Subsystems library and
respectively label them”Voltage” and ”Speed”.
12. In order to save all of these components as a single subsystem block, first
select all of the blocks, then select Create Subsystem from Selection.
Figure 5 subsystem
1. Open a new Simulink model and insert the following blocks. Resistor, Inductor,
Rotational Damper, Inertia, Rotational Damper, Electromechanical converter and four
Connection Port.
2. Select the components and click CTR+R to rotate components and place them like this.
Parameters:
3. Electromechanical Converter blocks and enter the following parameters and
associated units: Resistance = R [Ohm] Inductance = L [H] Inertia = J [kg*m2] Constant
of Proportionality = K [V/(rad/s)] Damping coefficient = b [N*m/(rad/s)]
4. Enter the following commands at the MATLAB prompt. J = 0.01; b = 0.1; K = 0.01; R
= 1; L = 0.5;
5. Select all of the blocks and right click and select Create Subsystem from selection.
6. Now place the following components on the new window. Current sensor block,
Controlled Voltage Source, Three PS-Simulink blocks, one Simulink PS block, one
solver configuration, Electrical Reference, Ideal Rotational Motion sensor, Mechanical
Rotational Reference block, three Out1 blocks and one In1 block.
Figure 7 simulink-connection
8. Now select all these blocks and press CTRL + G to create a subsystem.
Conclusion:
• In this lab we implement diRerent H-Bridge on proteus using Bjts, Mosfet and
Relay.
• Develop an under standing of Motor driver
• Learn about Bjts and Mosfet
Equipment:
Introduction:
BJTs:
BJT is a semiconductor device that can both conduct and insulate. A transistor can act as
a switch and an amplifier. It converts audio waves into electronic waves and resistor,
controlling electronic current. Transistors have very long life, smaller in size, can
operate on lower voltage supplies for greater safety and required no filament current.
The first transistor was fabricated with germanium. A transistor performs the same
function as a vacuum tube triode, but using semiconductor junctions instead of heated
electrodes in a vacuum chamber. It is the fundamental building block of modern
electronic devices and found everywhere in modern electronic systems.
Figure 9 opto-coupler
Conclusion:
In this lab we have learnt:
1. The working of Transistor, Relay , Mosfet and opto-isolator and how to connect them
to work as an H bridge to drive a motor.
2. What function they can perform with connecting motors.
3. To control motor using Transistor, Relay and Mosfet.
Objectives:
The objective of this lab is to familiarize the students MOSFETs’ operation and
Introduction:
It uses electromagnetism from small voltage to provide higher voltages. It has two basic
contacts i.e. NO (Normally Open) and NC (Normally Closed). When input voltage is
applied across its coil, NC changes to NO and NO changes to NC. When input voltage is
supplied, we say that the relay is energized. It has several features e.g. it can be used for
switching smaller voltage to higher. But it can not be used in power consuming devices.
It has a wide range of applications.
It can be used in home appliances, electronic circuits where there is a need of protection,
robotics for controlling its motors fro the proper motion and many more. As the schematic
shows, terminal1 of motor is connected to Relay1 while terminal2 is connected to Relay2.
Normally the relays are connected so that Relay1 is connected to Power while Relay2 is
connected to the drain of the MOSFET. So, in saturation region of MOSFET Relay2 will
be grounded. Therefore, terminal 1 will be at higher potential than terminal 2 and the
motor will rotate in one direction. But if both relays are activated Relay2 will be connected
to Power while Relay1 will be grounded inverting the potential across the motor so the
motor will start rotating in the other direction.
Brakes can be applied to a DC Motor by shorting both of its terminals. Or brakes are
applied when no voltage is being supplied to the motor.
Figure 10 relay operation
MOSFET H Bridge:
MOSFET is a Voltage controlled device which has a Drain Source and Gate. When
voltage is applied to the gate the MOSFET terminates voltage flow. Similar to
transistor four MOSFETS are connected in an H Bridge to control the direction of the
motor. The four MOSFET are turned ON to determine the direction of the motor.
Conclusion:
In this lab we concluded that a relay can be used as a switch to control the motion of the
motor. Basically from this lab the experienced of operating the relay with motor was
gained and how to reverse the motion of the motor using relay.
LAB# 05
To understand the procedure of interfacing
MATLAB/Simulink with Arduino using
MATLAB/Simulink
Objectives:
Introduction
With MATLAB® Support Package for Arduino® Hardware, you can use MATLAB to
interactively communicate with an Arduino board, as MATLAB is a high level
interpreted language, you can see results from I/O instructions immediately, without
compiling. MATLAB includes thousands of built-in math, engineering, and plotting
functions that you can use to quickly analyze and visualize data collected from your
Arduino. The Arduino Hardware Package enable us to perform:
1. Acquire analog and digital sensor data from your Arduino board.
2. Control other devices with digital and PWM outputs.
3. Drive DC, servo, and stepper motors (also supports Adafruit Motor Shield).
4. Communicate with an Arduino board over a USB cable or wirelessly over WiFi.
5. Build custom add-ons to interface with additional hardware and software libraries.
Methodology:
First, start MATLAB and click the Add-Ons drop down menu. In the drop-down menu
click Get Hardware Support Packages. It will start the package installer window.
In the next window you will see all the available packages for MATLAB and Simulink.
Select the Arduino package, then check all the packages displayed and click Next to
continue installation. Note that this picture is showing that I am reinstalling the
Arduino packages because I had previously installed them.
Next, the installer will ask you to log in to your MathWorks account. If you don’t have an
account, you can create one during installation. Accept the license agreement on the next
screen and continue to download the packages. Now you have to wait for MATLAB to
download and install all the required packages.
Interface Check:
At the end of this lab we were able to connect the MATLAB environment with arduino using the
ADD-IN explorer and downloading the necessary files, after which MATLAB can be used to
code and run any and all arduino devices physically.
Lab#6
Vrep introduction and task performance
Objectives:
The objective of this lab is to familiarize the students with V-rep simulation environment.
Introduction:
V-REP - the Virtual Robot Experimentation Platform - is a 3D robot simulation software, with
integrated development environment, that allows you to model, edit, program and simulate any robot
or robotic system (e.g. sensors, mechanisms, etc.).
It offers a multitude of functionality that can be easily integrated and combined through an
exhaustive API and script functionality. V-REP supports 2 different physics engines (Bullet and
ODE), handling of the inverse/forward kinematics of any type of mechanism, proximity sensor
simulation, camera sensor simulation with many built-in image processing filters, path planning,
minimum mesh-mesh distance calculation, surface cutting simulation, graphing, etc.
V-REP is used for remote monitoring, hardware control, fast prototyping and verification, fast
algorithm development / parameter adjustment, safety double-checking, robotics-related education
or factory automation simulations.
Installation Procedure:
Screenshots:
Figure16 task 1
Figure 17 task 2
Conclusion:
At the end of this lab we were able to simulate different mobile and non-mobile robots in the
Copellia sim V-rep environment. We became familiar with its tools and uses that will help us
better simulate robots in the future.
LAB# 07
Introduction to the sensors
Objectives:
1. To understand different types of sensors and their specifications.
Component Used:
➢ MATLAB Simulink
Introduction:
Sensors are devices that perform input function in a system as they 'sense' the changes
in a quantity. The best example of a sensor is mercury thermometer. A sensor converts
a physical event into an electrical signal, We live in a World of Sensors. You can find
different types of Sensors in our homes, offices, cars etc. working to make our lives
easier by turning on the lights by detecting our presence, adjusting the room
temperature, detect smoke or fire, make us delicious coffee, open garage doors as soon
as our car is near the door and many other tasks.
Our end semester project is Laser Engraver drawing purposes. A low power laser is
going to be mounted on an XY gantry system. The system will include two X axis guide
rails and one Y axis’s. The laser will be mounted on Y axis. Three stepper motors are
going to be used. Two to move across the X axis and one across the y axis using timing
belts
The Only Sensor required for the project were boundary switches to enable the
microcontroller to detect when the plotter has reached the boundaries. So we’re using
simple push switches as boundary sensors
They can determine the presence or absence, passing, positioning, and end of travel of
an object. They were first used to define the limit of travel of an object; hence the name
"Limit Switch
Conclusion:
Objective:
Components:
• Laptop
• MATLAB software with additional Hardware Packages
Pre Lab:
In this lab, I learn about signal processing. As we know singles can be noisy,
too small, non-linear, etc. So, we use this technique to make our single more accurate
for our robot sensor to read and make better decisions. Different steps are use in this
process, such as:
• Protection: The range of the output signals from the transducer may be so high
that it may damage the next unit or element which needs to be protected. So, we
can use a step-down transformer.
• Eliminating the interference: Some disturbances may be associated with the
output signals, which needed to be eliminated by using filters.
• Manipulation of signals: The output signals maybe nonlinear in nature, these need
to be linearized and vice-versa.
DESCRIPTION:
Ultrasonic sensors are used primarily as proximity sensors. They can be found in automobile self-
parking technology and anti-collision safety systems. Ultrasonic sensors are also used in robotic
obstacle detection systems, as well as manufacturing technology. In comparison to infrared (IR)
sensors in proximity sensing applications, ultrasonic sensors are not as susceptible to interference of
smoke, gas, and other airborne particles (though the physical components are still affected by variables
such as heat).
Ultrasonic sensors are also used as level sensors to detect, monitor, and regulate liquid levels in closed
containers (such as vats in chemical factories). Most notably, ultrasonic technology has enabled the
medical industry to produce images of internal organs, identify tumors, and ensure the health of babies
in the womb.
Figure 21 ultrasonic Sensor
1 Vcc The Vcc pin powers the sensor, typically with +5V
2 Trigger Trigger pin is an Input pin. This pin has to be kept high for 10us to initialize measurement by sending
US wave.
3 Echo Echo pin is an Output pin. This pin goes high for a period of time which will be equal to the time
taken for the US wave to return back to the sensor.
Sensor Features:
Objectives:
The objective of this lab is to design and implement the MSD lab project on solidworks.
Introduction:
SOLIDWORKS is used to develop mechatronics systems from beginning to end. At the initial stage,
the software is used for planning, visual ideation, modeling, feasibility assessment, prototyping, and
project management. The software is then used for design and building of mechanical, electrical, and
software elements. Finally, the software can be used for management, including device management,
analytics, data automation, and cloud services.
A sample of the products that are a part of SOLIDWORKS, as described on their website, include:
Circuit Works: an electronic CAD/ECAD translator that enables engineers to create accurate 3D
models of circuit boards.
CAM: an add-on to all versions of SOLIDWORKS CAD that lets you prepare your designs for
manufacturability earlier in the development cycle.
Electrical 3D: enables you to place electrical components and use SOLIDWORKS routing
technology to automatically interconnect electrical design elements within a 3D model. 2D
schematics and 3D models are synchronized bi-directionally in real time so any changes are
automatically updated.
Simulation: uses Finite Element Analysis (FEA) to predict a product’s real-world physical
behavior by virtually testing CAD models.
Visualize: leverage your 3D CAD data to create photo-quality content in the fastest and easiest
way you can–from images to animations, interactive web content, and immersive Virtual Reality.
3D CAD Model of our project:
We designed our model on Solid works 2018. The following figures describe the
Conclusion:
At the end of this lab we were able to implement the working model of our project
inside solidworks and we did the simulation study to calculate the stress/strain trends
all along the mechanical model.
LAB#10
V-REP PROJECT MODEL
Objectives:
The objective of this lab is to design and implement the MSD lab project on V-rep.
Introduction:
V-REP - the Virtual Robot Experimentation Platform - is a 3D robot simulation software,
with integrated development environment, that allows you to model, edit, program and
simulate any robot or robotic system (e.g. sensors, mechanisms, etc.). The simulation
features in this software help us better understand the effects of physical forces on our
system and how the system would react in a real environment.
Methodology:
• For this you will need to define the joints in solidworks window.
• Open V-rep and from “New” open the .URDF file of the project assembly.
Figure 26 vrep-design
Conclusion:
At the end of this lab we were able to implement the solidworks working model of our
project inside v-rep and we applied the calculated torques on both motors to produce the
output motion that resulted in expected orientations about both axes.
LAB# 011
To derive the mathematical model of your
semester project and modeling it in MATLAB using
SIMULINK/SIMSCAPE.
Objectives:
Introduction:
Simscape™ enables you to rapidly create models of physical systems within the
Simulink® environment. You model systems such as electric motors, bridge rectifiers,
hydraulic actuators, and refrigeration systems by assembling fundamental components
into a schematic. The models you create can be placed in subsystems so that you can
reuse them in other models.
The models you build are based on physical connections. To model a mass spring
damper, you simply connect mass, spring, and damper components, and Simscape
determines the system level equations for you. This is much easier than deriving the
equations and implementing them in code or by connecting input-output blocks
Methodology:
Project Diagram:
The below shown window shows the animation window that open up in MATLAB
when you have imported the model. You can play the animation and sets time limits
accordingly, changes made in the block diagram can result in changes in the animation.
Project Results:
The below shown window shows the obtained scope graphs from the MATLAB Simulink
model. Displacement and acceleration/velocity is given w.r.t time
Figure 0.1xcope output
Conclusion:
At the end of this lab we were able to implement the solidworks working model of our
project inside SIMSCAPE and the obtained model gave us keen insights on the
mathematical values and the input output relation of our project.