University of Florida



Pongator

[pic]

Shu Jiang

Final Report

Date: 24 April, 2007

TAs:

Adam Barnett

Julio Suarez

Instructors:

A. A. Arroyo

E. M. Schwartz

University of Florida

Department of Electrical and Computer Engineering

EEL 5666 Intelligent Machines Design Laboratory

Spring 2007

Table of Contents

Abstract

Introduction

Integrated System

Mobil Platform

Actuation

Sensors

Behaviors

Conclusion

Appendices

Abstract

Pongator retrieves ping-pong balls for ping-pong players, thus it makes the game more enjoyable for them. First, Pongator roams around in a table-tennis court while avoiding obstacles. When it finds a ping-pong ball, it picks up the ball. Then, Pongator searches out a designated basket and drops the ball into the basket. This paper describes the detail design of Pongator.

Introduction

It is such a nuisance for ping-pong players to stop their game to gather ping-pong balls from the floor. This problem can be solved by using a robot to pick up balls. Pongator is designed to perform this specific task.

Integrated System

[pic]

Mobile Platform

Pongator’s mechanical platform is a three tiers design. The first tier hosts motors, batteries and sensors. The second tier hosts electronic boards. The third tier acts as a cover but also hosts a LCD. An arm with two degrees of freedom will be mounted in the front of Pongator with a CMUcam.

Actuation

Pongator’s drive system is consisted of two 12vdc 30:1 200rpm gear head motors. The stall current of each motor is 1.5A, lower than the max output current of the TPIC0107B H-Bridge I am using. Tires are green dot sumo tires (2.13"D x 1.5"W); they provide good traction and prevent robot from slipping. Two Tamiya ball casters are mounted in the front and back of the robot respectively. An arm with gripper to pick up ping-pong balls will be consisted of two servos; one for up and down movement of the arm, the other for the opening and closing of the gripper. An HS-475 standard servo with 76 oz.-in torque is used for moving the arm up and down. Initially an HS-422 servo with 57 oz.-in was used for that purpose. However, 57 oz-in torque wasn’t enough for the weight of the arm. HS-475 works perfect. HS-422 is used for the gripper.

Microcontroller

MAVRIC IIB from BDMICRO is the controller board used for Pongator. The board is based on the ATmega128 microcontroller from ATMEL. The microcontroller can be easily programmed in C.

Sensors

IR

Two Sharp IR sensors are used for obstacle avoidance. They are analog sensors that output voltages depend on how far the obstacle are. Analog sensors require analog-digital conversion (ADC). 2 out of 8 ADC channels are used for the two IR sensors.

Sonar

Three SRF04 sonars are also used for obstacle avoidance. Basically, sonar first sends a sound pulse, and then it waits for a return echo. The time between the sending of the pulse and the receiving of the return echo can be use to determine how far obstacles are. A 10us pulse is needed to trigger the sonar to send out the sound pulse. This can be done by set a pin high for 10 us, and then set it low. The timing for the return echo should start right after the 10us pulse as recommended in the SRF04 datasheet.

CMUcam

A CMUcam is used to find ping-pong balls and the designated cup. The track color (TC) command of the CMUcam can be used to find any kind of color blob. In the case of Pongator, the ping-pong balls are painted red, so TC command is used to find a red color blob. The TC command returns a series of numbers, which include x and y coordinates of the center of the color blob, and also the pixels of the color blob in the picture frame. X-coordinate value is used to center Pongator while it moves toward the red ping-pong ball. Y-coordinate value is used to tell Pongator where it should stop to pick up the ball. The designated cup is also painted red, so pixel value is used by Pongator to distinguish between the cup and the ball. The Ping-Pong ball is much smaller than the cup, so its pixel value is much smaller than the cup.

Behaviors

Basically Pongator will be roaming around in a designated area and use a CMUcam to look for ping pong balls that are lying on the floor while avoiding obstacles. When it finds a ball, it will position itself in front of the ball using the CMUcam. Once positioning is completed, it lowers it arm, opens its gripper, and picks up the ball by closing its gripper. After the ball is successfully picked up, the robot searches for a designated cup, again using the CMU cam. Then the robot drops the ball into the cup after it is located.

Conclusion

Pongator is the first robot I have ever designed and built. It is a fun learning experience. It is also the first time I use a programming language like C to do something real. I also acquire lots of mechanical experience. At the end, Pongator proves the concept of using an autonomous agent to retrieves ping-pong balls for players.

Website



Appendix A

/*...................... main ...............................*/

int main (void)

{

arm_init();

motor_init();

sonar_init();

lcd_init();

int got_ball = 0;

int drop_ball = 0;

signed int left_motor, right_motor;

int x, y, pixel;

DDRE = 0X02;

UBRR0H = 0;

UBRR0L = 25;

UCSR0C = 0X06;

asm("sei");

track_red();

while(1)

{

while(got_ball == 0)

{

x = convert_x();

y = convert_y();

pixel = convert_pixel();

lcd_8bit_out(x);

lcd_char(' ');

lcd_8bit_out(y);

lcd_char(' ');

lcd_8bit_out(pixel);

if(x == 0)

{

sonar_motor();

}

else

{

if(pixel > 80)

sonar_motor();

else

{

if( y > 150)

avoid_ball();

else if((y < 45) && (y > 10))

{

left_motor = 0;

right_motor = 0; motor_control(left_motor, right_motor);

pick_up();

got_ball = 1;

}

else

{

left_motor = x + y/6;

right_motor = y/6 + 80 - x ;

motor_control(left_motor, right_motor);

}

}

}

UCSR0B = 0X90;

lcd_return_home();

}

cam_data[0] = 'M';

cam_data[1] = ' ';

cam_data[2] = '0';

cam_data[3] = ' ';

cam_data[4] = '0';

cam_data[5] = ' ';

cam_data[6] = '0';

cam_data[7] = ' ';

cam_data[8] = '0';

cam_data[9] = ' ';

while(drop_ball == 0)

{

x = convert_x();

y = convert_y();

pixel = convert_pixel();

lcd_8bit_out(x);

lcd_char(' ');

lcd_8bit_out(y);

lcd_char(' ');

lcd_8bit_out(pixel);

if(x == 0)

sonar_motor();

else

{

if(y > 150)

avoid_ball();

else if((y < 25) && (y > 10))

{

if(pixel < 70)

{

avoid_ball();

}

else

{

left_motor = 0;

right_motor = 0;

motor_control(left_motor, right_motor);

drop();

drop_ball = 1;

}

}

else

{

left_motor = x + y/6;

right_motor = y/6 + 80 - x ;

motor_control(left_motor, right_motor);

}

}

lcd_return_home();

UCSR0B = 0B10010000;

}

avoid_ball();

got_ball = 0;

drop_ball = 0;

cam_data[0] = 'M';

cam_data[1] = ' ';

cam_data[2] = '0';

cam_data[3] = ' ';

cam_data[4] = '0';

cam_data[5] = ' ';

cam_data[6] = '0';

cam_data[7] = ' ';

cam_data[8] = '0';

cam_data[9] = ' ';

}

return 0;

}

-----------------------

MAVRIC IIB microcontroller board

CMU cam

IR Sensors

Ultrasound sensors

Undecided Sensor

DC Motors

LCD

Motor Drivers

Battery

Status LED’s

Servos

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download