Making a Robot Claw

The beginning of 2019 found me working to build a platform for promoting sea buckthorn organic juice. The first finished part of the platform was a 3D printed robotic claw. This claw is attached to a 6-axis robotic arm SainSmart. It is the classic robot arm which reproduces the industrial design.

The robotic claw is used to:

  1. grab a small plastic cup with juice;
  2. detect if the plastic cup was grabbed. I use a limit switch sensor to detect the plastic cup;
  3. detect when the plastic cup is taken over;

The design
The application is not very complex. I need a robot claw to carefully handle a plastic juice cup without breaking the plastic cup or losing it on the way. I analyzed the steps, actions and worst case scenarios and I decided to stay in the classic design for the robot claw. Two claws actuated by a servo motor are what I need to grab and move a plastic cup. A more complex design with several claws and many degrees of freedom would be too much.

I have a few constraints to accomplishing the above steps. First, the plastic cup has a height of 5.2 cm. The claws will not have to cover a large surface so there should be enough space for picking up the cup. Also, I can’t prevent the cup to not slide between claws with an abrasive material glued on the inner surface. The plastic cup should not resist when it will be taken over by a person.

Robotic claw: CAD design and 3D printed

The solution

  • the claws have a thickness of 1 cm, that is about 20% of the height of the plastic cup. I could have made them less thick but I needed space to add the limit switch sensor for sensing the plastic cup.
  • gluing a rubber piece to the inner surface of the claw is excluded. The rubber would have prevented the plastic cup from slipping, but it would have made it very difficult to take it from the claws. I would have risked the robot arm being pulled up together with the cup. The solution was to use a high-torque servo motor able to maintain the position of the claws. SainSmart uses for the 6-axis robotic arm gripper the SG-90 servo motors. These servo motors cannot hold anything between the claws.

The implementation
The two claws attached to the servo motor moves left and right through a traditional gearing system. Only one of the claws is attached to the output shaft of the servo, while the second claw is driven by the first claw through the gear system.

The distance between the two claws can be adjusted enough to leave space and grab the plastic cup.

I've been making more attempts until I reached the current design. I tried longer and shorter claws. At first, I had trouble detecting the plastic cup, while at the second design, the plastic cup slide between claws.

I’ve been making more attempts until I agreed on the current design. I tried longer and shorter claws. At first, I had trouble detecting the plastic cup, while at the second design, the plastic cup slide between claws.

Both claws have sharp heads and inclined towards the inside. This design does not allow the plastic cup to slide out when the claws are fixing the plastic cup or during handling. Also, the shape of the plastic cup is conical and once it fixed by the claws, it does not slip down. Okay, if the plastic cup is filled full with liquid and the handling is at a high speed, the plastic cup could slide between claws. I’ll program the arm movements to work at lower speeds and fast enough to not seem boring to the user. Otherwise, the servo motor used is strong enough to hold the two claws in position. I will take this into account when I’ll programming the robotic arm.

The servo motor output shaft allows fixing in place only one claw. I chose to place the cup detection sensor on the claw fixed by the servo motor shaft. Also, another reason is that even though the sensor limit switch does not need high forces to trigger the flap, the wear of components occurs over time.

The robotic claw is attached by the arm through a tube that comes over the PVC pipe. This is somewhat larger than the PVC pipe to secure the wires of the servo motor and the sensor.

How the robotic claw works

The principle of operation is simple. I send the command to the servo motor to close the claws to a fixed position according to the size of the plastic cup. When the two claws grasp the plastic cup, the limit switch sensor is closed, so I get the signal that the plastic cup is between the robot’s claws. When the servo motor receives the command to open the claws at a certain position set by me, the switch sensor is released and I receive the signal that the plastic cup is delivered.

Below you can find the Arduino code used to test the robotic claw:

/*
Project name: RoboBioca
Author: Dragos Calin for Bioca - Sea Buckthorn Organic Juice
Date: 03.January.2019
Version: 1
File: This file is used to control a robotic claw. 
*/

#include <Servo.h>
#define INTERVAL_CONNECTION 200
#define INTERVAL_2000 2000
#define INTERVAL_4000 4000

#define limitSwitchCupClaw 9 //the pin for the limit switch sensor
#define servoSpeed 15 

unsigned long timeConnection = 0;
unsigned long time_2000 = 0;
unsigned long time_4000 = 0;

Servo servoE;
const int servoPinE = 4; 

void setup() 
{
  Serial.begin(9600);
  pinMode(limitSwitchCupClaw, INPUT_PULLUP);
  clawGrabCup(); //initiate position to grab the plastic cup
     
}

void loop() 
{ 
//clawCupSensor() //1 - cup grabbed by claw, 0 - no cup 

//simple test for grabbing and releasing the plastic cup
if(millis() > time_2000 + INTERVAL_2000){
        time_2000 = millis();
         clawHoldCup();
      }

       
if(millis() > time_4000 + INTERVAL_4000){
        time_4000 = millis();
           clawGrabCup();
      }

 if(clawCupSensor()==1)
        {
        Serial.println("01 - The robotic claw FIX the plastic cup");    
        }
       else{
        Serial.println("02 - The robotic claw RELEASE the plastic cup");
       }

          
 }//End Loop


//*******FUNCTIONS*******
void clawHoldCup(){
  controlServoE(servoE.read(),117); //117 - claws close to fix the plastic cup
  }
  
void clawGrabCup(){
  controlServoE(servoE.read(),105); //105 - claws opening to grab the plastic cup
}


int clawCupSensor(){
  int clawCup=0;
  if(millis() > timeConnection + INTERVAL_CONNECTION){
    timeConnection = millis();
    if (digitalRead(limitSwitchCupClaw)==LOW){
            return clawCup=1;
        }
       else{
           return clawCup=0;
       }
   }
}

void controlServoE(int posE, int newPosE)
{
 servoE.attach(servoPinE);
 if (posE<=newPosE){
   for (int pos = posE; pos <= newPosE; pos += 1) { 
      servoE.write(pos);              
      delayServoSpeed();                  
    }
   }else{
     for (int pos = posE; pos >= newPosE; pos -= 1) { 
      servoE.write(pos);              
      delayServoSpeed();                  
    }
  }
  servoE.detach(); 
}

void delayServoSpeed(){
   delay(servoSpeed);  
  }
  

The 3D printed parts
I used my cheap 3D printer to print the parts. The quality is not bad for a DIY product, but at this moment I don’t have other possibilities. There is room for improvement on the design side.

I have tested the claws with an MG996R from Tower Pro servo and the S06NF STD servo.

You can download the 3D printing files by visiting the link below.

Link to files on Thingiverse.

Leave a Reply

Required fields are marked *.