Home‎ > ‎Router‎ > ‎

Limit switches


There are two switches on each of the x and y axis but only a single switch at the top of the z axis.
There are close up images of each of the limit switches at the bottom of this document in the close-ups section.
This document deals with the mounting, wiring and testing of the limit switches connected to my Probotix V90. The configuration and testing of the LinuxCNC software I am using to control my V90.

Wiring and switches

The microswitches used were whatever they had at the time in the local electronics shop.

These microswitches have a long arm that made putting them somewhere where they would be pressed by the moving part easier than a short arm.

There are two microswitches on the x and y axis. At the 0 end of the x and y axis the microswitches perform double duty as both home and end detection.

At the x and y positive limit there are microswitches that perform end detection. If everything is working properly then after the initial homing procedure is finished the switches should not be touched again. If they are ever touched LinuxCNC will shut down the mill and the program as something is very wrong. This gives great confidence that I cannot inadvertently run the machine into end stops.

All of the wiring for the limit switches are run over twisted pair wires taken from an Ethernet patch lead. I work in IT and so the most obvious way for me was to use network wiring for hooking up the switches and connecting them back to the control box.

On the front of the V90 is a standard CAT5 wall socket. Each of the x,y and x axis have a twisted pair each. The 4th pair in the Ethernet cable is used to connect to a touch probe.

On the rear of the control box is another network wall socket. This makes the connection between the control box and the V90 a standard Ethernet patch lead. Patch leads are neat, cheap and come in lots of lengths.

Using CAT5 wall sockets very easy to connect up both inside the control box and within the V90. The twisted pair are soldered and covered in heat shrink at the microswitches. At the wall socket end they are just pushed into the back of the connector with a $2 plastic tool and they self terminate. Very easy, no soldering and no heat shrink.

Wiring diagram

The switches on each axis are connected in the normally closed position and in series such that if either switch is pressed, the circuit becomes open.

These are just wired back to the screw connector block on the back of the Gecko G540 as shown above.

LinuxCNC configuration

The limit switches and their relation to homing and table travel are set in the stepconf wizard. The following screenshots show the relevant configuration screens with some explanation.

For the purpose of the limit switches we are only interested in the inputs section. This defines the mapping between the input pins and their function.

The next part of the configuration is the length of each axis and where the machine will find the limit and home switches. These are all configured in the next sections of the stepconf wizard as per the screen shots below.

The exact meaning of each of the sections is covered very clearly in the stepconf documentation.

Briefly, the settings for the x axis are as follows.

The total travel for the x axis from end stop to end stop is 0 to 435.5mm. I moved this axis by hand and measured the total travel just with a ruler. The home switch should trip at 3.5mm from the 0 endstop and it should search for it at 10mm/s. When it finds the switch home latch direction of Same means the axis will

This short video shows the router doing its homing routine.

V90 homing procedure


The following images are close-ups of the individual limit switches and how they are mounted.

The X axis switches are screwed to a small block of wood sitting on where the spoil board screws to at the front and rear.

The switches are held in place by drilling a hole through the front and rear faces and putting a cable tie around the block.

On the Y axis the switches are mounted to a piece of wood on top of the cartridge so that they are pressed by the by the sides of the Z axis slide.

The Z axis only has a home/limit at the top. Is is screwed to the Z axis and is pressed by a small screw on the moving part of the axis.

X origin end microswitch

X origin maximim travel microswitch

Y and Z microswitches.