Arduino Uno Powered Robotic Arm

Hi, my name is Hope. I designed a robotic arm that you can control with a computer program. This arm is designed with an Elegoo UNO R3 or Arduino Uno and some servo motors. This project is perfect for beginners and for anyone wanting to learn about robotics, electronics, and 3d modeling.
Supplies
Materials
- Elegoo UNO R3 - Link
- DC Power 5v Female Connector - Link
- 5V Power Supply - Link
- 3 x SG90 Servos - Link
- 3 x MG996R Servos - Link
- Breadboard - Link
- 24 x Breadboard Jumper Wire Male to Male - Link
- Electrical tape - Link
- Digital Caliper - Link
Optional
- 3d Printer (I’m using the Bambu Lab A1 Mini)
- PLA Filament
Software
- Solidworks
- Bambu Studio (Splicing Software)
Drafting Parts




The idea behind this project was that I was inspired by robotic arms that are used in factories for manufacturing. I wanted to attempt this project to explore this interest in robotics and also learn more about electronics and 3d modeling. The first part of this project is creating the various parts of the arm. For this phase of the project since I wanted to create all the parts by scratch I started off with a design phase. During this phase I took all the measurements of my components being the servos and connectors for the wires. Below are some design drawings I did to come up with the final design. This process is very useful to map out what design aspects I wanted to keep and which ones I didn't want to include.
Designing the Parts



The first part of this project is designing the base. This is the foundation of the arm and stabilizes the whole arm. For this piece I made sure to design the middle of the servo piece to line up directly in the center of the piece. When designing this piece something that had to be mindful was on the servos the center of the rotating gear is off centered. So make sure to keep this in mind if you want to design your own parts. Below I have added some photos of each of the servos that were useful for the designing process.
Assembling the Arm


This next step involves mounting all of our components. For this step I used the provided screws for each of the servos that came with the servo motors. For this step I used a Phillips screw driver to connect all the servos. Next was installing the mounting pieces to the other end of the arms pieces.
Wiring the Arm

.jpg)
This next step is wiring up all the components. For the first part I took the 5v DC connector and exposed the positive and negative wire, next I took a male to male wire and cut it in half. Then I combined the wires, combining the positive wire with one half and doing the same with the negative wire. For this project I used electrical tape. Note that this is only temporary so if you can use crimps or solder.
Once I was done with that, next I connected the positive side of the DC connector to the positive rail of the breadboard and did the same with the negative wire to the negative rail. Next I did the same to each of the servos, to connect each of the servos following the circuit I linked below for a guide.
Coding the Arm
For this next part I used some code online to link the servos to the arduino. Below is the code and this code moves the front wrist as well as the shoulder servo.
Code
#include <Servo.h>
Servo servo_0; // Declaration of object to control the first servo
Servo servo_1; // Declaration of object to control the second servo
Servo servo_2; // Declaration of object to control the third servo
Servo servo_3; // Declaration of object to control the fourth servo
Servo servo_4; // Declaration of object to control the fifth servo
Servo servo_5; // Declaration of object to control the sixth servo
Servo servo_6; // Declaration of object to control the seventh servo (not used in this project)
void setup() {
Serial.begin(9600); // Initialize serial communication
servo_0.attach(2); // Associate servo_0 to pin 2
servo_1.attach(3); // Associate servo_1 to pin 3
servo_2.attach(4); // Associate servo_2 to pin 4
servo_3.attach(5); // Associate servo_3 to pin 5
servo_4.attach(6); // Associate servo_4 to pin 6
servo_5.attach(7); // Associate servo_5 to pin 7
servo_6.attach(8); // Associate servo_6 to pin 8
}
void loop() {
if (Serial.available() > 0) { // If there is data available to read
String input = Serial.readStringUntil('\n'); // Read the data string until newline
int servoIndex = input.substring(0, 1).toInt(); // Get the servo index
int servoValue = input.substring(2).toInt(); // Get the servo value
switch (servoIndex) {
case 1:
servo_0.write(servoValue);
break;
case 2:
servo_1.write(servoValue);
break;
case 3:
servo_2.write(servoValue);
break;
case 4:
servo_3.write(servoValue);
break;
case 5:
servo_4.write(servoValue);
servo_6.write(180 - servoValue);
break;
case 6:
servo_5.write(servoValue);
break;
default:
// Invalid servo index
break;
}
}
}
Outro
This project is still very much a work in progress, this is my first project using 3d printing so there are some tweaks to be done. And not just for the 3d parts but also the code and electronics. In the future I hope to further develop this project to maybe have it be controlled by an xbox controller. We will see what the future holds. Thank you for checking out my design!