Project showcase
How to Make a Robotic Arm

How to Make a Robotic Arm

This project will show you how to make a robotic arm using four servos (I only focus on coding, I don't have any 3D files to share).

  • 36,106 views
  • 5 comments
  • 29 respects

Components and supplies

Apps and online services

About this project

This robotic arm is composed of 4 servos :

  • the first servo makes an horizontal sweep
  • the other servos control the nozzle of the robotic arm

He can be control with four potentiometer.

You can also see the angular position of the servos on the serial monitor of Arduino IDE.

Remember that the number of baud for this project is 115200 !

Code

#include <Servo.h>

Servo my1Servo;
Servo my2Servo;
Servo my3Servo;
Servo my4Servo;

void setup()
{
Serial.begin(115200);
my1Servo.attach(3);
my2Servo.attach(5);
my3Servo.attach(6);
my4Servo.attach(9);
}

void loop()
{
int valcomfrom1pot = analogRead(A0);
int degree1 = map(valcomfrom1pot, 0, 1023, 0, 180);
my1Servo.write(degree1);
Serial.println("Angle (Servo 1) : ");
Serial.println(degree1);
int valcomfrom2pot = analogRead(A1);
int degree2 = map(valcomfrom2pot, 0, 1023, 20, 70);
my2Servo.write(degree2);
Serial.println("Angle (Servo 2) : ");
Serial.println(degree2);
int valcomfrom3pot = analogRead(A2);
int degree3 = map(valcomfrom3pot, 0, 1023, 0, 90);
my3Servo.write(degree3);
Serial.println("Angle (Servo 3) : ");
Serial.println(degree3);
int valcomfrom4pot = analogRead(A3);
int degree4 = map(valcomfrom4pot, 0, 1023, 0, 90);
my4Servo.write(degree4);
Serial.println("Angle (Servo 4) : ");
Serial.println(degree4);
Serial.println("");
Serial.println("");
Serial.println("");
Serial.println("");
Serial.println("");
Serial.println("");
Serial.println("");
delay(40);
}

Schematics

Code

4 ServoArduino
#include <Servo.h>

Servo my1Servo;  
Servo my2Servo;
Servo my3Servo;
Servo my4Servo;

void setup()
{
  pinMode(13,OUTPUT);
  Serial.begin(115200);
  my1Servo.attach(3); 
  my2Servo.attach(5); 
  my3Servo.attach(6); 
  my4Servo.attach(9);
}
 
void loop()
{
  int valcomfrom1pot = analogRead(A0);           
  int degree1 = map(valcomfrom1pot, 0, 1023, 0, 180);     
  my1Servo.write(degree1);              
  Serial.println("Angle (Servo 1) : ");
  Serial.println(degree1);
  
  int valcomfrom2pot = analogRead(A1);           
  int degree2 = map(valcomfrom2pot, 0, 1023, 20, 70);     
  my2Servo.write(degree2);                          
  Serial.println("Angle (Servo 2) : ");
  Serial.println(degree2);
  
  int valcomfrom3pot = analogRead(A2);           
  int degree3 = map(valcomfrom3pot, 0, 1023, 0, 90);     
  my3Servo.write(degree3); 
  Serial.println("Angle (Servo 3) : ");
  Serial.println(degree3);
  
  int valcomfrom4pot = analogRead(A3);           
  int degree4 = map(valcomfrom4pot, 0, 1023, 0, 90);     
  my4Servo.write(degree4);
  Serial.println("Angle (Servo 4) : ");
  Serial.println(degree4);
  
  Serial.println("");
  Serial.println("");
  Serial.println("");
  Serial.println("");
  Serial.println("");
  Serial.println("");
  Serial.println("");
 
  delay(40);
}

Schematics

Robotic Arm - schematics
grue_kd2Nwkyumy.fzz

Comments

Similar projects you might like

Robotic Arm Controlled by Human Arm

Project showcase by zezarandrade

  • 12,175 views
  • 1 comment
  • 22 respects

Robotic Arm from Recycled Materials

Project tutorial by circuito.io team

  • 60,816 views
  • 31 comments
  • 175 respects

Simple Programmable Robotic Arm

Project showcase by Ryan Chan

  • 165,450 views
  • 110 comments
  • 378 respects

Practical robotic grip arm

Project tutorial by Fethi Safak CAKIR

  • 2,009 views
  • 3 comments
  • 5 respects

Arduino 3D-Printed Robotic Arm

Project tutorial by Mirko Pavleski

  • 24,572 views
  • 4 comments
  • 45 respects

Record and Play Arduino 3D Printed Robotic Arm

Project tutorial by Mirko Pavleski

  • 8,617 views
  • 4 comments
  • 22 respects
Add projectSign up / Login