Research at the Children’s Hospital of Pennsylvania has shown that excessive pitching can lead to serious injuries in young baseball players. The dynamics of pitching motion generates massive forces on the elbow and shoulder, often above the tissue failure thresholds. Studies such as those conducted by Kaplan et al report instances of elbow pains percentages as high as 58% and instances of shoulder pain percentages as high as 38% among high-school pitchers. Research also shows that the strongest correlation between injury and the risk factor is the number of pitches. Therefore, there is a need for a device to detect and track pitching action.
What it does
a wristband device for adolescent baseball pitchers that measures the player’s pitching activity to keep track of wear and tear on the arm, analyses the data, and then provides relevant data to parents, coaches, and doctors via a software application.
How we built it
An IMU, worn on the pitching arm, will be used to measure motion of the player’s wrist and arm. This data will be converted into digital form and processed on a microcontroller, which will either possess or be interfaced with a data storage system. At regular intervals, this data will be uploaded wirelessly to a cloud database, where it can be accessed by algorithms which analyse the data to detect and keep track of the number and nature of pitches made the player. The user interface will be in the form of an android application which displays the processed data in an intuitive form to parents and coaches to help them track the player’s performance and to warn them when the player is approaching the limits of safe pitching. These limits can be calibrated through the app by providing the information such as height, weight or age of the player. Potentially, this data could be made accessible to doctors and specialists who can further analyze the data and infer specific patterns that cause physical damage to the player, and update the algorithms to enhance the system’s capability to detect harmful pitching activity and generate the required warnings.
We built two prototypes to test and compare the efficiency and feasibility of each method. The first prototype consisted of an ESP8266 WiFi module interfaced with an Adafruit 9 DOF accelerometer and an SD-Card. We used orientation and gyroscope data as data points for later pitch classification. Due to the high data acquisition rate, there was a necessity to push data to an external storage from where the data was wirelessly uploaded to a local server and accessed for further processing and machine learning classification.
This prototype was used with Dr. Greenberg for basic data acquisition, which was stored and used for the next prototype.
The current prototype uses a Raspberry Pi Zero in conjunction with an Adafruit 9 DOF accelerometer, and potentially an OLED screen and a Bluetooth module. The motivation for this prototype was to perform on-board machine learning of the data. This is in contrast with prototype 1, where classification would be performed over WiFi.
We used a moving window k-NN machine learning algorithm to detect and classify pitches. We acquired a total of 10 pitches after our meeting with Dr. Greenberg and used half of this data to train our classifier, and tested it on the other half. With this pre-acquired classification, we achieved a windowed test accuracy of about 80% and a pitch test accuracy of 100%.
We then loaded this trained classifier on to the RasPi Zero and performed classification on the data read on-board from the IMU and achieved a higher accuracy.
What we plan to do next
Now that we have the basic set up working, our next step will be to interface the OLED with the prototype, which will display the pitch count and other relevant information. Following this, we will try to set up a Bluetooth module to communicate with the player's smart phone using an Android application.
We developed a robust wristband device with a better enclosure and packaging. It was ensured that the hardware circuitry remained functional during violent pitching actions. An 128x32 OLED was interfaced with the microcontroller and attached to the wristband. A Li-Po battery was used to power the entire circuit. It was observed that the battery lasted for a long duration. A local server was set up that acts like a dashboard and plots graphs of the raw as well as processed data. A basic Android application was developed that displays basic profile information and statistics. The device was tested multiple times upon ourselves and also with Dr. Elliot Greenberg. These testing sessions improved accuracy of pitch classification.
Challenges we ran into
Data acquisition rates ; Fine-tuning of classification algorithm ; Robustness of wristband device ; Multiple iterations of building a prototype
Accomplishments that we're proud of
Accurate pitch detection ; Calibrating pitch intensity ; Ease of handling hardware/software interface
What's next for PitchPerfect
Further testing ; Including flexible proto-boards in the hardware ; Scaling the device ; Better connectivity to smartphone app