Electronics > Microcontrollers
Quadrature Decoder - For Reference
ehughes:
Hello:
I found this .pdf and posting it here for future archival and reference. The approach is quite simple and easily implement in an MCU or FPGA with just a few lines of code. I have tested it personally (using a simple shift register and LUTs) and it is quite robust. I also have tested with a high speed optical encoder.
All credit goes to the author.
Enjoy
http://www.mkesc.co.uk/ise.pdf
chris_leyson:
Found the same method used here: https://www.circuitsathome.com/mcu/reading-rotary-encoder-on-arduino/. I used a PIC and interrupt on change and found the method to be very robust.
FrankBuss:
I didn't know the paper, but the concept is obvious, I implemented it some years ago exactly like described, with 4 bits and a table:
http://www.instructables.com/id/Using-a-Quadrature-Encoder-with-an-ATtiny-2313-and/
See step 3 for details of the microcontroller program.
MarkF:
This pdf shows the technique I use. No lookup table required.
Benta:
In my opinion, overengineered.
Using one of the quadrature input signals as interrupt/clock, simply sampling the other input at this point will give you direction information.
The first input will give you relative position and speed.
Navigation
[0] Message Index
[#] Next page
Go to full version