I have this motor encoder mounted on the back of a 120RPM motor which has a gearing of 298:1 ratio. The back shaft is directly from the motor, not through any gears.
Im using an encoder disk that has 3 "wings". Exactly this one,
These encoders have 2 outputs for quadrature decoding.
This is my understanding.
1) Using the 3 wings and interrupting on the RISING edge of the signal I should have 3 * 291 transitions per full rotation of the shaft?
2) I only care about how much the wheel has turned by so I can control it to do half rotation, one rotation, x rotations etc. I dont need to know the direction or speed etc. So am I right in thinking I only need to use 1 output rather than both and having to do full quadrature decoding?
My problem
I have this connected directly to an arduino and have one function that is an ISR that is triggered on the rising edge. The function only has one line and increments a variable "ticks".
In my main loop I have it only checking "ticks" and if it = 873 (one full rotation according my understanding of rising edge and 3 wing encoder) then it stops the motor.
The problem is that its undershooting and stopping short each time.
Is there a problem with my understanding on how to properly use the encoder and its data or is it not that simple?
Thanks