Differential Encoder Shield for KFLOP/SnapAMP
The Kflop/SnapAMP that I am using for my CNC lathe is really great.
The SnapAMP has 4 differential signal encoder inputs. There are opto-isolated inputs that require 6mA at 5V, which any differential encoder should be able to drive, to handle the z index pulses, if needed.
I do anticipate needing more encoder inputs, though. Based on testing, I plan to use an encoder on every motor shaft, as well as a linear scale on every axis. Just for the lathe's x and y, I need the 4 differential encoder inputs. However, for threading I need another encoder on the spindle and I want to have two manual pulse generator (MPG) handwheels as well. That adds up to 7 encoders. The lathe is built in such a way, that I can add a z axis and use it as a gantry mill. So, one more shaft encoder, one linear encoder and handwheel. I can see using 10 encoders in this machine....:/
The existing inputs are presented with a 50 pin IDC header. I like having the encoders crimped to ethernet connectors. This works very well, is easy to do, very cheap, designed to work on differential signals at speeds far in excess of what I need, and allows me to use commonly available bulkheads.
But the last part, where I have to use dupont connectors to get at the IDC socket is going to be very inconvenient once several cables are coming in. Since the pins for a particular encoder are in three separated groups (power, AB, Z) this would turn into quite a cabling mess. I would like to use premade ethernet cables for this all the way, at least for the connections that come from the outside. The MPG wheels are probably connected most easily with ribbon cable and 6-pin IDC connectors. The hand wheels don't have index marks, of course.
I also want to be able to grab the encoder signals and copy them into a secondary signal for a DRO.
The Kflop has 16 single ended encoder inputs, split over two connectors. To turn these into differential channels, I will intersperse AM26LV32 chips. These are used on the SnapAMP for the differential channels.
I will probably want to use some limit switches at some point. I think a single 8 pin ethernet cable could handle those.
To switch the speed rate of the MPGs, I need 3 4-position switches. They will be put on 3 I/O pins each to do unary encoding of the states off, 1X, 10X and 100X. To connect them, I will use 6-pin headers.
So a full board with all those capabilities would have:
- 7 RJ45 sockets for 7 external encoder channels
- 3 6-pin IDC sockets for the 3 handwheels
- 3 6-pin IDC sockets to connect the 4-position switches.
- 5 AM26LV32 chips to turn 6 differential AB encoder signals and 7Z signals into single ended signals.
- 1 50-pin IDC socket to connect to the SnapAMP
- 1 26-pin IDC socket to connect to the KFLOP
I did put an 8th RJ45 socket in place to have access to the last two unused differential inputs on the last AM26LV32.
The KFlop has an RJ45 socket that could take the limit switches, so I am leaving that out for this revision.
I designed such a board in KiCAD and had OSHPark make some. The waiting begins...
The boards arrived!
And the footprint for the ethernet connectors was wrong!
Ok, second try:
And this time everything seems to fit:
I proceeded to drill holes for the pass-throughs and a MPG. It all works great so far.
The board files are available below.