Hot Sexy call girls in Pira Garhi🔝 9953056974 🔝 escort Service
Wireless Controlled Robotic Arm
1. StuDocu is not sponsored or endorsed by any college or university
Radio Control Robotic Arm
Advanced Financial Reporting (Virtual University of Pakistan)
StuDocu is not sponsored or endorsed by any college or university
Radio Control Robotic Arm
Advanced Financial Reporting (Virtual University of Pakistan)
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
2. ABSTRACT
In today’s world there is an increasing need to create artificial arms for different
human situations where human interaction is difficult or impossible. They may
involve taking readings from an active volcano to diffusing a bomb. Here we
propose to build a robotic arm controlled by android application whose data is
transmitted wirelessly through the use of Xbees. For proper control mechanism and
to reduce the amount of vibration coming in from the motors, speed control is used
for smoothing the output of the servos. The development of this arm is based on
arduino platform, Xbee wireless protocol which will all be interfaced with each
other using serial communication along with a android application to provide a
wireless interface for its control. Finally, this prototype of the arm may be expected
to overcome the problem such as placing or picking hazardous objects or non-
hazardous objects that are far away from the user.
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
4. 3.4 USB OTG Bridge
3.5 Robot Arm Application
3.6 XCTU Configurator
3.7 Software Design
Chapter 4: IMPLEMENTATION
4.1 Implementation
4.2 Data Acquisition, Processing and Calibration
4.2.1 Data Acquisition
4.2.2 Data Processing
Chapter 5: CONCLUSION AND FUTURE SCOPE
5.1 Conclusion
5.2 Future Scope
BIBLIOGRAPHY
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
5. LIST OF FIGURES
Fig1. Block Diagram Representation of the Proposed Robotic Arm System 3
Fig2. Simplified Accelerometer Functional Block Diagram 8
Fig3. Pin Configuration of ATmega32 11
Fig4. Pin Configuration of ATmega640 15
Fig5. LCD Pin Configuration and Connections 17
Fig6. Circuit diagram for the data acquisition from the sensor via ATmega32 18
Fig7. Circuit diagram for the control of servo motors via ATmega640 19
Fig8. Screenshot of AVR Studio 4 running on Windows 7 platform 21
Fig9. Screenshot of SinaProg 2.0 running on Windows 7 platform 22
Fig10. Screenshot of MATLAB v7.6 (R2012a) running on Windows 7 platform 23
Fig11. Block Diagram of the implemented system with signal information 24
Fig12. (a) Physical Implementation of the system; (b) Robotic Arm Only 26
Fig13. (a) Implementation of the Shoulder to Elbow Joint; (b) Implementation of
the
Elbow to Wrist Joint
27
Fig14. Shoulder Joint Motors (M1 and M2) 28
Fig15. Elbow Joint Motors (M3, M4 and M5) 28
Fig16. (a) ATmega32 (b) ATmega640 Development Board 29
Fig17. (a) Real time plot when accelerometer is kept constant; (b) Real time plot
when accelerometer is in rotation in both anti clockwise and clockwise
direction.
30
Fig18. Original Input Plot of accelerometer data 32
vi
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
6. Fig19. Smoothened Output Plot of accelerometer data when N = 5 32
Fig20. Smoothened Output Plot of accelerometer data when N = 10 33
Fig21. Smoothened Output Plot of accelerometer data when N = 15 32 33
LIST OF TABLES
Table1. Table containing the Timer Register Values for the reference positions
taken
during calibration.
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
7. CHAPTER - 1
INTRODUCTION
1.1 Introduction
With the growth of technology, the need of new devices grows accordingly.
Computer and electronic sciences is mostly premier in raising the new
technologies. Of course the new technology could affect different engineering
fields. For instance, if the robotics and artificial intelligence are considered, it
reveals that the technology with its high potential, affected many different fields of
studies. Therefore related fields of study could be combined to generate new
technologies that can be used in wide fields.
The robots play important roles in our lives and are able to perform the tasks which
cannot be done by humans in terms of speed, accuracy and difficulty. Robots can
be employed to imitate human behaviors and then apply these behaviors to the
skills that leads the robot to achieve a certain task . They do not get tired or face
the commands emotionally, and since they are designed by humans. They can be
programmed and expected to obey and perform some specific tasks. In some cases
the use of a robotic hand becomes remarkable. Robotic is applied in different
forms and fields to simulate human behavior and motions .There are different types
of robots which are discussed in chapter two.
Our daily life is virtually affected by robots . The idea of robotic is to create
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
8. practical and useful robots that facilitate our daily tasks. Because of the
independency of the robots, they have longer life time comparing with the humans
and can be helpful in industry, dangerous tasks and nursing homes .
Robotics can be described as the current pinnacle of technical development.
Robotics is a confluence science using the continuing advancements of mechanical
engineering, material science, sensor fabrication, manufacturing techniques, and
advanced algorithms. The study and practice of robotics will expose a dabbler or
professional to hundreds of different avenues of study. For some, the romanticism
of robotics brings forth an almost magical curiosity of the world leading to creation
of amazing machines. A journey of a lifetime awaits in robotics.
Nowadays, robots are increasingly being integrated into working tasks to replace
humans specially to perform the repetitive task. In general, robotics can be divided
into two areas, industrial and service robotics. International Federation of Robotics
(IFR) defines a service robot as a robot which operates semi- or fully
autonomously to perform services useful to the wellbeing of humans and
equipment, excluding manufacturing operations. These robots are currently used in
many fields of applications including office, military tasks, hospital operations,
dangerous environment and agriculture. Besides, it might be difficult or dangerous
for humans to do some specific tasks like picking up explosive chemicals, defusing
bombs or in worst case scenario to pick and place the bomb somewhere for
containment and for repeated pick and place action in industries. Therefore a robot
can be replaced human to do work.
1.2 Motivation
In this research the goal is to be able to print 3D objects, but also 2D prints, on 3D
objects using a 6 Degrees Of Freedom (DOF) robotic arm. One could say an extra
dimension is added to the already existing 3D printers. Where conventional
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
9. printers normally have to start the print from a flat surface, the printer of this
research can print on already existing objects.
Another major benefit compared to the conventional printers is provided by the use
of the robotic arm. The printer is now able to print in an increased workspace,
because of the reach of this arm. This is very different from printers like the
Ultimaker, where the maximum size of the product is confined by the dimensions
of the printer itself. It would also be very interesting to mount the robot arm to a
moving platform, so the workspace would become infinite in theory.
A couple of applications are very suitable for the 3D printer developed with the
right print head. One of those is to be able to combine 3D printing with other
manufacturing techniques. As already pointed out conventional 3D printing mostly
needs to start from a flat surface and is relatively slow for large volumes. Because
of this, injection moulding is a better option for producing for instance a plastic
mug in mass production. However when using the 3D printer from this research
one will be able to print one’s name on this mug. So the common part can be
manufactured by conventional techniques and the customized parts can be printed.
This makes customized mass production much faster and cost effective.
Other applications of the printer of this research are to be able to coat or plaster
large objects. Also filling cavities and repairing products are new applications very
suitable for this new printer
1.3 Robotic arm definition
A robotic arm is a robot manipulator, usually programmable, with similar functions
to a human arm. The links of such a manipulator are connected by joints allowing
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
10. either rotational motion (such as in an articulated robot) or translational (linear)
displacement. The links of the manipulator can be considered to form a kinematic
chain. The business end of the kinematic chain of the manipulator is called the end
effectors and it is analogous to the human hand. The end effectors can be designed
to perform any desired task such as welding, gripping, spinning etc., depending on
the application. The robot arms can be autonomous or controlled manually and can
be used to perform a variety of tasks with great accuracy. The robotic arm can be
fixed or mobile (i.e. wheeled) and can be designed for industrial or home
applications.
There are some type which are commonly used in industries and for commercial
purpose:
1. Cartesian robot / Gantry robot: Used for pick and place work, application of
sealant, assembly operations, handling machine tools and arc welding. It's a
robot whose arm has three prismatic joints, whose axes are coincident with a
Cartesian coordinator.
2. Cylindrical robot: Used for assembly operations, handling at machine tools,
spot welding, and handling at diecasting machines. It's a robot whose axes
form a cylindrical coordinate system.
3. Spherical robot / Polar robot Used for handling machine tools, spot welding,
diecasting, fettling machines, gas welding and arc welding. It's a robot
whose axes form a polar coordinate system.
4. SCARA robot: Used for pick and place work, application of sealant,
assembly operations and handling machine tools. This robot features two
parallel rotary joints to provide compliance in a plane
5. Articulated robot: Used for assembly operations, diecasting, fettling
machines, gas welding, arc welding and spray painting. It's a robot whose
arm has at least three rotary joints
6. Parallel robot: One use is a mobile platform handling cockpit flight
simulator. It's a robot whose arms have concurrent prismatic or rotary joints.
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
11. 7. Anthropomorphic robot: It is shaped in a way that resembles a human hand,
i.e. with independent fingers and thumbs.
This project deals with a robotic arm whose objective is to follow commands sent
wirelessly and execute precise movement patterns. This method of control allows
greater flexibility in controlling the robotic arm rather than using a wired controller
. The processing unit takes care of each actuator’s control signal according to the
inputs from application, in order to execute the required movements. Figure 1
shows the block diagram representation of the system to
be designed and implemented.
1.4 Literature Review
There are various ways in which a robotic arm may be controlled. In the past there
have been many researchers working to control robotic arm through computer
terminals, Joysticks, even interfacing them with the internet so they can be
controlled from anywhere in the world. Usually most of the robotic arms are
controlled by a central controller which makes uses of values taken in from the
terminal that are entered by the user at the terminal to move the arm to a particular
coordinates in space. This makes the control very difficult as the control values of
the motors are very difficult to predict to achieve a particular movement. This is
easily achieved by our project.
This Project represents a simple graphical interface that can control all the
variables required to move the arm precisely and addition of xbee modules
provides a robust wireless link for reliable data transmission
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
12. 1.5 Project Overview
In this Project, the hardware and software function are combined to make the
system reliable. The arduino board will be interfacing the robot with the xbee
board and the actuators i.e. servo motors which will control the movement of the
robot respectively.
Meanwhile the second xbee board will be connected to android phone will provide
control signals through the application interface. The chapter that follows describe
the hardware (Chapter 2), which is followed by the description of the software
being used (Chapter 3) Chapter 4 describes the implementation of the project and
Chapter 5 concludes the discussion followed by the future scope of the project.
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
13. CHAPTER – 2
HARDWARE DESIGN AND DESCRIPTION
This chapter describes the hardware that is being used in the project.
2.1 Hardware Requirements
1. Xbee boards (Wireless module)
2. Servo Motors (Actuator)
3. Arduino Uno board (Arm Controller)
4. Voltage regulator
5. Arduino Proto Shield
6. Robotic arm kit (Mechanical structure)
7. Android phone
8. Xbee ftdi adaptor
9. Xbee breadboard adaptor
2.2 Xbee Boards
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
14. These are the very popular 2.4GHz XBee modules from Digi. These modules take
the 802.15.4 stack (the basis for Zigbee) and wrap it into a simple to use serial
command set. These modules allow very reliable and simple communication
between microcontrollers, computers, systems, using a serial port, Point to point
and multi-point networks are supported.
It has the following specifications:
• 3.3V @ 50mA
• 250kbps Max data rate
• 1mW output (+0dBm)
• 300ft (100m) range
• Wire antenna
• Fully FCC certified
• 6 10-bit ADC input pins
• 8 digital IO pins
• 128-bit encryption
• Local or over-air configuration
• AT or API command set
2.3 Servo Motors
Servo motors are a type of electromechanical actuators that do not rotate
continuously like
DC/AC or stepper motors; rather, they are used to position and hold some object.
They are used where continuous rotation is not required so they are not used to
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
15. drive wheels (unless a servo is modified). In contrast they are used where
something is needed to move to particular position and then stopped and hold
there. Most common use is to position the rudder of aircrafts and boats etc. The
servo can be commanded to rotate to a particular angle (say 30) and then hold its
position there. Servos also employ a feedback mechanism, so it can sense an error
in its positioning and correct it. This is called servomechanism. Say if you ask
servo to go and lock itself to 30 degrees and then try to rotate it with your hand, the
servo will try hard and its best to overcome the force and keep servo locked in its
specified angle. Controlling a servo is easy by using a microcontroller, no external
driver like h-bridge etc. are required. Just a control signal is needed to be feed to
the servo to position it in any specified angle. The frequency of the control signal
is 50 Hz (i.e. the period is 20ms) and the width of positive pulse controls the angle.
We can use the AVR microcontrollers PWM feature to control servo motors. In
this way the PWM with automatically generate signals to lock servo and the CPU
is free to do other tasks. And so, it is used in most development board like Low
Cost AVR Development Boards.
The two types of servo motors used in this project are:
MG90S:
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
16. Weight: about 13.4g
Dimension: 22.8 x 12.2 x 28.5mm
Stall Torque: 1.8kg/cm (4.8V ),2.2kg/cm(6V)
Operating Speed: 0.1sec/60degree(4.8v), 0.08sec/60degree(6v)
Operating Voltage: 4.8-6.0V
Motor Type: coreless motor
Used as base and gripper servo because of low weight requirement
MG995:
Dimension: 40 x 19x 43mm
weight: about 69g
Operating Speed: 0.17sec / 60 degrees (4.8V no load)
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
17. Operating Speed: 0.13sec / 60 degrees (6.0V no load)
Stall Torque: 13 kg-cm (180.5 oz-in) at 4.8V
Stall Torque: 15 kg-cm (208.3 oz-in) at 6V
Operation Voltage: 4.8 - 7.2Volts
Gear Type: All Metal Gears
Used in shoulder and elbow for high torque requirement
2.4 Arduino Uno Board
Arduino Uno is a microcontroller board based on the ATmega328P It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog
inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
18. and a reset button. It contains everything needed to support the microcontroller;
following are its specifications:
Microcontroller ATmega328P
Operating Voltage 5V
Input Voltage
(recommended)
7-12V
Input Voltage (limit) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20 mA
DC Current for 3.3V Pin 50 mA
Flash Memory
32 KB (ATmega328P) of which 0.5 KB used by
bootloader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 MHz
LED_BUILTIN 13
Length 68.6 mm
Width 53.4 mm
Weight 25 g
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
19. 2.4.1 USART Interface
Arduino Development board also has a dedicated hardware for serial
communication this part
is called the USART - Universal Synchronous Asynchronous Receiver
Transmitter. Here we just
have to supply the data (in this case the ADC output) need to transmit and it will
do the rest. The advantage of hardware USART is that we just need to write the
data to one of the registers of USART and we are free to do other things while
USART is transmitting the byte.
Also, the USART automatically senses the start of transmission of RX line and
then inputs the whole byte and when it has the byte it informs through an
interrupt(CPU) to read that data from one of its registers. We are using USART in
our project for communication between the arduino board and xbee module and
also between xbee module and android phone.
2.4.2 Timer
A timer in simplest term is a register. Timers generally have a resolution of 8 or 16
Bits. So, an 8
bit timer is 8 Bits wide so capable of holding value within 0-255. But this register
has a property
that its value increases/decreases automatically at a predefined rate (supplied by
user). This is the timer clock. And this operation does not need CPU’s intervention.
The Pre-scaler is a mechanism for generating clock for timer by the CPU clock. As
we know that CPU has a clock source such as an external crystal of internal
oscillator. Normally these have the frequency like 1 MHz, 8 MHz, 12 MHz or
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
20. 16MHz (MAX). The Pre-scaler is used to divide this clock frequency and produce
a clock for TIMER. The Pressler can be used to get the following clock for timer;
No Clock (Timer Stop), No Pre-scaling (Clock = FCPU), FCPU/8, FCPU/64,
FCPU/256, FCPU/1024. Timers can also be externally clocked
Timer is being used in our project to generate the PWM signal of required pulse
width in order to control the servo motor’s position. By varying the value of the
registers of the timer we can
Change the pulse width of the control signal thus controlling the robotic arm itself.
2.5 Voltage regulator
The LM2576 series of regulators are monolithic integrated circuits that provide all
the active functions for a step-down (buck) switching regulator, capable of driving
3-A load with excellent line and load regulation. These devices are available in
fixed output voltages of 3.3 V, 5 V, 12 V, 15 V, and an adjustable output version.
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
21. This regulator is used in the project to convert battery voltage of 7.2v to 5v
required for operation of the arduino board and servo motors , it can provide
adequate current required by the servo motors
2.6 Proto Shield
The Arduino proto shield is used for connecting all the servos and the xbee module
to the arduino in a neat and compact manner , all the connections are reliable as
they are soldered and it becomes quite compact
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
22. 2.7 Robotic Arm kit
The first step of designing a robot is to decide the dimension and workspace
configuration according to the requirements. The next step is to decide the
specification of each actuator. The structure of the robot is built with compacted
wooden sheets in order to decrease the overall weight of the robot. The compacted
wooden sheets are also strong enough to keep and hold the whole parts tightly
together. The arm is attached to a base which is the most bottom part of the robot.
It is important to mention that the base ought to have considerably heavy weight in
order to maintain the general balance of the robot in case of grabbing an object.
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
23. Although the idea of using stepper and gear motors is brilliant, but physical
movement of the robot is done by using servo motors. The advantage of the servos
is that they can be programmed to return to their initial position. Since the servo
motors operate using the signals received from the microcontroller, they could be
programmed according to the requirements. However, this characteristic of the
servo motors is actually a disadvantage, because the chance of sending and
receiving a wrong signal is high which causes the servo to operate incorrectly.
The developed robot in this study is a stationary articulated robotic arm with 5 DoF
with only revolute joints which includes base, shoulder, elbow, gripper pitch and
gripper spin.
All parts of the robot including the parts for shoulder, elbow, gripper and etc, were
printed on the compact board and cut accurately. Some carpentry processes where
applied to the sheets to make the necessary holes and cuts to connect the parts to
each other and to keep the actuators tightly.
The gripper of the arm is designed in a way which uses a single actuator and
follows a basic physical gear concept. This means that when the mini servo
actuates, it turns the gear which is attached to it causing the gripper to expand and
contract. Figure 16 shows the template of the gripper with its magnitudes. The
design of the base, shoulder and elbow with their measurements are shown in
Figure 17.
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
26. The dimensions can differ for different designs, but this should be mentioned that
the dimensions given in this study are chosen with respect to the servo motors
which are used in the robot. The power, torque and size of the servo motors can
affect the dimensions. For instance if the servo motor used in the elbow is changed
with a less powerful servo, the length of elbow should be decreased accordingly,
because the servo may not have enough power to pull the elbow up.
On the other hand, if a longer elbow is required in order to enlarge the workspace
of the robot, the height of shoulder and elbow from the base should be changed
respectively in order to maintain the physical balance of the robot. In general, if
one part of the structure is changed in dimension, the change should be applied for
all parts of the robot accordingly in order to eliminate the instability problem.
All the parts were cut and drilled properly according to the design template. Then,
all parts were painted and the robot was assembled. The final look of the robotic
arm is already shown above.
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
27. 2.8 Android phone
Android phone is used in this project to provide a interface used to control the
robotic arm, a application has been made by us which will provide a easy interface
to control all the variables required for operation the android phone will
communicate with the arm using xbee module connected to it through a serial
adapter on the usb otg port, the required features for the phone are
• android version above 4.0
• USB OTG support
2.9 Xbee FTDI Adaptor
It is the most easiest and reliable way to connect the Xbee module to a PC via USB
port or android phone via OTG . It can be use as a communication point or a
programmer for Xbee module using X-CTU software. There are six LEDs on this
board to help you monitoring and quickly troubleshooting.
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
28. Specifications XBee-PRO ZB
Performance
RF Data Rate 250 kbps
Indoor/Urban Range Up to 300 ft (90 m) / 200 ft (60 m) Int’l variant
Outdoor/RF Line-of-
Sight Range
Up to 2 miles (3200 m) / 5000 ft (1500 m) Int’l variant
Transmit Power 63 mW (+18 dBm) Int’l version
Receiver Sensitivity
(1% PER)
-102 dBm
Features
Antenna Type XBee ZB Adapters: Internal Antenna; XBee-PRO ZB
Adapters: External RPSMA Antenna
Frequency Band 2.4 GHz
Serial Data Interface RS-232 DB9M/DTE or RS-485 (6-position wire terminal
block) switch selectable between RS-422 half-duplex,
RS-422 full duplex and RS-485
USB Data Interface USB 2.0 Full Speed (with ESD protection); connects to
host via captive 1-meter cable
Analog IO (AIO) &
Digital IO (DIO)
6-position wire terminal block; Analog IO: 0 - 10V, 4 - 20
mA, or +/- 2VDC Differential;
Digital IO: Digital Input or sinking driver output
Networking & Security
Network Topologies Point-to-point, Point-to-multipoint, Mesh
Number of Channels 14
Spread Spectrum Direct Sequence Spread Spectrum
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
29. Type
Filtration Options PAN ID, 64-bit MAC, channel
Addressing 65,000 available addresses for each channel
Others
Dimensions (L x W
x H) & Weight
RS-232, RS-485, AIO, DIO models: 3.60 in x 1.90 in x
1.20 in (9.14 cm x 4.82 cm x 3.04 cm) 2.29 oz (64.92 g)
USB models: 2.87 in x 1.80 in x 0.83 in (7.29 cm x 4.57
cm x 2.10 cm) 1.60 oz (45.36 g)
Operating
Temperature
-40° C to +70° C
Controls Device reset (internal push button); Identification (internal
push button) – relays ID to gateway
Power Requirements
Input Voltage RS-232, RS-485, AIO, DIO models: 3.7-6VDC and 9-30
VDC
USB models: Bus powered (+5V)
Power Consumption USB: 70 mA Rx and 250 mA Tx (normal operation) / 200
uA (suspend mode)
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
30. 2.10 Xbee Breadboard Adaptor
It is used to mount the xbee module to the arduino proto shield as xbee module has
smaller hole spacing it needs this adaptor to convert pins to standard hole spacing
to connect to the proto shield board
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
31. 2.11Hardware Design
The application by the help of cellular is connected with XBee in contact with
OTG cable by the mean of Arduino. The variation made through the android
application is transferred wirelessly through ZigBee Network to the XBee
connected with the robotic arm in series with Arduino with the help of Serial port
the Arduino is powered by a buck regulator which is taking supply from 7.2V
Battery pack. As the variation is applied from the application the ZigBee network
transferrers the data to Arduino then Arduino by the mean of PWM (Pulse Width
Modulation) moves the servos accordingly and respectively as per directed by the
application.
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
32. CHAPTER – 3
SOFTWARE DESIGN AND DESCRIPTION
21
This chapter describes the software that is being used in the project.
3.1 Software Requirements
1. Arduino IDE
2. MIT Appinventor 2.0
3. USB OTG Bridge (Android application)
4. Robot Arm application (Android application)
5. XCTU Configurator
3.2 Arduino IDE
This software is used for hardware side code development it can compile and
upload the code to the arduino development board .following is a screenshot of the
interface:
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
33. Code is compiled and uploaded using the buttons on the top panel.
Following is the arduino code made for this project:
#include <Servo.h> //arduino library
#include <math.h> //standard c library
#define PI 3.141
Servo baseServo;
Servo shoulderServo;
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
34. Servo elbowServo;
Servo gripperServo;
int command;
struct jointAngle{
int base;
int shoulder;
int elbow;
};
int desiredGrip;
int gripperPos;
int desiredDelay;
int servoSpeed = 30;
int ready = 0;
struct jointAngle desiredAngle; //desired angles of the servos
//+++++++++++++++FUNCTION
DECLARATIONS+++++++++++++++++++++++++++
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
35. int servoParallelControl (int thePos, Servo theServo );
//++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++
void setup()
{
Serial.begin(9600);
baseServo.attach(10); // attaches the servo on pin 9 to the servo
object
shoulderServo.attach(9);
elbowServo.attach(6);
gripperServo.attach(5);
Serial.setTimeout(50); //ensures the the arduino does not read serial
for too long
Serial.println("started");
baseServo.write(90); //intial positions of servos
shoulderServo.write(90);
elbowServo.write(90);
gripperServo.write(50);
ready = 0;
}
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
36. //primary arduino loop
void loop()
{
if (Serial.available()){
ready = 1;
desiredAngle.base = Serial.parseInt();
desiredAngle.shoulder = Serial.parseInt();
desiredAngle.elbow = Serial.parseInt();
desiredGrip = Serial.parseInt();
desiredDelay = Serial.parseInt();
Serial.println("ok");
if(Serial.read() == 'n'){ // if the last byte is 'd' then stop
reading and execute command 'd' stands for 'done'
Serial.flush(); //clear all other commands piled in the
buffer
//send completion of the command
Serial.print('d');
}
}
int status1 = 0;
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
37. int status2 = 0;
int status3 = 0;
int status4 = 0;
int done = 0 ;
while(done == 0 && ready == 1){
//move the servo to the desired position
status1 = servoParallelControl(desiredAngle.base, baseServo,
desiredDelay);
status2 = servoParallelControl(desiredAngle.shoulder,
shoulderServo, desiredDelay);
status3 = servoParallelControl(desiredAngle.elbow, elbowServo,
desiredDelay);
status4 = servoParallelControl(desiredGrip, gripperServo,
desiredDelay);
if (status1 == 1 & status2 == 1 & status3 == 1 & status4 == 1){
done = 1;
}
}// end of while
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
38. }
//++++++++++++++++++++++++++++++FUNCTION
DEFITNITIONS+++++++++++++++++++++++++++++++++
+++++++++
int servoParallelControl (int thePos, Servo theServo, int theSpeed ){
int startPos = theServo.read(); //read the current pos
int newPos = startPos;
//int theSpeed = speed;
//define where the pos is with respect to the command
// if the current position is less that the actual move up
if (startPos < (thePos-5)){
newPos = newPos + 1;
theServo.write(newPos);
delay(theSpeed);
return 0;
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
39. }
else if (newPos > (thePos + 5)){
newPos = newPos - 1;
theServo.write(newPos);
delay(theSpeed);
return 0;
}
else {
return 1;
}
}
3.3 MiT Appinventor 2.0
This software is used for simplifying development of android applications; it
provides a block programming interface with good testing and debugging features
and makes it easier for students to work on android development without learning
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
40. to use the android studio platform which is very challenging, following is the code
made in appinventor for this project:
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
42. 3.4 USB OTG Bridge
USB Bridge for App Inventor 2 allows through a USB OTG cable to achieve a
seamless interface between a USB device and the development tool APP
INVENTOR 2.
3.5 Robot Arm Application
This is the final form of the application made
using the above given code, it provides an
interface to control the robotic arm:
3.6 XCTU Configurator
XCTU is a free multi-platform application that
enables developers to manage Xbee radio
frequency (RF) modules through a simple-to-use
graphical interface. The application includes
embedded tools that make it easy to set up, configure, and test Xbee RF modules.
Following is a screenshot of its interface
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
43. Following are the steps required to set up the xbee radios:
1. Set up the first XBee module (XBEE_A):
a. Select the first XBee module.
b. Click the Load default firmware settings button .
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
44. Tip In the following steps, type parameter initials in the Search box
to quickly find a parameter, as shown in the following
example:
c. Configure the following parameters:
ID: D161
DH: 0013A200
DL: SL of XBEE_B (Enter the last eight characters of the MAC
address for XBEE_B. Or select XBEE_B and find its SL value.)
NI: XBEE_A
PL: 0
d. Click the Write radio settings button .
2. Set up the second XBee module (XBEE_B):
a. Select the second XBee module.
b. Click the Load default firmware settings button .
c. Configure the following parameters:
ID: D161
DH: 0013A200
DL: SL of XBEE_A (Enter the last eight characters of the MAC
address for XBEE_A. Or select XBEE_A and find its SL value.)
NI: XBEE_B
PL: 0
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
45. d. Click the Write radio settings button .
After you write the radio settings for the XBee modules, their names appear
in the Radio Modules area.
`
3.7 Software Design
The software is designed to achieve the required objective. There are three
software modules
which make up the project are:
1 Software development for Arduino: To receive data from the Xbee and store
them in their respective timer registers and generate corresponding PWM signal for
servo
motor actuation.
2. Software development for the Xbee transparent point to pint communication is
configured in both modules to send and receive data
3. Software development for Android: To send data through the Xbee to the arm
controller in a format that can be decoded by it and provide a control interface to
the user
The following block diagram shows the intermediate work/input entering the
individual blocks.
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
47. CHAPTER – 4
IMPLEMENTATION
4.1 Implementation
The android phone should be running both applications before starting the setup
i.e. OTG bridge and robot control application, when the OTG cable is plugged in
the OTG bridge application will detect it, next the robot arm application should be
opened and the start button should be press to connect the serial interface of the
xbee module to the android phone.
Before giving any instruction through the application the hardware must be
powered on after power on the controller will move all the servos to their default
position which are saved in memory, these positions are also saved in the
application and updated when any command is sent, when any button on the
application is pressed the application sends updated values of all the servos in a
encoded format to the xbee through which they are wirelessly transmitted using the
zigbee protocol to the receiver , the receiving xbee sends the data to the arduino via
the serial port where it is decoded and all the servos are updated to their new
positions using the speed selected by the user
Each motor moves the arm in one plane. As we have implemented two motors at
the shoulder
joint as can be seen from Figure 14, M1 is to move the arm in Y-Z plane and M2 is
for the
movement along the X-Z plane. In this way the two motors provide the shoulder
joint to be
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
48. moved in any direction in space. From Figure 15, it can be seen that we have
implemented three
motors at this joint. The Motor M3 is for the movement of the arm along the Z-axis
in the X-Y
plane. The Motor M4 is used for the bending motion of the elbow and the Motor
M5 is for the
rotation/twisting of the elbow to wrist portion.
4.2 Data Acquisition and Processing
4.2.1 Data Acquisition
The controller has the following variables that are considered data
desiredAngle.base
desiredAngle.shoulder
desiredAngle.elbow
desiredGrip
desiredDelay
it accepts these data points as a continuous array delimited by any non numeric
value , this operation is handled by the following code:
if (Serial.available()){
ready = 1;
desiredAngle.base = Serial.parseInt();
desiredAngle.shoulder = Serial.parseInt();
desiredAngle.elbow = Serial.parseInt();
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
49. desiredGrip = Serial.parseInt();
desiredDelay = Serial.parseInt();
Serial.println("ok");
Similarly there are 5 variables in the android application called:
Servo1
Servo2
Servo3
Servo4
Delay
These variables are updated by the application and sent as a continuous string
delimited by commas ( , ) which reach the serial port of the controller and are read
as described above.
4.2.2 Data Processing
After the variables are read by the controller the following function is used to
generate outputs for the servos using the stored variables:
int servoParallelControl (int thePos, Servo theServo, int theSpeed ){
int startPos = theServo.read(); //read the current pos
int newPos = startPos;
//int theSpeed = speed;
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
50. //define where the pos is with respect to the command
// if the current position is less that the actual move up
if (startPos < (thePos-5)){
newPos = newPos + 1;
theServo.write(newPos);
delay(theSpeed);
return 0;
}
else if (newPos > (thePos + 5)){
newPos = newPos - 1;
theServo.write(newPos);
delay(theSpeed);
return 0;
}
else {
return 1;
}
}
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
51. CHAPTER – 5
CONCLUSION AND FUTURE SCOPE
5.1 Conclusion
The objectives of this project has been achieved which was developing the
hardware and software for an android application controlled robotic arm. From
observation that has been made, it clearly shows that its movement is precise,
accurate, and is easy to control and user friendly to use. The robotic arm has been
developed successfully as the movement of the robot can be controlled precisely.
This robotic arm control method is expected to overcome the problem such as
placing or picking object that is far away from the user, pick and place hazardous
object in a very secure and easy manner.
Even after many years of research, the applications of robotic arm are restricted to
the industries and primarily used in manufacturing units for increasing
productivity. These arms are very sophisticated and can manage to make extremely
precise movements. The robotic arms have wide variety of general purpose and
domestic applications too, which are not much explored. Cost is the main
constraint on robotic arms and to bring it down is a challenging issue. High torque
servos with high precision are necessary for building these machines. These are the
main components which cause the motion of the arm, and are most expensive.
Finding alternatives to these motors to bring down the cost is the necessity. Also
the material which will be used for the body should be light and durable. The light
weight body can improve the performance of the motors and the torque. The
shapes and size of the components and parts varies widely depending on the
applications. Bringing these machines on product level for general purpose
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
52. application is a tough job. If these constraints are resolved, soon the robotic arms
will be available everywhere to serve as a “helping hand”.
5.2Future Scope
The project is built on a wireless model. It could further be developed to work on
accelerometers, thus allowing the user to move in an even easier unrestricted
manner. Currently the wireless signal is being transmitted via xbee; this could be
eliminated by using a wifi integrated controller such as esp8266, etc. It could also
be possible to eliminate the Arduino altogether when esp8266 is being used. The
microcontroller could take the input from the application through wifi and then
generate the corresponding PWM signal itself to actuate the servo motors.
Robotic Arms has a wide scope of development. In the near future the arms will be
able to perform every task as humans and in much better way. Imagination is the
limit for its future applications. It can be a real boon for handicapped people, who
are paralyzed or lost their hands in some accident. The arm can be trained to listen
to the command from a human and perform that task. A Precise gesture controlled
system is also possible. Wearable devices can be used to send the command and
control the movements of the arm.
Brain Computer Interface (BCI) is an emerging field of research. BCI can be used
to acquire signals from the human brain and control the arm. The system can work
in the same way as human arm. A person who may have lost his hand in any
accident can resume his life like previous by such artificial arms. Robotic arms are
versatile and have enormous ways of implementations. Not just an arm but a
complete human body (humanoid) can be controlled through Brain Computer
Interface.
The robotics is every vase field the universe is now moving towards it not just in
terms of construction, but making them automate the engineers of electro-
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
53. mechanical are emphasizing and planning a world controlled by fully automated
robots with highly equipped mechanisms in them. The plan is make each and every
work to be done with Artificial intelligence based robots in order to bring ease in
living of life and to hand over the entire labor to those robots. Through different
use of technology such as, Image processing, biorobots, military robots and many
more.
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
54. BIBLIOGRAPHY
39
[1] Mohd Ashiq Kamaril Yusoffa, Reza Ezuan Saminb, Babul Salam Kader
Ibrahimc, “Wireless
Mobile Robotic Arm”, International Symposium on Robotics and Intelligent
Sensors 2012
(IRIS 2012), July 2012
[2] Wan Muhamad Hanif Wan Kadir, Reza Ezuan Samin, Babul Salam Kader
Ibrahim, “Internet
Controller Robotic Arm”. International Symposium on Robotics and Intelligent
Sensors 2012
(IRIS 2012), July 2012
[3] Avinash Jain, “Servo Motor Control by Using AVR ATmega32
Microcontroller”, http://extr
emeelectronics.co.in/avr-tutorials/servo-motor-control-by-using-avr-atmega32-
microcontroller/, June 2010
[4] Paul Smith, “Programming with AVRDUDE”,
http://www.ladyada.net/learn/avr/ avrdude
.html/, April 2012
[5] Avinash, “Using LCD Modules with AVR”,
http://extremeelectronics.co.in/avrtutorials/using
-lcd-module-with-avrs/, July 2008
[6] Avinash, “Using ADC on AVR”, http://extremeelectronics.co.in/avr-
tutorials/using-theanalog-
to-digital-converter/, September 2008
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053
55. [7] Avinash, “Using the USART of Microcontrollers”,
http://extremeelectronics.co.in/avrtutorials/
using-the-usart-of-avr-microcontrollers/, December 2008
[8] Atmel ATmega32 Datasheet, AVR Corporation, Feb 2011
[9] Atmel ATmega640 Datasheet, AVR Corporation, April 2012
[10] ATmega640 Development Board Manual, Nex Robotics, Oct 2010
[11] MMA7361L Datasheet, Freescale Semiconductors, Apr 2008
Downloaded by IEA.BOD.I2 - S?n, V? V?n - Giám ??c E&A - INTECH GROU (sonvv@intechgroup.vn)
lOMoARcPSD|13167053