Vignesh GanesanMohammed Zeeshan syed
Published © Apache-2.0

Smart Monitoring System for Football Players

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

AdvancedFull instructions provided6 hours5,081
Smart Monitoring System for Football Players

Things used in this project

Hardware components

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

Software apps and online services

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

Hand tools and fabrication machines

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

Story

Read more

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.

End Prototype

Components required for Prototyping

Power up the board that contains the firmware and insert it in the knee region using the Knee support band

Simple Wiring diagram of the system

Code

Smart Monitoring System for Football players

C/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();
}

}

Credits

Vignesh Ganesan

Vignesh Ganesan

3 projects • 10 followers
Student(Engineer) Socialist, Ideologist & Sports freak!!
Mohammed Zeeshan syed

Mohammed Zeeshan syed

1 project • 4 followers

Comments

Add projectSign up / Login