Skip to content

17. Machine Design

On this week, the goal of the assignment was actuate and automate your machine. Two weeks ago, I designed and created an arm robot on a base, so our group tried to make programs to make our robot move automatically. The whole works were described here. My contribution would be described on this personal page.

My contribution

My contribution this week was to actuate a mechanical gripper and a manipulator.

Wiring electrical components

To control servo motors used for our robot, I applied an Arduino shield used for Braccico arm robot. This shield enables me to move multiple servo motors by desired angles at the same time. Actual wiring servo motors to the shield is shown below picture.

To supply power to the Arduino shield, I used Direct current stabilized power source equipment in Fablab Kannai. I adjusted the input voltage as 5V.

Coding

I defined three kinds of movement for our robots. One is “Catching” movement. In this movement, first of all, the gripper will open. Secondly, the arm robot will put the gripper down by letting each servo motor rotate by desired angles. Finally, the gripper will close to grasp objects.

The second one is “release” movement. In the second movement, the arm robot will put the gripper down to put the grasped objects. Next, the gripper will open to release the objects.

The last movement is “waiting”. This movement will make the posture of the arm robot keep straight by rotating all servo motors used in each joint by 90 degrees.

Programmed code beased on the above defenition is shown below.

#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("Arm ready");
Serial.print("\n");
Braccio.begin();
Serial.print("start");
Serial.print("\n");
}

void loop() {
  Serial.print("please input");
  Serial.print("\n");
  char ch = Serial.read();
  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.

Result

The video to demonstrate is shown Group page.

*Arduino Code