<p>The original Anet A8 has:</p>

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

// 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 X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 240
</pre>

<p>So in your case it would be:</p>

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

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS -16
#define Y_MIN_POS -5
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 240
</pre>

<p>Tuning the bed to print exactly in the middle so that large prints fit on the build plate is described in question: <a href="/q/6375/">"How to center my prints on the build platform? (Re-calibrate homing offset)"</a>.</p>

CC BY-SA 4.0
2020-01-05T02:32:40.740Z
Thanks a lot Oscar.  I was able to make that change, compile and upload, but it hasn't made a lot of difference.  The homing nozzle position is about 20mm north and 28mm west of the actual bed center.  This was what got me down this road in the first place...  So I downloaded your calibration diagram from thingiverse, and it won't really print because the center is so off.  The weird thing is, when I home the printer is heads off to X80 Y110.  Why not X110 Y110 since that's clearly the center of 220x220?
AndyDove
CC BY-SA 4.0
2020-01-05T03:01:24.577Z
Looks like I got there, bed centered and compiled as it should:

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

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS -16
#define Y_MIN_POS 15
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS 235
#define Z_MAX_POS 240
AndyDove
CC BY-SA 4.0
2020-01-05T10:09:26.480Z
@AndyDove Are the endstop locations the same as on the Anet A8 (X on the left and Y on the back when facing the machine)? Note the (0, 0), the origin is the left front. So when the printer homes Y, the nozzle is in front of the bed, so a negative Y value should be used (in front of the bed is the negative Y). Maybe you can add a link to your config and I'll inspect it for you. I also have an AM8, modified to my needs.
0scar
CC BY-SA 4.0
2020-01-05T23:44:33.103Z
Hello Oscar, thanks much and sorry for the stunted replies.  Just in the lounge heading over to Austria (from Detroit) for a week of business so it's been a day of packing.
The printer is working much better.  Stops are exactly as you describe, x on the left gantry and y on the rear right frame.  Works well.
What was throwing me is that when the printer homes, it actually centers the bltouch on bed center rather than the nozzle, but when I print it's now printing dead center so all's good.  I would send you my config, but I left it on my other laptop - some other time!  Thanks again!!  /Andy
AndyDove
CC BY-SA 4.0
2020-01-04T22:26:57.120Z
2020-01-04T22:26:57.120Z
0scar
<p>This is driving me up the wall, hope somebody can give me some advice...</p>

<p>I have an Anet A8 (metal frame, so 'AM8').  Bed is the original 220x220&nbsp;mm.  When the nozzle is at the X/Y end stops it is positioned 16&nbsp;mm 'west' away from the bed (in free space) in the x-axis, and 5&nbsp;mm 'north'.  </p>

<p>The problem I'm having is with the <code>X_BED_SIZE</code> (surely 220) and <code>X_MIN_POS</code> settings. I keep falling into either the nozzle home a long way from the center (should be 110,110), or getting a message about end stops being too narrow for the bed.  Given my sizings above, what should the following be?:</p>

<pre><code>// @section machine

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

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 240
</code></pre>

CC BY-SA 4.0
2020-01-04T22:21:16.310Z
Welcome to 3DPrinting.SE!
0scar
<marlin><anet-a8><firmware><homing><bed>
Bed size and nozzle homing offset in Marlin 1.1.9 firmware
AndyDove
# Bed size and nozzle homing offset in Marlin 1.1.9 firmware

(Asked by: username_0 on 2020-01-04)

This is driving me up the wall, hope somebody can give me some advice...
I have an Anet A8 (metal frame, so 'AM8').  Bed is the original 220x220 mm.  When the nozzle is at the X/Y end stops it is positioned 16 mm 'west' away from the bed (in free space) in the x-axis, and 5 mm 'north'.  
The problem I'm having is with the X_BED_SIZE (surely 220) and X_MIN_POS settings. I keep falling into either the nozzle home a long way from the center (should be 110,110), or getting a message about end stops being too narrow for the bed.  Given my sizings above, what should the following be?:
// @section machine

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

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 240

**Tags:** marlin, anet-a8, firmware, homing, bed
> **Comments:**
> **username_1**: Welcome to 3DPrinting.SE!  

---

## 1 answers

### Answer by username_1 on 2020-01-04. Score: 1

The original Anet A8 has:

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

// 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 X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 240

So in your case it would be:

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

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS -16
#define Y_MIN_POS -5
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 240

Tuning the bed to print exactly in the middle so that large prints fit on the build plate is described in question: "How to center my prints on the build platform? (Re-calibrate homing offset)".

> **Comments:**
> **username_0**: Thanks a lot Oscar.  I was able to make that change, compile and upload, but it hasn't made a lot of difference.  The homing nozzle position is about 20mm north and 28mm west of the actual bed center.  This was what got me down this road in the first place...  So I downloaded your calibration diagram from thingiverse, and it won't really print because the center is so off.  The weird thing is, when I home the printer is heads off to X80 Y110.  Why not X110 Y110 since that's clearly the center of 220x220?  
> **username_0**: Looks like I got there, bed centered and compiled as it should:  // The size of the print bed #define X_BED_SIZE 220 #define Y_BED_SIZE 220  // Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS -16 #define Y_MIN_POS 15 #define Z_MIN_POS 0 #define X_MAX_POS X_BED_SIZE #define Y_MAX_POS 235 #define Z_MAX_POS 240  
> **username_1**: @AndyDove Are the endstop locations the same as on the Anet A8 (X on the left and Y on the back when facing the machine)? Note the (0, 0), the origin is the left front. So when the printer homes Y, the nozzle is in front of the bed, so a negative Y value should be used (in front of the bed is the negative Y). Maybe you can add a link to your config and I'll inspect it for you. I also have an AM8, modified to my needs.  
> **username_0**: Hello Oscar, thanks much and sorry for the stunted replies.  Just in the lounge heading over to Austria (from Detroit) for a week of business so it's been a day of packing. The printer is working much better.  Stops are exactly as you describe, x on the left gantry and y on the rear right frame.  Works well. What was throwing me is that when the printer homes, it actually centers the bltouch on bed center rather than the nozzle, but when I print it's now printing dead center so all's good.  I would send you my config, but I left it on my other laptop - some other time!  Thanks again!!  /Andy  

---

