Limit switches are used to tell the CNC controller when the carriages have reached their travel limits. They are standard micro switches with a roller, to make the switching smooth. I tried with no rollers initially and the lever arms did not work as well. A purpose built shell was designed using Vectric Cut2D and machined in two mirrored halves on the ShapeOko from plastic cutting board. The limit switch shells are all identical except for the Z axis, which is shorter and has wire exit to the side.
The switch is held in place by the holes in its body. Once the two halves are bolted to the ShapeOko it provides a very rigid assembly. The groove at the back is for the wires to exit.
Wiring and Configuration
The switches are wired using the normally closed (NC) contacts on the switch and configured as active low in the ShapeOko.
The left hand gantry carriage (Y) and the central (Z) gantry each have a 4 core screened cable terminated into a plug block. The cores are arranged as 1 common and 3 signal wires, allowing up to 3 switches per gantry. On the Z gantry these are used for Xmin, Xmax and Zmax. And on the Y gantry for Ymin, Ymax and touch plate (technically Zmin).
The plug block is a very simple arrangement splitting the incoming 4 signals into 3 separate headers for the switch sockets and shares the common to the other header pin. It is built onto a 1 inch square prototype board and bolted onto an existing hole in the gantry.
X and Z axis
The plug block for the X axis is mounted in the space between the gantry plates. This keeps it out of the way. In this photo you can also see the back of the Z limit switch mounting bracket at the top.
The X limit switches are mounted in their shells at the back of the machine, as shown in the next photo. All the wiring is at the back to keep the front looking neat and to stop accidental bumps and catches on the wires.