|
Filtering out Vibration while using a KOP Accelerometer
So, this year, as the only programmer with experience, I figured I'd work on using an accelerometer to calculate distance for the autonomous mode. The Calculus behind this isn't hard, and the programming isn't either (in theory).
When I wrote the program, it compiled fine and the accelerometer seemed to give us pretty accurate data. We mounted the RC onto a cart and started walking with it through the halls, while using HyperTerm to take some data. We then took this data and plopped it into an excel graph, and to our surprise, got some messed up data! The accelerometer (both x and y) seemed to be super sensitive to shocks & vibrations. This was before the double integration too! We tried mounting the accelerometer in a piece of foam to help the shocks a bit, and that worked, but it didn't work well enough. We still can't get good data. I thought about doing a rolling average type of thing, but it seems that the data is averaged around 0 milliG's (512 on an analog input).
So does anyone have any ideas on how to make the data better? I want to use an accelerometer, because it gives the robots position based only on acceleration, rather than basing it on wheels, or other, more unreliable things...
(The loop is short enough to get a enough data points, and I did the integration right)
|