I finally finished a little project I had in my mind for a long time. I have some pretty common TOAUTO glass scale DROs with readout which I always wanted to connect to my LinuxCNC machine(s) to get DRO output on my touch screen and maybe also experiment with closed loop operation.
It can be done cheaply, total cost is maybe $30 in parts total, no custom parts. In essence it's based on a RP2040-Zero and a TXS0108E level shifter. The RP2040 acts as a regular USB device which can be accessed from a custom HAL component. This is not using some serial or ethernet connection but it's a full speed USB device implementation which means I can get about 1000 readouts per second. Is it as reliable as ethernet? I would not think so, but for $30 you can't ask for much more and my ethernet ports are limited
The way the electronics work is that you splice into the existing signals on the DB9 connectors on the DRO readout. So you get to keep your existing DRO panel fully working. My current hardware setup for that is rather janky, but modifying the existing DB9 connectors will probably be easier and nicer looking. The most tricky part here is that the cable lengths need to be as short as possible and ideally shielded if you want to avoid noise affecting the signal.
More information, full code and images for this project here:
github.com/tinic/rp2040-encoder
Someone should be able to solder this up in an afternoon after ordering the parts from Amazon the day before...