Difference between revisions of "Headband Helper"
(→Module 2: Filtering the Data)
(→Module 2: Filtering the Data)
|Line 69:||Line 69:|
belowFor = 0
belowFor = 0
Revision as of 12:39, 24 April 2019
- 1 Links
- 2 Project Proposal
- 3 Design and Solutions
- 4 Results
- 5 Next Steps
GitHub Repository 
Accelerometer code 
Final Poster 
Accelerometer Tutorial 
We hope to construct an accelerometer-based concussion monitoring system using a Raspberry Pi OW that can be contained within a headband. In addition, we will create a web interface that allows users to track their impact history. These two pieces (software and hardware) will communicate using an ad hoc IP network run by another Raspberry Pi.
- Jarrod Huther
- Katy Mockett
- TA: Ethan Shry
- Professor: James Feher
- Create an accelerometer-based concussion monitoring system that can be contained within a headband
- Create an ad hoc IP network using a master Raspberry Pi to collect data from the headbands
- Ensure that the master Pi and web interface can successfully communicate so the web interface can display collected data about collisions
- We both have limited experience with circuitry
- We both are comfortable working in Java but have never really used any languages beyond Java
- No experience with sensor networks; creating a fully debugged network will be difficult
- 2 accelerometers ($11.95 each, $23.90 total)
- Shipping (~$8.00)
- 1 Amp battery & charger (provided- free)
- Raspberry Pi 0W- headband (provided- free)
- Raspberry Pi- master (provided- free)
- 3D box to contain tracking materials within headband (free)
Total Budget: $31.90
Design and Solutions
Module 1: Wiring Accelerometer to Pi 0
Module 1 of our project involves wiring the H3LIS331DL accelerometer to the Raspberry Pi 0, as well as implementing the code in python that executes the readings. This specific accelerometer is 3-axis, meaning it records data in the x, y, and z-planes, and can take readings up to +-400g's. We chose this board specifically because concussions occur at approximately 95g's, so we needed a sensor that was capable of sensing events of this magnitude and beyond. Once the sensor was wired to the pi, we had to code the pi to use the sensor, as well as transmit the data to the master pi, in order to read the data on another interface. We begin by following the tutorial linked above (which we created for the purposes of this project). The completed system is shown below.
- Once the system was functioning properly, we used OnShape to design a case that could contain the pi, acceleromter, and power supply, to give it some protection from the more physical impacts it will likely record.
- Once the pi case was created and the system was placed inside, we could then fit it to either a football helmet or headband, depending on the sport.
Module 2: Filtering the Data
Module 2 of our project involves filtering the data being read by the RPi0. To do so, we first conducted testing to examine what collision data looks like compared to noise and other potential accelerations read by the RPi0. From our testing results, we determined that we should include three simple filtering functions: a peak detection algorithm, a minimum threshold for the peak point in the hit, and a minimum threshold for the average of the peak and the two adjacent data points on either side of the collision. We decided to use a peak detection algorithm to ensure each hit recorded in the database represented a unique collision rather than sending two (or more) hit events from the same collision. We included the minimum threshold for the peak point in the hit, which we set to 40G's, to avoid overcrowding the database with meaningless data, while we included the minimum threshold for the average to ensure the hit being recorded is not just noise from the accelerometer.
To implement the simple peak detection algorithm, we created a simple algorithm that follows the logic the pseudocode below:
if(point > 40 && previouslyOverThreshold = false): previousOverThreshold = true belowFor = 0 if(point < 40 && previouslyOverThreshold = true): belowFor += 1 if (belowFor = 2): previouslyOverThreshold = false belowFor = 0 checkThresholds(previousFivePoints)
Module 3: Building a Communication Network
- API Routes, Sending/receiving data, etc.
- Created Schema for design. Additionally, designed and set up AWS web interface structure, starting with the wireframe and working up(step-by-step and referenced websites can be found in log). Established ad hoc network and set up the pi 3 as an access point/router. Then created database instance and how the data would be displayed. Created API routes for the communication with the pi 0 as well as the other previously mentioned processes.
Module 4: Displaying the Data
- Once data is in the server, read results and draw conclusions. Will do this by testing the system in an experimental setting (lab first, then likely move to field to see how it responds in a practical application). Once data is collected and properly displayed on webpage, we can begin discussion on what certain outputs read, and what constitutes an "event" (possible concussion).
- Present all your results, including modules that only partially worked.
- Discuss how the results compare to your original objectives.
- Identify the critical decisions or factors in your project that stopped you from getting a better result (try to avoid obvious comments such as "we run out of time").
- If the project had any ethical, privacy or safety issues related to it, discuss how you addressed them.
- Include on the main wiki an image of the final project or short video of the working project.
- Miniaturization: Further development would allow us to miniaturize the system for easier implementation in headbands, helmets, and potentially other carriers.
- Multiple-Team Functionality: Design each accelerometer system to transmit unique ID to server to distinguish between players; Expanding off of this, potentially different servers/unique key requirements that allow for multiple teams to use the same system at once.
- Security: Relating to Multi-Team Functionality, design credential-based login to prevent other teams from accessing information, for many different reasons. Primarily privacy, as technically this is medical data and should be restricted to the same securities provided to information such as physicals. Additionally, should have a way of preventing editing of information, to prevent unethical practices such as erasing positive concussion readings.
- Refined Interface: Spend time improving aesthetic of displayed information, not only for obvious reason of looking nicer, but also to be more user-friendly and navigable.