Project tutorial

Robot Arm with Controller © LGPL

Robot arm and its controller.

  • 5,729 views
  • 9 comments
  • 91 respects

Components and supplies

A000066 iso both
Arduino UNO & Genuino UNO
×1
Servo Motor MG995
×1
Servo Motor DS3115
×1
10c0381 40
Rotary Potentiometer, 10 kohm
×1

Apps and online services

About this project

I made obot arm and its controller.

Constitution

The robot arm uses three conventional PWM servos, and each angle is controlled by a variable resistor. The rotary potentiometer used B curve 10k ohm.

Robot Arm Production

Two DS3115 servo motors were used in the vertical direction, and MG995 servo motor was used in the swing direction.

Controller Production

I made a controller case with a 3D printer.

A hole and a positioning hole for screwing through the knob of the rotary potentiometer, and a dent for inserting the knob are provided.

Assemble the fabricated parts and three rotary potentiometers to complete!

The rotary potentiometer has now been placed in the same direction as the rotation axis of the servomotor of the robot arm!

Arduino Code

This simple code simply reads the value of the rotary potentiometer with an analog pin, converts it to an angle, and inputs it to the corresponding servo.

#include <Servo.h>

Servo myservo1, myservo2, myservo3;

float th1=90.0,th2=90.0,th3=90.0;
float val1, val2, val3;

void setup() {
Serial.begin(9600);
myservo1.attach(9, 500, 2420); //MG995
myservo2.attach(10, 820, 2140); //DS3115
myservo3.attach(11, 820, 2140); //DS3115
set_servo();
}

void loop() {
val1 = analogRead(A1);
val2 = analogRead(A2);
val3 = analogRead(A3);

th1 = map(val1, 170.0, 880.0, 0.0, 180.0);
if(th1 >= 180.0){
th1 = 180.0;
}else if(th1 <= 0.0){
th1 = 0.0;
}

th2 = map(val2, 150.0, 860.0, 0.0, 180.0);
if(th2 >= 180.0){
th2 = 180.0;
}else if(th2 <= 0.0){
th2 = 0.0;
}

th3 = map(val3, 860.0, 160.0, 0.0, 180.0);
if(th3 >= 180.0){
th3 = 180.0;
}else if(th3 <= 45.0){
th3 = 45.0;
}

set_servo();
}

void set_servo(){
myservo1.write(th1);
myservo2.write(th2);
myservo3.write(th3);
}

Operation

Complete by wiring the rotary potentiometer and connecting it to Arduino!


Custom parts and enclosures

Comments

Similar projects you might like

ARMin v2: Simple Robot Car and Arm Controller Using Python

Project tutorial by HyperChiicken

  • 1,762 views
  • 0 comments
  • 7 respects

MK2 Plus Robot Arm Controller

Project tutorial by Samira Peiris

  • 6,249 views
  • 6 comments
  • 24 respects

ARMin: Simple Robot Arm Controller Using Python

Project tutorial by HyperChiicken

  • 4,233 views
  • 0 comments
  • 7 respects

MeArm Robot Arm - Your Robot - V1.0

Project tutorial by Benjamin Gray

  • 29,211 views
  • 4 comments
  • 41 respects

Gesture Controlled Trainable Arduino Robot Arm via Bluetooth

Project tutorial by KureBas Robotics

  • 24,856 views
  • 55 comments
  • 161 respects
Add projectSign up / Login