When I built my prototype Grbl ESP32 controller on a breadboard, I thought I would get X and Y axis to start moving before looking at other parts of the system. Once I got X moving, though, I changed my mind. Instead of getting Y to run, I wanted to make sure I understand more of X. Which meant learning about limit switches and homing routine in Grbl.
But first, a look at the actual hardware, which meant picking up the other wiring harness leading inside the linear actuator. There were nine wires, only six of which were connected from its previous usage. Three of the six were connected together resulting in a total of four unique pins.
On the assumption the three wires twisted together is a common ground, I probed between it and the remaining wires. I found two of them were closed circuit and the remaining one was open. This is consistent with a homing switch and two limit switches. The homing switch is normally open and, during homing operation, the controller looks for that switch to close. When that happens, the controller knows where home is. The limit switches are normally closed because that allows them all to be wired together in series. If any limit is reached, the circuit opens, and the controller stops. For the purposes of machine protection, it didn’t really matter which limit was reached, as long as it was detected.
With the ZETA4 unplugged, the stage could be moved by hand. Watching the output from a meter wired up to these pins, I looked for positions where these switches were tripped. The initial results were very disappointing! The limit switches would trip when there were still over ~10cm of travel remaining, and the home switch is ~5cm further inside of that range. This severely constrains the usable area to a very small subset of total area. When I reported this finding to the rest of SGVHAK, I was told “Oh. Why don’t you move them, then?”
I didn’t know these switches are adjustable to fit specific installations. In its previous life, this tables only needed to deliver a small range of its overall motion and were set appropriately. An allen wrench was all I needed to remove the cover and look inside: I saw three devices labeled Hamlin 59135, still in production and available from Digi-Key for $7.48 in single quantities. Each of these is a reed switch with a normally-open and normally-closed wire in addition to their common wire.
This explains the nine wires in the bundle: three wires for each of the switches, and the previous installation only used the common wire plus one of the other wires, leaving the remaining unconnected.
I loosened the screws holding these reed switches in place, and move them as far to the ends as I could push them with existing wiring. This still leaves approx ~3cm on either end, but I’m content to leave them as safety margin. The physical size of the home reed switch meant it couldn’t get within ~4cm of the limit switch. I don’t know if this is a problem yet. Next step: figure out how to interface these switches into Grbl.