The rotary encoders are used to resolve wheel velocity and acceleration. The encoders output a two bit binary quadrature signal, meaning they output two pulse width signals that are 90 degrees out of phase. The pulses are generated by opening and closing switches to a common ground. Therefore, in order to generate a readable signal from the encoders, we used pull-up resistors on the signal lines. Also, since the two phases were not sufficiently accurate relative to eachother, we only use 1 signal from each encoder. This cuts the number of pulses per rotation in half, but gives us a more consistent signal for accurate timing.
The specific encoders we used had 16 pulses per rotation. This means that there were four periods per rotation. The repetition would be insufficient for us to determine the position of the wheel (it is ambiguous which quadrant the wheel is in) but satisfactory for determining velocity. An example signal and rotary position is shown below. Velocity is determined by timing the difference between the rising and falling edges. Similarly, acceleration can be determined by calculating the difference in velocity between two adjacent pulses. Note the acceleration between the orange phase and green phase.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment