Basketball Local Indoor Positioning System: Big Bang Fair Runner-up 2021

Skills: Arduino, Java, Android Studio, Fusion360, Product Design

Visualisation of the shot tracker system

Visualisation of the shot tracker system

In my last year of high school over 5 weeks in 2021 I designed a system for tracking a player’s basketball shooting percentages at different positions on the court. The inspiration for this came from my interest in basketball, desire to learn more practical engineering before my university course and inspiration from popular engineering creators. Furthermore, I saw how analytics is useful for performance and engagement in sports such as running and weightlifting, and I wanted to bring this experience to basketball.

I entered this project into the 2021 Big Bang competition and won a scholarship to attend the 61st London International Youth Science Forum. This project was a lot of fun, and I learnt a lot about each stage of the project lifecycle while working with a very small budget. Four years of experience and an engineering degree later, I see how every part of the process could be improved. We’ll see if I revisit it…

Project output

The collection of all prototype modules designed. Total parts cost approx. £60

The collection of all prototype modules designed. Total parts cost approx. £60

The main output was a tool that could track shooting percentages at different positions on the basketball court. The idea is that this could be used to track progress over time and highlight strengths/weaknesses.

The system worked by having a small module inserted under the sweatband of a player. Position would be determined using bluetooth signal strength from different beacons placed around the court. The module continuously tracks the position of the player on the court, and when a shot is made or missed, it can be logged by tapping or double tapping on the wrist.

Because bluetooth signal strength doesn’t perfectly decrease with distance from a beacon with the inverse square law, a K-Nearest-Neighbour machine learning algorithm was used to detect player position from 10 different positions on the court. The system needed around 5 minutes of training data to function at a high accuracy.

Key takeaways

The main thing I’ve realised looking at this project in hindsight is that I focused too much on making an interesting engineering project, which was good for technical development but not useful for developing something in the real world. Engineering as a field is about much more than making something cool technically.

If I had to do this project again, I would find a user need and validate it with the most informative, least effort solution I could. E.g. manually counting shots for myself or a basketball team and finding whether that data had a use. By defining functional and non-functional requirements more clearly, I would have had more direction during research and development of my prototype.

Project phases

1. Problem definition and early research into positioning technology

  • Project scope: Tracking a basketball player’s shooting accuracy from different positions on the court to track player performance
  • Functional requirements:
    • Track player position on the court in real time.
    • Label whether a shot was made or missed (either manually or automatically)
    • Associate each shot with the correct court position
    • The system should not interfere with the player’s movement
  • Non-functional requirements:
    • Low cost: < £200 budget
    • Portable and easy to set up on any court, including outdoors
    • (If wearable module used) Lightweight and comfortable wearable module
  • Survey of existing indoor positioning technologies:
    • Key variables: Range, precision, cost
    • Time-of-Flight sensors: accurate but expensive. Less reliable outdoors and depth range up to 5m.
    • Computer vision: Can have high precision but setting up the camera is more complex for different court types
    • UWB: High precision but too expensive
    • Bluetooth/Wifi Signal Strength: Cheap and widely available. Sensors for robust design widely available but signal is noisy.
    • Ultrasound: Too low precision
    • Existing commercial technologies: Looked through ShotTracker patents to understand imaging technology
  • Outcome: Decided to create a BLE-based positioning system with a manual shot logging system, which best matched the design constraints and resources available to me.

2. Hardware exploration and exploration into input modality

CAD render of another iteration of the wristband module

CAD render of another iteration of the wristband module

  • Microcontroller research
    • Compared properties of different microcontrollers (ESP32, Arduino Nano etc.)
    • Decision: Arduino Nano 33 BLE for wristband module, Arduino Nano + HM10 BLE modules for beacons
  • Input modality research
    • Conductive rubber keypad
    • Tactile push buttons
    • Capacitive touch sensors
    • IMU-based detection of shot motion
    • Image detection of ball at the rim
    • Force-sensitive resistors
    • Wearable electronics
    • Decision: Integrated a force-sensitive resistor due to large sensing area which enables more natural interaction and less precise input (with vibration motor as feedback)

3. System design and algorithm development

Screenshot of the Andorid application

Screenshot of the Andorid application

  • System architecture
    • 3 BLE beacons connect to wristband module
    • Wristband module continuously stores signal strength from each beacon
    • When a shot is completed, signal information is broadcast to phone through another bluetooth connection
    • Phone calculates shot position and stores outcome at that position
  • Data acquisition process
    • Because of 2-5m accuracy of BLE RSSI, decided to collect RSSI values for 8 different positions on the court as a balance between information and accuracy
  • Positioning algorithm
    • Because RSSI doesn’t follow clear inverse square law decay which prevents analytical models working, switched to K-Nearest Neighbor because it works well with small datasets, it handles noisy spatial data and it’s simple to implement and visualise
  • Model training and evaluation
    • ~5 minutes of labeled data per court allowed KNN to achieve good accuracy
  • Shot event processing
    • Single tap = shot missed, Double tap = shot made
  • Jump height detection
    • By attaching wristband module to waist, jump height can be measured by using accelerometer on the device

4. Testing and validation

Future work could likely use accelerometer data like this to automatically detect shooting motions

Future work could likely use accelerometer data like this to automatically detect shooting motions

  • Indoor court testing with friends
    • Set up beacons around the court and wore the device while shooting from different positions
  • Measurement of accuracy
    • Positioning accuracy assessed by comparing predicted vs. true positions
    • 90% accuracy reached
  • UX feedback
    • Comfort of wristband
    • Integration of device use into player performance
    • Ease of remembering tap patterns
  • Performance summary
    • Position prediction is accurate after training, with reliable shot logging
    • Further testing needed on different court and environment conditions, over a greater time span

Outcome

A fully functional proof-of-concept capable of tracking shooting percentages across court regions, validated through real shooting sessions.