<p>There are at least 2 options to address the problem that you have:</p>

<ol>
<li>Adjust end-stops so that in 0,0 position Z-sensor would still hang above the printing table. This would reduce printing surface but allow perfect calibration</li>
<li>Mount extra metal plate at the table mount where it would not bump into printer parts and remain reachable for the sensor (perhaps with sensor relocation) when positioned at 0,0. This option requires extra space within table movement boundaries but saves printing surface.</li>
</ol>

CC BY-SA 4.0
2019-07-05T22:06:36.550Z
These solutions are totally unnecessary as it is easily fixed in the firmware. Only during levelling the probe needs to be above the bed, it is perfectly fine to have the sensor off the bed during printing.
0scar
CC BY-SA 3.0
2016-11-11T09:37:58.263Z
2016-11-11T09:37:58.263Z
Mikhail Z
<p><strong>It is not a problem</strong> that the sensor is <em>not above</em> the build plate <strong><em>during printing</em></strong> as long as it is <em>above</em> the build plate <strong><em>during the auto bed levelling sequence</em></strong>.</p>

<p>Homing does not necessarily need to be the <code>(0,0)</code> coordinate. Usually, a printer homes on the endstop switches, from that coordinate an offset is defined in the firmware to move to the origin. This implies that (depending on the position of the sensor), the sensor may be outside the bed area when the nozzle is at the origin <code>(0, 0)</code>). Therefore, similarly, you need to tell the printer the location of the Z sensor with respect to the nozzle position in order for the printer to keep the sensor on the bed when levelling by setting boundaries for the sensor to reach.</p>

<hr>

<p>E.g. for <a href="https://github.com/MarlinFirmware/" rel="nofollow noreferrer">Marlin firmware</a> the offset from homing to the bed origin is defined for an <a href="https://github.com/MarlinFirmware/Marlin/blob/1.1.x/Marlin/example_configurations/Anet/A8/Configuration.h" rel="nofollow noreferrer">Anet A8</a> by:</p>

<pre><code>#define X_MIN_POS -33
#define Y_MIN_POS -10
</code></pre>

<p>The values you should use need to correspond to the actual offset from the homing point to the origin of the bed <code>(0,0)</code>.</p>

<p>When using an auto bed leveling sensor like you are using you should consider this remark:</p>

<blockquote>
  <p>If using a Probe for Z Homing, enable Z_SAFE_HOMING also!</p>
</blockquote>

<p>Un-comment the proper line in the configuration file to read:</p>

<pre><code>#define Z_SAFE_HOMING
</code></pre>

<p>This will make the printer aware of the sensor, and home Z in the middle of the bed (default behavior, but can be changed), so that your sensor is never off the bed when probing the bed for Z homing.</p>

<p>Furthermore, you need to set the offset values of the center of your sensor to the nozzle center:</p>

<pre><code> *   Z Probe to nozzle (X,Y) offset, relative to (0, 0).
 *   X and Y offsets must be integers.
 *
 *   In the following example the X and Y offsets are both positive:
 *   #define X_PROBE_OFFSET_FROM_EXTRUDER 10
 *   #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
 *
 *      +-- BACK ---+
 *      |           |
 *    L |    (+) P  | R &lt;-- probe (20,20)
 *    E |           | I
 *    F | (-) N (+) | G &lt;-- nozzle (10,10)
 *    T |           | H
 *      |    (-)    | T
 *      |           |
 *      O-- FRONT --+
 *    (0,0)
 */
#define X_PROBE_OFFSET_FROM_EXTRUDER XXX   // X offset: -left  +right  [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER YYY   // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0   // Z offset: -below +above  [the nozzle]
</code></pre>

<p>Where XXX and YYY are your actual values.</p>

<p>And set the boundary of the probing section:</p>

<pre><code>// Set the boundaries for probing (where the probe can reach).
#define LEFT_PROBE_BED_POSITION 15
#define RIGHT_PROBE_BED_POSITION 190
#define FRONT_PROBE_BED_POSITION 15
#define BACK_PROBE_BED_POSITION 170
</code></pre>

<p>Note that the values should match your bed size!</p>

<p>And:</p>

<pre><code>// The Z probe minimum outer margin (to validate G29 parameters).
#define MIN_PROBE_EDGE 10
</code></pre>

<p>Details on setting the boundaries of the bed to keep the sensor on the bed is described in question "<a href="/q/8153">How to set Z-probe boundary limits in firmware when using automatic bed leveling?</a>".</p>

CC BY-SA 4.0
2018-06-30T22:16:24.073Z
2019-07-11T20:43:32.260Z
2019-07-11T20:43:32.260Z
0scar
<p>If using <code>marlin firmware</code> center your prints.</p>

<p>In my case...</p>

<pre><code>#define NOZZLE_X          8
#define NOZZLE_Y          -56
</code></pre>

<p>Then, set the Z-Probe offset from nozzle.
In my case the Z-Probe is 50mm behind the hotend.</p>

<pre><code>#define SENSOR_LEFT        0
#define SENSOR_RIGHT       0
#define SENSOR_FRONT       0
#define SENSOR_BEHIND      50
</code></pre>

<p>Finally set the bed extra movement. As you see i added the 50mm's at the back of the bed.</p>

<pre><code>#define XTRA_BED_LEFT     0  // Distance nozzle can move towards the left past X = 0
#define XTRA_BED_RIGHT    0  // Distance nozzle can move towards the right past X = 200
#define XTRA_BED_FRONT    0  // Distance bed can move towards the front past Y = 200 (Y=280 for large bed)
#define XTRA_BED_BACK     50  // Distance bed can move towards the back past Y = 0
</code></pre>

<p>This way once auto leveling, the probe starts with (0,0) and the hotend is 50&nbsp;mm's in front and out of the bed. </p>

CC BY-SA 4.0
2018-06-30T20:32:46.900Z
2019-07-05T20:20:55.463Z
2019-07-05T20:20:55.463Z
OrElse
<p>I had my printer printing fine when using the stock trigger switch as I used it to print the green bracket you see in the picture. </p>

<p><a href="https://i.sstatic.net/6kxYw.jpg" rel="noreferrer"><img src="https://i.sstatic.net/6kxYw.jpg" alt="Photo of probe atached to hotend"></a></p>

<p>My problem now is when I do a print with the sensor, it moves to 0,0 position. However in this position the sensor is hanging off the bed hence there is nothing for it detect so it crashes into the bed.</p>

<p>As far as I can tell the nozzle is homing in the right place.</p>

<p>How do I tell Marlin the new minimum position it needs to be in so it doesn't crash into the bed?</p>

CC BY-SA 4.0
2019-07-11T20:47:03.057Z
It does not matter if the probe is not above the bed during printing as long it is above the bed during auto leveling. This can be done by proper settings in your firmware configuration, no hardware changes are necessary.
0scar
<diy-3d-printer>
How to offset my probe so it's not hanging off the bed at 0, 0 position when printing
Ageis
# How to offset my probe so it's not hanging off the bed at 0, 0 position when printing

(Asked by: username_0 on 2016-11-07)

I had my printer printing fine when using the stock trigger switch as I used it to print the green bracket you see in the picture.

[![Photo of probe atached to hotend](https://i.sstatic.net/6kxYw.jpg)](https://i.sstatic.net/6kxYw.jpg)

My problem now is when I do a print with the sensor, it moves to 0,0 position. However in this position the sensor is hanging off the bed hence there is nothing for it detect so it crashes into the bed.

As far as I can tell the nozzle is homing in the right place.

How do I tell Marlin the new minimum position it needs to be in so it doesn't crash into the bed?

**Tags:** diy-3d-printer
> **Comments:**
> **username_1**: It does not matter if the probe is not above the bed during printing as long it is above the bed during auto leveling. This can be done by proper settings in your firmware configuration, no hardware changes are necessary.  

---

## 3 answers

### Answer by username_2 on 2016-11-11. Score: 0 | Accepted answer

There are at least 2 options to address the problem that you have:

1. Adjust end-stops so that in 0,0 position Z-sensor would still hang above the printing table. This would reduce printing surface but allow perfect calibration
2. Mount extra metal plate at the table mount where it would not bump into printer parts and remain reachable for the sensor (perhaps with sensor relocation) when positioned at 0,0. This option requires extra space within table movement boundaries but saves printing surface.

> **Comments:**
> **username_1**: These solutions are totally unnecessary as it is easily fixed in the firmware. Only during levelling the probe needs to be above the bed, it is perfectly fine to have the sensor off the bed during printing.  

---

### Answer by username_1 on 2018-06-30. Score: 4

It is not a problem that the sensor is not above the build plate during printing as long as it is above the build plate during the auto bed levelling sequence.
Homing does not necessarily need to be the (0,0) coordinate. Usually, a printer homes on the endstop switches, from that coordinate an offset is defined in the firmware to move to the origin. This implies that (depending on the position of the sensor), the sensor may be outside the bed area when the nozzle is at the origin (0, 0)). Therefore, similarly, you need to tell the printer the location of the Z sensor with respect to the nozzle position in order for the printer to keep the sensor on the bed when levelling by setting boundaries for the sensor to reach.

E.g. for Marlin firmware the offset from homing to the bed origin is defined for an Anet A8 by:
#define X_MIN_POS -33
#define Y_MIN_POS -10

The values you should use need to correspond to the actual offset from the homing point to the origin of the bed (0,0).
When using an auto bed leveling sensor like you are using you should consider this remark:

If using a Probe for Z Homing, enable Z_SAFE_HOMING also!

Un-comment the proper line in the configuration file to read:
#define Z_SAFE_HOMING

This will make the printer aware of the sensor, and home Z in the middle of the bed (default behavior, but can be changed), so that your sensor is never off the bed when probing the bed for Z homing.
Furthermore, you need to set the offset values of the center of your sensor to the nozzle center:
 *   Z Probe to nozzle (X,Y) offset, relative to (0, 0).
 *   X and Y offsets must be integers.
 *
 *   In the following example the X and Y offsets are both positive:
 *   #define X_PROBE_OFFSET_FROM_EXTRUDER 10
 *   #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
 *
 *      +-- BACK ---+
 *      |           |
 *    L |    (+) P  | R <-- probe (20,20)
 *    E |           | I
 *    F | (-) N (+) | G <-- nozzle (10,10)
 *    T |           | H
 *      |    (-)    | T
 *      |           |
 *      O-- FRONT --+
 *    (0,0)
 */
#define X_PROBE_OFFSET_FROM_EXTRUDER XXX   // X offset: -left  +right  [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER YYY   // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0   // Z offset: -below +above  [the nozzle]

Where XXX and YYY are your actual values.
And set the boundary of the probing section:
// Set the boundaries for probing (where the probe can reach).
#define LEFT_PROBE_BED_POSITION 15
#define RIGHT_PROBE_BED_POSITION 190
#define FRONT_PROBE_BED_POSITION 15
#define BACK_PROBE_BED_POSITION 170

Note that the values should match your bed size!
And:
// The Z probe minimum outer margin (to validate G29 parameters).
#define MIN_PROBE_EDGE 10

Details on setting the boundaries of the bed to keep the sensor on the bed is described in question "How to set Z-probe boundary limits in firmware when using automatic bed leveling?".


---

### Answer by username_3 on 2018-06-30. Score: 2

If using marlin firmware center your prints.
In my case...
#define NOZZLE_X          8
#define NOZZLE_Y          -56

Then, set the Z-Probe offset from nozzle.
In my case the Z-Probe is 50mm behind the hotend.
#define SENSOR_LEFT        0
#define SENSOR_RIGHT       0
#define SENSOR_FRONT       0
#define SENSOR_BEHIND      50

Finally set the bed extra movement. As you see i added the 50mm's at the back of the bed.
#define XTRA_BED_LEFT     0  // Distance nozzle can move towards the left past X = 0
#define XTRA_BED_RIGHT    0  // Distance nozzle can move towards the right past X = 200
#define XTRA_BED_FRONT    0  // Distance bed can move towards the front past Y = 200 (Y=280 for large bed)
#define XTRA_BED_BACK     50  // Distance bed can move towards the back past Y = 0

This way once auto leveling, the probe starts with (0,0) and the hotend is 50 mm's in front and out of the bed.


---

