# Machine Building (Group page)¶

## KARAKURI ROBOT ARM¶

1 min video (1920x1080 HTML5 MP4)

## Students¶

 Yozi Shimakawa Kota Tomaru Takayuki Sakai

## Mechanical Design(Week15)¶

The assignment this week should be done by the group. The requirements are shown following.

### Group Assignment¶

• design a machine that includes mechanism+actuation+automation
• build the mechanical parts and operate it manually
• document the group project and your individual contribution

### The machine we created¶

For this assignment, we created 3-DOF manipulator moving by servo motors and mechanical robotic hand.

#### Draft sketch¶

##### Mechanical hand¶

First, we sketched the mechanism to apply to our mechanical hand. We would like to build a basic style of a mechanical hand shown below.

However, we did not know the detailed mechanisms of the hands. Then, we referred to some basic robotic hands models and tried to understand how these major robotic hands are moved. After learning it, we defined the motions of major mechanical hands like a below picture. As a below figure shows, as long as links are joined as a parallelogram, the top side link will move by keeping its orientation same during the joint is rotating. Then, when a hand part is attached to the top side link, the hand part will move to open or close.

Based on the motion, we sketched an overview of our mechanical hand.

##### Manipualtor¶

To build a manipulator, how to connect motors to arm parts was the most mysterious thing for us, because we wondered if a motor could support arms and other motors. Then we referred existed arm robots, example1 and example2

From the above figure, the motors seem to be joined directly to arm components. Then, we decided to use the motor axis attachments to connect the motors and arm components. So, a rough sketch of the connection of a motor and arm components is shown like below figure.

Based on the above sketches and our understandings, we designed 3D models in Fusion360. To assemble components, we planned to use acrylic plates having 3 cm thickness and 3D printing.

##### Rotobitc hand¶

To design the hand, the 3D models of servo motors were necessary to define accurate sizes of components. Then, I download the 3D models of SG 90 micro servo and parallex servo motor from GrabCAD.

By importing these models, we created 3D model of out robotic hand.

#### Assembling¶

After completing cutting acrylic boards and 3D printing, we assembled them by using screws and bearings.

#### Checking motions by manual handling¶

To check the mechanical structures of our robot, we handle the robotic hand and arm robot manually.
As the above pictures show, our robot could move by manual handling, so we thought our mechanical design was well.

## Machine Design¶

### Group Assignment¶

• actuate and automate your machine
• document the group project and your individual contribution

### Electrical wiring¶

#### Mechanical gripper and manipulator¶

To actuate mechanical gripper and manipulator, we used an arduino commercial shield used for Braccico arm robot.

By using the shield, we wired cables of servo motors like below picture. Moreover, to supply power to the motors, we used DC 5V.

#### Rotational Base¶

The base part of the robot arm was created as follows.

Gear data was created using Fusion.
Timing belt is 2mm pitch.
Therefore, the mountain of gear was also 2 mm pitch.
Gears were stacked into pillars using acrylic of 5 mm thickness.

The above data was processed by laser and used as a base of robot arm.
It became as follows in combination.

### Programming our robot¶

#### Mechanical gripper and manipulator¶

To program the gripper and manipulator, we wrote below program. Through serial input from a keyboard, users can command to make the gripper and the manipulator catch and release when they want.

```#include <Servo.h>
#include <Braccio.h>

Servo base;
Servo shoulder;
Servo elbow;
Servo wrist_rot;
Servo wrist_ver;
Servo gripper;

void setup() {
Serial.begin(9600);
Serial.print("\n");
Braccio.begin();
Serial.print("start");
Serial.print("\n");
}

void loop() {
Serial.print("\n");
if(ch=='1'){
Braccio.ServoMovement(40,         90, 90, 90, 0, 0,  80);
delay(1000);
Braccio.ServoMovement(40,         45, 70, 20, 0, 0,  80);
Serial.print("catch");
Serial.print("\n");
delay(3000);
Braccio.ServoMovement(40,         45, 70, 20, 0, 0,  10);
delay(1000);
}
else if(ch=='2'){
Braccio.ServoMovement(40,         135, 110, 160, 0, 0,  10);
Serial.print("release");
Serial.print("\n");
delay(3000);
Braccio.ServoMovement(40,         135, 110, 160, 0, 0,  80);
delay(1000);
}
else if(ch=='3'){
Braccio.ServoMovement(40,         90, 90, 90, 0, 0,  10);
Serial.print("release_ver2");
Serial.print("\n");
delay(3000);
Braccio.ServoMovement(40,         45, 70, 20, 0, 0,  10);
delay(1000);
Braccio.ServoMovement(40,         45, 70, 20, 0, 0,  80);
delay(1000);
}
else{
Braccio.ServoMovement(40,         90, 90, 90, 0, 0,  10);
Serial.print("waiting");
Serial.print("\n");
delay(5000);
}
}
```

To actuate servo motors, we used existed function

```Braccio.ServoMovement ()
```

This function enables users to move directly several servo motors by the desired angles at the same time.

#### Rotational Base¶

Using Fritzing, I made a wiring diagram of Arduino and MoterDriver (A4988) as follows.

It was actually wired.

The following program was created to operate the installed stepping motor.
And library was used to operate the stepper motor driver (A4988).
* AccelStepper

```#include <AccelStepper.h>
//Define stepper motor connections
#define dirPin 4
#define stepPin 5

#define STATUS_STOP 0
#define STATUS_RIGHT 200
#define STATUS_LEFT -200

//Create stepper object
AccelStepper stepper(1,stepPin,dirPin); //motor interface type must be set to 1 when using a driver.

int state = 0;

void setup()
{
Serial.begin(9600);
stepper.setMaxSpeed(1000); //maximum steps per second
stepper.setAcceleration(30);
}
void loop()
{
stepper.setSpeed(state); //steps per second
stepper.runSpeed(); //step the motor with constant speed as set by setSpeed()
if (Serial.available() > 0) {

case 'l':
state = STATUS_RIGHT;
break;
case 'r':
state = STATUS_LEFT;
break;
case 's':
state = STATUS_STOP;
break;
default:
break;
}
}
}
```

## Result¶

The robot arm moved without incident.