Skip to main content

Site Navigation

Your Account

Choose Language

Help

Revision to Connecting endstop switches

David Crocker

 
 
== Duet WiFi/Ethernet and 0.6/0.8.5 endstop inputs ==
== Duet WiFi/Ethernet and 0.6/0.8.5 endstop inputs ==
 
Each endstop input has ground, +3.3V and sense pins in that order, labelled GND, 3V3 and STP respectively on the back of the board.
 
On all Duets except the Duet 2 Maestro, eachEach input has a pullup resistor and red LED between the STP pin and +3.3V. The LED will be illuminated when an endstop switch or other device connected to the input holds the voltage close to 0V (ground). '''Whether the LED is illuminated when the endstop switch is triggered or not triggered depends on whether your endstop switch produces and active-high or active-low output:'''
On all Duets except the Duet 2 Maestro, eachEach input has a pullup resistor and red LED between the STP pin and +3.3V. The LED will be illuminated when an endstop switch or other device connected to the input holds the voltage close to 0V (ground). '''Whether the LED is illuminated when the endstop switch is triggered or not triggered depends on whether your endstop switch produces and active-high or active-low output:'''
 
* An endstop switch with an active-high output holds the input pin at about 0V when the switch is not triggered, and about +3.3V when it is triggered. A typical example is a normally-closed microswitch. The LED on the Duet will be illuminated when the switch is connected but not triggered.
* An endstop switch with an active-low output holds the input pin at about 3.3V when the switch is not triggered, and about 0V when it is triggered. One example is a normally-open microswitch (which is not recommended, because a normally-closed switch is safer). Another example is a Hall sensor with an open-drain output that is connected directly to the Duet endstop input. The LED on the Duet will be illuminated when the switch is connected and triggered.
 
The endstop switches each need to be able to sink 1.5mA current for the Duet 2 WiFi and Duet 2 Ethernet, 0.3mA for the Duet 2 Maestro, and 2.1mA for the Duet 06 or 085. This is not usually a problem, except with some optical endstop switches that were not designed properly for 3.3V operation.
The endstop switches each need to be able to sink 1.5mA current for the Duet 2 WiFi and Duet 2 Ethernet, 0.3mA for the Duet 2 Maestro, and 2.1mA for the Duet 06 or 085. This is not usually a problem, except with some optical endstop switches that were not designed properly for 3.3V operation.
 
'''Note:''' some types of endstop (e.g. opto endstops designed for 5V operation) may pull the endstop input low enough to light the LED, but not low enough for the Duet to recognise that the input is in the LOW state.
 
== Duet Maestro endstop inputs ==
 
Each endstop input has ground, +3.3V and sense pins in that order, labelled GND, 3V3 and STP respectively on the back of the board (same pinout as for the Duets covered in the previous section).
 
There is no LED provided, just a 10K pullup resistor. So the endstop devices only need to sink 0.3mA.
 
== Duet 3 endstop inputs ==
 
Endstop devices can be connected to the IO_0 through IO_9 connectors. Each endstop input has a 27K pullup resistor, so the endstop devices only need to sink 0.12mA.
 
== Maximum input voltage on STP or IN pin ==
 
Duet 06 and 085: 3.3V
 
Duet WiFi/Ethernet hardware rev 2.03 and earlier: 3.3V (in practice a little more is unlikely to damage the Duet)
 
Duet WiFi/Ethernet hardware rev 2.04 and later: 8.3V. Higher voltages may damage the endstop LED.
 
Duet Maestro and Duet 3: 30V
 
== Configuration overview ==
 
Each axis endstop input can be configured in firmware for a Max (high end of axis) or Min (low end of axis) endstop, and with an active high or active low signal level. Configuration is done in config.g using the M574 command.
 
== Connecting different types of endstop switch ==
 
In the following descriptions, STP/IN refers to the IN pin of the connector if you are using a Duet 3, otherwise to the STP pin of the connector.
 
=== Microswitch ===
 
This applies to a bare microswitch, not to a microswitch on a board with a LED. Connect the switch between GND and STP (theSTP/IN. On all Duets except Duet 3, these are the outer 2 pins of the 3-pin connector)connector. '''Note''': this is '''not''' the same as on RAMPS.
This applies to a bare microswitch, not to a microswitch on a board with a LED. Connect the switch between GND and STP (theSTP/IN. On all Duets except Duet 3, these are the outer 2 pins of the 3-pin connector)connector. '''Note''': this is '''not''' the same as on RAMPS.
 
We recommend you use the normally-closed contacts of the microswitches, which are generally the outside two connections on the microswitch, and set the signal polarity to active high (S1) in the M574 command. If for any reason you use normally-open microswitch contacts, you will need to set the signal polarity to active low (S0) in the M574 command.
| 4
| Output
| STPSTP/IN
| STPSTP/IN
}
 
=== 3.3V-compatible Hall sensor ===
 
Connect Gnd to Gnd, Vcc of the Hall sensor to 3V3, and the output of the Hall sensor to STPSTP/IN. Simple Hall sensors normally have active low outputs, so use S0 in the M574 command. If your Hall sensor is a circuit board with a sensitivity adjustment potentiometer on it, then it may provide an active high output instead of active low. If your hall switch is just the IC then you should also connect a 0.1uF capacitor between Vcc and Gnd close to the IC.
Connect Gnd to Gnd, Vcc of the Hall sensor to 3V3, and the output of the Hall sensor to STPSTP/IN. Simple Hall sensors normally have active low outputs, so use S0 in the M574 command. If your Hall sensor is a circuit board with a sensitivity adjustment potentiometer on it, then it may provide an active high output instead of active low. If your hall switch is just the IC then you should also connect a 0.1uF capacitor between Vcc and Gnd close to the IC.
 
=== 5V Hall sensor with open-collector or open-drain output ===
Examples: Allegro A3141, A3142, A3143, A3144 (all of these are discontinued products, but still found on eBay)
 
PreferablyDuet 3: as for 3.3v Hall sensor, but connect Vcc to the 5V pin of the IO_connector instead of the 3.3V pin.

Other Duets: Preferably
, use 3.3V-compatible hallHall sensors instead. However, If your 5V Hall sensor has an open-collector or open-drain output (as the devices listed above do), or if you are using a Duet WiFi/Ethernet hardware rev 1.04 or later or a Duet Maestro, you can wire it as for a 3.3V sensor except that Vcc must be connected to +5V (available at pin 1 of the expansion connector) instead of to the 3v3 endstop connector pin.
PreferablyDuet 3: as for 3.3v Hall sensor, but connect Vcc to the 5V pin of the IO_connector instead of the 3.3V pin.

Other Duets: Preferably
, use 3.3V-compatible hallHall sensors instead. However, If your 5V Hall sensor has an open-collector or open-drain output (as the devices listed above do), or if you are using a Duet WiFi/Ethernet hardware rev 1.04 or later or a Duet Maestro, you can wire it as for a 3.3V sensor except that Vcc must be connected to +5V (available at pin 1 of the expansion connector) instead of to the 3v3 endstop connector pin.
 
=== 3.3V-compatible optical endstop ===
 
Connect Gnd to Gnd, Vcc of the opto sensor to 3V3, and the output of the opto sensor to STPSTP/IN. Opto sensors usually have active high outputs, so use S1 in the M574 command.
Connect Gnd to Gnd, Vcc of the opto sensor to 3V3, and the output of the opto sensor to STPSTP/IN. Opto sensors usually have active high outputs, so use S1 in the M574 command.
 
Note: opto endstops made to the Generation 7 design are often claimed to be 3.3V-compatible, but in fact the design is marginal with a 5V supply and frequently doesn't work at all on 3.3V. To use this design with a 3.3V supply, you may need to replace the 180 ohm opto switch series resistor resistor by 100 ohms. Tip: if your opto endswitch uses surface mount resistors, instead of removing the 180 ohm resistor it is easier to solder a 200 or 220 ohm resistor on top of it, so that the two resistorsHere are connected in parallel.some workarounds:
Note: opto endstops made to the Generation 7 design are often claimed to be 3.3V-compatible, but in fact the design is marginal with a 5V supply and frequently doesn't work at all on 3.3V. To use this design with a 3.3V supply, you may need to replace the 180 ohm opto switch series resistor resistor by 100 ohms. Tip: if your opto endswitch uses surface mount resistors, instead of removing the 180 ohm resistor it is easier to solder a 200 or 220 ohm resistor on top of it, so that the two resistorsHere are connected in parallel.some workarounds:
 
If- This design normally works with a 3.3V supply if you replace the 180 ohm opto switch series resistor resistor by 100 ohms. Tip: if your opto endswitch uses surface mount resistors, instead of removing the 180 ohm resistor it is easier to solder a 200 or 220 ohm resistor on top of it, so that the two resistors are connected in parallel. Make sure you pick the correct resistor to replace or solder another on top of! There is often also a load resistor, value 1K or higher.

- If
you are using eitherDuet 3 then you can use the 5V pin on the IO_ connector to provide power to the opto endstop instead of using 3.3V power.

- If you are using a
Duet 2 Maestro orWiFi/Ethernet hardware versionrev 1.04 of theor later or a Duet 2 WiFi/EthernetMaestro, these boards can tolerate 5V on the endstop inputs. So if your optical endstops do not work with a 3.3V supply, then instead of modifying them you can provide them with a 5V supply instead (leaving the centre pin of the endstop connector not connected) and connect the outputs of your endstops directly to the STPSTP/IN pins of the endstop connectors.
If- This design normally works with a 3.3V supply if you replace the 180 ohm opto switch series resistor resistor by 100 ohms. Tip: if your opto endswitch uses surface mount resistors, instead of removing the 180 ohm resistor it is easier to solder a 200 or 220 ohm resistor on top of it, so that the two resistors are connected in parallel. Make sure you pick the correct resistor to replace or solder another on top of! There is often also a load resistor, value 1K or higher.

- If
you are using eitherDuet 3 then you can use the 5V pin on the IO_ connector to provide power to the opto endstop instead of using 3.3V power.

- If you are using a
Duet 2 Maestro orWiFi/Ethernet hardware versionrev 1.04 of theor later or a Duet 2 WiFi/EthernetMaestro, these boards can tolerate 5V on the endstop inputs. So if your optical endstops do not work with a 3.3V supply, then instead of modifying them you can provide them with a 5V supply instead (leaving the centre pin of the endstop connector not connected) and connect the outputs of your endstops directly to the STPSTP/IN pins of the endstop connectors.
 
== Test endstop switches ==
 
=== Testing endstop switches using the web interface ===
 
Note: the following does not work if you are using stall detection instead of wired endstops.
 
* Apply power to the printer. You need only 5V power for this test, so we suggest you leave the main power turned off and just connect the printer to a PC via the USB cable. Note: if you have a PanelDue with 7" screen then USB power may not be sufficient.
* Connect to your printer from a web browser
* Select '''Settings''' fromIf you are using Duet Web Control 2.02 or later, select the menu on'''Machine Specific''' page. If you are using Duet Web Control 1.22.6 or earlier, select the left hand side
* Select
'''Settings''' page, then the '''Machine Properties''' tab
* You will see several rows of data. In
tab.

*In
the '''Endstops''' or '''Endstop Hit''' column you can see the state of the selected endstop type. The first three rows in that column correspond to the X, Y and Z endstops in that order.
* If you are using conventional microswitches or sensors connected to the endstop inputs of the Duet, test
each endstop.

* Test
that the Endstop Hit value displayed is '''No''' when the corresponding axis is not pushed against the endstop, and '''Yes''' when it is
* Select '''Settings''' fromIf you are using Duet Web Control 2.02 or later, select the menu on'''Machine Specific''' page. If you are using Duet Web Control 1.22.6 or earlier, select the left hand side
* Select
'''Settings''' page, then the '''Machine Properties''' tab
* You will see several rows of data. In
tab.

*In
the '''Endstops''' or '''Endstop Hit''' column you can see the state of the selected endstop type. The first three rows in that column correspond to the X, Y and Z endstops in that order.
* If you are using conventional microswitches or sensors connected to the endstop inputs of the Duet, test
each endstop.

* Test
that the Endstop Hit value displayed is '''No''' when the corresponding axis is not pushed against the endstop, and '''Yes''' when it is
 
What might go wrong:
* If the Endstop hit value doesn't change when you trigger the endstop:
** Check the wiring
** If they are optical endstops, first make sure that you have S1 in the M574 command. Then, if the endstops show as triggered all the time, your endstops are probably otnot 3.3V compatible and you need to modify them - see [[Connecting_endstop_switches#3.3V-compatible_optical_endstop]]. If they never show as triggered, check that the flag on the end of the axis blocks the slot completely, and that there is a pullup resistor between the sensor output and +3.3V (10K is usually suitable).
** If they are optical endstops, first make sure that you have S1 in the M574 command. Then, if the endstops show as triggered all the time, your endstops are probably otnot 3.3V compatible and you need to modify them - see [[Connecting_endstop_switches#3.3V-compatible_optical_endstop]]. If they never show as triggered, check that the flag on the end of the axis blocks the slot completely, and that there is a pullup resistor between the sensor output and +3.3V (10K is usually suitable).
 
=== Testing endstop switches using M119 ===

To undo the changes made by this version, click 'Revert Changes.' This will automatically restore the previous version of this guide.

Revert Changes