Inspiration

We wanted to create a simple, interactive, and fun way to track fitness using the Myo Armband.

What it does

A workout app that tracks the number of proper push-ups that you do during a workout routine. With offline voice recognition, it gives you the option of hands-free control to record your workout progress.The local database updates your highest score so you will always have a target to beat.

How we built it

Our app consists of three main parts - a Myo armband API to gather real-time user data, an algorithm that detects a proper-form push-up with the data, and OpenEars API to give offline and hands-free voice instruction.

We started off by gathering several sets of push-up data from different users of varying form and speed. Through running bash scripts that logged real-time accelerometer, gyroscope, Euler angles, quaternion position, and electromyographic readings from the Myo Armband to an Excel spreadsheet. Using MATLAB, we then performed signal analysis on these data sets and developed a suitable model waveform for a push-up in terms of Euler orientation of the Myo Armband. Based on this waveform model, we developed a flexible algorithm which would detect whether or not the user had successfully completed a proper push-up.

To enable hands-free instruction to the app when beginning and ending their push-ups, we incorporated the OpenEars API, which allows offline voice detection. The voice recognition keeps running once the app is paired with a Myo armband device. It listens to two instructions - "Start" and "Stop", and as soon as it detects either keyword from the user, it will give instruction to the Myo API to start counting the number of proper push-ups based on our data analysis.

Challenges we ran into

Since Myo Armband only provides 5 pre-defined hand gestures and no motion cues, we needed to run a brand-new analysis to model the pattern of how different data correspond to different states of a push-up, and select the ones that will be useful to be the determinants in our app. The main challenges of modeling process were that there were a lot of data to look into and that the data sets varied with different test users. We analyzed and compared plots of the accelerometer's x,y, and z readings, the Euler orientation of roll, pitch, and yaw, as well as the gyroscope and muscle electromyograph (EMG) data to determine a suitable algorithm for what defines a push-up for a wide range of users.

Accomplishments that we're proud of

Not allowing ourselves to be constrained to the pre-defined gestures that the Myo armband API provided, we jumped out of the box and attempted to come up with our own modeling methods through signal analysis techniques, analogy to finite state machine in TCP protocol, and some basic machine learning concepts. At the end, our algorithm worked out really well for push-ups with proper forms, incrementing the number of push-ups as soon as the user finishes one push-up.

Also, it's our first time learning to run voice control on our app. With limited documentation in Swift, we greatly improved voice detection efficiency using different functions and setting up different variables from numerous header files.

What we learned

From a technical perspective, we learnt about signals processing, Myo armband API, OpenEars API, pocketsphinx, sphinxbase API, and auto-layout in iOS. In addition, we learned to encourage the wildest hacks , and support each other even though some of our initial ideas didn't really seem to work.

What's next for MyownGains

We hope to add a compete mode that allow users to compete with each other through either local (Bluetooth) or remote (WiFi) connection. Two users can then compete to see who can do the most push-ups with the best form in the shortest amount of time. In addition, it would be cool to integrate the Facebook API and turn MyownGains into a more social and interactive experience.

Extending from just push-ups, we hope to apply the armband to more types of workouts, such as bench-presses, squats, and crunches. We see this application has the potential to allow users to accurately track their form for all types of workouts and to even become a personal trainer for the user.

Built With

Share this project:
×

Updates