Sei sulla pagina 1di 5

DIY Robot Arm and control it using Arduino

1 – Introduction to Robot Arm and it's applications


Most common manufacturing robot is the Robotic Arm, which is a programmable mechanical arm
the perform the same function or similar to the human arm in that chapter we gonna make a robot
arm like that

first of all let's talk about the required component to make the robot arm
then how to calibrate servo motors to make sure that the robot arm mechanism will work in a
perfect way
assemble the robot arm parts together and finally troubleshooting and test the whole project

let's talk about the required component to make the robot arm project
there are 3 main components which are : Servo motors , screws and laser cut your robot arm parts

The required component to make the robot arm project


4 * Servo Motor Micro “SG90”
11* Nut
7 * 6mm
15* 8mm
5 *10mm
8 *12mm
4 *20mm (All screws are M3 size)

Male pin header Tooled Up & Down to give us the ability to connect servo motors in the
breadboard

2* Voltage regulator 7805 to supply +5V to servo motors

I use 3mm acrylic, but the design is fairly tolerant and I've seen it made in wood and even 3D
printed
the MeArm design is an open source and you can download it from the attachment or from
thingiverse website
download the dxf file and it works on most laser cutters
all you have to do is send the dxf file to a laser cutter service provider and get you parts
2 – Servo Motor calibration
We gonna use Arduino to calibrate servo motors to go to the default positions Which are 90 for the
center, left, right servo motor and 25 degree for servo motor of gripper

first of all Let's write the code to make the servo go to 90 degree
the code contain two main function setup and loop
include the servo library to give us the ability to control servo motors with easy and simple
instructions with the instruction #include <Servo.h>
Create a servo object using the instruction Servo Servo1;
in setup function it's required to attach the servo to the used pin number in the Arduino and
we attached the Servo to the digital terminal D12 in the Arduino so we write
Servo1.attach(12)
in the loop function make servo go to 90 degrees with the instruction
Servo1.write(90)
as we mentioned before we gonna talk about libraries and objects in details later but right now all
you have to know about Servo library that it contain codes that give us the ability to control servo
motors with easy and simple instructions and Servo1 is an object from the Servo library that give us
the ability to deal with the library
that it let's upload the code to the Arduino board

let's connect the servo motor of the center with Arduino


the red wire of servo motor will be connected to +5V in the Arduino board
the brown wire of servo motor will be connected to GND in the Arduino board
the orange wire of servo motor will be connected to the digital terminal D12 in the Arduino board
let's supply power to the Arduino board with the USB cable
according to the code the servo motor right now is calibrated to go to 90 degree let's make a mark
on the servo that will mean something to you i'll mark that servo as C that refer to center

As we mentioned before you can power on more than one servo motor using Arduino board so don't
calibrate more than one servo in the same time

let's calibrate the left motor


connect servo motor to the Arduino the same as the previous servo motor
red wire to +5V – brown wire to the ground – orange wire to D12
let's supply power to the Arduino board with the USB cable
according to the code the servo motor right now is calibrated to go to 90 degree let's make a mark
on the servo that will mean something to you i'll mark that servo as L that refer to Left

let's calibrate the right motor


connect servo motor to the Arduino the same as the previous servo motor
red wire to +5V – brown wire to the ground – orange wire to D12
let's supply power to the Arduino board with the USB cable
according to the code the servo motor right now is calibrated to go to 90 degree let's make a mark
on the servo that will mean something to you i'll mark that servo as R that refer to right

let's calibrate the servo motor of gripper


before connecting servo motor with Arduino change the 90 degree with 25 degree
connect servo motor to the Arduino the same as the previous servo motor
red wire to +5V – brown wire to the ground – orange wire to D12
let's supply power to the Arduino board with the USB cable
according to the code the servo motor right now is calibrated to go to 25 degree let's make a mark
on the servo that will mean something to you i'll mark that servo as CL that refer to gripper
3 – Base and Left side assembly
After servo motors calibration we are ready to assemble the robot arm. Let's get started assembling
the base and left side of the robot arm

1 - Get part number 1 and insert four 20mm screws from the underside and screw four nuts half way
down them
2 - get part number 2, number 3, Center servo, and two 8mm screws and let's assemble these parts
3 - now let's assemble the left side get
get parts #4, #5, #6, left servo, two 8mm screws, and a servo fixing pack
let's assemble parts #4, #5 and servo motor (being careful not to over tighten. You don't want the
acrylic to bend, just hold the servo in place).
4 - Now attach the servo fixing to the servo arm (#6) using the sharp screws from the servo fixing
pack
Attach the servo fixing to your calibrated servo as shown, it should be parallel with the longest side
of part #4 and the lines you drew on earlier should still match up

4 – Right side assembly and build the middle


We are assembling the robot arm. We have done assembling the base and the left side
let's assemble the right side and build the middle of the robot arm

1 - Get parts #5, #12, #13, #17, two 8mm screws, a 6mm screw, the right servo, and a servo fixings
pack.
2 - Attach part #5 and 12 to the servo motor
3 - Attach the white servo fixing to the servo arm (#13) using the sharp screws as before.
4 - Attach that to the servo at 90 degrees to the longest side.
5 - Attach part #17 to the side using the 6mm screw.

let's build the middle of the robot arm


6 - Attach part #14 and a servo fixings pack together
7- get parts #8, #9, #10 and a 10mm screw. attach them together in that order #9, #10, #8 with the
screw coming in from the #8 side.

Now we done assembling the base,left,right and middle of the robot arm
in the next video we gonna integrate the left side with the middle of the robot arm

5 – Attach Left side to Middle


let's attach the left side of the robot arm and the middle together

1 - Attach the left side to part #7 with a 12mm screw and nut.
2 – Attach part #6, #20 and servo fixing which 12mm screw
3 – Attach part #14 which is the bottom plate to the left Arm
4 – Attach part #11 to the previous parts with 12mm screw and nut
P11
6 – Attach Right side with Middle and base
p12
let's attach the right side of the robot arm and the middle together
1 – Attach part #15 to #10 using 12mm screw and nut
2 – Bring the right and left assemblies together using 12mm screw and nut
3 – fix the right side to the middle and left with 2*12mm screw and nut
4 – Attach Arm assembly to the base with a small screw from servo pack
5 – finally attach part #16 to #17 and #10

7 – Add Left and Right forearm and Right forearm


P14
let's attach the left and right side forearm to the robot arm
1 – Attach part #31 to part #16 with part #18
2 – Attach part #17 to parallel link connector using 10mm screw and spacer
3 – Attach part #31 to parallel link connection using 10mm screw
4 – Attach part #17 to the parallel linkage connector with 6mm screw

8 – Build the gripper and attach it to the Robot Arm


P15
let's build the gripper and attach it to the robot arm
1 – get parts #21,# 23, #22, #24, Servo motor and 4*8mm screws and attach them together
2 – Attach part #24 to part#28 and #25 with 8mm screw and the other side with 12mm screw
3 – Attach servo arm to part #30 and fix it with the servo motor (pay attention to servo motor
calibration it's very important)
4 – Attach gripper gear #10 and bottom servo gear #29 with 3*6mm screw
5 – Finally attach the gripper to the Robot arm body

9 – Add Voltage Regulator 7805


As we mentioned before you can power on more than one servo motor using Arduino board so we
have to use a voltage regulator 7805 to supply +5V to servo motors
voltage regulator 7805 have 3 terminals input voltage, output voltage and ground
connect the left terminal which is input voltage terminal to +12V terminal in the battery
connect the middle terminal which is ground terminal to the ground of the battery

connect the right terminal which is output voltage to the red wire of servo motors
connect the middle terminal which is ground terminal to the brown wire of servo motors

now connect the signal terminal of servo motors to digital terminal in arduino
I will connect the signal terminal of first servo motor to D12
and the signal terminal of second servo motor to D11
and the signal terminal of third servo motor to D10
and the signal terminal of the last servo motor to D9

finally connect Vin input terminal in the Arduino to +12V and ground of the Arduino to the ground
of battery

and you are done, in the next tutorial we gonna write the code to control the Robot Arm
10 – Final Project (Transporter)
We done assembling the robot arm and we supply power to servo motors with the voltage regulator
7805 let's write the code the control the robot Arm with Arduino board

the code contain two main function setup and loop


include the servo library to give us the ability to control servo motors with easy and simple
instructions with the instruction #include <Servo.h>
Create a servo object for each servo motor
Servo G;
Servo B;
Servo UD;
Servo FB; // G for gripper - B for base - UD for Up and down - FB for forward and backward

in setup function it's required to attach the servo to the used pin number in the Arduino
G.attach(12);
B.attach(11);
UD.attach(10);
FB.attach(9);

in the loop function make Base, up and down, forward and backward servos to go from 45
degrees to 135 degree
and gripper servo to go from 0 degrees to 180 degree
with the instruction
G.write(0)
B.write(45)
UD.write(45)
FB.write(45)
tell arduino to do nothing for 3seconds
G.write(180)
B.write(135)
UD.write(135)
FB.write(135)
tell arduino to do nothing for 3seconds

let's upload the code and check the final result

Robot Arm is working in a perfect way and i'll let you unleash you creativity making a lot of
applications with robot arm

and i'd like to tell you that I will support you till you make all the project in that course

Potrebbero piacerti anche