Limit Switches

Limit switches are incredibly important on a CNC machine. Due to the danger inherent with CNC machines it’s necessary to put some fail safes in place. Limit switches help a lot with the safety aspect but also are very important for giving CNC machines a known zero or “home” position, which it can return to at any point.

Limit switches will help prevent a CNC machine’s axis from travelling beyond its limit and potentially causing damage. Another benefit is that if there was a power cut or small fault with the electronics while the machine was cutting, it can be moved back to the home position and the job restarted so the job isn’t wasted.

There are different kinds of switches you can use as limit switches are here are the more popular choices:


Micro-switches are a simple switch that is turned on and off via a small lever that sticks out of the top. This switch would be placed at the end of an axes travel, and as soon as the moving gantry slides to the end of the travel and hits the switch the computer will detect this and stop the machine dead in its tracks.

Most micro-switches you’ll see have three connections or terminals. They are: Common, NC and NO. NC and NO stand for Normally Closed and Normally Open. Normally Closed will pass the voltage you put into the common terminal  (aka close the circuit) when the switch is untouched and its lever is in the open position. Normally Open will open the circuit when the switch is untouched and its lever is in the open position.

This is very important to note because one of these options is better than the other. Lets say you hooked up a micro-switch in NO (Normally Open) mode the voltage would hit the switch and then pass only when the lever is in the closed position. For this mode we set our CNC controller software limit switch input to Active High, this means when the voltage passes through the switch and returns we have a closed circuit.

Now imagine we have this set up on a CNC machine axis and one day the wire going to the switch breaks off. The computer will never know this has happened as it’s only waiting for the switch to allow the voltage to pass through it and return. Now we have a bad situation; the CNC machine is relying on these switches to work. However not knowing this, the CNC will assume they are there and may travel too far and hit the end of their travel potentially causing damage to the machine.

If however we had hooked it up in NC (Normally Closed) mode and set the CNC controller softwares limit switch input to Active Low, as soon as the voltage didn’t return (open-circuit) the limit would be triggered. This means that a voltage is always passing through the limit switch and back, when the limit switch is engaged it cuts the flow of electricity and triggers our limit. This also means that should a wire break or become disconnected it would be effectively the same as the limit switch being engaged and the lever pushed to the closed position.

With a micro-switch connected via the Normally Closed terminal and the CNC controller software limit switch input set to Active Low a CNC machine will be even safe even if the limit-switches should fail. In an event of failure this set up would immediately halt the machine just as if the limit switch was triggered normally. This would prevent any damage until the disconnected / damaged wire or faulty switch are repaired.

Hall Effect Sensor

Hall effect sensors are small electrical devices that can sense magnetism. They work just like a switch but as opposed to a tactile button being pressed, when a magnet is placed close to the sensor it will trigger. Due to the nature of these sensors there are no moving parts so they don’t wear and they are extremely accurate. This makes them perfect for use as a limit switch and in many ways a much better choice over a micro-switch.

However as they are switched on and off my magnetic forces they can be accidentally triggered by other magnets in close range, and metal working machines can end up with a build up of swarf sticking to the magnet that triggers the sensor. This could cause the sensor to read incorrectly and allow the machine to drive over its maximum travel, potentially causing damage. Such machines would better suit micro-switches.


You can find limit switches here.