Gymnastics Competition App

From ESE205 Wiki
Revision as of 18:40, 25 April 2017 by Aidan.warren (talk | contribs)
Jump to navigation Jump to search

Project Proposal

Group Members

Aidan Warren and Lawrence Chan
TA: Nathan Schmetter

Project Overview

Right now, judges score gymnasts using pen and paper, and often have to employ assistants to enter scores for them. We would like to improve this process and to have a more efficient and better way of scoring gymnastics moves. We would build a machine using Raspberry Pi to record deductions with buttons (including a time-stamp of each deduction). There will also be a camera that records the gymnasts' routines. Gymnasts now are unable to view feedback from judges and only receive the final score. Our machine will upload the gymnasts's routine video to Youtube along with timestamp information about when each deduction took place. It will also include their routine's difficulty points and other scoring information. The gymnasts will then be able to go online to view their routines and figure out what mistakes they made and what they need to work on. For our demo, people will be able to watch recorded routines or skills on a computer and score them using our machine. They can then view the youtube video and comments that are uploaded.

Objectives

  1. Design the circuitry and Raspberry Pi to input scores with buttons and record the gymnasts' routines using a camera.
  2. Design and build a unit to house the computer and circuits.
  3. Upload the information to Youtube for the gymnasts to see the scoring process and view their mistakes.
  4. Let the audience use the machine for score deduction with a video of a gymnastics routine during our demo.

Challenges

  • Learn how to use Raspberry Pi.
  • Learn how to code with Python.
  • Learn how circuits work and how to create them (for visual inputs, and display/internet outputs).
  • Learn how to implement buttons to the Raspberry Pi.
  • Learn how to connect the camera to the Raspberry Pi and take videos with it.
  • Learn how to upload the information collected from the Raspberry Pi to Youtube.
  • Figure out how to 3D print the housing for the unit.

Budget

  1. $0.00 Raspberry Pi
  2. $0.00 Youtube upload videos service
  3. $29.95 Raspberry Pi Camera - https://www.adafruit.com/products/3099
  4. $7.97 Camera Extension Cord https://www.amazon.com/Adafruit-Flex-Cable-Raspberry-Camera/dp/B00XW2NCKS/ref=sr_1_2?ie=UTF8&qid=1486763635&sr=8-2&keywords=raspberry+pi+camera+extension+cable
  5. $7.99*2 Adeept 4pcs Digital Push Button Keypad Module for Arduino and Raspberry Pi AVR MSP430 MCU DIY Kit - https://www.amazon.com/Adeept-Digital-Button-Arduino-Raspberry/dp/B01LXHNBBJ/ref=sr_1_3?ie=UTF8&qid=1486763176&sr=8-3&keywords=raspberry+pi+buttons
  6. $22.99 Elecrow TFT Display Monitor 3.5 Inch 480x320 TFT LCD Display with Touch Screen for Raspberry Pi 2B B+ Raspberry Pi 3B - https://www.amazon.com/gp/product/B013JEV6VA/ref=ox_sc_act_title_1?ie=UTF8&psc=1&smid=A3UAI31N6IJM2
  7. $0.00 3D-Printing Materials and Software
  8. $7.50 (+ $7.14 Shipping) Foot Switch https://www.adafruit.com/products/423?gclid=Cj0KEQiAxeTFBRCGmIq_7rGt_r8BEiQANdPqUk8XYG37qe-_8iJT87roB9Z0fK-OCeW72jrDsBP9niUaAlmV8P8HAQ

Total: $91.53

Machine Design

Machine Design

Gantt Chart

Gantt Chart

Design and Solutions

Module 1: Raspberry Pi and Display Screen

Module 2: Inputs

Design

We needed an input to record the routine video and an input to time-stamp the judge's deductions. For the time-stamps, we need a an input that does not interfere with the judge's handwritten scoring. For filming, we needed a small camera that was easily compatible with Raspberry Pi to reduce our work load.

Solution

We decided to use a foot pedal to time-stamp deductions because it left the judge's hands free to score. Also, only having one button (pedal) instead of multiple makes it easier to use during a fast routine. Because the display screen from module 1 used up all the voltage pins, we didn't have any left for the foot pedal (which had a voltage, ground, and pin wire). In order to solve this problem we coiled the ground and voltage wires together and connected them to a single ground pin. The pin wire we simply connected to a GPIO pin. This works because it completes the circuit and the foot pedal doesn't actually require any voltage to work. It functioned as a simple button. For the camera, we used the Raspberry Pi camera. It is extremely small, and easily compatible with the Raspberry Pi. We plugged it in and only needed to change the screen orientation in order for it to work.

Module 3: Housing

Module 4: User Interface

Design

Module 5: YouTube Upload

Results

Final Product

All the modules described above were implemented. Our machine includes a Raspberry Pi connected to a 3.5" display screen which displays the interface. A raspberry pi camera records video and a foot pedal time-stamps deductions. Both of these are connected to the Raspberry Pi. The camera and Raspberry Pi both have 3-D printed housings. The user interface is simple and takes the judge through multiple scoring screens before automatically uploading the video with time-stamped deductions to YouTube.

Compared to Original Objectives

We successfully designed circuitry and utilized the Raspberry Pi. Unlike our initial design, which used four buttons, our final design used only one foot pedal, simplifying our circuitry and the user experience. We also successfully 3-D printed housings for both our Raspberry Pi + Screen and Camera. The machine also automatically uploads the video and deduction time-stamp information to YouTube, which is available for viewing within 2 minutes and does not interrupt the program. We had a successful demo. The audience was able to use the machine to time-stamp a gymnast's fall deduction, and then see that video uploaded in real time.

Critical Decisions and Factors

  • Our machine requires the user to authenticate the YouTube channel before uploading. This is only 2 extra buttons to press, but it is inconvenient and requires a browser pop-up. We were unable to automate this process because, unlike the old ClientLogin to authorize command-line scripts to run on servers without a browser, YouTube's new OAuth 2.0 system requires user authentication through a browser.
  • Our system only allows time-stamps of deductions to be precise within one second. This is because YouTube only allows second time-stamp marks for videos. However, this is not a huge problem as there is human error in the reaction time to the judge to press the pedal, and deductions never occur more frequently than several seconds apart.
  • When we turn on the Raspberry Pi the system does not automatically start. This is because we thought that the trade off of not being able to access other files important to the program would be too great. As a prototype version, we valued the ability to easily manually edit files on the Raspberry Pi.