Endstop

Also known as: end stop

On this page 7

An endstop (also written end stop) is a switch or sensor at the end of an axis that signals the controller when the moving carriage, bed or effector reaches a known reference position. In 3D printer hardware, it is the basis of homing: because stepper motors run open loop and do not know their absolute position at power-up, the firmware drives each axis toward its endstop until it triggers and then defines that point as the origin of the coordinate system.

Within 3D printing & making, endstops range from simple mechanical microswitches to optical and Hall-effect sensors, and on many modern machines they are replaced by sensorless homing or complemented by a bed probe for the Z axis. Their repeatability directly sets how consistently every print starts at the same position.

How an endstop defines the machine origin

An endstop defines the origin by changing its electrical state when the axis reaches it, which the mainboard reads as a digital input. During a G28 homing command, firmware such as Marlin, Klipper or RepRapFirmware moves the axis toward the endstop at a fast homing speed, stops at the trigger, backs off a few millimeters and approaches again at a slower second speed. The second, slower touch improves repeatability because it reduces overshoot and mechanical bounce.

After the trigger, the firmware sets the axis position to a configured value, often 0 or the maximum travel, and applies any home offset. Software limits then keep later moves inside the printable volume. Endstops are therefore mainly reference sensors, not safety stops: most firmware ignores them during printing unless endstop checking is explicitly enabled.

Wiring follows two conventions. A normally closed (NC) switch opens the circuit when pressed, so a broken wire reads as triggered and homing fails safely. A normally open (NO) switch closes when pressed, so a broken wire looks like an untriggered switch and the axis can grind against the frame. For this reason NC wiring is preferred for mechanical endstops.

Types of endstops

Endstop types differ in trigger mechanism, repeatability and sensitivity to dirt or vibration. The following table compares the common variants used on desktop printers.

TypeTrigger principleTypical repeatabilityStrengths and weaknesses
Mechanical microswitchContact closes or opens on lever pressAbout 0.01 to 0.05 mmCheap and robust; lever wear and bounce
Optical endstopFlag interrupts an infrared beamAbout 0.01 mmNo contact wear; sensitive to dust and ambient light
Hall-effect endstopMagnet approaches a magnetic sensorAbout 0.01 to 0.02 mmSealed and wear-free; needs a mounted magnet
Sensorless homingDriver detects motor stall currentAbout 0.05 to 0.1 mmNo extra wiring; tuning sensitive
Inductive probeEddy currents in a metal bedAbout 0.005 to 0.02 mmUsed for Z; requires a metal surface
Common endstop types and their characteristics

Repeatability values are typical ranges and depend strongly on approach speed, mounting rigidity and temperature. A cheap switch on a stiff bracket can outperform an optical sensor on a flexible printed mount.

Endstop placement in different kinematics

Where endstops sit depends on the printer kinematics, because each design homes different physical parts. The table shows the usual arrangement for the main machine types.

KinematicsEndstop locationHoming notes
Cartesian bed slingerX on the gantry, Y at the bed, Z at the bottom or replaced by a probeEach motor homes its own axis
CoreXYX and Y at the toolhead or frame cornersBoth motors move for each axis homing
Delta printerOne max endstop at the top of each towerAll three carriages home upward together
IDEX printerOne X endstop per toolhead at opposite endsEach carriage homes to its own side
Belt printerX and Z only; the belt axis has no endstopInfinite axis needs no reference
Typical endstop arrangement by printer type

On delta printers, small differences between the three tower endstops tilt the effective print plane, so firmware stores endstop adjustment offsets obtained from calibration. On CoreXY machines, a misaligned endstop flag shows up as a skewed origin in both X and Y.

Endstop, bed probe and sensorless homing compared

An endstop references a fixed machine position, while a bed probe such as a BLTouch or an inductive sensor measures the actual print surface. Modern printers often combine both: mechanical or sensorless homing for X and Y and a probe acting as a virtual Z endstop. The decision table below summarizes common choices.

SituationRecommended methodReason
Budget Cartesian printerMechanical switches with NC wiringReliable, cheap, easy to replace
CoreXY with Trinamic driversSensorless homing on X and YFewer cables to the moving toolhead
Removable or textured bedsProbe as Z endstopReferences the real surface height
Dusty workshop or enclosureHall-effect or mechanical sensorsOptical gates collect debris
High-precision tool changerOptical or high-grade switchesBest repeatability for alignment
Choosing a homing method

Sensorless homing relies on StallGuard-style stall detection in drivers such as the TMC2209 or TMC5160. It saves wiring, but it needs careful sensitivity tuning and repeatable belt tension, and it is generally unsuitable for the Z axis on lead screw drives.

Common endstop problems and fixes

Most homing faults trace back to wiring, configuration or mechanical mounting rather than a dead sensor. The M119 command reports the current state of every endstop and is the first diagnostic step.

  • Axis grinds into the frame: the switch is NO and a wire is broken, or the endstop is on the wrong pin; check with M119.
  • Homing reports immediately triggered: logic is inverted in firmware; flip the endstop inversion setting.
  • First layer height varies between prints: Z endstop repeatability is poor; slow the second approach or use a probe.
  • Random triggers during moves: electrical noise on long unshielded cables; add filtering or route cables away from motor wires.
  • Optical endstop never triggers: the flag misses the slot or sunlight saturates the receiver.

The short version

A 3D printer forgets where its parts are every time it is switched off. An endstop is a small sensor at the edge of each axis. The printer slowly moves each part until it touches that sensor.

This works like feeling for the wall in a dark room. Once you touch the wall, you know exactly where you stand. After that, the printer can measure every move from that point and start each print in the same place.

Where it makes a difference

A small print farm runs ten Cartesian bed slinger printers that produce identical housings around the clock. Operators notice that on two machines the first layer is sometimes too thin by about 0.05 mm, which causes scraped surfaces and failed prints overnight.

Testing with ten repeated G28 commands and position reports shows that the Z microswitches drift because their printed brackets flex slightly. The technician replaces the Z switches with inductive probes used as Z endstops and sets a slower second homing speed of 3 mm/s on the X and Y switches. After the change, the measured spread falls to under 0.01 mm, and the farm records no first-layer failures over the following month.