Home and Limit Switches
If you are learning about home and limit switches by reading forums or listening to experienced CNC’ers, you can get frustrated and confused. Often, we use the words: home switch and limit switch interchangeably. What are the differences, and what types of switches are used for CNC?
Let’s start off by looking at the differences between the home and limit switch.
The purpose of the home switch is to send a signal that will enable the controller to drive the axis to a known location. The controller can know where the axis is. This enables a couple features that are useful. First, if we have our workpiece in a fixture, therefore a known location, we can program our startup process. Even the homing process can be a part of the g-code file, enabling true plug and play. The second benefit is that once the CNC machine is homed, we can remove the switches from the circuit and use “soft” limits. Soft limits are programmed distances. This eliminates the need for switches during runtime. If your CNC uses simple contact switches this can eliminate false triggering due to machine chatter or electrical interference.
The purpose of the limit switch is to send a signal that will stop the axis from trying to move past the end of its travel range. A CNC can have one or two limit switches per axis. Limit switches have an advantage in open loop system. Open loop means that there is no feedback to the controller. Therefore, if steps are missed and the controller commands the axis to move past its travel range, the limit switch will trigger and notify the controller.
Limit switches can have double duty and act as home switches. This makes sense because they are located at the end of travel which is where the home and limit switches need to be placed.
Most early home-built machines used a simple contact switch. These switches are mechanical. They have contacts that open and close. Typically, these switches are wired “normally open” or “normally closed.” What is the difference? The normally open switch contacts are not touching. When the switch is depressed the contacts close. You might guess that the normally closed switch contacts are closed and will open when the switch is depressed. You would be correct.
OK, why is this a big deal? First, if you do not configure your controller correctly, the controller will not work correctly. I recommend the normally closed switch. If a wire breaks or the switch is defective it will open the circuit. The controller will not function as it is expecting the switch to be closed. Once alerted you will be able to diagnose and fix the machine before running any parts. If a wire is broken on a normally open switch you may not discover it until damage has been done.
One last topic on switches. Simple contact switches will have a transient voltage spike when opened or closed. They also can experience electrical interference from stepper motors. This can cause the controller to act as if the switch has been depressed. We can eliminate the electrical interference by careful wire routing, using shielded wires, or by adding resistors and capacitors to “catch” the spike. Most controller programs also program a “switch debounce” routine that ignores these spikes and will only validate a signal if it is held for a few milliseconds.
There are switches that are non-contact that add robustness to the home and limit switch design. The Hall Effect sensor is relatively inexpensive and will trigger the controller without the use of contacts. However, for a simple cost effective design, the home switch and the programmed soft limit setup work well.