Monday, July 13, 2015

Angle Encoder Revisited

I had a couple ideas I wanted to get out onto paper before I forget them regarding the errors that arise with the angle encoder. For the first version of the hardware, with the first two pins of the PMODs being used as a single interrupt, the threshold for which the pin changes from a HI to LO State is unclear. As the encoder shaft spins, the value on one of the pins will shift from 1 to 0 seemingly if there is any voltage above 0.0 V. But this surely cannot be the case. I have tested the chip/Zedboard combination to find where this threshold exists using a voltmeter but have come up empty on my attempts. I hold that the value is changing too quickly for the voltmeter to pickup the incremental changes sent to the Zedboard from the encoder. I know that the value is changing rapidly because I print out the value from "encoded" which is the combination from both encoder pins which should read a 11 10 01 or 00. Moving clockwise should follow the same order over and over and the same follows for counter-clockwise. There must be some noise, instead that is mucking up the cycle causing the algorithm I have written to break down. If I can find this threshold in the PMOD for where the change exists, I should have a properly working angle encoder.

No comments:

Post a Comment