Hi, I'm currently using an Orange 2500 ppr 3-phase encoder.
I would like use the z-phase to count the cycles, both clockwise and anti-clockwise.
The reason I'm doing this is, because I've used 2 phase encoders, which is not accurate for multiple cycles. So currently I've switched to 3-phase orange encoder.
I would like to use the z-phase for an up-down counter kind of value.
can someone help me, with a solution. Thanks a lot.
I used, different encoder earlier. On which, the optical disk is a separate module. Installing it manually produces errors. Approximately 200 points error for 20 rotations.
Then I switched to orange encoder, Since I do not have the ground truth, I cannot trust these too. That is the reason for using 3rd channel.
So, I use motion capture system (marker tracking system), to verify the angle: which is my ground truth.
I understand, that I can count complete rotation using 1 phase. But It was not accurate, for the other brand encoders.
If I do 10 or 20 rotations, my wheel which is attached to my encoder are 20 degree off.
That is why, I was thinking to use 3 channel encoder, so even if there is an error: let's say 3 degree error for each rotation, It will not accumulate overtime, I could write an algorithm to solve it.
still unclear how your determined that the counts were off, presumably based on newPosition
not clear which processor your using. pins 11, 12 are only both interrupts for a "101"(?) processor. the Encoder library can work without interrupts. so using it may miss counts
zcycle will not necessarily match newPosition if newPosition increments more than 1, as well as if one is missed
Even if Z covers several cycles of A&B, are the edges of Z on specific phases of A or B like:
You could do quadrature between Z an A in this trace to tell which way Z was turning. And it would even work if Z covered 10 cycles of A-- when Z changes, you check A to see if A is high or low.
You could even write code to say what A and B were when Z rose or fell clockwise, or rose or fell CCW.
I'd bet one of the signals is in quadrature with Z.