Installing Endstops / Limit Switches

You are here:

This article will guide you on connecting the endstops or limit switches to the LaserBoard.  It is based on the standard 300mm x 200mm K40 bed, but the concepts still apply for other machine types and larger work areas. Determine where your machine homes, as this is where the endstops or switches will be triggered: Setting Up the Correct Bed Size.

Homing and endstop location may vary, but we are outlining the most common setups in this document. If your machine auto homes, disable that feature or temporarily disconnect the stepper motors to prevent the machine from crashing while you are testing the endstops.

 

Types of Switches

Endstops and limit switches come in a variety of options, some of which are not covered here.  You will see these terms used interchangeably in many instances.

They are used as small interrupters, placed at the extremities of the bed area, to prevent the head from crashing into the gantry or on a Z-Table to limit the vertical movement.  You may encounter one or more of these types of switches on the same machine or peripheral.

The most prevalent types we encounter with laser machines are listed below, with a general description of what they look like and how they work.

Image Type Description Function
Optical Endstop Optical Endstop PCB with U-shaped channel sensor, wired / ribbon cable connector(s) Triggered when the light is interrupted in the channel.  See Standard Endstops section.
Mechanical Limit Switch Mechanical Limit Switch 3 terminal mechanical lever switch with 2 wires Triggered when the mechanical arm is actuated by being depressed.  See 2 Wire Mechanical Limit Switches section.
Mechanical Endstop Mechanical Endstop PCB with mechanical limit switch, 4 pin connector with 3 wires Triggered when the mechanical arm is actuated by being depressed.  See 3 Wire Mechanical Endstops section.
Optical Switch Optical Switch U-shaped channel sensor with 4 wires on opposite end Triggered when the light is interrupted in the channel.  See 4 Wire Optical Switches section.
Inductive / Proximity Sensor Inductive /
Proximity Sensor
Plastic block with internal LED and single wire from one end Triggered when certain metals are in the proximity of the target sensing area.  See Proximity Sensors section.

Note: This list is meant as a reference point. If you have a limit switch type that is not listed or need more information, please reach out to us on our Support Forum.


Connecting the Endstops

In most cases, your endstops or limit switches will come with connectors already wired in.  Depending on the type, the connectors may not be included or need to be rewired to fit the Cohesion3D board.  You might need 2, 3, or 4 pin connectors to attach your devices.

Standard Endstops

For Optical Endstops, the the X axis is usually located underneath the carriage arm, to the left of where the laser head is mounted.  It is triggered when the head moves to the far left (or alpha min, which is the X0 coordinate).

The Y axis endstop is usually located behind the mounting plate for mirror 2.  It is triggered when the carriage arm reaches the back of the work area (or beta max, which is the Y200).

Ribbon Cable

The two “daughter” PCBs for X and Y endstops are typically connected with a smaller, 6 pin ribbon cable.

The X stepper motor (in the dark area under the mount) is plugged into the 4 pin header on the Y optical endstop and a separate 12 pin ribbon cable then connects to the control board to operate them.  The Y stepper motor connects to the LaserBoard via a separate white 4 pin connector to the Y driver port.

Standard Endstop Locations

No Ribbon

In some instances, the X and Y stepper motors connect directly to the controller drivers with white connectors and there is a separate Endstop connector.  This is referred to as the “No Ribbon” variant in the installation instructions.

If you have a 5 pin connector for your stock endstops, it plugs into the Laser Endstops header, which is to the left of the SD Card slot on the LaserBoard.  Below are the pin designations:

image

If you connect to Laser Endstops connector and your switches are not working, check to see what type of sensors you have installed and find the appropriate wiring solution below.


Switch Wiring

You can also hook up switches to the Endstops row at the bottom of the board.  Wiring colors may vary, but the ones listed are the most common.

For a standard K40, which homes to and triggers the switches at position A, in the rear left, you will use the ports for X MIN and Y MAX.

For machines which home to and trigger the switches at position B, in the rear right, you will use the ports for X MAX and Y MAX.  The default configuration homing direction needs to be updated to match for this setup.  See Configuring the Switches section below.


Connections are discussed in order of the pins on the Endstop headers, from left to right.  Find the example style and number of wires your switch has, then read below for more details.

image

Note: Check the specs on your switches, as there are multiple types which may have similar wiring configurations.  Connecting these wrong can cause irrecoverable damage to the board and may also cause disconnects when triggering the switches. 


2 Wire Mechanical Limit Switches

If you are using mechanical switches like the ones we offer, connect NC (Red) to Sig and then C (Black) to Gnd using the included 2 pin connector for each respective axis, using the default configuration settings.  See 2 Wire Switch in the Endstops Header Row image above.

image

Wire(s) Switch Desc Switch Pin Endstops Pin
Red NC (or NO*) 2 (or 3*) Sig
Black Common – “C”
Ground
1 Gnd

*You could connect the red wire to the NO terminal (pin 3) on the switch instead of NC, but it is not recommended due to noise issues and potential crashes if a switch fails.  You will also have to make a configuration change to invert the pin if you decide to connect this way.  See Configuration settings below.


3 Wire Mechanical Endstops

If you are using mechanical endstops like the ones we offer, insert the included white 4 pin connector into the header on the end of the small PCB.  It is polarized, so it should only go in one way.  Do not force it.

image

For each respective axis port in the Endstops header row, connect 1 (Green) to Sig, 2 or 3 (Black) to Gnd, and 4 (Red) to V+ pins.  See 3 Wire Switch in the Endstops Header Row image above.

Note: 2 is usually not connected for these models.

Wire(s) Switch Desc Switch Pin Endstops Pin
Green SIG 1 Sig
Black GND 2 / 3 Gnd
Red DCC 4 V+

See the Configuring and Testing the Endstops sections below.


4 Wire Optical Switches

If you have slotted optical switches with 4 wires, you will have to do a little rewiring and setup.  These type of limit switches require resistors, which we carry in our Vitamins Kit and may also need connectors.

imageimage image

Wiring

In the Endstops row, connect pin 3 (White) to the Sig pin for each respective axis.
Connect the Black and Green wires to the “-” negative on the Separate Power IN in the upper left hand side of the board.  Up to 2 endstops can be wired into this terminal.
Connect pin 2 (Red with resistor) to the V+ on the Endstops row.

image

Wire(s) Switch Desc Switch Pin Board Pin
White Collector 3 Endstops Sig
Green Emitter 4 Separate Power IN “-” Negative
Black Cathode – 1 Separate Power IN “-” Negative
Red Anode + 2 Endstops V+

See the Configuring and Testing the Endstops sections below.


Inductive / Proximity Sensors

If you have inductive or proximity sensors and the standard setup is not working when attempting to home, you will have to rewire the sensors to the LaserBoard.

Confirm the voltage rating for your sensor specifications (usually printed on the front of the module). There are versions which are typically rated from 5~30VDC, 10~30VDC, or 6~36VDC.

imageimage

Trace the wires to the laser power supply to confirm how much power they are currently receiving. Some will be connected to 24V and some only need 5V, so make note of this.  The sensors will receive power from the LaserBoard, so connections to the laser power supply, power connector and/or limit switch connector from the stock board are no longer needed.

Each sensor has a sleeve around the Brown, Blue, and Black wires connected to it.  Separate them and expose the wires to connect to the LaserBoard following the instructions below.  You might need connectors to attach your devices to the board.

ProximitySensor

Note: Do not connect 24V proximity sensors to the far right V+ pins on the Endstops header row.  Connecting the wires wrong can cause irrecoverable damage to the board and may also cause disconnects when triggering the switches.

 

24V Wiring

The versions we have seen of these types of proximity sensors have been connected to the 24V on the LPSU.  Disconnect from the power supply / stock board and connect +V (Brown) to Separate Power IN + in the upper left corner of the board, then 0V (Blue) to Gnd, and Out / Output / Load (Black) to Sig for each respective axis.  See Proximity Sensor 24V in the left example of the Endstops Header Row image above.  Note that there is no connection for the V+ pin on the right.

Wire(s) Switch Desc Switch Pin Board Pin
Brown Brown: 10~30V
BN: 6~36V
1 Separate Power IN “+” Positive
Blue Blue: 0V
BU: 0V – NC
2 (or 3) Endstops Ground
Black Black: Out / Output
BK: Load NPN
3 (or 2) Endstops Sig

See the Configuring and Testing the Endstops sections below.

5V Wiring

The versions we have seen of these types of proximity sensors have been connected to the 5V on the LPSU. Disconnect from the power supply / stock board and connect +V (Brown) to V+, then 0V (Blue) to Gnd, and Out (Black) to Sig for each respective axis.  See Proximity Sensor 5V in the right example of the Endstops Header Row image above.

Wire(s) Switch Desc Switch Pin Board Pin
Brown Bn: +V
BN: 5~30V
1 Endstops V+
Blue BU: 0V
BU: 0V NPN NC
2 (or 3) Endstops Ground
Black BL: Out 3 (or 2) Endstops Sig

See the Configuring and Testing the Endstops sections below.


Configuring the Switches

In the configuration file, look at your Endstops and limit switches sections.  Complete the endstop testing linked below after making changes.

The default settings expect NC to be connected to Sig and C to Gnd (see the comment on alpha_min_endstop).

The Homing location is usually set in the upper left corner, which homes to alpha min and beta max.  If your sensors are located in a different position, this will need to be altered to match.

## Endstops
endstops_enable                              true             # the endstop module is enabled by default and can be disabled here
#corexy_homing                               false            # set to true if homing on a hbot or corexy
alpha_min_endstop                            1.24^            # add a ! to invert if endstop is NO connected to ground
alpha_max_endstop                            1.25^            # NOTE set to nc if this is not installed
alpha_homing_direction                       home_to_min      # or set to home_to_max and set alpha_max
alpha_min                                    0                # this gets loaded after homing when home_to_min is set
alpha_max                                    200              # this gets loaded after homing when home_to_max is set
beta_min_endstop                             1.26^            #
beta_max_endstop                             1.27^            #
beta_homing_direction                        home_to_max      #
beta_min                                     0                #
beta_max                                     200              #

You may also need to edit the max travel in order to trigger the sensor properly.  For optical switches, approximately 2 mm is enough to interrupt the signal.  For mechanical switches, it may take up to 4 mm to trigger properly.

alpha_max_travel                             302              # max travel in mm for alpha/X axis when homing
beta_max_travel                              202              # max travel in mm for beta/Y axis when homing
gamma_max_travel                             108              # max travel in mm for gamma/Z axis when homing

You may also need to adjust the amount of retraction to stop triggering the switches. Perform the endstop testing linked below after making changes.

alpha_homing_retract_mm                      5                # distance in mm
beta_homing_retract_mm                       5                # "
gamma_homing_retract_mm                      1                # "

If you want to stop the machine when the switches are triggered, uncomment the limit switch parameters by removing the ‘#’ at the beginning of the lines and set them to true.  Sending M999 in the console in LightBurn or a board reset may be required to continue.

#optional enable limit switches, actions will stop if any enabled limit switch is triggered
alpha_limit_enable                          true            # set to true to enable X min and max limit switches
beta_limit_enable                           true            # set to true to enable Y min and max limit switches
gamma_limit_enable                          true            # set to true to enable Z min and max limit switches

Refer to the Smoothie Endstops page for more details.


Testing the Endstops

You can physically move the laser head slowly to manually test triggering the endstops to ensure they are reading “0” when not interrupted and “1” when interrupted, for each of the axes.

If the endstop is reading as pressed when it is not actuated or vice versa when testing endstops, then add an exclamation point at the end of the endstop pin value in the configuration to invert it.

If you are using an object to test switch interruption on optical, inductive, or proximity sensors, make sure the item will trigger the sensor (i.e., use something thick and opaque to interrupt the infrared light from the LEDs in optical sensors, a magnet for inductive sensors, or a ferrous metal which can be detected by proximity sensors).

Please reach out to us on the Support Forum if you have any questions, need assistance, or have a different version of the Cohesion3D board.