Project tutorial
Smart Monitoring System for Football Players

Smart Monitoring System for Football Players © Apache-2.0

This system identifies footballer's skills, performance & moves that are difficult to identify during play or training.

  • 4,906 views
  • 1 comment
  • 11 respects

Components and supplies

Ardgen 101
Arduino 101 & Genuino 101
For processing IMU data and transmitting to mobile device through BLE
×1
Tens70
9V battery (generic)
Power supply to the Arduino/Genuino 101 board
×1
Adafruit industries ada80 image 75px
9V to Barrel Jack Connector
Connecting Battery to Arduino/Genuino 101 board
×1

Necessary tools and machines

Knee Band
An elastic band that is worn by sportsmen attached between thigh and leg

Apps and online services

Blynk logo new svawbywyip
Blynk
For visualizing performance parameters of players by themselves/trainers through android/iOS device
Ide web
Arduino IDE
To program Arduino/Genuino 101 development board

About this project

Football (Soccer) is one of the oldest sports in the world and with that; it’s also one of the most recognized. The pinnacle of the international game comes in the form the Football World Cup. There are also tournament such as the Euro Championships, Copa America and the African Cup of Nations. Domestically the strongest leagues come from England (English Premier League), Spain (La Liga), Italy (Serie A) and Germany (Bundesliga). In parts of the world the sport is also known as Soccer.

Picture :

Objective of the Game

The aim of football is to score more goals then your opponent in a 90 minute playing time frame. The match is split up into two halves of 45 minutes. After the first 45 minutes players will take a 15 minute rest period called half time. The second 45 minutes will resume and any time deemed fit to be added on by the referee (injury time) will be accordingly.

Players & Equipment Each team consists of 11 players. These are made up of one goalkeeper and ten outfield players. The pitch dimensions vary from each ground but are roughly 120 yards long and 75 yards wide. On each pitch you will have a 6 yard box next to the goal mouth, an 18 yard box surrounding the 6 yard box and a center circle. Each half of the pitch must be a mirror image of the other in terms of dimensions. Essentially the equipment that is needed for a soccer match is pitch and a football. Additionally players can be found wearing studded football boots, shin pads and matching strips. The goalkeepers will additionally wear padded gloves as they are the only players allowed to handle the ball. Each team will have a designated captain.

Rules of Football (Soccer)

A match consists of two 45 minutes halves with a 15 minute rest period in between. Each team can have a minimum off 11 players (including 1 goalkeeper who is the only player allowed to handle the ball within the 18 yard box) and a minimum of 7 players are needed to constitute a match. The field must be made of either artificial or natural grass. The size of pitches is allowed to vary but must be within 100-130 yards long and 50-100 yards wide. The pitch must also be marked with a rectangular shape around the outside showing out of bounds, two six yard boxes, two 18 yard boxes and a center circle. A spot for a penalty placed 12 yards out of both goals and center circle must also be visible. The ball must have a circumference of 58-61 cm and be of a circular shape. Each team can name up to 7 substitute players. Substitutions can be made at any time of the match with each team being able to make a maximum of 3 substitutions per side. In the event of all three substitutes being made and a player having to leave the field for injury the team will be forced to play without a replacement for that player.

Each game must include one referee and two assistant referee’s (linesmen). It’s the job of the referee to act as time keeper and make any decisions which may need to be made such as fouls, free kicks, throw ins, penalties and added on time at the end of each half. The referee may consult the assistant referees at any time in the match regarding a decision. It’s the assistant referee’s job to spot offside’s in the match (see below), throw ins for either team and also assist the referee in all decision making processes where appropriate. If the game needs to head to extra time as a result of both teams being level in a match then 30 minutes will be added in the form of two 15 minute halves after the allotted 90 minutes. If teams are still level after extra time then a penalty shootout must take place. The whole ball must cross the goal line for it to constitute as a goal.

For fouls committed a player could receive either a yellow or red card depending on the severity of the foul; this comes down to the referee’s discretion. The yellow is a warning and a red card is a dismissal of that player. Two yellow cards will equal one red. Once a player is sent off then they cannot be replaced. If a ball goes out of play off an opponent in either of the side lines then it is given as a throw in. If it goes out of play off an attacking player on the base line then it is a goal kick. If it comes off a defending player it is a corner kick.

The Offside Rule in Football

Offside can be called when an attacking player is in front of the last defender when the pass is played through to them. The offside area is designed to discourage players from simply hanging around the opponent’s goal waiting for a pass. To be onside they must be placed behind the last defender when the ball is played to them. If the player is in front of that last defender then he is deemed to be offside and free kick to the defending team will be called. A player cannot be caught offside in their own half. The goalkeeper does not count as a defender. If the ball is played backwards and the player is in front of the last defender then he is deemed to be not offside.

Scoring

To score the ball must go into your opponent’s goal. The whole ball needs to be over the line for it to be a legitimate goal. A goal can be scored with any part of the body apart from the hand or arm up to the shoulder. The goal itself consists of a frame measuring 8 feet high and 8 yards wide.

Winning the Game

To win you have to score more goals than that of your opponents. If the scores are level after 90 minutes then the game will end as a draw apart from in cup games where the game can go to extra time and even a penalty shootout to decide the winner. Players must use their feet to kick the ball and are prohibited to use their hands apart from goalkeepers who can use any part of their body within the 18 yard box

Existing Technologies

Goal-Line Technology

In association football, goal-line technology(sometimes referred to as a Goal Decision System) is a method used to determine when the ball has completely crossed the goal line in between the goal-posts and underneath the crossbar with the assistance of electronic devices and at the same time assisting the referee in awarding a goal or not. The objective of goal-line technology (GLT) is not to replace the role of the officials, but rather to support them in their decision-making. The GLT must provide a clear indication as to whether the ball has fully crossed the line, and this information will serve to assist the referee in making his final decision.

But this technology is used only for identifying whether the ball has crossed the goal-post line or not.

Arrival of idea and solution

In fact we, Vignesh and Zeeshan are also hardcore football fans. We follow almost every football game and discuss the pros and cons of every team and its management comprising of players,managers & trainers. It gives us immense pleasure while watching Champions League, English Premier League, Liga BBVA. The amount of money involved is also huge as fans spend a lot for entertainment and sponsors for advertising their brand and so on. They spend almost billions of dollars for training their players. Although the are only little available technologies such as stamina monitoring system and so on, they are focused only on measuring physical parameters of the players and are way too costly.

We decided to innovate something that is simple to use, affordable and of great value to the sports. Hence we arrived at the idea of developing this monitoring system that can be able to detect motion and several parameters with ease. When it comes to motion sensing or capturing again cameras come into use that are costly!

Well advancements have been made(still going) in the development of sensors and accelerometer is one of them. It is used in almost may IMU appliances such as wearables and smart phones. We decided to use this one in our project and found that Arduino 101 is really a great platform for prototyping such ideas that uses IMU. Since it has in-built IMU and BLE it made our work simple!

Importance of Monitoring

It requires lot of skills & training to shine at the top level either for the country or for clubs. Only talented players have an added advantage of performing better in those levels. Not all players have every skill sets. They are to be developed during the course of training. Some may have the ability to force or swing the ball into the net with ease while some may pass the ball accurately to their teammates. Some may play for full 90 minutes as they would have greater stamina while some may play for less than 30 minutes but perform well during that short span. Hence each player has an unique skill that needs to be monitored as well as improving other skills to some extent. Trainer/Manager may find it difficult to examine each and every player during training or match sessions. Hence this system would be of great use to the players in the domestic as well as international level.

Eg: Falcao, an colombian footballer said to have immense talent was signed by EPL giants Manchester United for a greater transfer fee during 2014 season & by Chelsea during 2015 season. Unfortunately he lacked stamina and could perform only for mere 30 minutes although he possesed great tactical skills. Managers & trainers took almost an year in analyzing him and was eventually benched for most part of the season due to this con.

If this sytem is used during the process of signing a player they could analyze the physical as well as technical parameter of each player before making an agreement. That could save lot of money and time for each and every football team and its management.

Pros

  • Special features of the players could be recognized easily.
  • Injuries during play could be avoided to a larger extent.
  • Accurate decision could be taken by the referee.
  • Coach/Trainer/Player himself could visualize the data remotely when stored in cloud.
  • Could lead to high level specialized training & teaching tactical moves to the players easily using this system.

Cons

  • The BLE functionality of the board is still in the development stage hence only few features are implemented.
  • Power connectivity is one important issue to be taken care of.
  • The data obtained would not be highly accurate as compared to high speed cameras.
  • The product must be designed in such a way it should not be tampered/damaged during play.

HARDWARE

Since the development board (Arduino 101) has an intel curie processor that has in-built accelerometer and BLE, that ensures that no other additional components are needed for this prototype apart from power supply. The accelerometer helps in analyzing the IMU data from curie module and the data could be easily visualized through a mobile that has BLE support.

ARDUINO/GENUINO 101

We used Arduino/Genuino 101 board that comes with a perfect combination for innovating wearable devices. Intel Curie module is the processor of Arduino 101. It has an in-built IMU(Inertial Motion Unit) & BLE(Bluetooth Low Energy). BMI160 an 6-axis accelerometer manufactured by Bosch that comprises of 3-axis accelerometer and 3-axis gyroscope.

KNEE SUPPORT SOCKS

This is a type of sock that a footballer usually wears. This may be used to place the prototype in the leg of the footballer.

SOFTWARE

  • ARDUINO IDE

Like other Arduinos the Arduino 101 can be programmed using the Arduino IDE.

If you are new to Arduino IDE and to manage libraries, check out this tutorial. https://www.hackster.io/attari/getting-started-with-arduino-genuino-101-b666d6?ref=user&ref_id=27194&offset=0

  • BLYNK APP

Blynk is an custom made app developed for visualizing data from the development board through WiFi or blue-tooth. It is the simplest of all with drag & drop widgets to use. It has found its application in the field of prototyping wearables automation or other IoT appliances. Connecting the arduino 101 requires some work.

BLE is one important feature of this board and Blynk supports this feature!

Basic transfer of data between arduino 101 & BLE device

//triggered from app
BLYNK_READ(V1)
{
//send to app
Blynk.virtualWrite(V1,val);
}

Check out this tutorial for connecting the BLE of the board with that of smartphone's blue-tooth and to send data from arduino to blynk and viceversa. https://www.hackster.io/nhuberfeely/arduino-101-blynk-bluetooth-tutorial-cb4c5d

Check out this tutorial for managing many widgets at the same time. https://www.hackster.io/Rjuarez7/arduino-101-blynk-and-ble-example-panel-69114f

My widget screen for visualizing parameters in Smart phone.

Widgets that I have added,

  • A graph for visualizing Acceleration data
  • Gauge for measuring Force at any instant
  • LED to indicate the type of foul committed
  • Analog value display to display the total distance covered.
  • Analog value display for displaying orientation of the leg during shot selection.

Calculation of performance parameters

The performance of a player determines his talent. Usually it takes lot of time for a coach to identify his innate skills before arriving at a conclusion.

  • FORCE IMPARTED ON THE BALL BY THE PLAYER

Force is one important parameter that a player must posses. Perfect amount of force ensures that the ball goes past the goal keeper in to the goal post with ease. Very little amount of force will make the Too much force will make the ball to travel past the goal post. Suitable amount of force could be calculated by measuring the acceleration values obtained.

Accelerometer provides 3-axis output data so that the average acceleration can be found out with the below given universal formula.

Average acceleration = Sqrt((Ax^2)+(Ay^2)+(Az^2))

Force = mass * average acceleration

mass is the weight of player during play.

Larger the force value indicate that the player has either shot the ball towards the goal or lobbed it to another player over long distance.

  • ANGULAR MOVEMENTS DURING PLAY

BMI 160 also has gyroscope that measures angular movements. It constantly measures not only acceleration values but also angular values. Both acceleration and gyroscopic values must be taken into account for making a perfect shot.

  • TOTAL DISTANCE COVERED

Greater the distance covered by player during the play indicates the physical strength and better stamina of the player. As a result the player may get a chance to play for the full 90 minutes. BMI 160 comes programmed with a step counter that measures the number of steps taken by a player during the course of play. Generally a player measuring 6" covers a meter in 2 steps or even less.

/*Program for counting number of steps */
#include "CurieIMU.h" 
const int ledPin = 13; 
boolean stepEventsEnabeled = true;   // whether you're polling or using events 
long lastStepCount = 0;              // step count on previous polling check 
boolean blinkState = false;          // state of the LED 
void setup() { 
 Serial.begin(9600); // initialize Serial communication 
 while(!Serial) ;    // wait for serial port to connect. 
 // pinMode(13, OUTPUT); 
 // intialize the sensor: 
 CurieIMU.begin(); 
 // turn on step detection mode: 
 CurieIMU.setStepDetectionMode(CURIE_IMU_STEP_MODE_NORMAL); 
 // enable step counting: 
 CurieIMU.setStepCountEnabled(true); 
 if (stepEventsEnabeled) { 
   // attach the eventCallback function as the 
   // step event handler: 
   CurieIMU.attachInterrupt(eventCallback); 
   CurieIMU.interrupts(CURIE_IMU_STEP);  // turn on step detection 
   Serial.println("IMU initialisation complete, waiting for events..."); 
 } 
} 
void loop() { 
 /* Instead of using step detection event notifications, 
    we can check the step count periodically */ 
 if (!stepEventsEnabeled) { 
   updateStepCount(); 
 } 
 digitalWrite(13, blinkState); 
 blinkState = !blinkState; 
 delay(1000); 
} 
static void updateStepCount() { 
 // get the step count: 
 int stepCount = CurieIMU.getStepCount(); 
 // if the step count has changed, print it: 
 if (stepCount != lastStepCount) { 
   Serial.print("Step count: "); 
   Serial.println(stepCount); 
   // save the current count for comparison next check: 
   lastStepCount = stepCount; 
 } 
} 
static void eventCallback(void) { 
 if (CurieIMU.stepsDetected()) 
   updateStepCount(); 
} 

Hence let us assume,

distance of 1 meter = 2 * steps detected

Hence from the total number of steps detected we can easily calculate the total distance covered by the player during play.

  • DRIBBLING SKILLS

A great player must have great dribbling skills so as to take the ball past the defenders. It may be noted that constant spikes in the acceleration values indicate the dribbling skills of the player. Sudden deviation from the spikes indicate that the player has either stopped dribbling the ball or lost the ball to any one of the defender.

TACKLE DETECTION

Tackling an opponent player and grabbing the ball is a extremely difficult technique that requires lot of skill and training. According to the rules of football, the player must tackle the opponent only under certain safety measures such as he shouldn't injure the opponent with any kind of intention. If the player is found to be guilty of being involved in a harsh tackle he/she may be sent off by the referee by issuing Yellow/Red cards. When the foul occurs inside the opponents box the referee may award them a penalty kick. But lately lot of players are involved in cheating that even a genuine tackle is faked and the results may favor them. New rules state that players who dive in the field without any tackle shall be sent off.

The recently concluded match between Barcelona and Paris Saint Germain(PSG) was an mouth watering fixture. With PSG leading Barcelona 4-0 in first leg Barcelona beat PSG and progressed to the next round by routing them 6-1 in the second leg. This match has lead to several controversies that Barcelona was awarded a penalty after their player Luiz Suarez dived intentionally for the want of goal. The referee did not notice that one & gave them a penalty after which they won the match so easily. If the referee had detected suarez's dive was an intentional the result could have been otherwise.

Hence the tackling the ball is one important parameter that is difficult to analyze. It may look tricky while judging through naked eye. It can only be analyzed with the help pf high speed cameras. With the help of IMU we can calculate any motion values.Hence tackle could be detected with the help of acceleration values.

Whenever there is a sudden change in acceleration it may be noted that the player has either played a shot or involved in an tackle. From the acceleration graph it may be noted that during tackle when the player is tackled severely with intention it will be listed as a sharp dip in the acceleration values. On the other hand if the player was involved in a genuine tackle but has dived intentionally there won't be of much difference in the graph.

Larger peak difference indicate rash tackle, while other type of peaks indicate genuine tackle. Hence using this graph the referee may be able to take any type of decision based on the intensity of foul committed will be able to give yellow/red card to a player based on the foul.

Final User Interface Display

Future Scope

This system could pave a way of monitoring the performance of players in almost all sports that could lead to better training and bringing out better players ultimately leading to entertainment of the spectators. This would make sure the reach of sports to every kind of people. People could learn from the data of certain moves and skills used by professional players and could learn on their own paving way to a whole different environment. Players can also learn certain skills & moves in in-door arena using the property of virtual reality in the near future where the availability of training places are limited.

Code

Smart Monitoring System for Football playersC/C++
Code for calculating acceleration, Force, orientation of the foot, type of tackle the player does, foul committed and total distance covered by the player during play.
/*
   This sketch example demonstrates how the BMI160 & BLE on the
   Intel(R) Curie(TM) module can be used to visualize the IMU data and several parameters in a widget
*/

/* To get an interrupt notification for every step detected,
    set stepEventsEnabeled to true. Otherwise, the main loop will
    poll for the current step count.

   By design, the step counter does not immediately update on every step detected.
   Please refer to Section 2.7 of the BMI160 IMU SensorData Sheet
   for more information on this feature.
*/
#define BLYNK_PRINT Serial

#include <BlynkSimpleCurieBLE.h>
#include "CurieIMU.h"
#include <CurieBLE.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "85d7b5288520498fb10242b1399a7361";

const int ledPin = 13;
boolean stepEventsEnabeled = true;   
long lastStepCount = 0;              
boolean blinkState = false;          
BLEPeripheral  blePeripheral;
WidgetLED led_D(V2); // Card to be given for foul committed
// intialize the sensor:
  CurieIMU.begin();
CurieIMU.setGyroRange(250);
CurieIMU.setAccelerometerRange(2);

BLYNK_WRITE(V6){
float ax, ay, az,a,F,V,m=15,t=0.1;
CurieIMU.readAccelerometerScaled(ax, ay, az);
a=sqrt(sq(ax)+sq(ay)+sq(az)); //universal formula for calcu;ating average acceleration
V=a/t; 
   if(V>35)
  {
  Blynk.virtualWrite(V6,"That was a harsh tackle done intentionally & you definitely deserve a Red card");
  delay(10);
    }
   else if(21<a<35)
   {
  Blynk.virtualWrite(V6,"That was a mediocre tackle & you deserve yellow card");  
  delay(10);
    }
   else 
   {
     Blynk.virtualWrite(V6,"That was genuine");
  delay(10);
    } 
}
void setup() {
  Serial.begin(9600);
  pinMode(13,OUTPUT);
  while(!Serial) ;    // wait for serial port to connect.

    // turn on step detection mode:
  CurieIMU.setStepDetectionMode(CURIE_IMU_STEP_MODE_NORMAL);
  // enable step counting:
  CurieIMU.setStepCountEnabled(true);
  if (stepEventsEnabeled) {
    // attach the eventCallback function as the
    // step event handler:
     CurieIMU.attachInterrupt(eventCallback);
    CurieIMU.interrupts(CURIE_IMU_STEP);  // turn on step detection


  blePeripheral.setLocalName("Blynk");
  blePeripheral.setDeviceName("Blynk");
  blePeripheral.setAppearance(384);
  Blynk.begin(blePeripheral, auth);
  blePeripheral.begin();
  digitalWrite(13, HIGH);
  

  Serial.println("Waiting for connections...");
}



void loop() {
  
float ax, ay, az, gx, gy, gz, a, F, V, g, m=15;
CurieIMU.readAccelerometerScaled(ax, ay, az);
CurieIMU.readGyroScaled(gx, gy, gz);
a=sqrt(sq(ax)+sq(ay)+sq(az)); //universal formula for calculating average acceleration
F=m*a; //Force imparted by the player
g=sqrt(sq(gx)+sq(gy)+sq(gz));  
  Blynk.virtualWrite(V0,a);
  Blynk.virtualWrite(V1,F);
  Blynk.virtualWrite(V3,g);
  Blynk.run();
  blePeripheral.poll();
  updateStepCount();
  card_shown();
}

void card_shown()
{
  float ax, ay, az,a;
CurieIMU.readAccelerometerScaled(ax, ay, az);
a=sqrt(sq(ax)+sq(ay)+sq(az)); //universal formula for calcu;ating average acceleration

Blynk.syncVirtual(V0); //Requests to update this virtual pin
  if(a>3.3)
  {
  led_D.setValue(255); //RED CARD
  delay(10);
    }
   else if(2.076<a<3.3) //YELLOW CARD
   {
    led_D.setValue(127);
      delay(10);
    }
else 
   {
    led_D.setValue(0);
  delay(10);
    }
   
}
  
static void updateStepCount() {
  
  int stepCount = CurieIMU.getStepCount();
  int dist =2*stepCount; //Assuming 2 steps equals 1 metre
  // if the step count has changed, print it:
  if (stepCount != lastStepCount) {
    Blynk.virtualWrite(V5,dist); //Distance covered in metres
    // save the current count for comparison next check:
    lastStepCount = stepCount;
  }
  static void eventCallback(void) {
  if (CurieIMU.stepsDetected())
    updateStepCount();
}

}

Custom parts and enclosures

Final end product look-alike
The Prototype that we have implemented uses Arduino 101 & a battery. In turn it could be fabricated in to a small chip and can be inserted in the knee of players similar to this type of smart band.

Schematics

Basic schematic of the system
After uploading the sketch in to the board using Arduino IDE, the board should be powered up using a battery. Using the blue-tooth the data from the board is transmitted to the trainer/players' device for visualization.
Pasted image 0 dwidfjnml5
End Prototype
17499799 1793702990948854 217571582 o uipr7nuasy
Components required for Prototyping
Power up the board that contains the firmware and insert it in the knee region using the Knee support band
20170325 170035 at1vzwm5ty
Simple Wiring diagram of the system

Comments

Similar projects you might like

Smart Garbage Monitoring System Using Arduino 101

Project tutorial by Technovation

  • 35,581 views
  • 13 comments
  • 52 respects

Smart Personal Money Vault Monitoring System Based on IoT

Project tutorial by Salah Uddin

  • 2,020 views
  • 0 comments
  • 11 respects

Smart Parking System

Project in progress by Md. Khairul Alam

  • 57,273 views
  • 36 comments
  • 125 respects

Arduino Controlled Smart Hydroponic Modular System

Project in progress by Luis Antonio Martin Nuez

  • 19,485 views
  • 3 comments
  • 96 respects

Smart Parking System

Project tutorial by Husinul

  • 14,842 views
  • 15 comments
  • 34 respects

Water Quality Monitoring System

Project tutorial by Hao Jie Chan

  • 63,094 views
  • 68 comments
  • 111 respects
Add projectSign up / Login