Electronic – Determine the angle and speed of a rotating platform

accelerometercompassgyropov

I have a 1 axis (x) spinning platform, that is spinning pretty fast ~300 RPM. I want to be able to detect with a good degree of precision how many degrees it has travailed from its starting position and the speed it is currently trailing at.

For example:
Think of a clock that has a single min hand. The hour hand travels across the face of the clock and I want to measure where it is on the clock face at any given time in degrees.

"3" o-clock it would be 90 degree,
"6" o-clock it would be 180 degree,
"9" o-clock it would be 270 degree,
"12" o-clock it would be 0 degree,

I have both of these sensors

My questions are:

  • Can I use a Gyro or Accelerometer to accurately measure how much rotation has occured on a spinning platform?
  • Is there a better sensor to use to determine rotation in degrees such as a Compass Module – HMC6352
  • Can you use a Gyro or Accelerometer to measure RPM?

Best Answer

For a problem like this you typically use an optical incremental encoder. Depending on the type it gives a series of pulses per revolution, so your resolution will depend on this number. It also gives you information on the rotation direction. You can find speed by timing the period of time between pulses.
See also this answer for more information on how incremental and absolute encoders work.

If you can't find a suitable encoder, and your motor runs smoothly, it may be sufficient to have just one pulse per revolution. The current position can then be derived from the time since the last pulse divided by the time between pulses (= rotation period). Just like the optical encoder you want a non-contact solution. Optical is one possibility. Use a reflective sensor (like Vishay CNY70) to detect a small reflective area on an otherwise matte disc (or vice versa). A magnetic solution is also possible, and often used in dirty environments where the optical sensor won't work. A small magnet on the motor's shaft will cause a Hall effect sensor (like Infineon TLE4913) to give a pulse each time it passes.

You would think the gyro would be ideal because it gives you angular velocity. To find rotation, however, you have to integrate angular velocity over time, and it's not always easy to maintain accuracy because you also integrate error which will become larger and larger, unless there's a way to recalibrate every rotation.
Like I commented to Mike, when using an accelerometer and a motor which isn't mounted vertically the accelerometer will respond to the earth gravitation and superimpose this as a sine wave to the reading from the centrifugal acceleration. This has to be filtered out, but can also be used to count rotations directly: you get 1 sine cycle per revolution.
important attention point:
Both a gyro and an accelerometer would have to be mounted on the shaft, and you will have to deal with the problem of wiring power and readings to a fixed position.