Bot Reboot
Published © GPL3+

Robotic Arm (with linear actuators)

I have made a different type of design than the normal robotic arms, based on linear actuators.

IntermediateFull instructions provided1,379

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
DRV8835 Dual Motor Driver Carrier
×2
10k rotary potentiometer
Optional
×3
GA12-N20 100 RPM Micro Metal Gearmotor
×4
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
Resistor 1k ohm
Resistor 1k ohm
×2
Breadboard (generic)
Breadboard (generic)
×1
Pushbutton switch 12mm
SparkFun Pushbutton switch 12mm
Optional
×1
Battery (generic)
The battery voltage depends on motor voltage. Also, consider that this should be in the motor driver input voltage parameters (2 - 11V).
×1

Software apps and online services

Arduino IDE
Arduino IDE
SketchUp
Ultimaker Cura

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Custom parts and enclosures

STL's Files

With this format, you can print every component at the 3D printer.

Robotic Arm Controller App

Install this app on your Android device. Then, turn on the Robotic Arm and pair the HC-05 with your phone via Bluetooth. Finally, open the app and tap one the "Connect to HC-05" button, then select the HC-05 device. It is now ready to go.

Schematics

Circuit Schematic

Code

Robotic Arm Code

Arduino
Doesn't have implemented the potentiometers control
/*
 * Code made by Bot Reboot
 * For further explanation for phase, enbl and mode,
 * see the Polulu DRV8835 Dual Motor Driver Carrier
 */
struct Motor {
  int nrMotor;
  int phase; //GPIO input
  int enbl; //PWM input
}m1, m2, m3, m4;

int val, cnt = 0, v[3];
int mode1 = 7;
int mode2 = 8;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  
  m1.nrMotor = 1;
  m2.nrMotor = 2;
  m3.nrMotor = 3;
  m4.nrMotor = 4;
  m1.phase = 4;
  m2.phase = 6;
  m3.phase = 10;
  m4.phase = 12;
  m1.enbl = 3;
  m2.enbl = 5;
  m3.enbl = 9;
  m4.enbl = 11;
  
  pinMode(m1.phase, OUTPUT);
  pinMode(m1.enbl, OUTPUT);
  pinMode(m2.phase, OUTPUT);
  pinMode(m2.enbl, OUTPUT);
  pinMode(m3.phase, OUTPUT);
  pinMode(m3.enbl, OUTPUT);
  pinMode(m4.phase, OUTPUT);
  pinMode(m4.enbl, OUTPUT);
  pinMode(mode1, OUTPUT);
  pinMode(mode2, OUTPUT);

  delay(50);
  digitalWrite(mode1, HIGH);
  digitalWrite(mode2, HIGH);
}

////////////Bluetooth Communication
void valuesread() {
  val = Serial.read();
  cnt++;
  v[cnt] = val;
  if (cnt == 3)
    cnt = 0;
}
void processing() {
  int a = v[1];
  if (a == 1) { //left joystick 
    motor_controler(m2, v[2]); //OX axis
    motor_controler(m1, v[3]); //OY axis
  }
  if (a == 2) { //right joystick
    motor_controler(m4, v[2]); //OX axis
    motor_controler(m3, v[3]); //OY axis
  }
}

void loop() {
  // put your main code here, to run repeatedly:
  if (Serial.available()) {
    while(Serial.available() == 0);
    valuesread(); 
  }
  processing();
}

////////////Motor Control

void forward_brake(Motor m, int val) {
  digitalWrite(m.phase, HIGH);
  analogWrite(m.enbl, val);
}

void backward_brake(Motor m, int val) {
  digitalWrite(m.phase, LOW);
  analogWrite(m.enbl, val);
}

void motor_controler(Motor &m, int val) {
  if(val == 100) {
    forward_brake(m, 0);
  }
  else {
    if (val > 100) {
      int x = map(val, 100, 200, 0, 255);
      forward_brake(m, x);
    }
    else {
      int x = map(val, 100, 0, 0, 255);
      backward_brake(m, x);
    }
  }
}

Credits

Bot Reboot

Bot Reboot

3 projects • 39 followers
Student in the first year at CSE TU Delft.

Comments