Electronic – arduino – Best way to detect horizontal vibration/shaking!

arduinomechanicalsensor

I need to detect shaking (not just vibration or small movements but significant horizontal rocking movement)! (its a long story)

I have an Arduino already in place, controlling some other stuff. I've tried a couple of simple methods with gyroscopes and pendulum like shake sensors and like, but they are either too sensitive or to hard to calibrate.

Mostly I need to detect horizontal plane movements.

Any suggestions? Anyone had done anything like this?

Best Answer

You have to decide what exactly you are trying to detect. You say "horizontal rocking" which implies a pivoting motion, but then "horizontal plane movements" which is something else. You need to make up your mind. I would detect these two differently.

Also, what exactly is "movement". Do you need to know the distance your object has moved, it's speed, or will acceleration do?

Acceleration is the easiest of these to measure with small and cheap off the shelf sensors. A number of companies, including Freescale and Analog Devices, make MEMS accelerometers. These come in flavors that either put out a analog signal proportional to acceleration, or also digital. You can use two single-axis accelerometers, or it may be more convenient to use one two-axis chip to detect motion in a plane. With the two axes aligned along the plane, the total acceleration magnitude is the square root of the sum of the squares of the individual acceleration signals. If you're just looking for some threshold, then you can square the individual signals, add them, and compare that to the square of the acceleration threshold.

You can do limited itegration of such acceleration signals. There is enough offset and hysteresis in cheap MEMS accelerometers that inertial navigation for more than a second or two becomes so inaccurate as to be unusable for most purposes.