The Basics of Limit Switches / End Stops

Overview

Limit switches have two main purposes. Firstly and most importantly they tell the controller board When one of the axes has moved to its limit stopping the machine from crashing into its support potential causing damage. This is done by using some kind of switch. There are normally 6 switches, two per axis. When any of these are activated it cause the machine to stop.

And secondly the switches are used to inform the controller of the home position when the machine is setup ready for a cut.

Switch

In the most simple cases the switch is normally a Snap Action NO / NC switch. Any style of switch can be used but it’s best to keep things simple.

PICTURE OF SWITCH

The snap action means that pressure is applied to activate the switch and when pressure is released the switch is deactivated.

The NO / NC means Normally Closed / Normally Open and refer to the mode that the terminals of the switch allow, one terminal per mode with a third terminal that is connected to ground.

Normally Closed means that the contacts of the switch are normally closed which results in the circuit being fully energised. Activating the switch opens the contacts and cuts the power to the circuit, a voltage drop.

Normally Open switches have, you guessed it, the contacts of the switch normally open stopping the current flow until the contacts of the switch are closed completing the circuit, a voltage rise.

Normally closed switch circuit are most common (your home lighting is an example). Normally closed are normally used for safety systems because of a distinct character, if your switches lose power it would be the same as the switch being activated, a voltage drop. This allows the circuit to be instantly activated in other situations i.e. if the wire connecting the switches or the switch itself fails. With a normally open circuit it could be days even months before you know you had a problem by then it’s too late. (normally at the point when you take that deep inhalation of breath as you see your gantry smash into the side of your machine).

To get started a NO circuit is sufficient but you should always look towards moving to NC for safety. The complexity of the circuits increase when we start adding noise filtering, more on that subject later

Arduino CNC Shield Limit Switch Pins

Please note when using either NC or NO you mush tell the Arduino that you are using limit stops and whether it is NC or NO. This way the Arduino knows to look for a high (voltage rise) or a low (voltage drop) when detecting stop signals.

To use hard limits with Grbl, the limit pins are held high with an internal pull-up resistor, so all you have to do is wire in a normally-open switch with the pin and ground and enable hard limits with $21=1. (Disable with $21=0.) “ … From GRBL Wiki

Use of NC instead of NO is enabled by configuring $5=1 in grbl:

$5 – Limit pins invert, boolean

By default, the limit pins are held normally-high with the Arduino’s internal pull-up resistor. When a limit pin is low, Grbl interprets this as triggered. For the opposite behavior, just invert the limit pins by typing $5=1. Disable with $5=0. You may need a power cycle to load the change.” … From GRBL Wiki

The pin for a limit switch is marked on the shield with the name of the axis followed by either a + or a – (one for one end and one for the other). There are two terminals, one connected to ground (easily distinguishable by looking at the circuit as all the grounds of the limit switch will flow to the ground point of the power jack) and one that is used as sense.

PICTURE OF THIS PART OF BOARD

Normally Open

With a simple NO circuit it is a mater of placing a switch (using the NO and Ground terminals) in-between these pins which causes a voltage to flow through the switch from the sense to ground when the switch is activated. This is a basic switch circuit.

PICTURE OF CIRCUIT

There are a number of ways to implement this; duplicate this circuit for all the axes + and – pins meaning that you would have 6 circuits coming off the board,

PIC OF CIRCUIT

Use one single circuit with 6 switches coming off one connection (a stop is a stop no matter where it comes from!),

PIC OF CIRCUIT

or the preferred root 2 switches on one circuit with a circuit per axis. This keeps the wiring down but allows each axis to be isolated allowing you to home a axis and know exactly which axis has tripped.

PIC OF CIRUIT

If more than one switch per circuit is used then they have to be wired in series as one switch must be closed to activate a stop. If this was done in parallel then the both switches would need to be activated. Note: The above wiring instructions can’t be used for NC circuits which must be connected in parallel as the circuit is always on.

Normally Closed

The circuitry for a Normally Closed circuit differs slightly as we have to take into action continuous current flow. Rigging up a single switch is just a case of using the NC terminal.

PIC OF CIRCUIT

But when we add more switches to a circuit we have to wire them in parallel rather than series so when one is broken the current stops flowing

PIC OF CIRCUIT

Be the first to comment

Leave a Reply

Your email address will not be published.


*