A common component to many of my machine computerisations has been a quadrature encoder. I have always used optical encoders, all with A/B outputs, some also with index output, for applications that require position timing, such as the lathe ELS.
I also use these encoders extensively as MMI input sensors for display data entry, frequency tuning on radios, etc. So, I end up using lots of the darn things, and the costs become a little silly.. I tried making units, with slotted discs, etc, especially for the low pulse count applications, such as data entry, but it is just to finicky.
So, I decided to try a magnetic encoder – chips implementing this function abound these days, with some being really complex – a neat, simple device is the AS5147P datasheet here with a programmable output interface that can do all one would need – I use the ABI ( chan A, B and index) outputs, and these can be programmed to output from 256PPR to 1024PPR ( 4096 edges).
It can also output angles with 14bit resolution.
The device will easily cope with up to 28K rpm, is US$10.00 for one.
It uses a diametrically magnetized neo magnet, 8mm diameter, 3mm thick.
Programming is via SPI , easily done from any Arduino, and the device can be permanently programmed with your desired setup, so that it remains simply an encoder when you power it, with the SPI interface no longer needed.
It works very well indeed.
I knocked up a prototype to test, just used some PVC rod, with an Aluminium shaft holding the magnet
If higher performance ( speed..) is needed, bore out the ends of the PVC body shaft hole to take 2 x 6mm ID bearings..
26mm diameter PCB for the device:
PVC Body, the magnet in the shaft and the pcb assembled
Joe
edit – fix syntax…
Edited By Joseph Noci 1 on 06/09/2020 15:12:19