Aesdrt Arduino
Aesdrt Arduino
INTRODUCTION
A Robot is a virtually intelligent agent capable of carrying out tasks robotically with the
help of some supervision. Practically, a robot is basically an electro-mechanical machine
that is guided by means of computer and electronic programming. Robots can be
classified as autonomous, semiautonomous and remotely controlled. Robots are widely
used for variety of tasks such as service stations, cleaning drains, and in tasks that are
considered too dangerous to be performed by humans. A robotic arm is a robotic
manipulator, usually programmable, with similar functions to a human arm.
This Robotic arm is programmable in nature and it can be manipulated. The robotic arm
is also sometimes referred to as anthropomorphic as it is very similar to that of a human
hand. Humans today do all the tasks involved in the manufacturing industry by
themselves. However, a Robotic arm can be used for various tasks such as welding,
drilling, spraying and many more. A self-sufficient robotic arm is fabricated by using
components like micro-controllers and motors. This increases their speed of operation
and reduces the complexity. It also brings about an increase in productivity which makes
it easy to shift to hazardous materials. The main part of the design is ATMEGA-328p
micro-controller which coordinates and controls the product’s action. This specific micro
controller is used in various types of embedded applications. Robotics involves elements
of mechanical and electrical engineering, as well as control theory, computing and now
artificial intelligence. According to the Robot Institute of America, ―A robot is a
reprogrammable, multifunctional manipulator designed to move materials, parts, tools or
specialized devices through variable programmed motions for the performance of a
variety of tasks.
The robots interact with their environment, which is an important objective in the
development of robots. This interaction is commonly established by means of some sort
of arm and gripping device or end effectors. In the robotic arm, the arm has a few joints,
similar to a human arm, in addition to shoulder, elbow, and wrist, coupled with the finger
1
joints; there are many joints . The design process is clearly explained in the next section
with detailed information regarding the components which are used.
The robotic arm works on the principle of electrical input energy to perform some
mechanical works effectively with the help of some automation and program based
operations. The pick and place robotic arm consist of major hardware components such as
strips & motors and arm gripper, switches, battery, piece of metal, and other discrete
mechanical and electrical components. This project is designed for developing a pick and
place robotic arm with a soft catching gripper. This soft catching gripper is used for safely
handling an object carefully while Catching and placing. The robotic arm consists of
servo motor which is used for angular rotations of the arm for catching items (to hold
items, to release, to rotate, to place). This servomotor used is works on the principle of
Fleming’s left-hand rule and is controlled using Arduino circuit board.
There are 3 modes of operations you can observe in this robotic arm
1. Manual control.
3. Kinect control
So the user have the flexibility to select different kind of operation. The details of
controlling mechanism has been explained in chapter 4.
2: Literature Reiview
A survey on Arduino Controlled Robotic Arm by Ankur Bhargava In this paper a 5 Degree of
Freedom (DOF) robotic arm have been developed. It is controlled by an Arduino Uno
microcontroller which accepts input signals from a user by means of a set of potentiometers.
The arm is made from four rotary joints andend effector also, where rotary motion is provided by a
servomotor. Each link has been first designed using Solid works Sheet Metal Working Toolbox and
then fabricated using a 2mm thick Aluminium sheet.
The servomotors and links thus produced assembled with fasteners produced the final shape of the
arm. The Arduino has been programmed to provide rotation to each servo motor corresponding to
the amount of rotation of the potentiometer shaft.
A robot can be defined according to the nature ofthe relative movements between the links that
constituteit. Review on development of industrial robotic arm by Rahul Gautam This selective
operation robotic control method is need to be overcome the problem such as placing or picking
object that at distant from the worker.
The robotic arm has been developed successfully as the movement of the robot can be controls
precisely. It is expensive to change the cable and therefore the designing to reduce the friction on
table, is crucial to increase time between maintenance. Survey on Design and Development of
competitive low cost Robot Arm With Four Degrees of Freedom by Ashraf Elfasahany
In this project the representation of the design, development and implementation of robot arm is
done, which has the ability to perform simple tasks, such as light material handling. The robotic
arm is designed and made from PLA material where servo motors are used to perform links
between arms. The servo motors consist of encoder so that no need to use controller.
However, the rotation range of the motor is less than 180º span, which greatly decreases the region
reached by the arm and the possible positions. The design of the robot arm was for four degrees of
freedom. The end effector is not considered while designing because a readily available gripper is
used as it is much easier and economical to use a commercial.
3: THEORETICAL ANALYSIS
3.1 Arduino
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 and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer with a
USB cable or power it with a AC-to-DC adapter or battery to get started.. You can tinker
with your UNO without worrying too much about doing something wrong, worst case
scenario you can replace the chip for a few dollars and start over again.
Specifications
Microcontroller ATmega328P
Operating Voltage 5V
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Length 68.6 mm
Width 53.4 mm
Weight 25 g
3.1.1 Programming
The Arduino Uno can be programmed with the (Arduino Software (IDE)).The
ATmega328 on the Arduino Uno comes preprogrammed with a bootloader that allows
you to upload new code to it without the use of an external hardware programmer. It
communicates using the original STK500 protocol.
3.1.2 Power
The Arduino Uno board can be powered via the USB connection or with an
external power supply. The power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-
wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug
into the board's power jack. Leads from a battery can be inserted in the GND and Vin pin
headers of the POWER connector.
Figure 3.3 Arduino Power Supply
3.1.3 Memory
The ATmega328 has 32 KB (with 0.5 KB occupied by the bootloader). It also has
2 KB of SRAM and 1 KB of EEPROM
3% 6%
2%
SRAM - 2 Killobyte
Flash Disk - 29 Killobyte EEPROM - 1 Killobyte Bootloader 0.5 Killobyte
89%
Website arduino.cc
Arduino programs are written in C or C++ The Arduino IDE comes with a software
library called "Wiring" from the original Wiring project, which makes many common
input/output.
Setup (): a function run once at the start of a program that can initialize settings.
Loop (): a function called repeatedly until the board powers off.
4. Experimental Investigations
The Robotic Arm is designed using the Microcontroller i.e. ATMEGA328p Micro-controller
using Arduino programming. This process works on the principle of interfacing servos and
potentiometers. This task is achieved by using Arduino board. Potentiometers play an important
role The remote is fitted with potentiometers and the servos are attached to the body of the
robotic arm. The potentiometer converts the mechanical motion into electrical motion. Hence,
on the motion of the remote the potentiometers produce the electrical pulses, which are in route
for the Arduino board. The board then processes the signals received from the potentiometers
and finally, converts them into requisite digital pulses that are then sent to the servomotors.
This servo will respond with regards to the pulses which results in the moment of the arm.
Figure 2.1 shows the image of a servo motor. It consists of a motor which is
coupled to a sensor, used for position feedback, through a reduction gearbox. It also
accompanies a relatively sophisticated controller, usually a dedicated module designed
specifically for use with servo motors
In short, the micro controller interfaces all these components specified below. A
short list of components include
1. Servo motors
2. Potentiometers
3. Atmega 328p.
4. Arduino Deumilanove "IDE"
5. Bloutooth module.
Figure2.1 shows the image of a servo motor
Weight: 9 g
Dimension: 22.2 x 11.8 x 31 mm approx.
Stall torque: 1.8 kgf·cm • Operating speed: 0.1 s/60 degree
Operating voltage: 4.8 V (~5V)
Dead band width: 10 µs
Temperature range: 0 ºC – 55 ºC
The motors which are utilized as DC servo motors, generally have separate DC
source for field winding and armature winding. The control can be archived either by
controlling the field current or armature current. Field control has some specific
advantages over armature control and on the other hand armature control has also some
specific advantages over field control. Which type of control should be applied to the DC
servo motor, is being decided depending upon its specific applications. Let's discus DC
servo motor working principle for field control and armature control one by one.
As field of this DC servo motor is excited by amplified error signal, the torque of
the motor i.e. rotation of the motor can be controlled by amplified error signal. If the
constant armature current is large enough then, every little change in field current causes
corresponding change in torque on the motor shaft.
The field is operated at well beyond the knee point of magnetizing saturation
curve. In this portion of the curve, for huge change in magnetizing current, there is very
small change in mmf in the motor field. This makes the servo motor is less sensitive to
change in field current. Actually for armature controlled DC servo motor, we do not want
that, the motor should response to any change of field current.
Figure 4.7 knee point of magnetizing saturation
Again, at saturation the field flux is maximum. As we said earlier, the general
torque equation of DC motor is, torque T ∝ φIa. Now if φ is large enough, for every little
change in armature current Ia there will be a prominent changer in motor torque. That
means servo motor becomes much sensitive to the armature current.
As the armature of DC motor is less inductive and more resistive, time constant of
armature winding is small enough. This causes quick change of armature current due to
sudden change in armature voltage.
That is why dynamic response of armature controlled DC servo motor is much
faster than that of field controlled DC servo motor.
The direction of rotation of the motor can easily be changed by reversing the polarity of
the error signal.
4.4.1System Model:
A useful component in many real control systems is a permanent magnet DC servo
motor. The input signal to the motor is the armature voltage Va(t), and the output signal
is the angular position θ(t). A schematic diagram for the motor is shown in Figure.
(4.4.1.1). The terms Ra and La are the resistance and inductance of the armature winding
in the motor, respectively. The voltage Vb is the back EMF generated internally in the
motor by the angular rotation. J is the inertia of the motor and load (assumed lumped
together), and B is the damping in the motor and load relative to the fixed chassis.
Figure 4.8 The terms Ra and La are the resistance
The equations for the electrical side of the system are
Where Kb is the motor’s back EMF constant. The equations for the mechanical side of
the system are
Where Tapp is the applied torque, and KT is the torque constant that relates the torque to
the armature current.
dia(t) /dt = − (Ra/ La )¶ ia(t) – (Kb /La ¶) dθ(t) /dt + ( 1 /La )¶ Va(t) (5)
Example With these definitions for the state variables, and defining
u(t) = Va(t) and y(t) = θ(t), the state and output equations are:
4.5 Potentiometers
A Potentiometer is a variable resistor. The two output terminals act as a fixed
resistor. A movable contact called a wiper (or a slider) moves across the resistor,
producing a variable resistance between the center terminals and the two sides. A
potentiometer is basically a voltage divider which is used for the measurement of
potential. Potentiometers are commonly used to control electrical devices such as volume
controls on audio equipment. Potentiometers which are operated by a mechanism can
also be used as position transducer.
Specifications
Hardware features
Typical .80dBm sensitivity
Up to +4dBm RF transmit power
Low Power 1.8V Operation ,1.8 to 3.6V I/O
PIO control
UART interface with programmable baud rate
With integrated antenna
With edge connector
Software features
Default Baud rate: 38400, Data bits: 8, Stop bit: 1, Parity: No parity, Dat
Control: has supported baud rate:
9600,19200,38400,57600,115200,230400,460800.
Given a rising pulse in PIO0, device will be disconnected.
Status instruction port PIO1: low disconnected, high connected;
PIO10 and PIO11 can be connected to red and blue led separately. When master
and slave are paired, red and blue led blinks 1time/2s in interval, while
disconnected only blue led blinks 2times/s.
Auto connect to the last device on power as default.
Permit pairing device to connect as default.
Auto pairing PINCODE:‖0000‖ as default
Auto reconnect in 30 min when disconnected as a result of beyond the range of
connection.
move the sliders of all the servos instead you can click on the play button which will simply
moves the servo arm as per the way points you have recorded so far.If you want to change the way
5: Experimental Results
Mechanical Design
The mechanical design of the robot arm is based on a robot manipulator with
similar functions to a human arm . The links of such a manipulator are connected by
joints allowing rotational motion and the links of the manipulator is considered to form a
kinematic chain. The business end of the kinematic chain of the manipulator is called the
end effector or end of arm tooling and it is analogous to the human hand. Figure 5.1
shows the Free Body Diagram for mechanical design of the robotic arm.
Figure 5.1 Free body diagram of the robot arm
As shown, the end effector is not included in the design because a commercially
available gripper is used.This is because that the end effector is one of the most complex
parts of the system and, in turn, it is much easier and economical to use a commercial one
than build it. Figure 5.17 shows the work region of the robotic arm. This is the typical
workspace of a robot arm with four degree of freedom (6 DOF). . The mechanical design
was limited to 6 DOF mainly because that such a design allows most of the necessary
movements and keeps the costs and the complexity of the robot competitively
Accordingly, rotational motion of the joints is restricted where rotation is done around
two axis in the shoulder and around only one in the elbow and the wrist, see Figure 5.18.
The robot arm joints are typically actuated by electrical motors. The servo motors were
chosen, since they include encoders which automatically provide feedback to the motors
Figure 2.16 shows the force diagram used for load calculations. The calculations
were carried out only for the joints that have the largest loads, since the other joints
would have the same motor, i.e. the motor can move the links without problems. The
calculations considered the weight of the motors, about 50 grams, except for the weight
of motor at joint B, since it is carried out by link BA. Figure 2.17 shows the force
diagram on link CB, which contains the joints (B and C) with the highest load (carry the
links DC and ED) and the calculations are carried out as follows.
L = 1 kg (load)
Performing the sum of forces in the Y axis, using the loads as shown in Figure 5.20,
and solving for CY and CB, see Equations (1).(4). Similarly, performing the sum of
moments around point C, Equation (5), and point B, Equation (6), to obtain the torque e
in C and B, Equations (7) and (8), respectively.
The servo motor that was selected, based on the calculations, is 7 small servo with
torque: 1.8 kg/cm and one big servo with torque 10kg/cm
. This motors was recommended because it is much cheaper than any other motor
with same specifications. Since we need more torque at joint B, see Equation (8), we used
two motors at point B to comply with the torque requirements; however, one motor is
enough for the other joints. Using two motors at joint B is much cheaper than using one
big motor with 10kg/cm. Other relevant characteristics of the motors, which can be
shown in Figureure 5, are that they can turn 60 degrees in 130 milliseconds and they have
a weight of 47.9 grams each. Once the initial dimensions for the robot arm and the motor
were defined, the design were carried out using the SolidWorks platform; design should
And that thin sheet was chosen because it easier for machining and less weight
with a good resistance. During design, we faced some difficulties due to the way of
joining thin acrylic parts strongly. It was needed tools to burn and join the acrylic parts
and that weren’t available and the team considered that a mechanical junction based on
screws and nuts would be much strong than other alternatives, such as glue for example.
In order to accomplish this, a small feature was designed which allowed to fasten the
bolts with the nuts without having to screw in the thin acrylic layer. The result of this
process was the tridimensional design shown in Figure 6.21 By end of design, each part
was printed in full scale in cardboard paper and then we verified all the dimensions and
the interfaces of the assembly. In turn, we built the first prototype of the robot arm. Next,
parts of the robot arm were machined from the acrylic sheet using a circular saw and
Dermal tools. The detailing on the parts was done in a professional workshop since the
parts of robot arm were too small and it is not an easy for accomplishing such small and
accurate cuts. During assembling the robot parts with the motors, few problems pop up.
There were critical points that did not resist the fastening and, in turn, may break down;
hence, reinforcements in these points were considered. The final result of the robot arm is
shown in Figure 5.21
End-Effector Selection
The end effector is probably one of the most important and most complex parts of
the system. The end effector varies mainly according to the application and the task that
the robot arm accomplishes for; it can be
pneumatic, electric or hydraulic. Since our robot arm is based on an electric system, we
may choose electric basis of end effector. Besides, the main application of our system is
handling, accordingly, the recommended type of our end effector is a gripper, as shown
in Figurer 5.22 and Figurer 5.23. Please note that the end effector is controlled by a servo
motor .
35
Interface designer :
36
Interface Blocks:
App Designer:
Figure 5.14 App Designer
CONCLUSION
The main focus of this work was to design, and programme robotic arm the robot
arm was designed with five degrees of freedom and talented to accomplish accurately
simple tasks, such as light material handling the robot arm is equipped with several servo
motors which do links between arms and perform arm movements. A microcontroller that
drives the servo motors with the capability of modifying position
[4] J. C. Trinkle and R. James Milgram, ―Complete Path Planning for Closed Kinematics
Chains with Spherical Joints‖; SAGE International Journal of Robotic Research 21, 9,
773- 789, 2002.
[5] M. Gemeinder and M. Gerke, ―GA-based Path Planning for Mobile Robot Systems
employing an active Search Algorithm‖; Journal of Applied Soft Computing 3, 2, 149-
158, 2003. [2]. ―Six-servo Robot Arm‖ from www.arexx.com.cn on 13-11-2011 pg: 1-18
[16] http://www.instructables.com/
[19] www.SocietyofRobots.com
Appendix A
#include <Servo.h>
//arduino library
#include <math.h>
//standard c library
#include<SoftwareSerial.h>
#define PI 3.141
Servo baseServo;
Servo shoulderServo;
Servo elbowServo;
Servo gripperServo;
int command;
SoftwareSerial app(2,3);
struct jointAngle{
int base;
int shoulder;
int elbow;
};
int desiredGrip;
int gripperPos;
int desiredDelay;
struct jointAngle
desiredAngle; //desired
angles of the servos
//++++++++++++++
+FUNCTION
DECLARATIONS++++++
++++++++++++++++++++
+
app.setTimeout(50);
//ensures the the arduino
does not read app for too
long
app.println("started");
baseServo.write(90);
//intial positions of servos
shoulderServo.write(150);
elbowServo.write(110);
ready = 0;
}
AngleWrite
[ stepcounter ]= AngleRead;
//re-write the items of the
local array one item at the
time
// nextServo++ and
following if statement will
cause the rotation to go
from 0-3 (the 4 items of the
array)
stepcounter++;
if ( stepcounter > 3 )
{
stepcounter = 0 ;
}
gripperServo. write
( AngleWrite [ 3 ]);
elbowServo . write
( AngleWrite [ 2 ]);
shoulderServo. write
( AngleWrite [ 1 ]);
baseServo . write
( AngleWrite [ 0 ]);
}
if (app.available()){
ready = 1;
desiredAngle.base =
app.parseInt();
desiredAngle.shoulder =
app.parseInt();
desiredAngle.elbow =
app.parseInt();
desiredGrip =
app.parseInt();
desiredDelay =
app.parseInt();
if(app.read() == '\n'){
// if the last byte is 'd' then
stop reading and execute
command 'd' stands for
'done'
app.flush();
//clear all other commands
piled in the buffer
//send completion of
the command
app.print('d');
}
}
int status1 = 0;
int status2 = 0;
int status3 = 0;
int status4 = 0;
int done = 0 ;
//+++++++++++++++++++
+++++++++++FUNCTION
DEFITNITIONS++++++++
++++++++++++++++++++
++++++++++++++
int startPos =
theServo.read(); //read
the current pos
int newPos = startPos;
//int theSpeed = speed;
newPos = newPos + 1;
theServo.write(newPos);
delay(theSpeed);
return 0;
newPos = newPos - 1;
theServo.write(newPos);
delay(theSpeed);
return 0;
else {
return 1;
}