by spumco » Sun Dec 20, 2020 7:35 pm
I've had pretty good success with a low-res encoder just sending one half of the differential signal pairs to the BOB. Different BOB than UB1, but it's not got high-speed optos either. A 200-line (800 count) encoder has been plenty for synchronized tapping on my machine up to 2kRPM.
Power the encoder from the UB1 5v output, and hook up the A+/B+/Z+ to three of the inputs. X2xx inputs are 5v NPN's.
If you keep the encoder count down then the UB1 optos should handle it. Obvioulsy it depends on max spindle speed, desired resolution and so forth - you'll need to do the math. I believe there's a UB1 video (or thread here?) showing about 20kHz is the useable top end - but research and double-check that number.
I suspect (but haven't tried this) that if you have an encoder count too high for the UB1 to keep up at high spindle speed then UCCNC will just ignore the signal saturation... assuming you aren't using the PID control. Activating the PID control and saturating the UB1 optos would probably cause UCCNC to control the spindle rather badly.
It also depends on what you're driving the spindle motor with... if you're using a servo drive or a higher-end VFD the drive may have emulated outputs you can use. If this is the case, then the encoder is powered by and connected to the drive, and the outputs are sent to the UB1 with whatever scaling you need to keep the signals below the UB1 opto saturation point.