Soccer Robot 3
Soccer Robot 3
Soccer Robot 3
Submitted By
Muhammad Faizan 57089
Waqar Ahmad 57158
Supervised By
Prof. Zulfiqar Ahmed
Assistant Professor, Department of CS & IT
This is certifying that we have read the project report titled “SOCCER ROBOT” submitted by
following students of BSCS Hazara University Mansehra.
It is our judgment that this project report is of sufficient standard to warrant its acceptance by the
Department of Information Technology, Hazara University Mansehra.
COMMITTEE
1. Supervisor _________________________________
SOCCER ROBOT ii
Declaration
It is hereby declared that this project, neither as a whole nor as a part has been copied out from any
source. It is further declared that we developed this software and this report entirely on the basis
of my personal efforts made under the sincere guidance of my project Supervisor.
If any part of this software is proved to be copied or found to be a report of some other, we
standby the consequences. No portion of the work presented in this report has been submitted in
support of any application from any other degree of qualification of any other university or institute
of learning. We further declare that this software and all associated documents, reports and records
are submitted as partial requirement for the degree of BSSE (Bachelor of Studies in Software
Engineering). We therefore understand and transfer copyrights for these materials to Hazara
University Mansehra.
. .
I would like to express my special thanks and gratitude to my teachers as well my supervisors who
gave me the golden opportunity to do this wonderful project on the topic SOCCER ROBOT,
which also helped me in doing a lot of research and we came to know about so many new things.
Also my first thanks also goes to Hazara University Mansehra for designing such a worthy
syllabus and making me do this project. Secondly we are thankful to the faculty of the CS&IT
department without whom my project would have been impossible. Especially my heartfelt thanks
goes to Prof. Zulfiqar Ahmed, my project supervisor who constantly supervised me throughout
the project time period.
SOCCER ROBOT iv
Dedication
This Thesis report we dedicated to
Our Beloved Parents
And Respected Teachers
SOCCER ROBOT v
Project In Brief
SOCCER ROBOT vi
Table of Content
4. 1 Testing................................................................................................................................ 19
4.2 Black Box Testing............................................................................................................... 20
4.3 Test Cases Scenario ............................................................................................................ 20
4.3.1 NodeMCU individual Test ......................................................................................................... 20
4.3.2 Android Application test ............................................................................................................ 21
4.3.3 Overall Developed Project Test with Working .......................................................................... 21
4.3.4 Android Application Button test ................................................................................................ 22
4.3.5 Car Circuit Test .......................................................................................................................... 22
4.4 Branch testing ............................................................................................................................... 23
SOCCER ROBOT ix
FIGURE 6.2 : CONNECTION OF NODEMCU TO LAPTOP .................................................................................. 30
SOCCER ROBOT x
List of Tables
SOCCER ROBOT xi
List of Abbreviations
SOCCER ROBOT 1
1.3 Scope of the Project
Robotics, the design, construction and use of machines (robots) to perform tasks traditionally
performed by humans. Robots are widely used in industries such as automobile manufacturing to
perform simple and repetitive tasks, and industries that must work in environments that are harmful
to humans.
In gaming robots, robots can be used to create realistic environments or to provide haptic feedback
that makes the game feel more real.
SOCCER ROBOT 2
1.5 Future Movement of the Project
The future scope of this project is that we could build a team of soccer robots in future. Also if we
move forward in future more we could make such robots which play with human as human play
in teams.
SOCCER ROBOT 3
NodeMCU ESP8266 Specifications & Features
Microcontroller: Tensilica 32-bit RISC CPU Xtensa LX106
Operating Voltage: 3.3V
Input Voltage: 7-12V
Digital I/O Pins (DIO): 16
Analog Input Pins (ADC): 1
UARTs: 1
SPIs: 1
I2Cs: 1
Flash Memory: 4 MB
SRAM: 64 KB
Clock Speed: 80 MHz
USB-TTL based on CP2102 is included onboard, Enabling Plug n Play
PCB Antenna
Small Sized module to fit smartly inside your IoT projects
SOCCER ROBOT 4
1.6.3 3.7v Lithium battery
3.7V 18650 sizes Cylindrical Li-Ion Cell
No memory effect and longer storage life than NiMH Batteries
Lighter weight and higher energy density than any other rechargeable battery
It is excellent to use as standard for text battery analyzer, used in DIY projects and power
banks.
Nominal Voltage: Average 3.7V
Nominal Capacity: 800mAh
Max. Charging current 2.6A max.
Max. Discharging current: 5.2A max.
SOCCER ROBOT 5
1.6.5 Connecting Wire
A jumper wire is an electric wire that connects remote electric circuits used for printed circuit
boards. By attaching a jumper wire on the circuit, it can be short-circuited and short-cut (jump) to
the electric circuit. [6]
SOCCER ROBOT 6
the work of Seymour Papert and the MIT Logo Group in the 1960s, and has also manifested itself
with Mitchel Resnick's work on Lego Mindstorms and StarLogo. [7]
App Inventor also supports the use of cloud data via its CloudDB component.
SOCCER ROBOT 7
iii. Chapter 3 : Design of the Proposed System
This is the most important chapter of the project that contains all the diagrammatically
approaches and Software design approaches of the system.
This is last chapter of my project report. This chapter will include training manual part and
content references.
SOCCER ROBOT 8
Requirement Specification
2.1 Introduction
Different innovations; building robots, began already ages ago until this present time. In fact, some
countries were already using robots as a useful machine for industry purposes and other innovative
projects. If we imagine how the world could be seeing robots scattered in different places with
different functions then life would be much easier. Somehow, disadvantages and crisis in making
and using those machines always have its way beneath everything. [8]
Soccer or football is a 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. 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
goal keepers stops 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, at present robot
technology offering many services in the field of robotic vehicles, intelligent systems, soccer
playing robots, etc.
SOCCER ROBOT 9
2.2 Existing Soccer Robotic Game
Every year Soccer playing robot participates in the competition held annually. The main concept
of this competition is to promote robotics in every field. A soccer robot is a one kind of mobile or
autonomous robot, used to play soccer with variants. Every year there are many tournaments are
organized like FIRA, Robocop. At present, the Robocop contest has various soccer leagues like
Simulation, Small Size, Middle Size, Four Legged and Humanoid. [9]
SOCCER ROBOT 10
For a robot, playing of soccer is a highly complex attempt. The Robot must be able to constantly
identify the ball. There is a high tech equipment is arranged to scan the robot’s surroundings.
Internal processors of the robot can change the data to define game policies and strategies of
defense.
SOCCER ROBOT 11
Design of the Proposed System
3.1 Overview of the Proposed System
Playing soccer is fun, but playing soccer with robots is awesome! The soccer
playing robot is one of the most popular robotics projects among children and is
also pretty simple to make.
Simply a Soccer Bot is a type of robot that can play Soccer. This type of robot
basically design in such a way that can remotely and autonomously play football.
It has some unique features and this robot is also can move very fast.
This soccer robot can move forward, left, right, and reverse with the help of an
Android phone. The robot also kicks ball when the user will click the left, right,
forward and reverse button from android application respectively.
The circuit uses three 3.7 volt batteries cell also one for the NodeMCU board and
the car kit is used. Android application is used on the user side to send the
command to NodeMCU. After receiving the command, soccer robot will move left,
right, forward and reverse respectively.
SOCCER ROBOT 12
3.2 Block Diagram
A block diagram is a diagram of a system in which the principal parts or functions are represented
by blocks connected by lines that show the relationships of the blocks. They are heavily used in
engineering in hardware design, electronic design, software design, and process flow diagrams.
The Block diagram of the Soccer Robots project are as under:
SOCCER ROBOT 13
3.3 Activity Diagram
An activity diagram visually presents a series of actions or flow of control in a system similar to a
flowchart or a data flow diagram. Activity diagrams are often used in business process modeling.
The Activity diagram of the Soccer Robots project are as under:
SOCCER ROBOT 14
3.4 System Design approach
Project has been programmed using Node MCU. Node MCU is open source software which is
easily available for use and its modifications. It consists of a programmable circuit board and
software, IDE (Integrated Development Environment). With the connection of Node MCU board,
all mentioned hardware are used to move the soccer robots. For better understanding we can split
the project into two part that are:
SOCCER ROBOT 15
Figure 3.5 : Hardware Prototype from top
SOCCER ROBOT 16
Figure 3.6 : Hardware Prototype Image
SOCCER ROBOT 17
3.4.2 Controller side
User will send the move command to the soccer robots from the developed android application.
There are four button on the android application left, right, forward and reverse as shown in the
below screenshot.
th
Figure 3.8 : Smartphone Application Screenshot
SOCCER ROBOT 18
Testing
4. 1 Testing
Software Testing is an empirical investigation conducted to provide stakeholders with information
about the quality of the product or service under test, with respect to the context in which it is
intended to operate. Software Testing, depending on the testing method employed, can be
implemented at any time in the development process, however the most test effort is employed
after the requirements have been defined and coding process has been completed.
Moreover after developing the proposed Project named “SOCCER ROBOT”, I have covered all
the software testing steps to check whether my project meet with the expected requirements or not.
So my project have no bugs, no error and also hardware working properly in all tested steps.
SOCCER ROBOT 19
4.2 Black Box Testing
A strategy in which a software component is treated like an opaque box. This tests designers’ focus
on determining how well the component conforms to the published requirements for the
component, instead of worrying about the implementation details. Black box testing focuses on
the functional requirement of the software. Black box testing is not an alternative to white box
testing. Rather, it is a complementary approach that is likely to uncover a different class of errors
than white box testing method. So I also have used Black box testing used to find following errors
Incorrect or missing functions.
Interface errors.
Performance errors.
Initializing and termination errors
Test Results:
Successfully
SOCCER ROBOT 20
4.3.2 Android Application test
Test Case Title Developed Android Application Test with Working
Use Case Id 02
Test Results:
Successfully
Use Case Id 03
Test Results:
Successfully
SOCCER ROBOT 21
4.3.4 Android Application Button test
Test Case Title Android Application Button test
Use Case Id 4
Test Results:
Successfully
Test Results:
Successfully
SOCCER ROBOT 22
4.4 Branch testing
Branch Testing is defined as a testing method, which has the main goal to ensure that each one
of the possible branches from each decision point is executed at least once and thereby ensuring
that all reachable code is executed.
In the branch testing, each outcome from a code module is tested as if the outcomes are binary,
you need to test both True and False outcomes. My Project Advanced Soccer Robots Project
pass the branch test.
Branch testing also provides a method to measure the fraction of independent code segments and
also helps you to find out which is sections of code don’t have any branches.
SOCCER ROBOT 23
Results or Screen Shots
5.1 General View of Project
The general view of the project are under below. In the general view we can see the two sided of
the project. One side is smartphone application and second side is robot car as shown.
SOCCER ROBOT 24
5.2 Hardware Prototype Image
The hardware prototype of the project are as under. In this project, we have used nodeMCU, battery
cell. Car kit, serve motor as shown in the below prototype
SOCCER ROBOT 25
Figure 5.3 : Hardware Prototype Image
SOCCER ROBOT 26
Figure 5.5 : Hardware Prototype Image
SOCCER ROBOT 27
5.3 Smartphone Application Screenshot
User will send the move command to the soccer robots from the developed android application.
There are four button on the android application left, right, forward and reverse as shown in the
below screenshot.
SOCCER ROBOT 28
Reference Manual or Training Manual
6.1 Training Manual
Project is based on the advance Internet of Thing technology. I programmed the NodeMCU
microcontroller using Arduino IDE. The Arduino IDE uses C++ but of course the physical
environment is limited so not all C/C++ features can be used and the Arduino environment has
helper functions to enable you to use the hardware easily and the Serial monitor for input/output.
Arduino IDE is open source platform.
SOCCER ROBOT 29
For the system to work, first I have to connect the Computer system with NodeMCU to upload
source code
SOCCER ROBOT 30
For the development of Smartphone application I have used MIT app Inventor. Using MIT App
inventor Application easily built and will have a perfect interface.
The construction mode of the application screenshot in MIT app Inventor are under below:
SOCCER ROBOT 31
The Block Code of Smartphone Application are below:
SOCCER ROBOT 32
6.2 Coding
#define ENA 14 // Enable/speed motors Right GPIO14(D5)
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
int speed_Coeff = 3;
ESP8266WebServer server(80);
void setup() {
pinMode(ENA, OUTPUT);
pinMode(ENB, OUTPUT);
SOCCER ROBOT 33
pinMode(IN_1, OUTPUT);
pinMode(IN_2, OUTPUT);
pinMode(IN_3, OUTPUT);
pinMode(IN_4, OUTPUT);
Serial.begin(115200);
// Connecting WiFi
WiFi.mode(WIFI_AP);
WiFi.softAP(ssid);
Serial.println(myIP);
// Starting WEB-server
server.onNotFound ( HTTP_handleRoot );
server.begin();
void goAhead(){
SOCCER ROBOT 34
digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar);
digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar);
void goBack(){
digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);
digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
void goRight(){
SOCCER ROBOT 35
digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);
digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar);
void goLeft(){
digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar);
digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
void goAheadRight(){
digitalWrite(IN_1, LOW);
SOCCER ROBOT 36
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar/speed_Coeff);
digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar);
void goAheadLeft(){
digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar);
digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar/speed_Coeff);
void goBackRight(){
digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
SOCCER ROBOT 37
analogWrite(ENA, speedCar/speed_Coeff);
digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
void goBackLeft(){
digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);
digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar/speed_Coeff);
void stopRobot(){
digitalWrite(IN_1, LOW);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);
SOCCER ROBOT 38
digitalWrite(IN_3, LOW);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
void loop() {
server.handleClient();
command = server.arg("State");
SOCCER ROBOT 39
else if (command == "5") speedCar = 750;
void HTTP_handleRoot(void) {
if( server.hasArg("State") ){
Serial.println(server.arg("State"));
delay(1);
SOCCER ROBOT 40
References
https://www.techtarget.com/iotagenda/definition/Internet-of-Things-IoT. [Accessed 05
2023].
https://www.electronicwings.com/nodemcu/introduction-to-nodemcu. [Accessed 05
2023].
for-arduino-in-
pakistan.html#:~:text=The%20Arduino%20chassis%20kit%20provides,can%20start%
[Accessed 05 2022].
2023].
SOCCER ROBOT 41
[9] "techtarget," [Online]. Available:
https://www.techtarget.com/iotagenda/definition/Internet-of-Things-IoT. [Accessed
2022].
SOCCER ROBOT 42