<p>In principle you only need the minimum axis position (or the maximum), the offset to the bed and the size of the bed in the direction of the axes. Fortunately, you can specify this in the firmware:</p>

<p>E.g. in Marlin Firmware offsets are defined as travel limits:</p>

<pre>
// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS -33
#define Y_MIN_POS -10
#define Z_MIN_POS 0
#define Z_MAX_POS 240
</pre>

<p>Bed size:</p>

<pre>
// The size of the print bed
#define X_BED_SIZE 200
#define Y_BED_SIZE 200
</pre>

<p>Do note that some printers do have maximum endstops on top of minimum endstops. This is handy in case of layer shifting (e.g. caused by the nozzle catching the print as such that the belt skips notches and as such redefining the reference frame) to prevent the carriage from destroying the printer at the maximum of the axis.</p>

CC BY-SA 4.0
2019-05-08T16:02:06.097Z
2019-05-08T16:42:11.703Z
2019-05-08T16:42:11.703Z
0scar
<p>I have seen that many 3D printers have only one limit switch for each axis, how does it know where to stop on the other end?</p>

<p>My first guess is that the machine knows how big the plate is, and calculates it accordingly.</p>

<p>If this is true, then if I were to use a RAMPS, I would have to modify the software to figure out the build plate, it won't have the hardware to autocalculate.</p>

CC BY-SA 4.0
2019-05-10T18:52:53.143Z
it doesn't need to be at one end, any known position can be used to "home" (calibrate absolute position in regards to future movement commands).
dandavis
CC BY-SA 4.0
2019-05-15T15:13:12.623Z
Limit switches have (at least) 2 uses: finding the edge, and preventing running past it. With one limit switch per axis you get the first but only half the second. But as @Oscar points out, any kind of slippage (belt, motor limitations, etc.) means the axis won't be where the software thinks it is. I much prefer having limit switches at both ends.
TextGeek
CC BY-SA 4.0
2019-05-21T16:40:37.737Z
I believe you can add a 2nd limit switch, and update the Configuration.h file to show it's there.  My combined Mega2560+RAMP functionality (Migbot printer) has both + and - limit switch connectors.  Looks like this, with X+/X-. Y+/Y-, and Z+/Z- at the lower right.  I haven't tried any Config file changes myself, am just running the software that came with the board in Jan 2015.
CrossRoads
<diy-3d-printer><printer-building><desktop-printer>
Why do 3D printers have only one limit switch?
Riz-waan
# Why do 3D printers have only one limit switch?

(Asked by: username_0 on 2019-05-08)

I have seen that many 3D printers have only one limit switch for each axis, how does it know where to stop on the other end?

My first guess is that the machine knows how big the plate is, and calculates it accordingly.

If this is true, then if I were to use a RAMPS, I would have to modify the software to figure out the build plate, it won't have the hardware to autocalculate.

**Tags:** diy-3d-printer, printer-building, desktop-printer
> **Comments:**
> **username_1**: it doesn't need to be at one end, any known position can be used to "home" (calibrate absolute position in regards to future movement commands).  
> **username_2**: Limit switches have (at least) 2 uses: finding the edge, and preventing running past it. With one limit switch per axis you get the first but only half the second. But as @Oscar points out, any kind of slippage (belt, motor limitations, etc.) means the axis won't be where the software thinks it is. I much prefer having limit switches at both ends.  
> **username_3**: I believe you can add a 2nd limit switch, and update the Configuration.h file to show it's there.  My combined Mega2560+RAMP functionality (Migbot printer) has both + and - limit switch connectors.  Looks like this, with X+/X-. Y+/Y-, and Z+/Z- at the lower right.  I haven't tried any Config file changes myself, am just running the software that came with the board in Jan 2015.  

---

## 1 answers

### Answer by username_4 on 2019-05-08. Score: 7 | Accepted answer

In principle you only need the minimum axis position (or the maximum), the offset to the bed and the size of the bed in the direction of the axes. Fortunately, you can specify this in the firmware:
E.g. in Marlin Firmware offsets are defined as travel limits:

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS -33
#define Y_MIN_POS -10
#define Z_MIN_POS 0
#define Z_MAX_POS 240

Bed size:

// The size of the print bed
#define X_BED_SIZE 200
#define Y_BED_SIZE 200

Do note that some printers do have maximum endstops on top of minimum endstops. This is handy in case of layer shifting (e.g. caused by the nozzle catching the print as such that the belt skips notches and as such redefining the reference frame) to prevent the carriage from destroying the printer at the maximum of the axis.


---

