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.
| Type | Trigger principle | Typical repeatability | Strengths and weaknesses |
|---|---|---|---|
| Mechanical microswitch | Contact closes or opens on lever press | About 0.01 to 0.05 mm | Cheap and robust; lever wear and bounce |
| Optical endstop | Flag interrupts an infrared beam | About 0.01 mm | No contact wear; sensitive to dust and ambient light |
| Hall-effect endstop | Magnet approaches a magnetic sensor | About 0.01 to 0.02 mm | Sealed and wear-free; needs a mounted magnet |
| Sensorless homing | Driver detects motor stall current | About 0.05 to 0.1 mm | No extra wiring; tuning sensitive |
| Inductive probe | Eddy currents in a metal bed | About 0.005 to 0.02 mm | Used for Z; requires a metal surface |
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.
| Kinematics | Endstop location | Homing notes |
|---|---|---|
| Cartesian bed slinger | X on the gantry, Y at the bed, Z at the bottom or replaced by a probe | Each motor homes its own axis |
| CoreXY | X and Y at the toolhead or frame corners | Both motors move for each axis homing |
| Delta printer | One max endstop at the top of each tower | All three carriages home upward together |
| IDEX printer | One X endstop per toolhead at opposite ends | Each carriage homes to its own side |
| Belt printer | X and Z only; the belt axis has no endstop | Infinite axis needs no reference |
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.
| Situation | Recommended method | Reason |
|---|---|---|
| Budget Cartesian printer | Mechanical switches with NC wiring | Reliable, cheap, easy to replace |
| CoreXY with Trinamic drivers | Sensorless homing on X and Y | Fewer cables to the moving toolhead |
| Removable or textured beds | Probe as Z endstop | References the real surface height |
| Dusty workshop or enclosure | Hall-effect or mechanical sensors | Optical gates collect debris |
| High-precision tool changer | Optical or high-grade switches | Best repeatability for alignment |
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.