Quote Originally Posted by Kitwn View Post

That's basically what my board was designed to do but I opted to create all-new step pulses while the controller believed the machine was stationary. It also acted as the splitter for sending the pulses from one output axis of LinuxCNC to two motor drivers during normal operation. 'Great minds', eh?
Great minds! I just wanted the controller to stay in control at all times so I figured this approach was simpler and possibly a bit safer and it squares the axis as part of the controllers normal homing process. Not sure on the pros/cons of detection on approach vs retraction so long as it is done super slow I don't think it matters, may make more of a difference with mechanical switches.

I did notice a problem with my board yesterday, it was generating a spurious step every few seconds and you could hear them as faint ticks on the stepper whilst it was running. This was due to common mode noise on the step differential line, and is because I didn't bother to put a differential line receiver on the input lines, rather both the +ve and -ve signal are referenced to GND on the arduino. It was fixed by debouncing the inputs over 1 cpu cycle 62.5ns, i.e. reading them twice. However I think I will make a new board in a few days that properly terminates the differential signals, works well enough as it is to to get the machine working now. Any thoughts on the pros/cons of using a opto to terminate the differential signal like the stepper drivers do vs a proper line receiver?

The next step is work out how to bury these proximity sensors in the machine, the Z will be a bit tight and I may need to source a much smaller switch.