Incremental encoder

I am in possession of an incremental encoder, mounted on the shaft of an electrical machine. The encoder gives 1000 ppr. From the manual I read that it was a good idea to configure timer 3 in incremental interface mode. Also I configured it to trigger on any transition of T3IN only. Signal A from the encoder is physically coneceted to input port 3.4, and signal B to port 3.6. With the current software implementation I am able to relate counter clockwise shaft revolution with a negative decreasing value and vice versa.
However I have some trouble figuring out how to relate the magnitude of the values to a given physical position of the shaft. Does anyone have an idea how to do that?

Parents
  • It seems to me that with no other information you'd have to calibrate the zero position. Given that, and the fact that you get 1000 pulses per revolution, you can calculate the shaft angle from the zero position in radians or degrees if you like.

    Many incremental encoders have a zero-point output signal. Connect that to another I/O pin, and you can detect the zero position directly.

Reply
  • It seems to me that with no other information you'd have to calibrate the zero position. Given that, and the fact that you get 1000 pulses per revolution, you can calculate the shaft angle from the zero position in radians or degrees if you like.

    Many incremental encoders have a zero-point output signal. Connect that to another I/O pin, and you can detect the zero position directly.

Children
More questions in this forum