0% found this document useful (0 votes)
81 views

Scara Robot Arm

Arm

Uploaded by

moatef710
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views

Scara Robot Arm

Arm

Uploaded by

moatef710
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 91

SACARA Robot Arm

Graduation Project

Name ID
Mazen Atef Shaker 1805320

Karim Abdel-Halim Abel-Halim 1803574

Mohamed Atef Hassan 1900555

Super Visor: Dr. Omar Shehata

Faculty of Engineering Ain Shams University

Mechatronics Department
Table of Contents
Introduction .................................................................................................................................................. 5
1.1 Over View ...................................................................................................................................... 6
1.1.1 Fields of using robotic arm .................................................................................................... 6
1.1.2 Specific tasks of robotic arm ................................................................................................. 7
1.2 Types of robotic arms ......................................................................................................................... 7
1.2.1 Cartesian Robotic Arms................................................................................................................ 7
1.2.2 Cylindrical Robotic Arms .............................................................................................................. 8
1.2.3 Spherical Robotic Arms ................................................................................................................ 8
1.2.4 SCARA Robotic Arms .................................................................................................................... 8
Objectives & Methodology ........................................................................................................................... 9
2.1 Problem statement ........................................................................................................................... 10
2.2 Objectives.......................................................................................................................................... 10
2.3 Spics .................................................................................................................................................. 10
2.4 Needs ................................................................................................................................................ 11
2.5 Methodology..................................................................................................................................... 12
2.5 Software tools ................................................................................................................................... 14
2.5.1 CAD............................................................................................................................................. 14
2.5.2 Simulation .................................................................................................................................. 14
2.5.3 Programming Languages ............................................................................................................ 14
2.4 Expected outcomes ........................................................................................................................... 15
Mechanical design ...................................................................................................................................... 16
3.1 Overview ........................................................................................................................................... 17
3.2 First Joint ........................................................................................................................................... 18
3.3 Second joint ...................................................................................................................................... 19
3.5 Joint 3 ................................................................................................................................................ 19
3.6 The End Effector................................................................................................................................ 20
3.4 Robot Integration .............................................................................................................................. 21
Electrical design .......................................................................................................................................... 23
4.1 Electronic components ..................................................................................................................... 24
4.1.1 Arduino UNO .............................................................................................................................. 24
4.1.2 Stepper Motor – NEMA 17......................................................................................................... 24
4.1.3 CNC Shield .................................................................................................................................. 25

1|Page
4.1.4 A4988 Stepper Driver ................................................................................................................. 26
4.1.5 DC Power Supply ........................................................................................................................ 26
4.1.6 Servo Motor ............................................................................................................................... 27
4.1.7 Limit switch ................................................................................................................................ 27
4.2 Electrical circuit ................................................................................................................................. 28
4.3 Wiring ................................................................................................................................................ 28
Kinematics ................................................................................................................................................... 29
5.1 Forward Kinematics .......................................................................................................................... 30
5.2 Inverse Kinematics ............................................................................................................................ 32
Modeling & Simulation ............................................................................................................................... 35
6.1 Overview ..................................................................................................................................... 36
6.1.1 Objectives of Robot Simulation ................................................................................................. 36
6.1.2 Simulation Benefits .................................................................................................................... 37
6.2 MATLAB Simulation .................................................................................................................... 38
6.2.1 MATLAB overview ...................................................................................................................... 38
6.2.2 Simulation Steps......................................................................................................................... 40
6.2.2.8 Simulation Results ................................................................................................................... 46
6.3 ROS Simulation............................................................................................................................ 47
6.3.1 ROS Overview............................................................................................................................. 47
6.3.2 ROS Simulation benefits............................................................................................................. 47
6.3.3 The key features of the ROS....................................................................................................... 49
6.3.4 Rviz ............................................................................................................................................. 49
6.3.5 MoveIt ........................................................................................................................................ 51
6.3.6 Gazebo ....................................................................................................................................... 54
6.3.7 Simulation Steps......................................................................................................................... 56
6.3.8 Conclusion .................................................................................................................................. 65
System Overall Control ............................................................................................................................... 66
Cost Sheet ................................................................................................................................................... 69
Conclusion & limitations ............................................................................................................................. 72
9.1 Conclusion ......................................................................................................................................... 73
9.2 Limitations......................................................................................................................................... 73
Results and testing ...................................................................................................................................... 74
References .................................................................................................................................................. 76

2|Page
Appendices.................................................................................................................................................. 78
9.1 Drawings ........................................................................................................................................... 79
9.2 Codes........................................................................................................................................... 89
9.2.1 Python UI Code .......................................................................................................................... 89
9.2.1 Python Code for the listener node............................................................................................. 89
9..2.3 Arduino Code ............................................................................................................................ 90

Table of Figures
Figure 1. Cartesian Robotic Arms ..................................................................................................................................... 7
Figure 2. Cylindrical Robotic Arms .................................................................................................................................. 8
Figure 3. Spherical Robotic Arms...................................................................................................................................... 8
Figure 4 SCARA......................................................................................................................................................................... 8
Figure 5. Methodology ......................................................................................................................................................... 13
Figure 6. Mechanical design .............................................................................................................................................. 17
Figure 7. joint1........................................................................................................................................................................ 18
Figure 8. joint2........................................................................................................................................................................ 19
Figure 9. joint3........................................................................................................................................................................ 19
Figure 10. Gripper ................................................................................................................................................................. 20
Figure 11. Arduino ................................................................................................................................................................ 24
Figure 12. Nema17 ................................................................................................................................................................ 24
Figure 13. CNC shield ........................................................................................................................................................... 25
Figure 14. stepper driver.................................................................................................................................................... 26
Figure 15. power supply ..................................................................................................................................................... 26
Figure 16. servo ...................................................................................................................................................................... 27
Figure 17. limit switch ......................................................................................................................................................... 27
Figure 18. electrical circuit ................................................................................................................................................ 28
Figure 19. wiring.................................................................................................................................................................... 28
Figure 20. simple design ..................................................................................................................................................... 40
Figure 21. simscape model ............................................................................................................................................... 41
Figure 22. Matlab simulation ............................................................................................................................................ 41

3|Page
Figure 23. trajectory ............................................................................................................................................................. 42
Figure 24. inverse .................................................................................................................................................................. 43
Figure 25. forward ................................................................................................................................................................ 44
Figure 26. Mtalab full Model ............................................................................................................................................. 45
Figure 27. desired trajectory ............................................................................................................................................ 46
Figure 28. Actual result ....................................................................................................................................................... 46
Figure 29. ROS......................................................................................................................................................................... 47
Figure 30. URDF ..................................................................................................................................................................... 56
Figure 31. URDF editting .................................................................................................................................................... 57
Figure 32. Moveit ................................................................................................................................................................... 58
Figure 33. UI ............................................................................................................................................................................ 63
Figure 34. Rviz ........................................................................................................................................................................ 64

4|Page
CHAPTER1

Introduction

5|Page
1.1 Over View

Robotic arms are highly versatile, and can be designed and utilized for a number of different
purposes. As already noted, the primary purpose of a robotic arm is to automate what we
generally consider to be repetitive tasks, ensuring that they’re a popular mechanical addition to
production lines and manufacturing robots processes. Industrial robotic arms are also incredibly
precise, so they’re perfectly suited for tasks that also require a high degree of accuracy and
consistency.

Industrial robotic arms can be kitted out with a number of different tools and pieces of
mechanical equipment and, as such, they can be used across many different industries. They can
also be involved in different stages of production, from the design stage of products through to
the manufacturing, testing, packing and inspection stages.

Their purpose is never limited to one single function, and they can be reused, re-equipped,
redesigned and recycled to meet different demands throughout their lifespan.

1.1.1 Fields of using robotic arm

• Agriculture
• Aerospace
• Automobile
• Design
• Manufacturing
• Pharmaceuticals
• Tech and computing

Within these different industries, an industrial robotic arm may be programmed to


perform a variety of different tasks. Tasks that require lots of repetition or precision are
well suited to be conducted by a robotic arm, and they can be used for purposes as diverse
as welding, picking, packaging, labelling and painting.

6|Page
1.1.2 Specific tasks of robotic arm

• Welding together metals


• Material handling tasks
• Cutting or slicing materials
• Assembling parts or components
• Picking products from conveyor belts
• Picking and packing items into boxes
• Placing labels on to boxes
• Painting products and items
• Placing boxes on to pallets
• Inspecting and testing products as part of quality control

Industrial robotic arms have a range of different functions, with their primary purpose being to
automate tasks that would otherwise need to be performed manually, by humans. As well as the
above purposes, industrial robotic arms have the capacity to complete many more industrial tasks
that require or benefit from efficiency, accuracy, and automation. As technology continually
improves, the potential scope and number of uses for robotic arms is continually growing too.

1.2 Types of robotic arms

There are a variety of different types of industrial robotic arms produced by manufacturers
worldwide. While they're all highly customizable, different designs generally follow four
primary concepts, each of which is best suited to particular functions. These four primary types
of industrial robotic arms are:

1.2.1 Cartesian Robotic Arms

Cartesian robotic arms work on Cartesian principles, meaning


their movements are based on an X, Y or Z-axis.
A Cartesian robot, therefore, consists of at least three mechanical parts, and
they are commonly used to pick and pack-objects from or on to conveyor
belts, or for design and production work such as 3D printing.
Figure 1. Cartesian
Robotic Arms

7|Page
1.2.2 Cylindrical Robotic Arms

Cylindrical robotic arms work on a simple cylindrical basis, which


means they can move up and down, as well as left or right. Keeping
within this cylindrical shape, these robotic arms are often used for
assembly and manufacturing. They are often shaped similarly to human
arms and consist of several jointed sections and a particular tool, such as
a welder or a drill for example.

Figure 2.
Cylindrical Robotic
Arms

1.2.3 Spherical Robotic Arms

Spherical robotic arms are very similar to cylindrical robotic arms,


but with the useful addition of a twisting joint that allows for greater
movement and control. Spherical robotic arms are used for many
similar tasks as cylindrical robotic arms, including manufacturing,
construction and assembly functions.
Figure 3. Spherical Robotic
Arms

1.2.4 SCARA Robotic Arms

SCARA robotic arms are commonly used for assembly tasks, as they are incredibly precise when
it comes to picking and selecting components and parts. SCARA stands for Selective
Compliance Assembly Robot Arm, and they work on a number of different axes, allowing for
greater flexibility of movement.

Figure 4 SCARA

8|Page
CHAPTER 2

Objectives & Methodology

9|Page
2.1 Problem statement

The manufacturing industry constantly seeks automation solutions to enhance productivity


and precision. One common task in manufacturing is the repetitive pick-and-place operation,
where objects are moved from one location to another. Traditional manual methods are slow,
error-prone, and can lead to repetitive strain injuries for workers. Therefore, there is a need for
an automated solution that can perform these tasks efficiently and accurately. This project aims
to design and develop a SCARA robot arm capable of executing pick-and-place operations to
improve efficiency, accuracy, and safety in a manufacturing environment.

2.2 Objectives

• Design and Develop: To design and construct a SCARA robot arm using four stepper
motors that can perform precise pick-and-place operations.
• Accuracy and Precision: To ensure the robot arm can pick and place objects with high
accuracy and repeatability.
• Control System: To develop a robust control system for managing the movements of the
robot arm.
• User Interface: To create a user-friendly interface for easy control and programming of
the robot arm.
• Testing and Validation: To rigorously test the robot arm in various scenarios to validate
its performance and reliability.

2.3 Spics

• Degrees of Freedom (DOF): 4 degrees of freedom.

• Reach: Maximum horizontal reach =432 mm & Maximum vertical reach =400 mm

• Payload Capacity:

• Speed: Maximum speed of the arm’s movements, both linear and rotational.

10 | P a g e
• Work Envelope: x=y=510mm z=470mm

2.4 Needs

1. Motor Control Algorithms: Developing and implementing efficient motor control


algorithms that generate accurate and repeatable movements for each joint of the SCARA
robot without relying on feedback sensors.

2. Kinematic Modeling: Establishing a comprehensive kinematic model for the SCARA


robot, allowing for precise calculation of joint angles and end-effector positions based on
the motor commands.

3. Dynamic Analysis: Conducting dynamic analysis to understand the impact of external


forces on the robot's performance and optimizing control strategies to compensate for
these effects.

4. Trajectory Generation: Design algorithms for generating smooth and efficient


trajectories for the robot's movements, considering the limitations of open-loop control.

5. Calibration Procedures: Developing calibration procedures to minimize errors and


inaccuracies in the open-loop control system, ensuring the robot's movements align with
the desired positions.

6. Performance Metrics: Define metrics for evaluating the performance of the open-loop
control system, such as positional accuracy, repeatability, and response time.

11 | P a g e
2.5 Methodology

1. Research and Planning:


• Conducting a literature review on SCARA robots and existing pick-and-place systems.
• Define the specifications and requirements for the robot arm.

2. Design:
• Mechanical Design: Create CAD models and drawings of the robot arm structure.
• Electrical Design: Develop wiring diagrams for the motors, drivers, and microcontroller.
• Software Design: Plan the control algorithms and user interface layout.

3. Development:
• Mechanical Assembly: Construct the physical components of the robot arm.
• Electronics Integration: Wire the motors, drivers, sensors, and microcontroller.
• Software Programming: Write the control software and user interface.

4. Calibration and Testing:


• Calibrate the motors and sensors to ensure accurate movement.
• Conduct tests to measure the performance and accuracy of the robot arm.

5. Evaluation:
• Analysing the test results to verify that the objectives are met.
• Identification and troubleshoot any issues that arise during testing.

6. Documentation:
• Documenting the design process, development steps, and testing results.
• Preparing the final report with all findings and conclusions.

12 | P a g e
Figure 5. Methodology

13 | P a g e
2.5 Software tools

2.5.1 CAD

Use Computer-Aided Design (CAD) software (e.g., SolidWorks, Autodesk Inventor) for
designing and modeling the robot's mechanical components.

2.5.2 Simulation

Employ simulation tools (e.g., MATLAB, Simulink, ROS) to model and simulate the robot's
movements before physical implementation.

2.5.3 Programming Languages

Choose a programming language (e.g., C++, Python) to develop the control software for the
robot.

14 | P a g e
2.4 Expected outcomes

1. Proof of Concept: Demonstrate the feasibility of open-loop control for a SCARA robot by
accurately executing predefined movements and tasks.

2. Optimized Motor Commands: Achieve efficient and optimized motor commands that
result in accurate and repeatable robot movements.

3. Understanding Limitations: Gain insights into the limitations of open-loop control,


particularly in scenarios with external disturbances or changes in the robot's environment.

4. Trajectory Accuracy: Showcase the ability of the SCARA robot to follow predefined
trajectories with minimal deviation, emphasizing the accuracy of open-loop control.

5. Documentation of Findings: Provide a detailed analysis of the project's findings, including


the strengths and weaknesses.

15 | P a g e
CHAPTER 3

Mechanical design

16 | P a g e
3.1 Overview

Figure 6. Mechanical design

The robot has 4 degrees of freedom and it’s driven by 4 NEMA 17 stepper motors. Additionally, it
has a small servo motor for controlling the end effector or the robot gripper in this case. The brain
of this SCARA robot is an Arduino UNO board which is paired with a CNC shield and four A4988
stepper drivers for controlling the stepper motors.

17 | P a g e
3.2 First Joint

Figure 7. joint1

For the first joint, we have 20:1 reduction ratio, achieved in two stages with these custom
designed pulleys. The two GT2 belts I use here are closed loop with 200mm and 300mm length.
The robot joints are composed of two thrust bearings and one radial bearing.

18 | P a g e
3.3 Second joint

Figure 8. joint2

For the second joint, we have 16:1 reduction ratio, achieved in the same way, and the third joint
has 4:1 reduction ratio with just a single stage reduction. The joints are hollow, so we can use
that to passthrough the wires from the motors and the micro switches. For each of the belts, there
are slots on which we can attach idler pulleys for tensioning them.

3.5 Joint 3

Prismatic Joint gives the robot the


ability to move along the z-axis

Figure 9. joint3

19 | P a g e
3.6 The End Effector

Figure 10. Gripper

The robot gripper is driven by an MG996R servo.

20 | P a g e
3.4 Robot Integration

21 | P a g e
22 | P a g e
CHAPTER 4

Electrical design

23 | P a g e
4.1 Electronic components

4.1.1 Arduino UNO

Using an Arduino UNO for controlling and coordinating the movements of the robot, the CNC
shield is plugged onto the Arduino and on top of it is the A4988n drivers and is used as a driver
expansion board.

Figure 11. Arduino

4.1.2 Stepper Motor – NEMA 17

The NEMA 17 stepper motor is a popular type of stepper motor commonly used in various
applications, including 3D printers, CNC machines, robotics, and other precision motion control
systems. NEMA stands for the National Electrical Manufacturers Association, and "17" refers to
the size of the motor faceplate (42mm x 42mm).

Figure 12. Nema17

24 | P a g e
4.1.3 CNC Shield

A CNC shield is commonly used in the context of controlling stepper motors for CNC machines,
3D printers, and robotic arms. When applied to a Degree of Freedom (DOF) SCARA (Selective
Compliance Assembly Robot Arm), the CNC shield can serve as an integral part of the control
system.

Figure 13. CNC shield

25 | P a g e
4.1.4 A4988 Stepper Driver

The A4988 is a complete micro stepping motor driver with built-in translator for easy operation.
It is designed to operate bipolar stepper motors in full-, half-, quarter-, eighth-, and sixteenth-step
modes, with an output drive capacity of up to 35 V and ±2 A.

Figure 14. stepper driver

4.1.5 DC Power Supply

The DC power supply plays a crucial role in powering and controlling different elements of the
robot

Figure 15. power supply

26 | P a g e
4.1.6 Servo Motor

Gives the movement to the end effector

Figure 16. servo

4.1.7 Limit switch

Limit switches are commonly used to provide position feedback and implement safety features.

Figure 17. limit switch

27 | P a g e
4.2 Electrical circuit

Figure 18. electrical circuit

4.3 Wiring

Figure 19. wiring

28 | P a g e
CHAPTER 5

Kinematics

29 | P a g e
5.1 Forward Kinematics

Assign coordinate frames: Assign a coordinate frame to each joint. Typically, this is done using
the Denavit-Hartenberg parameters (a, alpha, d, theta).

• a: Distance along the common normal between the Oi−1 and Oi axes.
• α: Angle about the xi−1 axis from zi−1 to zi.
• d: Distance along zi−1 to the common normal.
• θ: Angle about zi−1 from xi−1 to xi.

i i di ai αi
1 1 L1 0 0
2 90 D2 0 90
3 3 L3 0 0
H 4 L4 0 0

30 | P a g e
𝐶𝑖 −𝐶ᾳ𝑖 𝑆𝑖 𝑆ᾳ𝑖 𝑆𝑖 𝑎𝑖 𝐶𝑖
𝑆𝑖 𝐶ᾳ𝑖 𝐶𝑖 −𝑆ᾳ𝑖 𝐶𝑖 𝑎𝑖 𝑆𝑖
𝑜𝐴4 =[ ]
0 𝑆ᾳ𝑖 𝐶ᾳ𝑖 𝑑𝑖
0 0 0 1

𝐶1 − 𝑆1 0 0 0 0 1 0
𝑆1 𝐶1 0 0 1 0 0 0
𝑜𝐴1 =[ ] 1𝐴2 =[ ]
0 0 1 𝑑1 0 1 0 𝑑1/2
0 0 0 1 0 0 0 1

𝐶3 − 𝑆3 0 0 𝐶4 − 𝑆4 0 0


𝑆3 𝐶3 0 0 𝑆4 𝐶4 0 0
2𝐴3 =[ ] 3𝐴𝐻 =[ ]
0 0 1 𝐿2 0 0 1 𝐿3
0 0 0 1 0 0 0 1

𝑛 𝑜 𝑎 𝑝
𝑜𝑇4=𝐴1∗𝐴2∗𝐴3∗𝐴4 0𝑇4 = [
0 0 0 1
]

31 | P a g e
5.2 Inverse Kinematics

𝑨−𝟏
𝟏 ∗ 𝒐𝑻𝟒 = 𝑨𝟐 ∗ 𝑨𝟑 ∗ 𝑨𝟒

𝐶1 𝑆1 0 0 𝑛𝑥 𝑜𝑥 𝑎𝑥 𝑝𝑥
=[−𝑆1 𝐶1 0 0 𝑛 𝑜𝑦 𝑎𝑦 𝑝𝑦
][ 𝑦 ]
0 0 1 −𝑑1 𝑛𝑧 𝑜𝑧 𝑎𝑧 𝑝𝑧
0 0 0 1 0 0 0 1

𝐶3 − 𝑆3 0 0 𝐶4 − 𝑆4 0 0 𝐶1 𝑆1 0 0 𝑛𝑥 𝑜𝑥 𝑎𝑥 𝑝𝑥


𝑆3 𝐶3 0 0 𝑆4 𝐶4 0 0 −𝑆1 𝐶1 0 0 𝑛 𝑜𝑦 𝑎𝑦 𝑝𝑦
=[ ][ ][ ][ 𝑦 ]
0 0 1 𝐿2 0 0 1 𝐿3 0 0 1 −𝑑1 𝑛𝑧 𝑜𝑧 𝑎𝑧 𝑝𝑧
0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
0 0 1 𝐿2 + 𝐿3
𝐶𝜃3𝐶4 − 𝑆𝜃3𝑆𝜃4 −𝐶3𝑆𝜃4 − 𝑆𝜃3𝐶𝜃4 0 0
=[ ]
𝑆𝜃3𝐶𝜃4 + 𝐶𝜃3𝑆𝜃4 −𝑆𝜃3𝑆𝜃4 + 𝐶𝜃3𝐶𝜃4 0 𝑑/2
0 0 0 1
by multiplying row 2 by column 3 we get value 0 so we get :
𝑎𝑦
−𝑆𝜃1 ∗ 𝑎𝑥 + 𝐶𝜃1 ∗ 𝑎𝑦 = 0 , 𝑞1 = tan−1 ( )
𝑎𝑥

32 | P a g e
𝑨−𝟏 −𝟏
𝟐 ∗ 𝑨𝟏 ∗ 𝒐𝑻𝟒 = 𝑨𝟑 ∗ 𝑨𝟒

0 1 0 0 𝐶 1 𝑆1 0 0 𝑛𝑥 𝑜𝑥 𝑎𝑥 𝑝𝑥
0 0 1 −𝑑/2 −𝑆1 𝐶1 0 0 𝑛𝑦 𝑜𝑦 𝑎𝑦 𝑝𝑦
[ ][ ][ ]
1 0 0 0 0 0 1 −𝑑1 𝑛𝑧 𝑜𝑧 𝑎𝑧 𝑝𝑧
0 0 0 1 0 0 0 1 0 0 0 1

𝐶3 − 𝑆3 0 0 𝐶4 − 𝑆4 0 0


𝑆3 𝐶3 0 0 𝑆4 𝐶4 0 0
=[ ][ ]
0 0 1 𝐿2 0 0 1 𝐿3
0 0 0 1 0 0 0 1

−𝑆1 𝐶1 0 0 𝑛𝑥 𝑜𝑥 𝑎𝑥 𝑝𝑥
0 0 1 −𝑑/2 − 𝑑1 𝑛𝑦 𝑜𝑦 𝑎𝑦 𝑝𝑦
[ ][ ]
𝐶1 0 𝑆1 0 𝑛𝑧 𝑜𝑧 𝑎𝑧 𝑝𝑧
0 0 0 1 0 0 0 1

➢ by multiplying row 2 by column 4 we get value 0 so we get :


𝑝𝑦
𝑝𝑦 + 𝑝𝑧 (−𝑑1/2 − 𝑑1) = 0 , 𝑑/2 = − 𝐿1
𝑝𝑧

33 | P a g e
𝑨−𝟏 −𝟏 −𝟏
𝟑 ∗ 𝑨𝟐 ∗ 𝑨𝟏 ∗ 𝒐𝑻𝟒 = 𝑨𝟒

𝐶3 − 𝑆3 0 0 −𝑆1 𝐶1 0 0 𝑛𝑥 𝑜𝑥 𝑎𝑥 𝑝𝑥


𝑆3 𝐶3 0 0 0 0 1 −𝑑/2 − 𝑑1 𝑛𝑦 𝑜𝑦 𝑎𝑦 𝑝𝑦
[ ][ ][ ]
0 0 1 𝐿2 𝐶1 0 𝑆1 0 𝑛𝑧 𝑜𝑧 𝑎𝑧 𝑝𝑧
0 0 0 1 0 0 0 1 0 0 0 1

𝐶4 − 𝑆4 0 0
𝑆4 𝐶4 0 0
=[ ]
0 0 1 𝐿3
0 0 0 1
−𝐶3𝑆1 𝐶3𝐶1 −𝑆3 𝑆3(𝑑/2 + 𝑑1) 𝑛𝑥 𝑜𝑥 𝑎𝑥 𝑝𝑥
−𝑆3𝑆1 𝑆3𝐶1 𝐶3 𝐶3(−𝑑/2 − 𝑑1) 𝑛𝑦 𝑜𝑦 𝑎𝑦 𝑝𝑦
[ ][ ]
𝐶1 0 𝑆1 𝐿3 𝑛𝑧 𝑜𝑧 𝑎𝑧 𝑝𝑧
0 0 0 1 0 0 0 1

𝐶4 − 𝑆4 0 0
𝑆4 𝐶4 0 0
=[ ]
0 0 1 𝐿3
0 0 0 1

➢ by multiplying row 1 by column 3 we get value 0 so we get:

𝐶3𝐶1𝑎𝑌 − 𝐶3𝑆1𝑎𝑥 − 𝑆3𝑎𝑍 = 0,

𝐶1𝑎𝑌 − 𝑆1𝑎𝑥
𝑞3 = tan−1 ( ),
𝑎𝑍

➢ by multiplying row 1 by column 1 we get value 𝑪𝜽𝟒 so we get:

𝐶𝜃4 = 𝐶3𝐶1𝑛𝑦 − 𝐶3𝑆1𝑛𝑥 − 𝑆3𝑛𝑧 ,

𝑞4 = cos −1 ( 𝐶3𝐶1𝑛𝑦 − 𝐶3𝑆1𝑛𝑥 − 𝑆3𝑛𝑧 )

So we get that the four equations describing the sacra robot inverse kinematics can
be written as:
𝑎𝑦 𝐶1𝑎𝑌 −𝑆1𝑎𝑥
𝑞1 = tan−1 ( 𝑎 ) 𝑞3 = tan−1 ( )
𝑥 𝑎𝑍

𝑝𝑦
𝑑2 = − 𝐿1 𝑞4 = cos −1 ( 𝐶3𝐶1𝑛𝑦 − 𝐶3𝑆1𝑛𝑥 − 𝑆3𝑛𝑧 )
𝑝𝑧

34 | P a g e
CHAPTER 6

Modeling & Simulation

35 | P a g e
6.1 Overview

6.1.1 Objectives of Robot Simulation

The objectives of simulating the SACRA robot are multifaceted, focusing on both educational and
practical outcomes.

6.1.1.1 Educational Objectives

• Understanding Robot Kinematics and Dynamics: The simulation helps in


comprehending the fundamental concepts of robot kinematics (both forward and inverse)
and dynamics, which are crucial for designing and controlling robots.

• Learning Control Algorithms: It provides a platform to implement and test various control
algorithms such as PID, MPC, and robust control, facilitating a deeper understanding of
control theory.

• Developing Simulation Skills: Students and researchers can develop and refine their skills
in using MATLAB and Simulink for modeling and simulation purposes.

6.1.1.2 Practical Objectives

• Design Validation: Simulations allow for the validation of robot designs before physical
prototypes are built, saving time and resources.

• Performance Analysis: They enable detailed analysis of robot performance under different
scenarios, helping in optimizing design parameters and control strategies.

• Safety Testing: Simulations provide a safe environment to test robot behaviors in various
situations, including failure modes, without risking damage to actual hardware or human
injury.

• Algorithm Development and Testing: New control algorithms and strategies can be
developed and tested in a simulated environment before being implemented in real robots.

36 | P a g e
6.1.2 Simulation Benefits

Simulating offers numerous benefits, enhancing both the design and operational phases of robotic
systems.

1. Cost Efficiency

• Reduced Development Costs: By identifying and resolving design issues early in the
development process, simulations can significantly reduce the cost of building and testing
physical prototypes.

• Resource Optimization: Simulations allow for efficient use of resources by minimizing the
need for physical testing and reducing material waste.

2. Risk Mitigation

• Safe Testing Environment: Simulations provide a risk-free environment for testing robot
behaviors and control algorithms, preventing potential damage to expensive equipment and
avoiding safety hazards.

• Failure Mode Analysis: They enable thorough analysis of different failure modes and the
development of strategies to mitigate these risks.

3. Time Savings

• Accelerated Development Cycles: Simulations can speed up the development cycle by


allowing for rapid prototyping and iterative testing.

• Real-Time Feedback: Immediate feedback from simulations helps in quickly identifying


and correcting errors, leading to faster iterations and improvements.

4. Enhanced Design Flexibility

• Design Iteration: Simulations allow for easy modifications and iterations of the robot
design, facilitating exploration of various configurations and their impacts on performance.

• Customization: They enable the customization of robot models and control strategies to
meet specific application requirements.

5. Improved Performance and Efficiency

• Optimization: Simulations allow for the optimization of robot parameters and control
strategies, leading to improved performance and efficiency in real-world applications.

• Predictive Maintenance: By analyzing simulation data, predictive maintenance schedules


can be developed, reducing downtime and extending the lifespan of the robot.

37 | P a g e
6.2 MATLAB Simulation

6.2.1 MATLAB overview

➢ MATLAB: A high-level language and interactive environment for numerical computation,


visualization, and programming.

➢ Simulink: A block diagram environment for multidomain simulation and Model-Based


Design.

The MATLAB simulation provides:

1. Comprehensive Modeling and Simulation

• MATLAB and Simulink provide extensive tools for modeling the kinematics and
dynamics of the SCARA robot arm.

• Users can create detailed models of the robot's mechanical structure, actuators,
sensors, and control systems.

2. Advanced Algorithm Development

• MATLAB offers a rich set of toolboxes for developing advanced algorithms, including
control algorithms, machine learning, and optimization.

• Simulink allows for the simulation of these algorithms in a dynamic environment,


facilitating the testing and tuning of control strategies.

3. Control System Design

• Simulink supports the design and simulation of various control systems, such as PID,
adaptive, and model predictive controllers.

• Control System Toolbox in MATLAB provides tools for designing, analyzing, and
tuning control systems, ensuring precise control of the SCARA robot.

4. Kinematic and Dynamic Analysis

38 | P a g e
• MATLAB’s Robotics System Toolbox provides functions for kinematic and dynamic
analysis, including forward and inverse kinematics, dynamics, and trajectory
generation.

• Simulink can simulate the robot’s response to different inputs and control strategies,
helping in understanding its behavior under various conditions.

5. Integration with Hardware

• MATLAB and Simulink support real-time simulation and testing, allowing integration
with hardware-in-the-loop (HIL) systems.

• This facilitates seamless transition from simulation to physical implementation,


ensuring that the developed algorithms work correctly on the actual SCARA robot.

6. Visualization and Animation

• MATLAB provides powerful visualization tools for plotting and animating the robot’s
motion, trajectories, and sensor data.

• Simulink 3D Animation allows for the creation of virtual reality models and
animations, providing a clear view of the robot’s operation in a simulated
environment.

7. Data Analysis and Optimization

• MATLAB’s data analysis capabilities enable the processing and analysis of simulation
data, helping in identifying performance issues and optimizing the robot’s operation.

• Optimization Toolbox and Global Optimization Toolbox provide tools for parameter
tuning and optimizing the robot’s performance.

8. Extensive Documentation and Support

• MATLAB and Simulink come with extensive documentation, examples, and a large
user community, offering valuable resources for troubleshooting and development.

• MathWorks provides technical support and training, helping users to leverage the
full potential of MATLAB and Simulink.

9. Co-Simulation with Other Tools

• MATLAB and Simulink can co-simulate with other software, such as ROS and Gazebo,
enabling the integration of MATLAB’s advanced algorithms with ROS-based robotic
systems.

• This interoperability enhances the development process by combining the strengths


of different simulation tools.

39 | P a g e
6.2.2 Simulation Steps

6.2.2.1 Simple design suitable for the simulation

When designing a simulation, it's essential to start with a simplified model of the robot that
includes the key components and joints. This initial design helps in understanding the basic
movements and control strategies.

• Robot Configuration: Describe the basic configuration of the robot, including the number
of joints, types of joints (rotational or prismatic), and the degrees of freedom.

• Kinematic Chain: Explain the concept of the kinematic chain and how the links and joints
are connected to form the robot structure.

Figure 20. simple design

40 | P a g e
6.2.2.2 Import the CAD using simscape multiple body link

Importing the CAD model involves converting the CAD files into a format compatible with MATLAB
and Simscape Multibody. This process allows for accurate representation of the robot's geometry
and physical properties.

• CAD File Preparation: Steps to export the CAD model from software like SolidWorks or
Autodesk Inventor.

• Import Process: Detailed instructions on importing the CAD model into MATLAB using
Simscape Multibody Link.

Figure 21. simscape model

Figure 22. Matlab simulation

41 | P a g e
6.2.2.3 Define the Desired Trajectory Function

A desired trajectory function specifies the path the robot's end-effector should follow. This can be
defined using various mathematical functions or by specifying waypoints.

• Mathematical Trajectories: Using functions like sine, cosine, or polynomial equations to


define trajectories.

• Waypoint Trajectories: Defining a series of waypoints that the end-effector must pass
through.

Figure 23. trajectory

42 | P a g e
6.2.2.4 Define the Inverse Kinematics Function

Inverse kinematics (IK) calculates the required joint angles to achieve a specific end-effector
position. MATLAB provides several tools and functions to solve IK problems.

• Analytical IK: Using geometric methods to derive closed-form solutions for simple robots.

• Numerical IK: Using optimization techniques to solve IK for more complex robots.

Figure 24. inverse

43 | P a g e
6.2.2.5 Define the Forward Kinematics Function

Forward kinematics (FK) calculates the end-effector position based on given joint angles. This
function is crucial for validating the robot's movements and ensuring the accuracy of the IK
function.

• FK Calculation: Using the robot's kinematic chain to compute the position and orientation
of the end-effector.

Figure 25. forward

44 | P a g e
6.2.2.6 Control Algorithm

Implementing a control algorithm, such as a PID controller, ensures that the robot's joints follow
the desired trajectories accurately.

• PID Controller Design: Design and tune PID controllers for each joint to achieve stable and
accurate motion.

• PID controllers is defined for each joint. Typically, each joint in the robot will have its own
controller.

• Set up a simulation loop to apply the PID control and visualize the robot’s response.

Figure 26. Mtalab full Model

6.2.2.7 Calibration

Calibration involves comparing the desired trajectory with the actual output and adjusting the
control parameters to minimize errors.

• Trajectory Comparison: Visualize and compare the desired and actual trajectories.

• PID Tuning: Adjust the PID gains to achieve the best fit between the desired and actual
movements.

45 | P a g e
6.2.2.8 Simulation Results

Figure 27. desired trajectory

Figure 28. Actual result

46 | P a g e
6.3 ROS Simulation

6.3.1 ROS Overview

ROS stands for robot operating system but it's not a standalone operating system as it goes on top
of ubuntu linux. ROS has simplified the process of creating and writing robot software.

ROS works on Linux Ubuntu or Linux Debian.

Figure 29. ROS

6.3.2 ROS Simulation benefits

Using ROS (Robot Operating System) for simulating the robot has several advantages, making it a
valuable tool in the development and testing of robotic systems.

Using ROS Simulation provides:

1. Modularity and Flexibility

• ROS provides a modular framework that allows for the integration of different
packages and tools, facilitating a flexible development environment.

• It supports various simulation tools such as Gazebo, which can be used to create and
test complex robotic models and environments.

2. Community and Support

47 | P a g e
• ROS has a large and active community, offering extensive documentation, tutorials,
and support forums, making it easier to troubleshoot and find resources.

• A wealth of pre-built packages and libraries are available for common robotic
functions, reducing development time.

3. Realistic Simulation

• ROS, in combination with Gazebo, provides high-fidelity simulations with accurate


physics and sensor models, enabling realistic testing of robotic behaviors.

• It supports the simulation of dynamic environments and interactions, which are


crucial for validating robot performance under various conditions.

4. Integration with Other Tools

• ROS can easily integrate with other simulation and development tools, such as
MATLAB and Simulink, allowing for comprehensive analysis and control system
development.

• It supports communication with hardware interfaces, enabling seamless transition


from simulation to real-world implementation.

5. Control and Planning Algorithms

• ROS offers a wide range of ready-to-use control and planning algorithms, which can
be directly applied to the SCARA robot for tasks such as motion planning, trajectory
generation, and inverse kinematics.

• It allows for the customization and optimization of these algorithms to meet specific
project requirements.

6. Visualization

• ROS provides powerful visualization tools like RViz, which help in monitoring and
debugging the robot’s state, sensor data, and planned trajectories in real-time.

• These tools enhance understanding of the robot's behavior and facilitate rapid
iteration and improvement of the control strategies.

7. Scalability

• ROS is designed to scale from single robot systems to large multi-robot setups,
making it suitable for both small projects and large-scale industrial applications.

• This scalability ensures that the same simulation framework can be used as the
project grows in complexity.

48 | P a g e
6.3.3 The key features of the ROS

• The ability to reuse the code and modify its parameters if needed to be used over another
robots

• ROS provide a wide range of libraries and tools that helps in monitoring and debugging the
robot like gazebo and Rviz for simulation

• ROS community: ROS has wide and active community that contributes with different a vast
array of modules and packages that extend and widen the functionality of the ROS and
might help in accelerating the operations

• Multi language support: ROS has the ability to support multiple powerful languages like
python and C++ and has the ability to communicate with codes that are written in other
languages

• Scalability as the ROS can work on a wide range of projects no matter it`s scale

6.3.4 Rviz

RVIZ is a short for ROS visualization and it`s 3d visualization software that is used to visualize the
robot and its sensors in a 3d dimensional space, it helps in visualizing the sensor data such as lidars,
ultrasonic, cameras and more. It renders a real time 3d graphical presentation of the robot showing
its current pose and orientation and more.

Using Rviz provides

• Real-Time Visualization

49 | P a g e
• RViz allows for real-time visualization of a robot's state, including its position, orientation,
and sensor data. This helps developers understand the current status and behavior of the
robot.

• Sensor Data Display

• It can display data from various sensors such as LiDAR, cameras, depth sensors, and IMUs,
providing a comprehensive view of the robot's perception of its environment.

• Sensor data visualization aids in debugging and calibrating sensors, ensuring accurate data
collection and processing.

• Model and State Visualization

• RViz can visualize the robot model, including its joints and links, in a 3D space. This is useful
for verifying the correctness of the robot's kinematic model and motion.

• It also displays joint states, helping in monitoring and adjusting the robot's movement and
configuration.

• Trajectory and Path Planning

• RViz supports the visualization of planned paths and trajectories. Developers can see the
intended movement of the robot and verify if the paths are collision-free and feasible.

• It helps in fine-tuning path planning algorithms and ensuring smooth and efficient robot
motion.

• Interactive Markers

• Interactive markers in RViz allow users to manipulate objects and set goals in the
environment. This is particularly useful for testing and debugging manipulation and
navigation tasks.

• It enables intuitive interaction with the simulation environment, making it easier to test
different scenarios.

• Visualization of Transformations

• RViz can visualize the transformations (tf) between different coordinate frames of the robot
and the environment. This is crucial for understanding the spatial relationships and
ensuring correct data transformations.

• It helps in verifying and debugging the robot’s coordinate frame hierarchy.

• Customizable and Extensible

• RViz is highly customizable, allowing users to create custom displays and plugins to suit
their specific needs. This flexibility makes it adaptable to various robotic applications.

50 | P a g e
• It supports adding custom markers and visualizations, enhancing the tool's functionality.

• Environment Visualization

• RViz can display the robot's environment, including obstacles and maps, providing context
for the robot's operation. This is essential for tasks such as navigation and SLAM
(Simultaneous Localization and Mapping).

• It allows for the visualization of static and dynamic objects, aiding in the development and
testing of environment-aware algorithms.

6.3.5 MoveIt

MoveIt is an open-source software for robotic motion planning, manipulation, 3D perception,


kinematics, control, and navigation. It integrates with ROS and provides a comprehensive set of
tools to facilitate the development and deployment of complex robotic systems.

Using MoveIt provides:

1. Motion Planning

• MoveIt provides advanced motion planning algorithms that allow the SCARA robot to
compute collision-free paths. This is crucial for ensuring safe and efficient operation in
dynamic environments.

• It supports various planning algorithms like RRT (Rapidly-exploring Random Trees) and
PRM (Probabilistic Roadmap), which can be chosen based on the specific requirements of
the task.

2. Inverse Kinematics

• MoveIt includes robust inverse kinematics solvers, enabling the SCARA robot to calculate
the necessary joint angles to reach a desired end-effector position and orientation.

• This simplifies the process of controlling the robot and executing precise movements.

51 | P a g e
3. Collision Detection

• MoveIt continuously monitors for potential collisions between the robot and its
environment, ensuring that planned motions are safe.

• This is particularly useful in environments with obstacles, preventing damage to the robot
and its surroundings.

4. Path Optimization

• MoveIt optimizes planned paths to minimize execution time, energy consumption, or other
criteria, leading to more efficient operations.

• Optimization helps in achieving smoother and faster robot movements, enhancing overall
performance.

5. 3D Perception Integration

• MoveIt can integrate with 3D perception sensors (e.g., depth cameras, LiDAR) to perceive
and interact with the environment.

• This capability allows the SCARA robot to adapt to changes in its surroundings, enabling
tasks like object detection and manipulation.

6. Grasping and Manipulation

• MoveIt provides tools for grasping and manipulation, making it easier to develop
applications where the SCARA robot needs to pick up, move, and place objects.

• It includes libraries for generating grasps and handling different types of objects.

7. Simulation and Visualization

• MoveIt integrates with RViz for visualization, allowing users to simulate and visualize the
robot’s planned motions and interactions with the environment.

• This aids in debugging and refining motion plans before deploying them on the physical
robot.

8. Integration with ROS Ecosystem

• MoveIt seamlessly integrates with other ROS packages and tools, facilitating communication
and data exchange within the robotic system.

• It supports easy integration with controllers, sensors, and other components, streamlining
the development process.

52 | P a g e
53 | P a g e
6.3.6 Gazebo

Gazebo is an open-source robotics simulator that offers a high-fidelity environment for


simulating robots in complex indoor and outdoor settings. It integrates with ROS to enable
comprehensive testing and development of robotic systems without the need for physical
hardware.

Using Gazebo Provides:

1. Realistic Physics Simulation

• Gazebo provides accurate physics simulations, including dynamics, collisions, and sensor
data, allowing for realistic testing of the SCARA robot's movements and interactions.

• It uses advanced physics engines like ODE, Bullet, and DART to simulate the robot's
behavior under various conditions.

2. 3D Environment Modeling

• Users can create and simulate detailed 3D environments, which is essential for testing the
SCARA robot in scenarios that closely resemble real-world applications.

• Gazebo supports complex environments with various obstacles and objects, facilitating
comprehensive testing.

3. Sensor Simulation

• Gazebo can simulate a wide range of sensors, including cameras, LiDAR, IMUs, and more,
providing the SCARA robot with realistic sensory inputs.

• This helps in developing and testing sensor-based algorithms such as object detection and
localization.

4. Robot Modeling

54 | P a g e
• Users can model the SCARA robot with precise joint configurations, link dimensions, and
physical properties. This ensures that the simulated robot closely matches its real
counterpart.

• URDF (Unified Robot Description Format) files are used to define the robot's structure,
which can be imported into Gazebo for simulation.

5. Integration with ROS

• Gazebo integrates seamlessly with ROS, allowing for the use of ROS packages and tools
within the simulation. This includes ROS control, MoveIt, and other ROS-based algorithms.

• ROS topics, services, and actions can be used to interact with the robot and the simulation
environment.

6. Plugin Support

• Gazebo supports custom plugins for extending functionality, enabling users to add specific
behaviors, sensors, and controllers to the SCARA robot.

• These plugins allow for the simulation of custom scenarios and advanced features not
available out-of-the-box.

7. Testing and Debugging

• Gazebo provides a safe environment for testing and debugging robotic algorithms without
the risk of damaging physical hardware.

• Users can iterate quickly, testing different configurations and control strategies to optimize
the robot's performance.

8. Visualization and Monitoring

• Gazebo offers real-time visualization of the simulation, including the robot's movements,
sensor outputs, and environmental interactions.

• This visual feedback aids in understanding the robot's behavior and in debugging issues
effectively.

9. Community and Resources

• Being a widely-used simulator, Gazebo has a large community and extensive


documentation. This makes it easier to find resources, tutorials, and support for developing
and troubleshooting simulations.

• Numerous example simulations and models are available, which can serve as a starting
point for new projects.

55 | P a g e
6.3.7 Simulation Steps

6.3.7.1 Step1

Creating a workspace with suitable name for the Scara robot and Creating the required packages in
order to help facilitating the organization of the scripts and launch files then building and sourcing
the workspace in order to compile the source code and handling the dependencies

• mkdir -p ~/scara/src # Creating work source

• cd ~/scara # Entering the workspace folder

• Catkin build # Building the workspace

• cd ~/scara/src # Entering the work space src folder

• catkin_create_pkg movit_scara_robot_arm_sim std_msgs rospy roscpp # creating a


required package

• catkin_create_pkg scara_robot_urdf std_msgs rospy roscpp # creating a required package

6.3.7.2 step2

Creating the URDF of the robot and simplifying it in order to facilitate the importing of the URDF
in the simulation softwares like Moveit, Rviz and Gazebo then exporting the URDF so we can import
it into these softwares.

Figure 30. URDF

56 | P a g e
6.3.7.3 Step3

We have edited the URDF file manually in order to change the limits according to the real robot as
modifying and editing these limits will help in simulating the robot correctly

Figure 31. URDF editting

• name: Unique and suitable name for the joint.

• Type: joint type whether it`s revolute or prismatic or fixed like the base

• Parent: The parent link that is connected to this child

• Child: The child link that will be connected right after this link

• Axis: The axis of rotation for each joint

Limit: the joint constraints that will be used to adjust the upper and lower limit of the real robot

6.3.7.4 Step4

We have ran the launch file that launches the setup assistant for move it

57 | P a g e
Then we have imported the urdf file into moveit after finishing it

Figure 32. Moveit

58 | P a g e
Then we have optimized the self collision inside moveit

And we have defined the groups for the moving arm of the robot and the end effector

59 | P a g e
And we have defined the groups for the moving arm of the robot and the end effector then we have
defined suitable poses by rotating each joint with suitable rotation for the task for both groups
which are :

• Zero pose : initial position of the robot after homing it

60 | P a g e
• Pickup pose: the position in which the robot will move in order to pick a certain object from
a certain place

• Placing pose: the position in which the robot will move in order to place a certain object in a
certain place

Finally, we have generated the Moveit files

6.3.7.5 Step5(Creating Robot User interface)

Writing Implementing Python code for the Ui using Tkinter library so the UI will be used to send
commands through the serial port in which arduino is connected and to take the joints angles from
Rviz through listener node in order to execute the RVIZ pick pose and Place pose that is configured
using moveit setup.

Listener Node
This node will be used to publish the joint angles in RVIZ to the UI so the UI can send them after
calibrating them and converting the angle to steps using the following conversions with Python
math library.

Arduino execution of the commands sent from the ui

61 | P a g e
The UI sends commands through the serial port and the arduino code receives these commands and
compare it wit the predefined commands in the c++ arduino code in order to execute the proper
execution

6.3.7.6 Step6 ( Using Rviz & Gazebo)

Gazebo

62 | P a g e
6.3.7.7 UI

Figure 33. UI

• zero position(homing): the robot moves toward the limit switch, when limit switch is
triggered, the arm moves to the opposite direction.
• Set pick up & set Place: take angels from Rvis turn it into steps by conversion equations
• Open grip & Close grip: controls the end effector

63 | P a g e
Figure 34. Rviz

64 | P a g e
6.3.8 Conclusion

The two UI we have created includes the following :

1- Selection of arduino port

2- sending individual commands to each motor or axis

3- predefined Full poses commands which includes :

• Picking up pose

• Placing pose

• Zero Positioning using Limit Switches

4- Total steps in which each stepper motor has done

5- servo motor control:

• Open gripper

• Close the gripper

Arduino Code Key components

1- defining pins and libraries

2- Setting global variables and flags

3- initializing the objects


4- predefined functions in order to execute orders and poses

5- logic in order to differentiate between zero positioning and normal operating mode using limit
switches

65 | P a g e
CHAPTER 7

System Overall Control

66 | P a g e
67 | P a g e
68 | P a g e
CHAPTER 8

Cost Sheet

69 | P a g e
Item Source Picture Cost

3d printing parts Aristo +1177

Barings ‫الحطيب الهندي‬ 600

Belts future electronics 85

Bolts & Nuts El-sabtya 200

Arduino UNO Flux 400

CNC shield Flux 115

A4988 Stepper
Flux 65
Drivers

70 | P a g e
NEMA17 Stepper
Flux 2400
Motors (x4)

Mg996r Servo
Free Electronics 220
Motor

Limit Switch Flux 28

Power supply Flux 525

Voltage Regulator Flux 6

71 | P a g e
CHAPTER 9

Conclusion & limitations

72 | P a g e
9.1 Conclusion
• Successfully designed, modelled, and implemented a SCARA robotic arm.
• Integrated mechanical and electrical components effectively, including Arduino UNO
and CNC shield for control.
• Developed accurate forward and inverse kinematic models for precise movement and
positioning.
• Utilized MATLAB and ROS simulations for system performance analysis and PID
controller fine-tuning.
• Validated the robot's performance through testing, confirming the design and control
strategies.
• Highlighted the potential of SCARA robots in various industrial applications.
• Provided a comprehensive guide for future developments in robotic systems.

9.2 Limitations

• Precision is dependent on the quality and accuracy of 3D printed parts, which can vary.
• Use of standard components like NEMA17 stepper motors and Mg996r servo motor may
limit speed and payload capacity.
• algorithms such as adaptive or model predictive control.
• Simulations conducted under ideal conditions may not fully replicate real-world
scenarios, affecting practical performance.
• Project constraints included budget and time, limiting the extent of testing and
refinement.
• Future work should explore higher precision manufacturing methods, advanced control
strategies, and extensive real-world testing to enhance capabilities and reliability.

73 | P a g e
CHAPTER 10

Results and testing

74 | P a g e
After completing all the design process and reviewing, the final test is on its place. The robotic
arm is assembled as shown and reaches all of the specifications

75 | P a g e
CHAPTER 11

References

76 | P a g e
• https://robodk.com/blog/what-is-a-scara-robot/
• https://www.academia.edu/28681822/Kinematics_of_SCARA_Robos
• Mechatronics ASU. (2022). Industrial Robotics Lectures [YouTube Playlist]
• Age Of Robotics. (2024). [YouTube Playlist]

77 | P a g e
CHAPTER 12

Appendices

78 | P a g e
9.1 Drawings

79 | P a g e
80 | P a g e
81 | P a g e
82 | P a g e
83 | P a g e
84 | P a g e
85 | P a g e
86 | P a g e
87 | P a g e
88 | P a g e
9.2 Codes

9.2.1 Python UI Code

9.2.1 Python Code for the listener node

89 | P a g e
9..2.3 Arduino Code

90 | P a g e

You might also like