0% found this document useful (0 votes)
27 views

Source Codeasdas

This document describes the design and implementation of a mobile sumo robot. It discusses the mechanical parts of the robot including the main base, support structure, top base, and robot arm. It also describes the electrical components including the Arduino microcontroller, motor driver, Bluetooth module, and motors. The robot is designed to be controlled wirelessly using an Android device and Bluetooth to maneuver in different directions and dispense objects using servo motors. The document concludes the robot meets the goals of being efficient, functional, and suitable for sumo robot competitions.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Source Codeasdas

This document describes the design and implementation of a mobile sumo robot. It discusses the mechanical parts of the robot including the main base, support structure, top base, and robot arm. It also describes the electrical components including the Arduino microcontroller, motor driver, Bluetooth module, and motors. The robot is designed to be controlled wirelessly using an Android device and Bluetooth to maneuver in different directions and dispense objects using servo motors. The document concludes the robot meets the goals of being efficient, functional, and suitable for sumo robot competitions.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

SOURCECODE

#include<Servo.h>

Servovert;

digitalWrite(motora1,HIGH);

Servo des;

digitalWrite(motora2,LOW);

int motora1 = 5;

digitalWrite(motorb1,HIGH);

intmotora2 = 6;

digitalWrite(motorb2,LOW);

intmotorb1 = 9;

int motorb2 = 10;

voidrv ()

intbyt;

intvpos = 0;

digitalWrite(motora1,LOW);

intval=0;

digitalWrite(motora2,HIGH);

intflag = 0;

digitalWrite(motorb1,LOW);
digitalWrite(motorb2,HIGH);

voidsetup() {

// put your setup code here, to run once:

void lf ()

Serial.begin(9600);

vert.attach(11);

digitalWrite(motora1,HIGH);

des.attach(3);

digitalWrite(motora2,LOW);

vert.write(20);

digitalWrite(motorb1,LOW);

des.write(90);

digitalWrite(motorb2,HIGH);

pinMode(motora1,OUTPUT);

pinMode(motora2,OUTPUT);

voidrt ()

pinMode(motorb1,OUTPUT);

pinMode(motorb2,OUTPUT);

digitalWrite(motora1,LOW);

digitalWrite(motora2,HIGH);

voidfw ()

digitalWrite(motorb1,HIGH);

digitalWrite(motorb2,LOW);

if((byt == 206) && (flag == 1)){

voidst ()

lf();

flag = 0;
digitalWrite(motora1,LOW);

digitalWrite(motora2,LOW);

if((byt == 210) && (flag == 1)){

digitalWrite(motorb1,LOW);

st();

digitalWrite(motorb2,LOW);

flag = 0;

}
if((byt>=0) && (byt<=100) && (flag == 1)){

voidloop () {

vpos = map(byt,0,100,0,180);

if(Serial.available() > 0){

vert.write(vpos);

byt = Serial.read();

flag = 0;

flag = 1;

if((byt == 205) && (flag == 1)){

if((byt == 209) && (flag == 1)){

fw();

des.write(30);

flag = 0;

delay(250);

des.write(90);

if((byt == 208) && (flag== 1)){

rv();
flag = 0;
}

Serial.println(byt);
}
}

if ((byt == 207) && (flag == 1)){


rt();
flag = 0;

II. CIRCUIT DESCRIPTION

A. L298 MOTOR DRIVER

B. PCB LAYOUT

C. Bluetooth Module

Specification:
Bluetooth protocol: Bluetooth

160 kbps, Synchronous: 1Mbps/1Mbps

Specification v2.0+EDR
Security: Authentication and encryption
Frequency: 2.4GHz ISM band
Profiles: Bluetooth serial port
Modulation: GFSK(Gaussian
Frequency Shift Keying)

Power supply: +3.3VDC 50mA

Emission power: 4dBm, Class 2

Working temperature: -20 ~ +75


Centigrade

Sensitivity: -84dBm at 0.1% BER


Dimension: 26.9mm x 13mm x 2.2 mm
Speed: Asynchronous: 2.1Mbps(Max) /

D. Arduino Uno
A.

B.
C.
D.
E.
F.
G.
H.
I.
J.

K. SPECIFICATIONS:

L.
N.
P.
R.

Microcontroller
Operating Voltage
Input Voltage (recommended)
Input Voltage (limits)

T. Digital I/O Pins


W. Analog Input Pins
X.
Z. DC Current per I/O Pin
AA.
AB.
AC.
AD.
AE.
AF.
AG.
AH.
AI.
AK.
DC Current for 3.3V Pin
AM.

Flash Memory

AP. SRAM
AR.
EEPROM
AT. Clock Speed
AV. Length
AX.
Width
AZ.
Weight

M.
O.
Q.
S.
U.
V.

ATmega328
5V
7-12V
6-20V
14 (of which 6 provide PWM output)

Y. 6

AJ.40 mA

AL.
50 mA
AN.
AO.
32 KB (ATmega328) of
which 0.5 KB used by bootloader
AQ.
2 KB (ATmega328)
AS.
1 KB (ATmega328)
AU.
16 MHz
AW.
68.6 mm
AY.53.4 mm
BA.
25 g

BB.

INTER CONNECTION CIRCUIT


BC.

BD.

CONCLUSIONS

Starting this work, the group formulated two main points, to be the primary goal of the testing and the

experimenting of the product. And if the group successfully proved it to be essentially possible, then the whole point
of building this product will be satisfied.
BE.

Based on the results gathered during the testing of the product, certain questions will now be
answered.
1. Sumobot

is

controlled and made


of what?
BF.

The group used a


lot of recyclable materials
for its outer appearance,
and failed many times. But
the team ended up with
wood and acrylic glass for
its base and support using
two dc motors (or more).
Its maximum length is 12
inch

and

any

desired

height. As for the robots


mobility,

L298

motor

driver is used for its


locomotive mechanism.
It only has 3 wheels. Front
driver are the two wheels
while the one wheel left is
a roller. Its dispenser is
made of wood and is

supported by 2 servo motors (or more). The program used is Arduino, and it is controlled by a Bluetooth on
any Android phone, with the use of HC-05 Bluetooth module inter connected to the Arduino for the transfer

of data from the android device to the robot . By the use of a universal pcb, all circuits were connected
into one. And it is powered by two lithium ion batteries. After many days of trials, the sumobot moved in left,
right, forward and reverse direction.
2. What causes the hitches encountered by the sumobot?
BG.

Several tests were done and it is concluded that the malfunction of the sumobot were caused

by loose or incorrect circuit connections, poor mechanical assembly, choice of power, motors and gears, and
inaccurate programming language. So it is observed to troubleshoot these areas when having problems in building
the sumobot.
BH.

The results gathered greatly specified that the group has accomplished its goals, particularly

on making an efficient and functional sumobot fitted for the said competition.

BI.
I.

Mobile Sumobot

INTRODUCTION
BJ. A robot is a mechanical or virtual artificial agent, usually an electro-mechanical machine that is

guided by a computer program or electronic circuitry. Robots can be autonomous or semi-autonomous and
range from humanoids. By mimicking a lifelike appearance or automating movements, a robot may convey a
sense of intelligence or thought of its own.

BK.

A robot is a machine that contains sensors, control systems, manipulators,

power supplies and software all working together to perform a task. A mobile robot is an
example of an application which is programmed to perform a particular work
BL.

Mobile robot is a physical agent that performs task by manipulating the

physical world. It exhibit three key elements: Programmability, implying computational or


symbol- manipulative capabilities that a designer can combine as desired (a robot is a
computer).

BM.

The types of robots that you will encounter most frequently are robots that

do work that are too dangerous, boring, onerous or just plain nasty. Most of the robots in
the world are of this type. They can be found in auto, medical, manufacturing and space
industries. In fact, there are over a million of these types of robots working for us today.
BN.
BO.

BP.

MECHANICAL PARTS
BQ.

BR.

Main Base

BS.

The main base is the base where the twin motor place and the wheel attach. Including
the PCV and arduino program, they are place in this area in order that they cant be easily
move by movement because they have some sensitive connections in the circuit. It is the
source or the guidelines of some parts of the robot because they attached with the base.

BT.
BU.

Support
The support is place between the main base and top base in order that the bases

will not destroyed or have space between them and the space can be used as placement of
components including the circuit, arduino, etc. The support made to strengthen the robot that
can support the top base in colliding or giving up with the weights of the robot arm.

BV.
BW.

Top Base
Also called the secondary base, it is use to be the base of the robot arm and

carry the balance of the arm in the whole robot. It needs to be stronger than the arm in order
that it can carry the arm. The top base also is the servo # 1 attached and the batteries pack.
The main purpose of the Top base is to have another space with the components and to be the
base of Robot arm.

BX.

Robot Arm

BY.

This is the most complicated part of the robot because it depends upon the weighs of
the arm in order that the servo # 1 can lift it. It is place in the Top base and the servo # 1 is
fixed in the top base in order that it can easily move when the robot is begun to move. This

part where the servo placed, the servo # 1 is the fixed servo in the based and the servo # 2 ,
where serves us dispenser, placed in the arm itself.
BZ.
CA.

Note: For the pictures of the parts please see the Mechanical Assembly page.

CB. MOBILE ROBOT


CC.

CD. A Project
CE. Presented to Engr. Gershom Defe
CF.
CG.

CH.
By
CI. Bernadas, Michelle
CJ. Madaiton, Marvin
CK.Medalle, Kirck
CL. Montao, Regin
CM.
CN.
CO.
CP. March 2014
CQ.
CR.
CS.
CT.
CU.
CV.

You might also like