Hi everyone, I'll still quite new to ardiuno and looking to get into a new project but I'm unsure how feasible it is. I was thinking of building a small sensor with an IMU that can be worn by a sprinter (perhaps on the chest) where it measures and records their acceleration throughout a run for analysis later or to track improvements. The acceleration readings should be accurate enough where it shows a very similar reading if the same athlete were to run the race again. Just wanted to make sure there were cheap IMUs < $80 that could achieve this. Any maths calculations or filters it will need to perform I can learn and implement as long as they will make it fairly accurate. Any other advice on how to approach it or other ideas would be appreciated.
An accelerometer responds to the force of gravity and to every jolt of a foot setting down, in addition to "horizontal acceleration".
Your only option is to buy one, make measurements, and determine if it is possible to make sense out of them.
It can work but I suspect that it will be a lot harder than it seems at first glance.
In addition to the problem that @jremington mentioned, the accelerometer won't always be in the same plane, so you'll have to do gyro fusion to take the rotation of the sprinter's body out of the picture.
I've had to do this to measure vehicle acceleration (front pitches up under hard acceleration and down under braking and rotates going around curves) and it is much more complex than it seems.
Excellent point.
Another way to think about the problem mentioned above is that with sensors attached to a moving object, it can be very difficult to determine "horizontal".
Thanks to both of you for the info. I was thinking if I combine it with a gyro and a good filter and could decently accurately calculate angular orientation. Then doing some trigonometry or matrix calculations convert the acceleration in that plane to the direction I want. Also maybe if I could have a calibration button where the athlete faces the direction they’re running and the gyro remembers the plane? What do you guys think?
Unfortunately, not with consumer grade IMUs. They are simply too noisy and inaccurate.
.
You can expect at very best about +/- 2-3 degrees error in 3D orientation, which means that it is impossible to completely remove the effect of Earth's gravity, in order to accurately estimate of "horizontal acceleration". Typical error estimates of that quantity are +/- 0.4 m/s/s.
In a nutshell you need to know when you're straight and level at rest and zero out everything at that point. There's a pretty good arduino library that takes advantage of the MPU-90xx internal sensor fusion algorithms (they do the heavy lifting for you) and outputs the x,y,z accelerations of a point in space. I've used it to build a single-axis level platform without much difficulty.
However, I don't know if it updates fast enough to deal with someone running. I don't remember which of the many MPU6050 libraries it is, but you can search for this include file and find it.
"MPU6050_6Axis_MotionApps20.h"
Thanks for the extra help. Would you say you were happy with the accuracy of the acceleration in your project? Also I did a quick google search and it saying the MPU6050 is obsolete now and I should use an ICM one instead. Do you know any do libraries for those?
Mahony and other fusion filters for Arduino are available for the modern ICM-20948 9DOF and the ISM330DLHC 6DOF sensors.