Extension board · Inputs

Endstop inputs (basic)

Connect seven limit or homing switches to your controller through one ten-way cable. Each input has a three-pin connector, a red light that shows its state and a simple filter. The circuit uses only resistors, capacitors, diodes and lights.

Top view of the Endstop inputs (basic) board: seven three-pin connectors along the top edge, a ten-pin connector at each end, and seven rows of small parts between them.
Top view, drawn from the board’s design files. This is a drawing, not a photograph.
7switch inputs
7 lightsone per input
3.3 or 5 Vsensor supply, set by a jumper
1.2 msdelay when a switch closes, simulated
1 cableten ways to the controller
77 × 27millimetres, two layers
The + pins have no fuse or current limit: a short from + to − shorts the controller’s own supply. Wire with all power off. The inputs have no isolation or surge protection, and the board is not a safety device: wire an emergency stop so that it cuts power by itself. Made for mechanical switches. A closed input reaches only about 0.7 V at the controller, so end every pin name with - (no pull resistor), and read before connecting an electronic sensor. Keep the supply jumper on 3V3 with a Smoothieboard V2.

Compare the endstop input boards

Both boards bring several switches to one ten-way controller cable.

Endstop inputs (basic) Endstop and probe inputs (advanced)
Specifications
Inputs76, plus 1 probe input
Sensor supply3.3 or 5 V5 V
Input connectors3-pin 2.54 mm header3-pin header, JST PH or jack, and a screw terminal
Size77 × 27 mm96 × 70.5 mm
Features
Light on every input
Buffered controller signals
Limited sensor supply
Probe input for a positive-voltage signal
Cuttable link on every input
Second connector for another board
M3 mounting holes
Cable-tie holes

Tech specs

InputsSeven, INP0 to INP6, each with signal, ground and supply pins
Meant forMechanical switches and dry contacts to ground
Sensor supply3.3 V or 5 V from the controller, one jumper for all seven. No fuse or current limit.
Pull-up1 kΩ to the selected supply, in each channel
Filter5.6 kΩ and 100 nF between each channel and its controller pin
Delay1.2 ms to read closed and 0.6 ms to read open (simulated, 3V3)
Signal levels at the controllerOpen: 3.3 V. Closed: about 0.68 V. Not inverted. (Simulated, 3V3.)
IndicatorsOne red light per input, lit while the input is pulled low
Controller connectorsINPUT Y and CHAIN Y, 2×5 at 1.27 mm (Gadgeteer type Y)
Sensor connectorsSeven 3-pin 2.54 mm keyed headers (Molex KK 254, 22-23-2031)
IsolationNone. Controller ground and sensor ground are the same.
Size77 × 27 mm, two copper layers, four M3 holes on 70 × 20 mm
Works withSmoothieboard V2 Prime and Smoothieware V2, through the endstops and probe modules
LicenceOpen hardware, CERN OHL v1.2

Every figure with its basis is in the electrical specifications appendix; hole positions are in the mounting dimensions appendix.

Board tour

The numbers on the drawing match the list below it. The board is shown from the component side, with the sensor connectors at the top.

  1. 1
    Controller connector (INPUT Y) — a 2×5, 1.27 mm Gadgeteer Y shrouded header for the ribbon cable from the controller. Pin 1 is the lower contact of its right-hand column.
  2. 2
    Chain connector (CHAIN Y) — a second header wired contact for contact to INPUT Y, for another board.
  3. 3
    Sensor connectors INP0 to INP6 — seven 3-pin 2.54 mm keyed headers, one per switch. Printed pin order from left to right: + , − , S.
  4. 4
    Input lights — one red light per input, lit while that input is pulled low, for example while a switch to ground is closed.
  5. 5
    Input diodes — one diode per input between the sensor’s S pin and the rest of the channel.
  6. 6
    Filter capacitors — one 100 nF capacitor per input, which smooths contact bounce and short noise pulses.
  7. 7
    Signal links JP2 to JP8 — one cuttable solder link per input, between the channel and its controller pin. All are closed as delivered.
  8. 8
    Supply selector JP1 — a three-pin header whose jumper cap picks 3.3 V (left) or 5 V (right) for the + pins and for the high level of every input. Use the 3V3 position with a Smoothieboard V2.
  9. 9
    Mounting holes — four 3.2 mm holes for M3 screws on a 70 × 20 mm rectangle, not connected to anything.
Point at a number, or tap it, to read what the part is; the same text is in the list. Repeated channels have one marker. On a small screen, scroll the drawing sideways.

Pinout

INPUT Y: controller connector

Connect INPUT Y to the header labelled G_F on the Smoothieboard V2 Prime with a straight ten-way cable. The last column is the name you use in the configuration file.

PinSignalWhat it doesPrime pin (header G_F)
13.3 VFeeds the lights, and the + pins in the 3V3 position3.3 V
25 VFeeds the + pins in the 5V position5 V
3INP0State of input INP0: high when open, low when closedPB1
4INP1State of input INP1: high when open, low when closedPJ4
5INP2State of input INP2: high when open, low when closedPA4
6INP3State of input INP3: high when open, low when closedPG0
7INP4State of input INP4: high when open, low when closedPJ3
8INP5State of input INP5: high when open, low when closedPG1
9INP6State of input INP6: high when open, low when closedPJ2
10GNDGroundGND
INPUT Y seen from above: odd pins in the right column and even pins in the left column, pin 1 at the bottom right. 13.3 V25 V3INP04INP15INP26INP37INP48INP59INP610GND
INPUT Y seen from above, in the same orientation as the board tour. CHAIN Y has the same layout. The drawing is enlarged; the real pins are 1.27 mm apart.

Sensor connectors INP0 to INP6

PinPrintedFunction
3 (left)+3.3 V or 5 V, set by JP1
2 (middle)−GND
1 (right)SSignal
A sensor connector seen from above, from left to right: pin 3 supply marked plus, pin 2 ground marked minus, pin 1 signal marked S. 3+sensor supply2−ground1Ssignal
Every sensor connector, seen from above with the connectors at the top of the board. The large numbers are pin numbers.

Check the order of any ready-made switch cable against the printed + − S before plugging it in: a different order can short the supply.

CHAIN Y: chain connector

PinOn CHAIN YUsed by this boardAs delivered
13.3 V from INPUT YYes: lights and the 3V3 positionPassed through
25 V from INPUT YOnly in the 5V positionPassed through
3Controller pin of INP0Yes, through link JP2Passed through; JP2 closed
4Controller pin of INP1Yes, through link JP3Passed through; JP3 closed
5Controller pin of INP2Yes, through link JP4Passed through; JP4 closed
6Controller pin of INP3Yes, through link JP5Passed through; JP5 closed
7Controller pin of INP4Yes, through link JP6Passed through; JP6 closed
8Controller pin of INP5Yes, through link JP7Passed through; JP7 closed
9Controller pin of INP6Yes, through link JP8Passed through; JP8 closed
10GroundYesPassed through

What you need

ControllerA Smoothieboard V2 Prime running Smoothieware V2, with its G_F header free.
10-way ribbon cable1.27 mm pitch, 2×5 cable connectors at both ends, wired pin 1 to pin 1.
SwitchesUp to seven mechanical switches, normally closed for limits and homing.
Switch cablesWith a 3-way 2.54 mm housing that mates with the Molex KK 254 header.
Jumper capOne 2.54 mm cap for the supply selector JP1.
MountingFour M3 screws and spacers, so the underside touches no metal.

Get started

A ribbon cable from header G_F to INPUT Y, and a normally closed limit switch between the S and minus pins of INP0. SmoothieboardV2 Primeheader G_FEndstop inputs(basic)INPUT Y · INP010-way ribbon cablepin 1 to pin 1Limit switchnormally closedcontactS−The + pin stays unconnected for a plain switch.
Minimal wiring: one ribbon cable and one switch.
  1. Set the supply jumper

    With all power off, put the jumper cap on JP1 across the middle pin and the pin marked 3V3 (the left one). Never fit a cap or solder across all three pins.

  2. Connect the controller

    Plug the ribbon cable into the header labelled G_F and into INPUT Y, pin 1 to pin 1.

  3. Connect one switch

    Wire the normally closed contact between S and − of INP0.

  4. Power the controller

    No machine motion is needed for this test.

    The red light under INP0 is lit, and goes out while you press the switch.

  5. Configure and check

    Add example 1 for the axis, restart, and send M119 with the switch released and then pressed.

    The reply shows 0 when released and 1 when pressed.

Configuration

The board needs no module of its own: each input is an ordinary controller pin, given to the firmware module that should read it.

You wantModuleExample
Stop the machine when an axis runs into its endEndstops, as limit switches1. Limit switches
Find the zero positionEndstops, as homing switches2. Homing switch
Touch off with a contact probe or touch plateProbe3. Probe
Run a command when a door opensSwitch, with an input pin4. Door switch
Halt with a buttonKill button5. Kill button

End each pin name with -, which switches the controller’s pull resistor off. Without it the firmware turns a pull-up on, even when the name has no ^. That pull-up would raise the level of a closed switch to about 1 V, at the limit of what reads as low; the board already has a pull-up on every input. Each pin can be claimed by one entry only. Merge the lines into your configuration file, adding to a section that already exists.

1. Limit switches (Endstops module)

Normally closed switches on INP0 to INP2:

[endstops]
maxx.enable       = true
maxx.pin          = PB1-      # INP0  (G_F pin 3)
maxx.axis         = X
maxx.limit_enable = true      # halt when hit during a move

maxy.enable       = true
maxy.pin          = PJ4-      # INP1  (G_F pin 4)
maxy.axis         = Y
maxy.limit_enable = true

maxz.enable       = true
maxz.pin          = PA4-      # INP2  (G_F pin 5)
maxz.axis         = Z
maxz.limit_enable = true

2. Homing switch (Endstops module)

A normally closed switch at the low end of X on INP3, used by G28:

[endstops]
minx.enable           = true
minx.pin              = PG0-         # INP3  (G_F pin 6)
minx.axis             = X
minx.homing_direction = home_to_min
minx.homing_position  = 0
minx.max_travel       = 500          # a little more than the axis length, mm
minx.fast_rate        = 20           # mm/s for the first approach
minx.slow_rate        = 5            # mm/s for the accurate approach
minx.retract          = 5            # mm to back off between the two
minx.limit_enable     = false

Choose rates at which your axis can stop within the switch’s spare travel. The input takes about 1 ms to respond.

3. Probe (Probe module)

A normally open contact on INP6, such as a touch plate that the tool connects to ground:

[zprobe]
enable        = true
probe_pin     = PJ2!-         # INP6  (G_F pin 9), contact that closes to ground
slow_feedrate = 2             # mm/s while probing
fast_feedrate = 20            # mm/s between probe points
probe_height  = 5             # mm above the surface to start from

Check with M119 that the probe reads 0 at rest and 1 when you close the contact by hand, before any probing move.

4. Door switch (Switch module with an input pin)

A contact on INP4 that is closed while the door is shut:

[switch]
door.enable             = true
door.input_pin          = PJ3-        # INP4  (G_F pin 7)
door.input_pin_behavior = momentary
door.output_on_command  = M600        # contact open: suspend the job
door.output_off_command = M601        # contact closed again: resume

5. Kill button (Kill button module)

A button on INP5 that closes its contact to ground when pressed:

[kill button]
enable        = true
pin           = PG1-          # INP5  (G_F pin 8)
toggle_enable = false         # true for a latching button
unkill_enable = true          # holding the button about 2 s clears the halt

This button acts through the firmware. It does not replace an emergency stop that cuts the power.

Commands

CommandWhat it does
M119Lists every configured endstop pin and the probe: 1 is triggered, 0 is not.
$X or M999Leaves the halted state after a limit switch was hit.

Good to know

  • No ! for normally closed switches. A closed switch reads 0 and an open one reads 1, which the endstops module treats as triggered.
  • An input with nothing connected reads 1. Enable only the inputs that have a switch.
  • An unplugged ribbon cable is not detected reliably. With the pull resistors off, the pins float, so run M119 and press each switch after any rewiring.
  • Extra filtering. common.debounce_ms under [endstops] adds a debounce time in the firmware.

Wiring switches and sensors

A switch connects between S and minus. A normally closed switch reads 0 at rest; a normally open contact reads 1 at rest. BoardINP connectorNormally closed switchrecommended for limitsS−BoardINP connectorNormally open contactprobe, buttonS−Reads 0 at rest, 1 when pressed or when a wire breaksReads 1 at rest, 0 when closed
Both kinds of contact use the same two pins. The configuration decides what each level means.

Use the normally closed contact for limits and homing: a broken switch wire then reads as triggered.

Electronic sensors need care. The signal passes through a diode before it reaches the controller, so the sensor must pull S very close to ground: below about 0.26 V in the 3V3 position for the controller to read low down to −10 °C, and below 0.32 V at 25 °C (simulated, about 4 mA to sink). Many open-collector and NPN sensors do not guarantee that. The sensor must also work from the voltage JP1 selects, which is 3.3 V with a Smoothieboard V2. For sensors that need 5 V or more, use the Endstop and probe inputs (advanced) board within its stated range.

How it works

Each channel: the switch pulls a node low through a diode, a light shows it, and a resistor and capacitor filter the signal on its way to the controller. SwitchS to groundDiodeblocks higheroutside voltageChannel node1 kΩ pull-up tothe selected supplyFilter5.6 kΩ and100 nFRed lightfrom 3.3 V, 680 ΩController pinthrough a link
One of the seven identical channels.

Each channel has a node pulled up by 1 kΩ to the supply selected by JP1. A switch to ground pulls that node low through a diode, which also lights the channel’s light from the 3.3 V supply.

The diode lets the sensor pull the node down but stops a higher outside voltage on S from reaching the node. Its own voltage drop is why a closed input rests well above 0 V.

A 5.6 kΩ resistor and a 100 nF capacitor then smooth the signal before it goes to the controller pin.

What the lights tell you

INP0 to INP6
WhereOne below each sensor connector
Lit meansThe input is pulled low: its switch to ground is closed
Dark meansThe input is open, or the board has no 3.3 V

Options

Supply selector JP1

Jumper cap+ pinsOpen input at the controllerUse
Middle and 3V3 (left)3.3 V3.3 VSmoothieboard V2 and other 3.3 V controllers
Middle and 5V (right)5 V5.0 VOnly a controller whose pins are rated to accept 5 V, with no pull resistor enabled
No capNot poweredNot definedDo not use
All three joinedNever: this joins the 3.3 V and 5 V supplies—Never

Each link joins one channel to its controller pin: JP2 for INP0 up to JP8 for INP6, left to right. Cutting a link frees that controller pin for something plugged into CHAIN Y. The input then no longer reaches the controller; its light still works. Solder the pads together to restore it.

Chaining a second board

CHAIN Y is wired contact for contact to INPUT Y: power, ground and all seven signal pins pass through, whatever the links are set to. To give a second board a pin, first cut that pin’s link here, so that only one board drives it. A pin used by a switch on this board is not free for the next one.

The controller's ribbon cable goes to the connector INPUT Y of the Endstop inputs board. Inside the board each of the ten pins runs straight to the connector CHAIN Y, where a second ribbon cable continues to the next board. Controller one ten-pin port Endstop inputs board INPUT Y CHAIN Y pins 1, 2 and 10: power and ground passed on a pin with a switch on this board passed on a pin whose link you cut passed on Next board sees what is passed on
Chaining: one port of the controller serves two boards. Pin 1 of INPUT Y leads to pin 1 of CHAIN Y, pin 2 to pin 2, and so on. The three lines stand for the ten pins. Two boards must never drive the same pin, and a pin that one board uses for a signal is not free for the next. All contacts pass straight through to CHAIN Y. The links JP2 to JP8, not drawn here, disconnect this board’s own channel from a pin.

Troubleshooting

When you seeIt meansDo this
A light stays dark when its switch is closedNo 3.3 V, or the switch is not between S and −.Check the cable is in INPUT Y and pin 1 goes to pin 1; join S and − with a wire: the light must come on.
Every input reads wrongJP1 has no cap, or the cable is not on G_F.Fit the cap on 3V3 and check both cable ends.
The light is on but M119 shows 1The low level does not reach the controller threshold, or the pin is not the one configured.End the pin name with - and no ^, check the link JP2 to JP8 is closed, and check the sensor limits.
M119 does not list the pinThe input is not configured.Check enable = true and the pin name, then restart.
The machine halts with ALARM: Hard limit as soon as an axis movesAn enabled limit input reads triggered.Send M119; disable unused entries and check the switch wiring.
The controller resets or loses power when a switch is plugged inThe + pin is shorted to ground.Unplug it and check the cable order against + − S.
An input triggers by itself during motionElectrical noise on the switch cable.Route it away from motor cables and set common.debounce_ms.

Still stuck? Read how to ask for help or see the general troubleshooting guide. Include the text printed on your board, the JP1 position, what is connected to each input, and what M119 replies.

Downloads

FileWhat it is
Schematic (PDF)The complete circuit diagram
Parts list (CSV)Every component with its value, footprint and part number
Top view (PNG)The drawing used on this page

Appendix: mounting dimensions

Positions are hole centres in millimetres from the corner marked 0, 0, seen from the component side. The four holes take M3 screws; the small locating holes of the two ten-pin connectors are not shown.

Mounting drawing of the Endstop inputs (basic) board, component side: outline 77 by 27 millimetres with 4 mounting holes. Hole positions are listed in the table below. COMPONENT SIDE · millimetres 77 27 0, 0 X Y 1 3.50, 3.50 2 73.50, 3.50 3 3.50, 23.50 4 73.50, 23.50 Numbered rings are mounting holes. Positions are hole centres, X then Y, from the marked corner.
Board outline 77 × 27 mm, corners rounded to a 3.5 mm radius, board thickness 1.6 mm. Drawn from the design files, component side up, in the same orientation as the board tour.
HoleX (mm)Y (mm)DiameterUse
13.503.503.2 mm, not platedMounting, M3 screw
273.503.503.2 mm, not platedMounting, M3 screw
33.5023.503.2 mm, not platedMounting, M3 screw
473.5023.503.2 mm, not platedMounting, M3 screw

Appendix: electrical specifications

One channel; the seven channels are identical.

ParameterApplies toLowerNominalUpperBasis and conditions
Sensor supply+ pins, 3V3 position—3.3 V—From the controller
Sensor supply+ pins, 5V position—5 V—From the controller
Sensor supply current+ pins——OpenNo fuse on the board; set by the controller supply
Closed input voltageController pin, 3V30.62 V0.68 V0.74 VSimulated, 60, 25 and −10 °C, S at 0 V, no controller pull resistor
Closed input voltageController pin, 5V0.64 V0.70 V0.76 VSimulated, same conditions
Open input voltageController pin—3.3 / 5.0 V—Simulated, 3V3 / 5V position
Contact currentS pin, closed—4.1 / 5.7 mA—Simulated, 3V3 / 5V
Light currentClosed input—1.5 mA—Simulated, assumed red light model
Total current, all seven closedController supplies—29 / 40 mA—Calculated from the simulated channel, 3V3 / 5V, no sensor power
Sensor low voltage still read lowS pin, 3V3——0.26 VSimulated, −10 °C, 0.99 V controller threshold
Switch and cable resistanceS to − loop——95 / 58 ΩSimulated, 25 °C, 3V3 / 5V; keep well below
Delay, closingTo 0.99 V—1.2 ms—Simulated, 3V3
Delay, openingTo 2.31 V—0.6 ms—Simulated, 3V3
Operating temperatureBoardOpen—OpenNot established

Component stress limits

These are limits of parts and not operating conditions.

CircuitPin or device stressAbsolute limit
Filter capacitorsVoltage50 V (part value)
Input diodesReverse voltage on S above the channel nodeOpen
Sensor pinsElectrostatic discharge and surgeOpen: no protection parts
Resistors and lightsPower and currentOpen

Appendix: simulation

One input channel was simulated in ngspice with generic diode and light models, a 100 MΩ controller input unless stated, and low and high thresholds of 0.99 V and 2.31 V. These are not measurements.

Simulated controller pin voltage: it falls below the low threshold 1.2 milliseconds after the switch closes and rises above the high threshold 0.6 milliseconds after it opens. 0 V1 V2 V3 Vreads low below 0.99 Vreads high above 2.31 V0246810121416time in millisecondsswitch closesswitch opens
Simulated voltage at the controller pin (blue), 3V3 position, no controller pull resistor.
Controller pin setting (3V3 position)Closed level, −10 to 60 °CReads low reliably
No pull resistor (-)0.62 to 0.74 VYes
Pull-up (default or ^), 50 kΩ0.89 to 1.00 VMarginal
Pull-up (default or ^), 40 kΩ0.95 to 1.06 VMarginal
Pull-up (default or ^), 30 kΩ1.05 to 1.14 VNo

Not simulated: noise and surge on long cables, electrostatic discharge, the behaviour of particular sensors, and heating.

Appendix: historical page

The historical page for ExtraEndstops describes the original design files.

See all boards on the extension boards page.

This is a wiki! If you'd like to improve this page, you can edit it on GitHub.