written report of robot design - university of florida reports/ge_shaojie/ge...for the walking...

21
Written Report of Robot Design Name: Shaojie Ge Robot Name: Four Leg Walking Robot Course: EEL 4665/5666 Intelligent Machines Design Laboratory Instructors: Dr. A. Antonio Arroyo Dr. Eric M. Schwartz TAs: Devin Hughes Josh Weaver Andy Gray

Upload: others

Post on 19-Mar-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

Written Report of Robot Design

Name: Shaojie Ge

Robot Name: Four Leg Walking Robot

Course: EEL 4665/5666 Intelligent Machines Design

Laboratory

Instructors: Dr. A. Antonio Arroyo

Dr. Eric M. Schwartz

TAs: Devin Hughes

Josh Weaver

Andy Gray

Page 2: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

1. Abstract

This article introduces the four legged walking robot I design for IMDL class. I

make an introduction to my design and the integrated system, mobile platform,

actuation system, sensors I used in this design, and I present the performance of the

robot and experiment result

2. Introduction

The robot I want to build is a robot that simulates the movements of a four leg

walking animal. Its basic function include: Walking Straight with four legs, sensing

the obstacles in its way, determining the size of the obstacle, and walking backwards

when it's a big one, turning to different direction (left/right) with respect to the

orientation of the obstacle if it's a small one.

Figure1 Robot Overview

Page 3: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

A walking machine has an irreplaceable importance in modern robot design and

application. A robot with wheels or caterpillar band is suitable when being used in

sandy and muddy territory, but they cannot be used in hilly area or ground with a lot

of obstacles. The walking mechanism robots can be able to make them walk in these

areas due to the fact that the area they touch the ground is small, which make they

more adaptive and mobile with a proper desired supporting point.

The four leg walking robot consists of a platform, a control board, a servo driver, 9

servo motors, and an IR sensor. The control board is powered by a 9 VDC battery and

the servo driver is powered by a 6 VDC NIMH battery. This writing report is going

introduce the way I build the robot, including the platform design, the walking

mechanism, and sensor selection and installation, control method.

3. Integrated System

The platform is for mounting the main hardware of the robot, including the

controlling board, the sensor and other necessary parts.

The control board I selected is Arduino Mega 2560, it is for controlling the robot:

running the downloaded program, getting the sensor’s signal and controlling the

movements of the robot.

I selected SSC-32 servo driver to control the servo motors of the robot. SSC-32

servo motor controller is connected to Arduino via RX-TX0 port Bus for data

transmission.

Servo motors are for performing the desire movements of the robot. The robot has

four legs. Every leg has 2 joints, each with a motor to control its rotating angle. They

are all for walking straight and turning by rotating backward and forward. The front

legs have the similar structure of the rear legs. The last motor is mounted on the head

part of the robot so that it can turn its head to different direction.

The IR sensor is for detecting obstacles, when the robot is walking toward an

Page 4: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

obstacle, the sensor detect it and then trigger a signal change back to the controlling

board, after reading the signal, the controlling board sends out a signal to the motor

driver connected with it and makes the sensor turn to another direction, if there is no

obstacles, then the controlling board sends out signal to make the robot turn to that

direction and then walk straight.

4. Mobile Platform

The mobile platform I designed for my robot is a rectangular board supporting

servo driver, four legs. I also designed another one supporting Arduino mega 2560,

the two boards are connected to each other with special designed screws and nuts. The

servo motors are connected by several servo brackets and connector brackets. The

legs are connected to the platform with offset axis brackets.

5. Actuation

I use Arduino mega 2560 r3 as the controlling board of the robot. It has a number

of facilities for communicating with a computer, another Arduino, or other

microcontrollers. The ATmega2560 provides four hardware UARTs for TTL (5V)

serial communication. By using UARTs of Arduino mega 2560, I can transmit data

between Arduido mega 2560 r3 and SSC-32 servo motor control board.

Page 5: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

Figure2 Arduino Mega 2560 Hardware Information

I use SSC-32 servo motor controller to power the 9 servo motors of the robot.

SSC-32 servo motor controller is connected to Arduino via a RS232 Bus for data

transmission. The reason I select it is that SSC-32 can be able to control several

motors at the same time. And it can make motors move at desired speed, or move

within a desired period of time.

Figure3 SSC32 Hardware Information

For the motor selection, since it is a walking robot, the joints of legs are supposed

Page 6: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

to withstand a relatively high torque during walking, the output torque of the servo

motors for legs is an important parameter to look at. I choose DELUXE HS-485HB

servo motor to build my robot. It has 6kg.cm output torque when powered by 6 dc

volts, it is a standard type servo so I can mount it in general servo bracket.

Figure4 HS-485HB

6. Sensors

The sensor I want to use is the IR sensor for obstacle avoidance. when the IR range

finder is close to an obstacle, it transmit the signal back to the board, then I wrote a

program that if the returning signal is higher than a certain amount, like 300, the

control board set output pin high to light the LED, otherwise it set the output pin low.

Page 7: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

Figure5 IR sensor

My special sensor system is the walk mechanism of my robot. Since my robot is a

walking robot with four legs. It is important to make the robot walk straight stably

with these legs without falling down.

For the walking mechanism of the robot, I want to design it in the alternating

walking gait. Alternating waking mechanism is developed in order to taking

advantages of the four leg robot’s flexibility compared to wheeled robot in complex

terrain. Alternating gait is becoming the new concentrating research in robot research.

In alternating gait, the movement of each leg can be divided into two parts. They are

uplifting and advancing. When a leg’s adjacent legs begin to touch the ground, the leg

starts moving and gives adjacent legs signal. Similarly, when the leg is touching the

ground, it sends signal to adjacent legs to make them perform the corresponding

movements. Thus, once the entire robot is in the four legged walking state, the

submissive four legged walking gait can be maintained continuously. As the time the

leg has to wait for adjacent legs touching the ground is determined by the movements

and touching spots when hitting the ground of adjacent legs. The gait itself is

considered to be unstable for bumpy ground. However, when walking on a flat ground,

the moving cycle of each leg is going to be the same.

As for connection, I choose to power both the power terminal VS1, VS2 and VL

with a 6V NIMH battery pack. Thus I keep shorting bar jumpers

“VL=VS”,”VS1=VS2” connected. I connected the servo motors on the same side to

channel 0 to 3, and the servo motors on the other side of robot to channel 16 to 19.

Page 8: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

The SSC32 and Arduino mega 2560 is connected by a wire between the serial port

TX0 on Arduino and port RX on SSC32.

The main issue of designing the walking mechanism is to set correct parameters on

each servo motor to control its position and movement speed in every walking step of

the robot. The purpose is to make every joint is compatible with other joints so that

they will not interrupt each other, thus move the robot forward instead of staying at

the same place or slipping around.

The control of the servo motors is done with Arduino develop tool. To make a

servo move at a desired speed to a desired position, I need to send a control code via

the serial port to the SSC32 by Arduino. For example: “#5 P1600 #10 P750 T2500

<cr> ”, this will move servo #5 to position 1600 and servo #10 to position 750. The

entire movement will take 2.5 seconds.

Figure6 Arduino develop tool

The motion of walking can be divided into 8 portions. Basically it is an alternating

walking mechanism. When the front-left and rear-right legs are upshifting to push the

robot advance, the other two legs are rotating forward. Similarly, when front-right and

Page 9: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

rear-left legs are upshifting, the other legs are advancing.

The motion of turning direction is similar to the walking motion, it also consists of

two states: upshifting and advancing. The issue in this part is that the legs cannot

move simultaneously when turning. Because it will give apply force of opposite

direction to the robot, basically they just counteract with each other. I made its two

legs of the same side stay still while other two moving in sequence (upshifting and

advancing) to actually apply force to the robot to turn.

I calibrated the parameters of all the servos on the purpose that it will actually walk

and turn direction rather than slipping back and forth, that means the four legs must

work with each other well so that they will not apply wrong force to the robot to

interrupt the motion of walking or turning in the process. And I set a delay between

each step to make the robot walk more stably.

Page 10: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating
Page 11: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

Figure6 Alternating Walking Sequence of Robot in Walking Motion

7. Behaviors

When the switch is turned on, the robot will light the LED and start rotating servo

motors to desired angle with certain speed. It will walk forward with alternating

walking gait. When there is something blocking its way, it will act based on the size

of the obstacle: If it’s a big one, the robot will move back; If it’s a relatively small one,

it will turn to direction where there is no obstacle ahead, and keep moving.

8. Experimental Layout and Results

The position of each servo motors in every step is described as blow.

Walking forward:

"#0 P1300 #1 P1650 #2 P1700 #3 P1200 #16 P1200 #17 P1650 #18 P1800 #19 P1300

T1500"

“#0 P1500 #1 P1450 #2 P1500 #3 P1900 #16 P1500 #17 P900 #18 P1600 #19 P1450

T1000"

"#2 P1350 #16 P1700 T1500"

"#3 P1550 #17 P1150 T1500"

Page 12: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

"#0 P1700 #1 P1250 #18 P1350 #19 P1750 T1500"

"#0 P1500 #1 P1900 #2 P1520 #3 P1400 #16 P1400 #17 P1450 #18 P1500 #19 P1150

T1000"

"#0 P1300 #18 P1800 T1500"

"#1 P1650 #19 P1300 T1500"

Walking backward:

"#0 P1300 #1 P1650 #2 P1700 #3 P1200 #16 P1200 #17 P1650 #18 P1800 #19 P1300

T700"

"#0 P1300 #1 P1650 #2 P1520 #3 P1400 #16 P1400 #17 P1450 #18 P1800 #19 P1300

T500"

"#1 P1900 #19 P1150 T500"

"#0 P1500 #18 P1500 T500"

"#0 P1700 #1 P1250 #2 P1350 #3 P1550 #16 P1700 #17 P1150 #18 P1350 #19 P1750

T700"

"#0 P1500 #1 P1450 #2 P1350 #3 P1550 #16 P1700 #17 P1150 #18 P1600 #19 P1450

T500"

"#3 P1900 #17 P900 T500"

"#2 P1500 #16 P1500 T500"

Turning left:

"#0 P2300 #1 P650 #2 P750 #3 P2200 #16 P1900 #17 P950 #18 P1150 #19 P1950

T500"

"#0 P2300 #1 P650 #2 P750 #3 P2200 #16 P1400 #17 P1450 #18 P1600 #19 P550

T300"

"#18 P2200 T300"

"#19 P900 T300"

"#16 P800 #17 P2050 T300"

"#16 P1400 #17 P550 #18 P1600 #19 P1450 T500"

"#16 P1900 T300"

"#17 P950 T300"

Turning right:

Page 13: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

"#0 P1100 #1 P1850 #2 P1900 #3 P1050 #16 P800 #17 P2050 #18 P2200 #19 P900

T500":

"#0 P1500 #1 P1450 #2 P1500 #3 P2300 #16 P800 #17 P2050 #18 P2200 #19 P900

T300"

"#2 P1150 T300"

"#3 P1800 T300"

"#0 P1900 #1 P1050 T300"

"#0 P1500 #1 P2300 #2 P1520 #3 P1400 T500"

"#0 P1100 T300"

"#1 P1850 T300"

9. Conclusion

As humanity is reaching out its activity space, to accomplish the task to walking on

intricate surfaces, like seafloor, or unknown planet surface, we can hardly rely on

robot walking barely on wheels. This project is to develop a four leg walking robot,

its structure mimics the walking mechanism of mammals, with controlling of the

rotation of 9 servo motors, I give it 9 degree of freedom. This article introduces the

whole process of me designing and building this robot.

10. Documentation

i. Xia Hu. The Gait Control and Dynamic Simulation of Hexapod Walking Robot.

2008.

ii. CAI Rui-yan. Design of Servo Control System Based on Arduino. Computer

Knowledge and Technology,2012,(8).

Page 14: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

11. Appendices

Program for demo:

const int analogInPin = A0; // Analog input pin that the potentiometer is attached to

const int ledPin = 9; //LED pin #

int ledState = LOW;

int sensorValue = 0; // value read from the pot

int outputValue = 0; // value output to the PWM (analog out)

int signal;

String A_Walk[14];

String Speed=" S1000";////T100<=speed<=T9999,default:1000

int value1 = 0;

int value2 = 0;

int value3=0;

void setup() {

Serial.begin(9600); // initialize serial communications at 9600 bps

pinMode(ledPin,OUTPUT);

Serial.println("#0 P1500 #1 P550 #2 P1520 #3 P2300 #16 P1400 #17 P2350 #18

P1600 #19 P600 T700");

delay(1500);

Serial.println("#0 P1500 #1 P550 #2 P800 #3 P2300 #16 P1400 #17 P2350 #18

P2200 #19 P600 T1000");

delay(1500);

Serial.println("#0 P1500 #1 P1450 #2 P1520 #3 P1400 #16 P1400 #17 P1450 #18

P1600 #19 P1450 T700");

Page 15: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

delay(1000);

}

void loop() {

sensorValue = analogRead(analogInPin);

digitalWrite(ledPin,HIGH);

forward();

if(sensorValue>200)//The robot is sensing a obstacle

{

Serial.println("#20 P1950 T500");

delay(500);

value1= analogRead(analogInPin);

delay(1000);

Serial.println("#20 P1050 T500");

delay(500);

value2= analogRead(analogInPin);//Determine the size of the obstacle

delay(1000);

Serial.println(value1);

delay(500);

Serial.println(value2);

delay(500);

if(value1>200&&value2>200)//it is a big obstacle

{

Serial.println("#20 P1500 T500");

delay(500);

//Serial.println("#0 P1500 #1 P1450 #2 P1520 #3 P1400 #16 P1400 #17

P1450 #18 P1600 #19 P1450 #20 P1500 T1500");//stand

//delay(1500);

backward();//the robot moves backwards

Page 16: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

backward();

backward();

Serial.println("#0 P1300 #1 P1650 #2 P1700 #3 P1200 #16 P1200 #17

P1650 #18 P1800 #19 P1300 T700");//back to position 1

delay(1000);

Serial.println("#0 P1500 #1 P1450 #2 P1520 #3 P1400 #16 P1400 #17

P1450 #18 P1600 #19 P1450 T1000");//stand up

delay(1500);

Serial.println("#0 P1500 #1 P550 #2 P800 #3 P2300 #16 P1400 #17

P2350 #18 P2200 #19 P600 T1000");//benddown1

delay(1500);

Serial.println("#0 P1500 #1 P550 #2 P1520 #3 P2300 #16 P1400 #17

P2350 #18 P1600 #19 P600 T700");//benddown2

delay(1000);

value3=analogRead(analogInPin);

delay(15);

while(value3>100)

{value3=analogRead(analogInPin);

delay(15);

digitalWrite(ledPin,LOW);

}

digitalWrite(ledPin,HIGH);

Serial.println("#0 P1500 #1 P550 #2 P1520 #3 P2300 #16 P1400 #17

P2350 #18 P1600 #19 P600 T700");

delay(1000);

Serial.println("#0 P1500 #1 P550 #2 P800 #3 P2300 #16 P1400 #17

P2350 #18 P2200 #19 P600 T1000");

delay(1500);

Serial.println("#0 P1500 #1 P1450 #2 P1520 #3 P1400 #16 P1400 #17

P1450 #18 P1600 #19 P1450 T700");

Page 17: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

delay(1500);

}

else if(value1>200&&value2<200)//there is no obstacle on the left

{

Serial.println("#20 P1500 T500");

delay(500);

Serial.println("#0 P1500 #1 P1450 #2 P1520 #3 P1400 #16 P1400 #17

P1450 #18 P1600 #19 P1450 T1500");

delay(1000);

turnleft();

turnleft();

turnleft();

turnleft();

Serial.println("#0 P2300 #1 P650 #2 P750 #3 P2200 #16 P1900 #17 P950

#18 P1150 #19 P1950 T500");

delay(1000);

Serial.println("#0 P1500 #1 P1450 #2 P1520 #3 P1400 #16 P1400 #17

P1450 #18 P1600 #19 P1450 T1500");

delay(1000);

}

else if(value1<200&&value2>200)//there is no obstacle on the right

{

Serial.println("#20 P1500 T500");

delay(500);

Serial.println("#0 P1500 #1 P1450 #2 P1520 #3 P1400 #16 P1400 #17

P1450 #18 P1600 #19 P1450 T1500");

delay(1000);

turnright();

turnright();

Page 18: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

turnright();

turnright();

turnright();

Serial.println("#0 P1100 #1 P1850 #2 P1900 #3 P1050 #16 P800 #17

P2050 #18 P2200 #19 P900 T500");

delay(1000);

Serial.println("#0 P1500 #1 P1450 #2 P1520 #3 P1400 #16 P1400 #17

P1450 #18 P1600 #19 P1450 T1500");

delay(1000);

}

else{

Serial.println("#20 P1500 T500");

//Serial.println("#0 P1500 #1 P1450 #2 P1520 #3 P1400 #16 P1400

#17 P1450 #18 P1600 #19 P1450 #20 P1500 T1500");

delay(1000);

}

}

}

void forward()

{

Serial.println("#0 P1300 #1 P1650 #2 P1700 #3 P1200 #16 P1200 #17 P1650

#18 P1800 #19 P1300 T700");

delay(1000);

Serial.println("#0 P1500 #1 P1450 #2 P1500 #3 P1900 #16 P1500 #17 P900 #18

P1600 #19 P1450 T500");

delay(500);

Serial.println("#2 P1350 #16 P1700 T500");

delay(500);

Page 19: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

Serial.println("#3 P1550 #17 P1150 T500");

delay(500);

Serial.println("#0 P1700 #1 P1250 #18 P1350 #19 P1750 T700");

delay(1000);

//if(analogRead(analogInPin)>150)

//{return;}

Serial.println("#0 P1500 #1 P1900 #2 P1520 #3 P1400 #16 P1400 #17 P1450

#18 P1500 #19 P1150 T500");

delay(500);

Serial.println("#0 P1300 #18 P1800 T500");

delay(500);

Serial.println("#1 P1650 #19 P1300 T500");

delay(500);

}

void backward()

{

Serial.println("#0 P1300 #1 P1650 #2 P1700 #3 P1200 #16 P1200 #17 P1650

#18 P1800 #19 P1300 T700");

delay(1000);

Serial.println("#0 P1300 #1 P1650 #2 P1520 #3 P1400 #16 P1400 #17 P1450

#18 P1800 #19 P1300 T500");

delay(500);

Serial.println("#1 P1900 #19 P1150 T500");

delay(500);

Serial.println("#0 P1500 #18 P1500 T500");

delay(500);

Serial.println("#0 P1700 #1 P1250 #2 P1350 #3 P1550 #16 P1700 #17 P1150

#18 P1350 #19 P1750 T700");

delay(1000);

Page 20: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

Serial.println("#0 P1500 #1 P1450 #2 P1350 #3 P1550 #16 P1700 #17 P1150

#18 P1600 #19 P1450 T500");

delay(500);

Serial.println("#3 P1900 #17 P900 T500");

delay(500);

Serial.println("#2 P1500 #16 P1500 T500");

delay(500);

}

void turnleft()

{

Serial.println("#0 P2300 #1 P650 #2 P750 #3 P2200 #16 P1900 #17 P950 #18

P1150 #19 P1950 T500");

delay(1000);

Serial.println("#0 P2300 #1 P650 #2 P750 #3 P2200 #16 P1400 #17 P1450 #18

P1600 #19 P550 T300");

delay(300);

Serial.println("#18 P2200 T300");

delay(300);

Serial.println("#19 P900 T300");

delay(300);

Serial.println("#16 P800 #17 P2050 T300");

delay(300);

Serial.println("#16 P1400 #17 P550 #18 P1600 #19 P1450 T500");

delay(1000);

Serial.println("#16 P1900 T300");

delay(300);

Serial.println("#17 P950 T300");

delay(300);

Page 21: Written Report of Robot Design - University of Florida Reports/Ge_Shaojie/Ge...For the walking mechanism of the robot, I want to design it in the alternating walking gait. Alternating

}

void turnright()

{

Serial.println("#0 P1100 #1 P1850 #2 P1900 #3 P1050 #16 P800 #17 P2050 #18

P2200 #19 P900 T500");

delay(1000);

Serial.println("#0 P1500 #1 P1450 #2 P1500 #3 P2300 #16 P800 #17 P2050 #18

P2200 #19 P900 T300");

delay(300);

Serial.println("#2 P1150 T300");

delay(300);

Serial.println("#3 P1800 T300");

delay(300);

Serial.println("#0 P1900 #1 P1050 T300");

delay(300);

Serial.println("#0 P1500 #1 P2300 #2 P1520 #3 P1400 T500");

delay(1000);

Serial.println("#0 P1100 T300");

delay(300);

Serial.println("#1 P1850 T300");

delay(300);

}