10 years, 11 months ago.

hey help me urgent accelerometer problem

i have bought mbed application board designed for mbed NXP LPC 1768,i am working with accelerometer on application board.a project related to active ankle foot movements.i want to use tap detection method to know whether the foot is on ground or not.please anyone help me with a code which displays wheher the foot is on ground or not.

1 Answer

10 years, 11 months ago.

There certainly are a lot of 'urgent accelerometer problems' just lately...

Seems to me the most straightforward way to detect a footfall might be to realise that when your foot is in the air taking a pace forward, the accelerometer will be moving about a lot, and when it lands on the ground it will be the other foot moving through the air so the foot with the mbed and application board strapped to it won't be moving so much.

You could exploit this by taking the absolute of each of your three x,y and z values from the accelerometer and adding those absolutes together. As you sample this value over time, you should get periods of high values (foot in air) and periods of low values (foot on ground), and with a bit of experimentation to work out suitable threshold values and number of consistent samples to identify which state you're in, should be able to count paces.