0% found this document useful (0 votes)
48 views3 pages

Robotic Arm Project

In this project you are going to make and Arduino based robotic arm using four servos controlled by four Potentiometer attached to it;

Uploaded by

Ryan Olaybal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views3 pages

Robotic Arm Project

In this project you are going to make and Arduino based robotic arm using four servos controlled by four Potentiometer attached to it;

Uploaded by

Ryan Olaybal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CPE-PC 411 - Embedded Systems Robotic Arm Project

Robotic Arm

In this project you are going to make and Arduino based robotic arm using four servos controlled by four
Potentiometer attached to it; each potentiometer is used to control each servo. You can move these
servos by rotating the pots to pick an object.

We provide variable voltage at the ADC channels of Arduino UNO using the potentiometer. So, the digital
values of Arduino are under control of the user. These digital values are mapped to adjust the servo motor
position; hence the servo position is in control of user and by rotating these Pots user can move the joints
of Robotic arm.

Materials Needed:

• Servo Motor SG90 x 4


• Potentiometer 10K x 4
• Arduino Uno
• Breadboard
• Connecting Wires
• External 5V Source
• Popsicles for the arm
• Instant glue or double-sided tape

Connect the Servos and Potentiometers as indicated in the diagram. Carefully place them in the
breadboard and use connecting wires to connect the components to your Arduino Uno.
CPE-PC 411 - Embedded Systems Robotic Arm Project

In your Arduino IDE, encode the program code below:

#include <Servo.h>

Servo ser0; // create servo object to control a servo


Servo ser1;
Servo ser2;
Servo ser3;

int con1 = 0; // analog pin used to connect the potentiometer


int con2 = 1;
int con3 = 2;
int con4 = 3;
int val; // variable to read the value from the analog pin
int val1;
int val2;
int val3;

void setup()
{
ser0.attach(7); // attaches the servo on pin 9 to the servo object
ser1.attach(6);
ser2.attach(5);
ser3.attach(4);
}

void loop()
{
val = analogRead(con1); // reads the value of the potentiometer (value between 0 and 1023)
val = map(val, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180)
val1 = analogRead(con2);
val1 = map(val1, 0, 1023, 0, 179);
val2 = analogRead(con3);
val2 = map(val2, 0, 1023, 0, 179);\
val3 = analogRead(con4);
val3 = map(val3, 0, 1023, 0, 179);

ser0.write(val); // sets the servo position according to the scaled value


ser1.write(val1);
ser2.write(val2);
ser3.write(val3);
delay(15); // waits for the servo to get there
}
CPE-PC 411 - Embedded Systems Robotic Arm Project

SAMPLE ROBOTIC ARM (FOR REFERENCE)

You might also like