# Prints are mirrored in X-axis and inverted in Y-axis direction

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.

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

1. Shows inverted print.

1. 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.

• it's odd that neither of the solutions works... Apr 17 at 12:19
• Doing both at the same time could have caused nothing to happen.. Apr 17 at 13:42
• 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
Apr 18 at 4:40
• 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
Apr 18 at 5:59

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!

• Thanks mick.... it worked... see picture below.
– Raj
Apr 18 at 4:21
• 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
Apr 18 at 5:20
• @Oscar Thanks for the feedback. I have updated my answer. Hopefully, it addresses all of your points.
– Mick
Apr 18 at 9:47
• Clarified some things Apr 18 at 10:09
• 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
Apr 18 at 10:58

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 ?


• the endstop behavior says, that you have your endstop at Y=0, which is a fine way to do it. Apr 18 at 6:43