Você está na página 1de 20

KILABOT

____________

A Design Project
Presented to
The Engineering and Technical Courses Department
College of Science and Technology
Adventist University of the Philippines

____________

In Partial Fulfillment
of the Requirements for the Course
ECEE 513 Robotics

____________

DARWIN TIPDAS
March 10, 2013

I. INTRODUCTION

1.1

Statement of the Project


Sumobot is a robotic competition of custom robots that has a level of intelligence

to outwit its opponent. As the name suggests, the competition is based on the sport Sumo
wrestling. The goal of each players robot is knock the opponent out of the ring while
avoiding falling out of the ring itself. The use of sensors in coordination with motors is
the basic of a Sumobot. Stability, Intelligence and Strength of the design are the three
important characteristic of Sumobot. With these, the robot will unlikely suffer from
suicide, find the enemy, and then push them out of the arena by force.
1.2

Objectives
The objective is to create a robot that has an ability to detect the boundary of the

arena by using sensors. To make a platform that is rigid and compact to pass the
dimension limits which is 20 x 20 cm. To have intelligence to detect the enemy and have
enough force to push the enemy outside the arena.

1.3

Scope and Delimitation


This project scope is only about the manipulation and control of sensors and

motors and not an design for an innovative system. The robot is for competition purpose
but can be incorporated to a number of actual applications. Thus the robot is a basic study
of sensors and motors.
1.4

Description of the Project


Sumobot KilaBot was a robot that has the ability to detect the boundary of the

arena by the use of an infrared sensor that distinguishing black from white. With this, it
set the condition for the control of the motors. KilaBot has 4 DC motors that are
controlled individually using an IC. It also has a proximity sensor that detects
obstructions which in this case the enemy robot. The robot has the three basic
requirements for a Sumobot, capability of detecting the enemy, ability to stay in the arena
and speed to ram the opponent.

II. DESIGN CONSIDERATIONS


2.1

Block Diagram

Motor
CNY70 (Line
Detector)

Arduino

Figure 2.2.1 Project Block Diagram


US-100
(Proximity
Sensor)

2.2

Schematic Diagram

Figure 2.3.1 Project Schematic Diagram

2.3

PCB Layout

Figure 2.3.1 Project PCB Layout

2.4

Flow Chart

Detect Edge
Yes

No

Reverse and Rotate


Detect Enemy
Yes
Attack

No
Rotate
Figure 2.4.1 Project Flow Chart

The program flows like this. First detect if the sensor is on the edge or not. If yes
then reverse and rotate. If no, detect the enemy. If enemy on sight, attack. If no, rotate.

2.5

Source Code

//Pins for LM293D (Motor Control)


#define MotorA1 2
#define MotorA2 3
#define MotorB1 4
#define MotorB2 5
#define MotorC1 6
#define MotorC2 7
#define MotorD1 9
#define MotorD2 10
const int Val1 = A0; //Right CNY70 (Infrared)
const int Val2 = A1; //Left CNY70
const int trigger = 25; //Trigger pin of US-100 (Proximity)
const int echo = 26; //Echo pin of US-100
float distance;
int value1 = 0;
int value2 = 0;
void setup()
{
pinMode(MotorA1, OUTPUT);
pinMode(MotorA2, OUTPUT);
pinMode(MotorB1, OUTPUT);
pinMode(MotorB2, OUTPUT);
pinMode(MotorC1, OUTPUT);
pinMode(MotorC2, OUTPUT);
pinMode(MotorD1, OUTPUT);
pinMode(MotorD2, OUTPUT);
Serial.begin(9600);
pinMode(trigger, OUTPUT);
pinMode(echo, INPUT);
}
void loop()
{
value1 = analogRead(Val1); //Read Right sensor
value2 = analogRead(Val2); //Read Left sensor
Serial.println(value1);
Serial.println(value2);
// Trigger US-100 start measurement
// set up trigger
digitalWrite(trigger, LOW);
delayMicroseconds (5);
// Start measurement
digitalWrite(trigger, HIGH);
delayMicroseconds (10);
digitalWrite(trigger, LOW);
// Acquire and convert to meters
distance = pulseIn(echo, HIGH);
distance = distance*0.0001657;
// Send result to UART
Serial.println(distance);
delay(50);

//If right sensor detects the boundary reverse then rotate to the left
if (value1 <= 1014){
digitalWrite(MotorA1, LOW);
digitalWrite(MotorA2, HIGH);
digitalWrite(MotorB1, LOW);
digitalWrite(MotorB2, HIGH);
digitalWrite(MotorC1, LOW);
digitalWrite(MotorC2, HIGH);
digitalWrite(MotorD1, LOW);
digitalWrite(MotorD2, HIGH);
delay(2000);
digitalWrite(MotorA1, LOW);
digitalWrite(MotorA2, HIGH);
digitalWrite(MotorB1, LOW);
digitalWrite(MotorB2, HIGH);
digitalWrite(MotorC1, HIGH);
digitalWrite(MotorC2, LOW);
digitalWrite(MotorD1, HIGH);
digitalWrite(MotorD2, LOW);
delay(2000);
}
//If left sensor detects boundary reverse then rotate to the right
if(value2 <= 1014){
digitalWrite(MotorA1, LOW);
digitalWrite(MotorA2, HIGH);
digitalWrite(MotorB1, LOW);
digitalWrite(MotorB2, HIGH);
digitalWrite(MotorC1, LOW);
digitalWrite(MotorC2, HIGH);
digitalWrite(MotorD1, LOW);
digitalWrite(MotorD2, HIGH);
delay(2000);
digitalWrite(MotorA1, HIGH);
digitalWrite(MotorA2, LOW);
digitalWrite(MotorB1, HIGH);
digitalWrite(MotorB2, LOW);
digitalWrite(MotorC1, LOW);
digitalWrite(MotorC2, HIGH);
digitalWrite(MotorD1, LOW);
digitalWrite(MotorD2, HIGH);
delay(2000);
}
//If enemy is at range attack
if(distance <= 0.35){
digitalWrite(MotorA1, HIGH);
digitalWrite(MotorA2, LOW);
digitalWrite(MotorB1, HIGH);
digitalWrite(MotorB2, LOW);
digitalWrite(MotorC1, HIGH);
digitalWrite(MotorC2, LOW);
digitalWrite(MotorD1, HIGH);

digitalWrite(MotorD2, LOW);
}
//If no detection rotate
else {
digitalWrite(MotorA1, LOW);
digitalWrite(MotorA2, HIGH);
digitalWrite(MotorB1, LOW);
digitalWrite(MotorB2, HIGH);
digitalWrite(MotorC1, HIGH);
digitalWrite(MotorC2, LOW);
digitalWrite(MotorD1, HIGH);
digitalWrite(MotorD2, LOW);
}
delay(5);
}

2.6

Structure of the System

Figure 2.6.1 Actual Project

2.7

Materials

Material
Gizduino
Atmega 644
DC Motor
CNY70
US-100
SLB Battery
SLB Charger
PCB
Headers
and Connectors
220
Resistor
10 M Resistor
DC Plug
DC socket
Wheels
Acrylic
Screws
Total

Price (Php)
760

Quantity
1

140
60
300
400
400
45
150

4
2
1
1
8
1
15

2
10
10
100/pair
150
1

2
3
2
2
1
20
P 2727.00

Table 2.7.1 Materials and Price List

III. RESULTS AND DISCUSSION

The Sumobot KilaBot unfortunately lost all of its battles against other robots.
First conclusion, the sensor gives different readings every fight so technically the robot
suicides. The line detection sensor is not stable. Second, almost all opponents used servo
motor that has a high torque rating. DC motor cannot win against it unless use a bigger
one. But through the tests and initial calibrations, the robot KilaBot passed almost all the
requirements. The platform is stable but the sensors malfunction due to unstable
connection.

IV. CONCLUSION AND RECOMMENDATION


The robot Kilabot shows poorly in the competition but it passed almost all of it
initial testing requirements. Stability is important especially the battle is about ramming
other Sumobot. Sensors didnt work in the actual competition and the motors dont sync
with the sensors. These are important because it will prevent the robot from falling out of
the arena. The robot also cannot push hard because of it light weight of 0.8 kg. This
makes Kilabot easily pushed back but cannot push in return. In implementing this project
again, it is better to use a more stable sensor because CNY70 is not that sensitive at all
times. Use a bigger motor for strength and add weight to the robot to be able for it to
withstand others.

IV. APPENDICES
4.1

User Manual
Steps on using KilaBot
1. Check first all the sensors and motors for correct and loose contacts.
2. Attach the battery and let it go.
3. The robot is now working and the sensors will detect the edge and the enemy.
4. If the robot detects boundary it will reverse and rotate to prevent falling.
5. If the robot detects enemy it will attack.
6. The robot will push through the enemy until one of them is out of the arena.

4.2 Specification Sheets


Gizduino Atmega 644

Figure 4.2.1 Gizduino Atmega 644


Basic Information

Arduino software
compatible
Power Inputs

4.5V 5.5V, 5.0V Nominal


16MHz (ATMEGA 164,

Clock Frequency
324, 644)
Programming Ports

Arduino & ICSP

Board Dimension

73.5mm L x 53mm W

CNY70

Figure 4.2.2 CNY70 Specification Sheet

US-100

Figure 4.2.3 US-100 (Ultrasonic Sensor) Specification Sheet

SLB-1647

Figure 4.2.4 Samsung SLB-1647

DC Motor

Figure 4.2.5 6V DC Motor

H-Bridge

Figure 4.2.7 H-Bridge Motor Driver

Você também pode gostar