At the moment, I’m using a linear magnetic encoder IC from AMS (the AS5311) on a small PCB I’ve designed, along with an ATmega328 to track the axis motion and implement I2C communication (also on the same IC).
This seems to be a relatively robust solution, and the encoder can track axis motions up to about 350mm/s – which I think covers speeds reached by most 3D printers.
Printer firmware is Marlin, with a few new bits I’ve thrown in to get this working.
Here you can see it working when Chris forcefully pushes the extruder by hand:
You can find his code for this system at: