Arduino Based Mini Robot Arm
Arduino Based Mini Robot Arm
This simple project explains how to build an Arduino based robot arm.
The objective is to control each part of the robot arm separately using servo motors and potentiometers.
In this project, 3 potentiometers are used to control 3 servo motors to form up a mini robot arm.
The LCD module displays the servo motor angles for determining the position.
Hence , the operator can determine the position of the gripper, even without having the robot arm in the range of vision.
Note : Power supply must be capable of supplying higher current for proper operation of the servo motors.Hence use a power supply with a higher current rating.
Tools & Components
1 X Arduino Nano
3 X Potentiometers (10K Ohm)
3 X Metal Gear Servo Motors (MG995)
1 X LCD Module + I2C Module
1 X Breadboard
Jumper Wires
Robot Arm Mechanism
Connecting Components
Arduino Pin A0 - Potentiometer 03 Sig. Pin
Arduino Pin A1 - Potentiometer 02 Sig. Pin
Arduino Pin A2 - Potentiometer 01 Sig. Pin
Arduino Pin D11 - Servo Motor 01 Sig. Pin
Arduino Pin D10 - Servo Motor 02 Sig. Pin
Arduino Pin D09 - Servo Motor 03 Sig. Pin
Arduino Pin A04 - I2C Module SDA Pin
Arduino Pin A05 - I2C Module SCL Pin
PCB Layout
Top Copper Layer
Complete Layout
Top View
Bottom View
Side View
Robot Arm Mechanism
You can either craft a arm mechanism or there are many types of pre-crafted robot arm skeletons available with servo motors installed.
Arduino Code
//2020 Ardulink.Blogspot.com
//Author - Chathura.H
#include <Servo.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
Servo myservo1;
Servo myservo2;
Servo myservo3;
int potpin1 = A0;
int potpin2 = A1;
int potpin3 = A2;
int val1;
int val2;
int val3;
void setup() {
myservo1.attach(11);
myservo2.attach(10);
myservo3.attach(9);
lcd.begin();
}
void loop() {
val1 = analogRead(potpin1);
val1 = map(val1, 0, 1023, 0, 180);
myservo1.write(val1);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Servo 01 =");
lcd.setCursor(0, 1);
lcd.print("val1");
delay(500);
val2 = analogRead(potpin2);
val2 = map(val2, 0, 1023, 0, 180);
myservo2.write(val2);
delay(15);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Servo 02 =");
lcd.setCursor(0, 1);
lcd.print("val2");
delay(500);
val3 = analogRead(potpin3);
val3 = map(val3, 0, 1023, 0, 180);
myservo3.write(val3);
delay(15);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Servo 03 =");
lcd.setCursor(0, 1);
lcd.print("val3");
delay(500);
}
Upload the code to the Arduino microcontroller.
Using potentiometers, try to change the gripper position.
Calibrate & edit the code to meet with different parameters.
Safety First !
Always Connect the power supply if you are absolutely sure that the components are connected correctly without changing polarity and short circuited the wiring.
Even if it seems nothing is wrong : DOUBLE CHECK EVERYTHING !!
Your Feedback is very important to us.
Please Leave a comment about how you feel about this project.
Comments
Post a Comment