Detect gyro spin rather than wider rotation

Hi,

Looking for some advice on measuring kinds of rotation.

I have a gyroscope/accelerometer/magnetometer on a teensy prop shield.

I can measure rotation as a relative position, but need to to distinguish between spinning vs wider rotation or movement.

For instance, if it was a spinning top i want to respond to spin (even gentle) but not movement like picking it up or spinning on a wider axis.

I code in a basic way but struggle to know how to understand the gyro. If anyone knows of existing code/library I would be really grateful.

Thanks.

The gyro detects rate of rotation, which is independent of the distance from the gyro to the axis of rotation.

However, the accelerometer will also detect the centripetal acceleration, which is due to rotation about an axis, and increases proportionally with the distance of the sensor from the axis of rotation.

If you combine the two with some sensible algorithm, you should be able to do what you want. This will require subtracting the acceleration due to gravity as well as any other incidental accelerations from the measured acceleration.

Thanks for the info I'll try and figure it out.

Any pointers towards what this algorithm might look like?

If I was able to calculate centrepetal acceleration could I then decide if it is the correct distance from the axis of rotation and so count rotations with gyro.

Why not tell us what you are really trying to do?
Describe the situation and problem, rather than your proposed solution to the problem.