Eben Kouao
Published © LGPL

DIY Arduino Robot Arm – Controlled by Hand Gestures

Introducing MARK 1, the programmable Arduino Robot Arm. But, that's not all, this Robot Arm can be controlled by Hand Gestures. Here's How..

IntermediateFull instructions provided12 hours34,720
DIY Arduino Robot Arm – Controlled by Hand Gestures

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
JLCPCB Customized PCB
JLCPCB Customized PCB
×1
Servo Motor, MG996R
×6
5V Battery Pack
×1
PCA9685 8-Channel 8W 12V FET Driver Proportional Valve Controller with I2C Interface
National Control Devices PCA9685 8-Channel 8W 12V FET Driver Proportional Valve Controller with I2C Interface
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×2
Stepper motor driver board A4988
SparkFun Stepper motor driver board A4988
×1
NEMA-17 Stepper Motor
×1
Breadboard (generic)
Breadboard (generic)
×1
Inertial Measurement Unit (IMU) (6 deg of freedom)
Inertial Measurement Unit (IMU) (6 deg of freedom)
×1
Arduino Nano R3
Arduino Nano R3
×1
Flex Sensor
×1

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

Thingiverse

https://www.thingiverse.com/thing:1748596

Thingiverse

https://www.thingiverse.com/thing:1750025

Thingiverse

https://www.thingiverse.com/thing:1838120

Thingiverse

https://www.thingiverse.com/thing:1982745

Schematics

Robot Arm Git Repo

Code

Code snippet #1

Plain text
* Include the HCPCA9685 library */
#include "HCPCA9685.h"

/* I2C slave address for the device/module. For the HCMODU0097 the default I2C address
   is 0x40 */
#define  I2CAdd 0x40

/* Create an instance of the library */
HCPCA9685 HCPCA9685(I2CAdd);

//initial parking position of the motor
const int servo_joint_L_parking_pos = 60;

//Degree of robot servo sensitivity - Intervals
int servo_joint_L_pos_increment = 20;

//Keep track of the current value of the motor positions
int servo_joint_L_parking_pos_i = servo_joint_L_parking_pos;

//Minimum and maximum angle of servo motor
int servo_joint_L_min_pos = 10;
int servo_joint_L_max_pos = 180;

Code snippet #3

Plain text
//Defining the servo driver. 0x40 Address is the default I2C Address.
#define I2CAdd 0x40 

int response_time = 5; //Receiving values from the Robotic Glove interval
// Checks whether data is coming from the serial port
  
if (Serial.available() > 0) { 
    state = Serial.read(); // Reads the data from the serial port
    Serial.print(state); // Prints out the value sent
    //Motor functionality code block
}

Code snippet #4

Plain text
if (Serial.available() > 0) { // Checks whether data is coming from the serial port

    state = Serial.read(); // Reads the data from the serial port
    Serial.print(state); // Prints out the value sent


    //For the naming of the motors, refer to the article / tutorial
    //Move (Base Rotation) Stepper Motor Left
    if (state == 'S') {
      baseRotateLeft();
      delay(response_time);
    }
}

Code snippet #5

Plain text
HCPCA9685.Servo(0, servo_joint_L_parking_pos_i); // Drive the servo motor at channel 0 to the desired angle.

//Move Claw Motor Downwards
    if (state == 'f') {
      if (servo_joint_3_parking_pos_i < servo_joint_3_max_pos) {
        HCPCA9685.Servo(4, servo_joint_3_parking_pos_i);
        delay(response_time);
        Serial.println(servo_joint_3_parking_pos_i);
        servo_joint_3_parking_pos_i = servo_joint_3_parking_pos_i + servo_joint_3_pos_increment;
      }
    }

void baseRotateLeft() {
    digitalWrite(stepPin, LOW); //Spin in a direction based on HIGH, LOW
    delayMicroseconds(stepDelay); //Change the speed of the Stepper motor
}

Code snippet #7

Plain text
//LED ON PIN 3
int pinkie_Data = A1;
int finger_Data = A2;
int thumb_Data = A3;

//const int MPU_addr = 0x68;
const int MPU2 = 0x69, MPU1 = 0x68;

Code snippet #11

Plain text
  if (bool_caliberate == false ) {
    delay(1000);
    thumb_high = (thumb * 1.15);
    thumb_low = (thumb * 0.9);

    finger_high = (finger * 1.03);
    finger_low = (finger * 0.8);

    pinkie_high = (pinkie * 1.06);
    pinkie_low = (pinkie * 0.8);

    bool_caliberate = true;
  }

Code snippet #12

Plain text
  // finger 1 - Claw Bend/Open
  if (finger >= finger_high) {
    Serial.print("F");
    delay(response_time);
  }

  if (finger <= finger_low) {
    Serial.print("f");
    delay(response_time);
  }

Github

http://github.com/EbenKouao/arduino-robot-arm

Github

https://github.com/EbenKouao/arduino-robotic-arm

Credits

Eben Kouao

Eben Kouao

5 projects • 64 followers
I like to build stuff.

Comments