0% found this document useful (0 votes)
37 views16 pages

Soccer Robot Project Overview

This document describes a project to build a soccer robot that can be controlled via Bluetooth from an Android phone. It includes block diagrams and circuit diagrams showing the components used, which include an Arduino board, Bluetooth module, servo motor, motor driver, and two DC motors. It also provides code for the Arduino board that allows it to receive movement and kicking commands from the Android phone over Bluetooth and control the motors and servo motor accordingly. Testing shows the robot is able to move and kick a ball as commanded. Some lessons learned are also discussed.

Uploaded by

Talha Ahsan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views16 pages

Soccer Robot Project Overview

This document describes a project to build a soccer robot that can be controlled via Bluetooth from an Android phone. It includes block diagrams and circuit diagrams showing the components used, which include an Arduino board, Bluetooth module, servo motor, motor driver, and two DC motors. It also provides code for the Arduino board that allows it to receive movement and kicking commands from the Android phone over Bluetooth and control the motors and servo motor accordingly. Testing shows the robot is able to move and kick a ball as commanded. Some lessons learned are also discussed.

Uploaded by

Talha Ahsan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

FAST National University of Computer and Emerging

Sciences, CFD Campus


FEEDBACK CONTROL SYSTEMS
(EE-304)
SEMESTER: SPRING 2019

SOCCER ROBOT

PROJECT ASSIGNMENT NO: 2

DUE DATE: 08/04/19

SUBMISSION DATE: 08/04/19

SUBMITTED TO

SIR ENGR. ARSLAN AHMED AMIN

SUBMITTED BY
NAME: Dure Shahzad TOTAL MARKS:
ROLL NO:16f8358
CLASS:BS-EE
SECTION:A
Introduction Pg3
Block Diagram Pg4
Circuit Diagram Pg4
Project Working Pg5
Project Prototyping Pg6
Code Pg7
Refrences Pg14

Contents

QAD - Course Specification Form - Revision 2 - Last Revised: 11-03-2015 Page 2 of 16


Introduction:
Soccer or football is one type of sport played between two teams, where each team on
the soccer consist of 11 players and plays with a spherical ball. Soccer is the world's
most famous sport played over 150 countries. The soccer game is played on a
rectangular field with a goal at each end. The main concept of this sport is to score by
getting the spherical ball into the opposite goal. The goalkeepers stop the ball with their
arms from the outfield players. When the team gets more score at the end of the match,
then that match will be declared as a win. But in today's world robot technology is
offering a vast amount of intelligent systems, soccer-playing robots, etc.

Available Solutions:
The idea is to create Q fix-Soccer robot and Graupner RC-Soccer robot that includes a
control board, Atmel controller, a dribbler, and a kicker in case of Q fix-Soccer robot and
on other hand in case of Graupner RC-Soccer robot it is used as a radio controller doll
playing soccer with ping-pong balls this robot can be implemented to gain experience
using C++ programs.
The programming of these robots can be done using the compiler GNN GCC from the
personal computer. These robots are frequently used in the Robot cup competitions for
juniors where soccer-playing robots are built from the components of the kits.

Selected Solutions:
 We choose the easily available and relatively cheap components from others to
design our soccer robot.
 Our project has following features, our soccer robot can move forward, reverse,
forward-left, forward-right, reverse-left and reverse-right with the help of an
Android phone. The speed of its movement is controlled by the angle of rotation
of the phone. The robot also kicks a ball when the phone is shaken.

 Our project can be controlled with Bluetooth device so no need to be present


there physically.
 The circuit is built around Arduino UNO board (BOARD1), servo motor
(connected at CON5), Bluetooth module JY MCU BT, motor driver L293D (IC1)
and two DC motors (M1 and M2).

QAD - Course Specification Form - Revision 2 - Last Revised: 11-03-2015 Page 3 of 16


Block Diagram:
INCLUDEPICTURE
"[Link]
39788768006157@1458023363763/[Link]" \*
MERGEFORMATINET INCLUDEPICTURE
"[Link]
39788768006157@1458023363763/[Link]" \*
MERGEFORMATINET INCLUDEPICTURE
"[Link]
39788768006157@1458023363763/[Link]" \*
MERGEFORMATINET INCLUDEPICTURE
"[Link]
39788768006157@1458023363763/[Link]" \*
MERGEFORMATINET

Block Diagram 1

Circuit Diagram:

QAD - Course Specification Form - Revision 2 - Last Revised: 11-03-2015 Page 4 of 16


INCLUDEPICTURE "[Link]
contents/uploads/2016/03/95F_Fig_3.jpg" \* MERGEFORMATINET INCLUDEPICTURE
"[Link] \*
MERGEFORMATINET INCLUDEPICTURE "[Link]
contents/uploads/2016/03/95F_Fig_3.jpg" \* MERGEFORMATINET INCLUDEPICTURE
"[Link] \*
MERGEFORMATINET

PCB Layout 1

Project Working:
 ATMEG328 is the brain of the project controlling functions of the robot.
 Motor driver IC L293D controls the pump and motors.
 Motor driver is connected with ATMEG328 and with motors.
 The circuit uses two 9V batteries; one for the Arduino board (BOARD1) and
the other for DC motors.

 The 5V regulated supply for rest of the circuit is provided by Arduino board
itself. LED on BOARD1 indicates the presence of power supply.

QAD - Course Specification Form - Revision 2 - Last Revised: 11-03-2015 Page 5 of 16


 All new smart phones contain an accelerometer sensor. A phone with an
accelerometer can detect the angle it is being held at. It can also detect
rotation and motion gestures such as swinging, shaking and flicking. The
accelerometer can detect whether the phone is upright or sideways and
automatically rotate the graphics on the screen accordingly.
 At the transmitter end, android app is used to send commands to the receiver
end to control the robot movement.
 The Bluetooth module used in this project is JY MCU BT, which can be
connected to any device via built-in UART interface. It can communicate with
other Bluetooth-enabled devices such as mobile phones, handheld computers
and laptops.

 The module runs on a 3.6V to 6V supply.

 A servo motor is used for kicking the ball in this project. Servos are extremely
useful in robotics. The motors are small but extremely powerful for their size.
A servo motor mainly comprises a DC motor, gear system, position sensor
(which is generally a potentiometer) and control electronics
 The software (soccer. info) for the soccer robot is written in Arduino
programming language. The Arduino UNO is programmed using Arduino
IDE software. Atmega328 on Arduino UNO comes with a boot loader that
allows you to upload new code to it without the use of an external hardware
programmer.

 It communicates using the STK500 protocol. You can also bypass the boot
loader and program the microcontroller through the ICSP header, but using
boot loader programming is quick and easy.

Project Working State:


The project is working successfully on proteus, our project has to take command from
Bluetooth and perform the function accurately that is commanded by us. Due to IC issue
our project may not perform all defined functions. However, the project is in working
condition.

QAD - Course Specification Form - Revision 2 - Last Revised: 11-03-2015 Page 6 of 16


Project Prototyping:

Figure 1-Robot

Lesson Learned:

It was helpful as we got to have knowledge of our project and to help broaden our vision
in making this project successful. Due to this project we become familiar to a soccer
robot and we are now interested in soccer robot technology, that give us motivation to
work on the improvement of soccer robot industry. The project was helpful in solidifying

QAD - Course Specification Form - Revision 2 - Last Revised: 11-03-2015 Page 7 of 16


our subject concepts. We were able to utilize our subjects concepts and develop this
robot.

Code:
#include <SoftwareSerial.h>

#include <Servo.h>

SoftwareSerial mySerial(8,9);// RX, TX

Servo myServo; //create Servo object to control a servo

int servoPin = 10; //pin at which servo's logic pin is connected to arduino

int Kick = 170;//50 degree is the sevros position after kicking

int neutral = 50; //170 degree is the servo's postion intialy and finaly after kicking

long Wait = 750;

int xsign;// establish variables for reading received 2 byte data

int x;// establish variables for reading received 2 byte data

int ysign;// establish variables for reading received 2 byte data

int y;// establish variables for reading received 2 byte data

int zsign;// establish variables for reading received 2 byte data

int z;// establish variables for reading received 2 byte data

int kick=0;// establish variables for reading received 2 byte data

int m1f=2;

int m1b=4;

int m2f=5;

int m2b=7;

int m1=3;

QAD - Course Specification Form - Revision 2 - Last Revised: 11-03-2015 Page 8 of 16


int m2=6;

void setup()

[Link](servoPin);// attaches the servo on pin 9 to the servo object

pinMode(m1f, OUTPUT);//set mlf pin as output pin

pinMode(m1b, OUTPUT);//set mlb pin as output pin

pinMode(m2f, OUTPUT);//set m2f pin as output pin

pinMode(m2b, OUTPUT);//set m2b pin as output pin

[Link](neutral);//set servo position to 170 degrees

[Link](57600); // set the data rate for the SoftwareSerial port

void loop() // run over and over

if ([Link]())//if number of bytes available to read greater than 0

kick=[Link]();// read the incoming byte:

xsign=[Link]();// read the incoming byte:

x=[Link]();// read the incoming byte:

ysign=[Link]();// read the incoming byte:

y=[Link]();// read the incoming byte:

zsign=[Link]();// read the incoming byte:

z=[Link]();// read the incoming byte:

if(x>2&&xsign==1&&kick==0)

{
QAD - Course Specification Form - Revision 2 - Last Revised: 11-03-2015 Page 9 of 16
if(y>3&&ysign==0&&kick==0)

frontright(y);

else if(y>3&&ysign==1&&kick==0)

frontleft(y);

else

moveforward(x);

else if(x>2&&xsign==0&&kick==0)

if(y>3&&ysign==0&&kick==0)

backright(y);

else if(y>3&&ysign==1&&kick==0)

backleft(y);

else

{
QAD - Course Specification Form - Revision 2 - Last Revised: 11-03-2015 Page 10 of 16
moveback(x);

else

stops();

if(kick==1)

kicks();

void kicks()

[Link]("kicked!!");

[Link](Kick);// sets the servo position according to the kick [Link] can change kick value.

delay(Wait);

[Link](neutral);// sets the servo position according to the neutral [Link] can change
neutral value.

delay(500);

void moveforward(int a)//y values are passed from the function call

int x=map(a,2,10,120,255);

QAD - Course Specification Form - Revision 2 - Last Revised: 11-03-2015 Page 11 of 16


digitalWrite(m1f,LOW);

digitalWrite(m2f,LOW);

digitalWrite(m1b,HIGH);

digitalWrite(m2b,HIGH);

analogWrite(m1,x);

analogWrite(m2,x);

[Link]("Moving Forward");//prints "moving forward" below in the "robot status" label in the
app

void moveback(int a)//y values are passed from the function call

int x=map(a,3,10,120,255);

digitalWrite(m1f,HIGH);

digitalWrite(m2f,HIGH);

digitalWrite(m1b,LOW);

digitalWrite(m2b,LOW);

analogWrite(m1, x);

analogWrite(m2, x);

[Link]("Moving Back");//prints "moving back" below in the "robot status" label in the app

void frontleft(int a)//y values are passed from the function call

int x=map(a,3,10,120,255);

digitalWrite(m1f,LOW);

digitalWrite(m2f,LOW);

QAD - Course Specification Form - Revision 2 - Last Revised: 11-03-2015 Page 12 of 16


digitalWrite(m1b,LOW);

digitalWrite(m2b,HIGH);

analogWrite(m1,0);

analogWrite(m2,x);

[Link]("Turning front left");//prints "Turning left" below in the "robot status" label in the
app

void frontright(int a)//y values are passed from the function call

int x=map(a,3,10,120,255);

digitalWrite(m1f,LOW);

digitalWrite(m2f,LOW);

digitalWrite(m1b,HIGH);

digitalWrite(m2b,LOW);

analogWrite(m1,x);

analogWrite(m2,0);

[Link]("Turning front Right");//prints "Turning right" below in the "robot status" label in
the app

void backleft(int a)//y values are passed from the function call

int x=map(a,3,10,120,255);

digitalWrite(m1f,LOW);

digitalWrite(m2f,HIGH);

digitalWrite(m1b,LOW);

QAD - Course Specification Form - Revision 2 - Last Revised: 11-03-2015 Page 13 of 16


digitalWrite(m2b,LOW);

analogWrite(m1,0);

analogWrite(m2,x);

[Link]("Turning back left");//prints "Turning left" below in the "robot status" label in the
app

void backright(int a)//y values are passed from the function call

int x=map(a,3,10,120,255);

digitalWrite(m1f,HIGH);

digitalWrite(m2f,LOW);

digitalWrite(m1b,LOW);

digitalWrite(m2b,LOW);

analogWrite(m1,x);

analogWrite(m2,0);

[Link]("Turning back Right");//prints "Turning right" below in the "robot status" label in
the app

void stops()//no values are passed from the function call

digitalWrite(m1f,LOW);

digitalWrite(m2f,LOW);

digitalWrite(m1b,LOW);

digitalWrite(m2b,LOW);

QAD - Course Specification Form - Revision 2 - Last Revised: 11-03-2015 Page 14 of 16


analogWrite(m1, 0);

analogWrite(m2,0);

[Link]("stopped");//prints"stopped" below in the "robot status" label in the app

References:
 [Link]
diy/soccer-robot/2
 [Link]

 [Link]

 [Link]

 [Link]
q=robot+football&oq=robot+football&aqs=chrome.0.0j69i60j0l4.5043j0
j7&sourceid=chrome&ie=UTF-8

 [Link]
q=robot+football&source=lnms&tbm=isch&sa=X&ved=0ahUKEwju5rin
o-
3gAhXEzaYKHTL3BVQQ_AUIDygC&biw=1366&bih=608#imgrc=Zxk
5oeByeh_F1M:

 [Link]
ei=t8x_XLaPNp36z7sPwYew0AE&q=football+robots+artificial+intellig
ence&oq=football+robot+in&gs_l=psy-
ab.1.0.0i22i30l2.31810.38492..42243...2.0..0.1775.5010.0j1j5-
1j1j0j2......0....1..gws-wiz.......[Link]-8WNJFclA
 [Link]
biw=1366&bih=608&tbm=isch&sa=1&ei=btx_XKvdJ_7Zz7sPvpepgA
M&q=robot+football+hd+fllow+chart&oq=robot+football+hd+fllow+char
t&gs_l=img.3...591261.596664..597736...0.0..0.463.4211.0j15j2j3j1....
..0....1..gws-wiz-img.0nl4tAOC--o#imgrc=Grtqh2AIHS8MGM:
 [Link]
 [Link]
robot/2
 [Link]
[Link]/universitaet/selbstverstaendnis/profil_geschichte/technik
/thema_technik_k02.[Link]
 [Link]
football-robots/
QAD - Course Specification Form - Revision 2 - Last Revised: 11-03-2015 Page 15 of 16

 [Link]
biw=1517&bih=675&tbm=isch&sa=1&ei=sg-AXPzeGZrVz7sPr-
uZgAU&q=table+of+contents+of+football+robot&oq=table+of+content
s+of+football+robot&gs_l=img.3...137670.148895..149363...0.0..0.0.0.
......1....1..gws-wiz-
img.zDu4VLFghms#imgdii=p2ZsEkdfLo2jpM:&imgrc=BCD0vhsB6ScD
uM:
 [Link]
%[Link]%

QAD - Course Specification Form - Revision 2 - Last Revised: 11-03-2015 Page 16 of 16

You might also like