I have an application where I’d like to measure the position and speed of a cradle is moving linearly from 0 to 1.5 meters. So imagine like a small slider on a ruler going back and forth.
Someone asked me why I don’t try using an accelerometer for this. What are some considerations for using an accelerometer for this application? Since you have to integrate twice to get position, and also you have to calibrate, I’m not sure that’s the best solution. But I’m curious… would this even be a viable solution using a 2-D accelerometer? Thanks for your help
What kind of motion is expected? Will it be smooth? Does the cradle rotate/translate in any other directions (even if it is just slop)? How often do you expect it to reach the limits (0 and 1.5m)?
I think that if the slider has little slop in its motion, and the movement is pretty smooth (‘jerk’ or da/dt is small) then it could be decent. The computed position will definitely drift over time… You could place limit switches at either end so serve as a reset whenever that position is reached. But the longer the movement stays in the middle the more opportunity for error to accumulate.
What are the requirements of position accuracy / and update rate?
The motion is pretty fluid and smooth, with minimal (if any) slop and ‘jerk’ (da/dt). I guess some variability would arise if you place the setup on an uneven table or floor though.
No, the cradle does not translate in any other direction - just forward and back in 1-D. And usually does not go all the way to either limit of 0 or 1.5m (but it does get close, and may hit 0 occasionally). It will mostly move around in the middle (from about 0.4m to 1m - so as you said, there’s more opportunity for error to accumulate). So maybe a limit switch could be placed in a couple clever places along the track to reset.
Update rate should be as fast as possible. Minimum of about 30Hz (which is acceptable), but ideally 60Hz to 100Hz. For accuracy, 1cm resolution would be perfect (even 2-3cm is probably okay, but I’d rather have less). And in terms of speed, it should be able to track movement of about 0.4m/sec (so about 1m per 2 or 3 sec)
Side note: I know using a TOF sensor (like the VL53L0X) would be much better and easier to implement, but my initial post question is more of a conceptual one to see if using 1-D accelerometer to detect linear speed and position even makes sense, and if it’s remotely feasible for this application
The accuracy of location prediction would be a fun thing to derive given an expected actual motion, a numerical integration technique, and the accuracy/resolution/noise of the sensor. Your point of using a TOF sensor is a great idea… you could combine the prediction (based on the acceleration - which you can sample at fairly high frequency) with the reported position as determined by ToF. That would be a cool application of something like a Kalman filter!
Wish I had time to try it out myself! I’m eager to hear what you end up doing (if this ever becomes non-conceptual)