Marathons and Half-Marathons are more popular than ever before. The large number of injuries, especially among beginner and intermediate runners, is a big cause for concern. There are large number of studies that show that foot form (how your foot contacts with the ground) plays an important role is staying injury free.

Gait Analysis is a popular method used to analyze foot form during running. The only way to perform Gait Analysis on yourself is through an expensive session at an adequately equipped Physical Therapy center, or you head to the closest running-shoe store and ask one of the experts to give your their opinion.

In either case, you aren't getting Gait Analysis results frequent enough. This is what drove us to create a prototype for a low cost Gait Analysis device.

## Step 1: Bill of Materials

For this project we used:

1. 6 Piezo Sensors

2. Edison Dev Kit

3. Necessary resistors and hook-up wire

## Step 2: About the Piezo

Piezos are sensors that generate a certain voltage upon vibration or a knock. Here is the exact part we used:

https://www.sparkfun.com/products/10293

This Arduino Tutorial gives a good overview of how the sensor should be used:

http://www.arduino.cc/en/Tutorial/KnockSensor

In essence, based on the velocity of impact, you will get a value between 0 and 1023 when you read the AnalogPin the sensor is connected to.

## Step 3: Hooking Up the Sensors and Reading Them

The circuit is really simple. The Piezo elements are connected to 6 Analog Ins on the Edison Development Board. You will need to connect necessary resistor in parallel to calibrate the sensor readings. Piezos are sensitive elements and without these resistors its output will turn out to be 1023 (the maximum possible value) even with a slight impact. Use these resistors to tame down the sensor and get a meaningful scale of values.

Once you have these sensors connected and the device powered up. The following piece of Python code will read the sensor values periodically.

import mraa
import time

# Get handle on each of the inputs

impact = [mraa.Aio(0),mraa.Aio(1), mraa.Aio(2), mraa.Aio(3), mraa.Aio(4), mraa.Aio(5)]

# Init result vector

impactVal = [0, 0, 0, 0, 0, 0]

while 1:

print impactVal

# Allow settling time for the sensors

time.sleep(0.5)

You now have the first steps necessary to create a Personal Gait Analysis Device