How to Assemble and Control a Robot Arm With an Arduino

by Webotricks in Circuits > Arduino

2 Views, 0 Favorites, 0 Comments

How to Assemble and Control a Robot Arm With an Arduino

Untitled design (66).png

Hello, welcome back. In this tutorial, we will learn how to assemble and control a robotic arm with an Arduino. A robot arm kit has been used for this project. You can easily buy it in the market. Also, four servo motors are required for this robot arm and a PWM servo motor driver board has been used to control them. The Arduino UNO board is used to control all of these components. Keep reading.

What is a robotic arm?

A robotic arm is a programmed mechanical system. These are works like a normal human hand. Also, this is called a robot arm because it works according to a program. We can see these from small sizes to very large sizes. These robotic arms are specially used for industrial purposes. Through these, various activities that can not be done by a normal human being can be done. Also, we can see in the market a variety of robot arms designed to facilitate everyday work in our home. This tutorial covers how to assemble a robot arm kit for sale in the market step by step and how it works with an Arduino. Also, use this tutorial to understand how a robotic arm works.

Supplies

Ok, let’s do this project step by step. The required components are given below.


Arduino Uno - Buy Now

Servo Motor (SG90) - BUY NOW


Jumper-Wires - BUY NOW


Robot arm kit x 1


PWM servo motor driver x 1

Firstly, identify these components.

Secondly, take the robotic arm kit and remove the parts one by one. Afterwards, remove the stickers.

Thirdly, connect the first servo motor as follows.

After, connect the robot arm based part. Use four screws to do this.


Next, connect the rotating part of the grounded servo motor. For that, use the servo motor horns and screws.

OK, now connect the servo motors on both sides.

Next, connect the left side servo motor rotation parts. For that, use the servo motor horns and screws.

Then, Next, connect the right side servo motor rotation parts. For that, use the servo motor horns and screws.

Now, connect the below parts to the main rotation part.


After, connect the below part to the left side servo motor part. After, connect it to the main rotation part.

Now, connect the right side servo motor part to the main rotation part.

After, connect the robot arm elbow parts. For that, use the pictures below.

Okay, now let’s set the fingers of the robot’s arm. For that, connect the last servo motor as follows.

Next, connect the servo motor rotation wheel and servo motor horns.

Then, attach one finger to it.

After, connect the other finger.

Finally, connect the above part with the main robot arm.

Ok, the robot arm is done. Now, attach the PWM servo motor driver board and connect the motors to it. For that, use the circuit diagram below.


Afterwards, connect the PWM servo motor driver to the Arduino board and connect the 5v external power supply to this robot arm. For that, use the circuit diagram above.

OK, now connect this robot arm to the computer and let’s creates the program for this project. It is as follows.

ow, select board and port. After, upload this code to the Robot arm. OK, enjoy this project.

/*Robot arm control with Arduino
Home Page
*/
#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>
Adafruit_PWMServoDriver srituhobby = Adafruit_PWMServoDriver();
#define servo1 0
#define servo2 1
#define servo3 2
#define servo4 3
void setup() {
Serial.begin(9600);
webotricks.begin();
webotricks.setPWMFreq(60);
webotricks.setPWM(servo1, 0, 330);
webotricks.setPWM(servo2, 0, 150);
webotricks.setPWM(servo3, 0, 300);
webotricks.setPWM(servo4, 0, 410);
delay(3000);
}
void loop() {
for (int S1value = 330; S1value >= 250; S1value--) {
webotricks.setPWM(servo1, 0, S1value);
delay(10);
}
for (int S2value = 150; S2value <= 380; S2value++) {
webotricks.setPWM(servo2, 0, S2value);
delay(10);
}
for (int S3value = 300; S3value <= 380; S3value++) {
webotricks.setPWM(servo3, 0, S3value);
delay(10);
}
for (int S4value = 410; S4value <= 510; S4value++) {
webotricks.setPWM(servo4, 0, S4value);
delay(10);
}
////////////////////////
delay(2000);
for (int S4value = 510; S4value > 410; S4value--) {
webotricks.setPWM(servo4, 0, S4value);
delay(10);
}
for (int S3value = 380; S3value > 300; S3value--) {
webotricks.setPWM(servo3, 0, S3value);
delay(10);
}
for (int S2value = 380; S2value > 150; S2value--) {
webotricks.setPWM(servo2, 0, S2value);
delay(10);
}
for (int S1value = 250; S1value < 450; S1value++) {
webotricks.setPWM(servo1, 0, S1value);
delay(10);
}
//////////////////////
for (int S2value = 150; S2value <= 380; S2value++) {
webotricks.setPWM(servo2, 0, S2value);
delay(10);
}
for (int S3value = 300; S3value <= 380; S3value++) {
webotricks.setPWM(servo3, 0, S3value);
delay(10);
}
for (int S4value = 410; S4value <= 510; S4value++) {
webotricks.setPWM(servo4, 0, S4value);
delay(10);
}
for (int S4value = 510; S4value > 410; S4value--) {
webotricks.setPWM(servo4, 0, S4value);
delay(10);
}
///////////////////
for (int S3value = 380; S3value > 300; S3value--) {
webotricks.setPWM(servo3, 0, S3value);
delay(10);
}
for (int S2value = 380; S2value > 150; S2value--) {
webotricks.setPWM(servo2, 0, S2value);
delay(10);
}
for (int S1value = 450; S1value > 330; S1value--) {
webotricks.setPWM(servo1, 0, S1value);
delay(10);
}
}