<p>For most Cartesian printers, the homing position is at the front-left corner of the build plate. End-stop switches can be at either end of each axis (and even both), but the firmware must be configured accordingly.</p>
<p>A common arrangement is to have end-stop switches at X-min, Y-min and Z-min positions. You will see this on pretty much all budget printers, but things may be different on high-end machines. For the Y-axis on a cartesian machine, this mean placing the end-stop switch at the rear of the printer. A CoreXY machine on the other hand has the Y-min sensor on the front left corner.</p>
<p>So, unless your intentions were otherwise, you have simply got the Y-axis end-stop switch in the wrong position. For your design, it should be at the back of the printer, triggered by the bed in it's most backwards position. You will also need to reverse the direction of the Y-axis stepper motor, do that +Y moves the bed towards the operator (like you have it now).</p>
<p>If you want to have the end-stop switch at the front of the printer for some reason, you will need to re-configure the firmware accordingly - it is an Y-max sensor in that position!</p>

CC BY-SA 4.0
2021-04-18T05:20:06.430Z
Sorry Mick, bit this answer is wrong, you can have the endstops at every side, so at the max or at the min position, as long as you tell the printer where the endstop is in firmware. What you actually mean is that generally the origin of the build plate is at the front-left, but this doesn't have to be the homing position. Please change the answer to state that for the current firmware setup your printer has the incorrect mechanical layout and reason from there that for the current firmware the OP needs to do some hardware changes.
0scar
CC BY-SA 4.0
2021-04-18T09:47:51.197Z
@Oscar Thanks for the feedback. I have updated my answer. Hopefully, it addresses all of your points.
Mick
CC BY-SA 4.0
2021-04-18T10:09:48.580Z
Clarified some things
Trish
CC BY-SA 4.0
2021-04-18T10:50:09.610Z
@Mick ...  Y-max ... yes that's what i am looking for... as i have some design issue... i want to put the endstop at the front... thanks again.. but i think my bed is moving wrong way when clicking -Y or +Y button in pronterface... or that's correct behavior ?
Raj
CC BY-SA 4.0
2021-04-18T10:54:01.423Z
It is outside my area of expertise, I'm afraid. We shall have to rely on @Trish's help.
Mick
CC BY-SA 4.0
2021-04-18T10:58:00.840Z
Certainly, if you press -Y, the bed should move to the Y-min position (i.e. to the rear), and if you press +Y, the bed should move to the Y-max position (i.e. to the front).
Mick
CC BY-SA 4.0
2021-04-18T11:09:17.917Z
Yes, -Y is backwards and +Y forwards
Trish
CC BY-SA 4.0
2021-04-17T15:39:52.493Z
2021-04-18T10:08:45.250Z
2021-04-18T10:08:45.250Z
Mick
<p>Instead of changing firmware or changing the wiring, I flipped the motor direction. See the first photo below. Motor shaft was on the right side, now, the motor shaft is on left side, so the the bed moves backwards. I moved the Y endstop to back and now it prints fine.</p>
<p>only the problem is</p>
<p>In Pronterface,</p>
<pre><code>if I press -Y -- bed moves backward (towards the Y endstop - new position)
if I press +Y -- bed moves forward (away from Y endstop - new position)

--- is this normal ?
</code></pre>
<p><a href="https://i.sstatic.net/DXX1m.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DXX1m.jpg" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2021-04-18T06:43:02.260Z
the endstop behavior says, that you have your endstop at Y=0, which is a fine way to do it.
Trish
CC BY-SA 4.0
2021-04-18T04:35:39.690Z
2021-04-18T05:23:50.547Z
2021-04-18T05:23:50.547Z
Raj
<p>My custom 3D printer prints everything inverted. I guess this is a homing problem as the motor moves in correct direction.</p>
<p>In Pronterface,</p>
<ul>
<li>if I press -Y — bed moves forward (towards the Y endstop)</li>
<li>if I press +Y — bed moves backward (away from Y endstop)</li>
<li>if I press -X — hotend moves left (towards the X endstop)</li>
<li>if I press +X — hotend moves right (away from the X endstop)</li>
</ul>
<p>on RAMPS 1.4:</p>
<ul>
<li>X endstop is connected on the 1st pin</li>
<li>Y endstop is connected on the 3rd pin</li>
<li>Z endstop is connected on the 5th pin</li>
</ul>
<p>(Pin 2, 4 &amp; 6 are not used (are these for MAX_ENDSTOP ?))</p>
<p>Below is my Marlin config</p>
<pre><code>#define X_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe.

#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

#define INVERT_X_DIR false
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
</code></pre>
<p>I have attached 3 photographs.</p>
<ol>
<li>Shows the Home position of hotend. Y Motor on back and Y endstop at front.</li>
</ol>
<p><a href="https://i.sstatic.net/M4Gcr.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/M4Gcr.jpg" alt="Home position of hotend" /></a></p>
<ol start="2">
<li>Shows inverted print.</li>
</ol>
<p><a href="https://i.sstatic.net/9SRBZ.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/9SRBZ.jpg" alt="inverted print" /></a></p>
<ol start="3">
<li>Pronterface screenshot (shows actual G-code file)</li>
</ol>
<p><a href="https://i.sstatic.net/4ru5r.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/4ru5r.jpg" alt="Pronterface screenshot" /></a></p>
<p>I tried flipping the motor cables, but that inverts the motor direction
I also tried INVERT_Y_DIR true, but no luck.</p>
<p>Please help me. What am I doing wrong?</p>

CC BY-SA 4.0
2021-04-17T12:19:40.503Z
it's odd that neither of the solutions works...
Trish
CC BY-SA 4.0
2021-04-17T13:42:09.333Z
Doing both at the same time could have caused nothing to happen..
R.. GitHub STOP HELPING ICE
CC BY-SA 4.0
2021-04-18T04:40:19.217Z
thank you guyz... i think you are right... doing both at the same time caused nothing to happen.. .lol... i should have tried one by one.. i tried multiple configs about 50 times so i was frustrated... thank you all.
Raj
CC BY-SA 4.0
2021-04-18T05:59:20.150Z
The firmware configuration setup is incorrect with respect to your mechanical layout. You need to change the firmware or change the hardware to reflect the current configuration in firmware.
0scar
<marlin><diy-3d-printer><homing>
Prints are mirrored in X-axis and inverted in Y-axis direction
Raj
# Prints are mirrored in X-axis and inverted in Y-axis direction

(Asked by: username_0 on 2021-04-17)

My custom 3D printer prints everything inverted. I guess this is a homing problem as the motor moves in correct direction.
In Pronterface,

if I press -Y — bed moves forward (towards the Y endstop)
if I press +Y — bed moves backward (away from Y endstop)
if I press -X — hotend moves left (towards the X endstop)
if I press +X — hotend moves right (away from the X endstop)

on RAMPS 1.4:

X endstop is connected on the 1st pin
Y endstop is connected on the 3rd pin
Z endstop is connected on the 5th pin

(Pin 2, 4 & 6 are not used (are these for MAX_ENDSTOP ?))
Below is my Marlin config
#define X_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe.

#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

#define INVERT_X_DIR false
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false

I have attached 3 photographs.

Shows the Home position of hotend. Y Motor on back and Y endstop at front.



Shows inverted print.



Pronterface screenshot (shows actual G-code file)


I tried flipping the motor cables, but that inverts the motor direction
I also tried INVERT_Y_DIR true, but no luck.
Please help me. What am I doing wrong?

**Tags:** marlin, diy-3d-printer, homing
> **Comments:**
> **username_1**: it's odd that neither of the solutions works...  
> **username_2**: Doing both at the same time could have caused nothing to happen..  
> **username_0**: thank you guyz... i think you are right... doing both at the same time caused nothing to happen.. .lol... i should have tried one by one.. i tried multiple configs about 50 times so i was frustrated... thank you all.  
> **username_3**: The firmware configuration setup is incorrect with respect to your mechanical layout. You need to change the firmware or change the hardware to reflect the current configuration in firmware.  

---

## 2 answers

### Answer by username_4 on 2021-04-17. Score: 1 | Accepted answer

For most Cartesian printers, the homing position is at the front-left corner of the build plate. End-stop switches can be at either end of each axis (and even both), but the firmware must be configured accordingly.

A common arrangement is to have end-stop switches at X-min, Y-min and Z-min positions. You will see this on pretty much all budget printers, but things may be different on high-end machines. For the Y-axis on a cartesian machine, this mean placing the end-stop switch at the rear of the printer. A CoreXY machine on the other hand has the Y-min sensor on the front left corner.

So, unless your intentions were otherwise, you have simply got the Y-axis end-stop switch in the wrong position. For your design, it should be at the back of the printer, triggered by the bed in it's most backwards position. You will also need to reverse the direction of the Y-axis stepper motor, do that +Y moves the bed towards the operator (like you have it now).

If you want to have the end-stop switch at the front of the printer for some reason, you will need to re-configure the firmware accordingly - it is an Y-max sensor in that position!

> **Comments:**
> **username_3**: Sorry Mick, bit this answer is wrong, you can have the endstops at every side, so at the max or at the min position, as long as you tell the printer where the endstop is in firmware. What you actually mean is that generally the origin of the build plate is at the front-left, but this doesn't have to be the homing position. Please change the answer to state that for the current firmware setup your printer has the incorrect mechanical layout and reason from there that for the current firmware the OP needs to do some hardware changes.  
> **username_4**: @Oscar Thanks for the feedback. I have updated my answer. Hopefully, it addresses all of your points.  
> **username_1**: Clarified some things  
> **username_0**: @Mick ...  Y-max ... yes that's what i am looking for... as i have some design issue... i want to put the endstop at the front... thanks again.. but i think my bed is moving wrong way when clicking -Y or +Y button in pronterface... or that's correct behavior ?  
> **username_4**: It is outside my area of expertise, I'm afraid. We shall have to rely on @Trish's help.  
> **username_4**: Certainly, if you press -Y, the bed should move to the Y-min position (i.e. to the rear), and if you press +Y, the bed should move to the Y-max position (i.e. to the front).  
> **username_1**: Yes, -Y is backwards and +Y forwards  

---

### Answer by username_0 on 2021-04-18. Score: 1

Instead of changing firmware or changing the wiring, I flipped the motor direction. See the first photo below. Motor shaft was on the right side, now, the motor shaft is on left side, so the the bed moves backwards. I moved the Y endstop to back and now it prints fine.
only the problem is
In Pronterface,
if I press -Y -- bed moves backward (towards the Y endstop - new position)
if I press +Y -- bed moves forward (away from Y endstop - new position)

--- is this normal ?

> **Comments:**
> **username_1**: the endstop behavior says, that you have your endstop at Y=0, which is a fine way to do it.  

---

