<p>The issues you are facing can be caused typically by a defective X-axis endstop, an inverted logic of the X-axis endstop or a defective printer controller board. </p>

<p>When the X-axis endstop is reporting being triggered, it will not move. After "homing" it will only go to the right of the "home position".</p>

<p>There a couple of things to troubleshoot the X-axis endstop working:</p>

<ul>
<li>Command an <code>M119</code> command over a printer console or connect your printer over USB to a printer software application like PronterFace, OctoPrint, Repetier-Host, etc. and look at the reported endstop triggers; these should be triggered when the endstops are pressed. Issue the <code>M119</code> when you press the X endstop manually, if it reports "open" for X you need to invert the logic. If still triggered, the endstop is broken.</li>
<li>Swap the X-endstop for a any other endstop (Y or Z); then you can also check if the printer board is broken!</li>
</ul>

<hr>

<p>If it is the case to invert the polarity of the endstop, in the Marlin firmware Configuration.h, look up:</p>

<pre><code>// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
</code></pre>

<p>Change the boolean value of the endstop you'd like to invert.</p>

CC BY-SA 4.0
2020-04-03T09:12:12.740Z
You are right, the limit switch top is missing, can you tell me the revert instructions and then I will check for the board. I will and keep you posted, since it is very irritating to disassemble, i will take some time to update. Thank you, once again.
navya teja
CC BY-SA 4.0
2020-04-03T10:33:07.340Z
Oscar, I have a question, top one of the switch(one that makes 'click' sound) is missing, nothing of an electric component, I guess. Still x-axis should end up on it, right?
navya teja
CC BY-SA 4.0
2020-04-03T10:55:56.477Z
The click is the sound the switch makes internally, maybe you could add an image of the switch to the question? I do not fully understand what you mean by `the limit switch top is missing`. Is the metal lever missing? See [this question](/q/7591).
0scar
CC BY-SA 4.0
2020-04-03T11:10:44.817Z
Yes, the metal lever(phew!) is missing. Does the machine know that, even before moving along the x-axis>
navya teja
CC BY-SA 4.0
2020-04-03T12:18:12.827Z
The lever presses the small micro-switch, if it is missing, the switch will not be pressed (as it relies on the lever), but that is not an issue as your printer does not home on X the switch is broken and should be replaced. Just buy a new one, literally a few cents at th electrical electronics components store or any online alternative!
0scar
CC BY-SA 4.0
2020-04-04T02:08:45.993Z
Yes, would replacing be enough or do I have to invert the endstop polarity too?
navya teja
CC BY-SA 4.0
2020-04-04T02:14:49.387Z
Why I'm saying this, because, it's COVID-19 lock down in India till 14th of this month and it is said that it will extend till end of may or june, except for groceries and essentials, there will be no other online or local store for 'limit switch'. And my doubt is if the hardware component is missing does the motherboard and code know that beforehand? And can I use the end switch that is in the DVD player:-)
navya teja
CC BY-SA 4.0
2020-04-04T11:56:50.073Z
it's a silly question maybe.
navya teja
CC BY-SA 4.0
2020-04-03T09:04:47.110Z
2020-04-03T09:35:57.657Z
2020-04-03T09:35:57.657Z
0scar
<p>I realize this is an old post, but in the event someone is having a similar problem and this post turns up in a search....</p>
<p>All three axis-stop switches are normally closed, and go open when the axis carriage hits the little lever.  What this switch is doing is providing an easy low-resistance path to ground for the 3.3 (or 5) volt control card rail.  You have the rail feeding this circuit through a 10K resistor (or some other relatively high value resistor), then the path forks; one fork to the limit switch, the other through a 100 ohm resistor to the microprocessor pin that handles the stop input.  As long as that limit switch is closed and the circuit is good, the 3.3 volts goes through it to ground and the microprocessor never sees the 3.3 volts, the pin is &quot;LOW.&quot;  Once that switch is opened, the easy path to ground is removed, and the 3.3 volts goes to the microprocessor, and the pin goes &quot;HIGH.&quot;  If that switch or harness wiring has failed in a manner that opens that branch of the circuit, the card thinks the stop is <em>already</em> tripped, and won't allow motion towards the switch.</p>
<p>You can verify this easily enough by putting a meter on the two contacts in the Z-stop plug where it plugs into the control card (remove it from the card first so you aren't reading the <em>card</em> too.)  Using the continuity function (buzzer or just reading ohms), you should get straight continuity with the switch at rest, and it should go open (infinite ohms) when you push the lever.<br />
This checks both the switch <em>and</em> the harness wiring. If you don't see that state-change from continuity to open when you push the lever, go up to the switch itself and pull the wires off it, and read the switch pins directly with the meter.  Same deal, should read continuity when in the at rest state, and go open when you push the lever.  If it does, then the harness wiring is bad.  If not, the switch is junk or failing, soon to be junk.</p>
<p>A LOT of people have a LOT of trouble adding a BLTouch to their machines, with many reporting that the gantry won't go down no matter what they do short of turning the Z-screw(s) by hand.  This is a direct result of removing the Z-stop switch wiring and/or switch.  That easy route to ground was removed when the switch was disconnected/removed, and even worse, now the microprocessor has conflicting inputs as to the status of the Z axis, one input from the BLTouch telling it the Z-axis is untripped, and the missing switch is telling it that it's already tripped... therefore, no downward motion, only up.</p>
<p>To fix this you have to edit the firmware (configuration.h) in the section covering the state of the stop switches.  They are all defaulted to &quot;HIGH,&quot; meaning that if the microprocessor sees that voltage, it's tripped.  Remember, anything that opens that circuit makes the associated pin to high (including disconnecting the Z-stop wiring from the control board, OR removing the switch and mounting bracket completely.)  Doesn't seem to matter if you use the five-pin dedicated Z-probe socket for all five wires or put the black and white wires in the Z-stop socket and the other three in the Z-probe socket.  You have to change the &quot;tripped state&quot; of the Z-axis in firmware from &quot;HIGH&quot; to &quot;LOW,&quot; then build the new firmware and flash the control card with it.  I beat my head against that BLTouch for nearly four months before I stumbled across this little factoid that nobody else was talking about (not anywhere <em>I</em> was looking, anyway, which was pretty much everywhere.)</p>
<p>Schematics are a HUGE help (for some things) if you can read them!</p>

CC BY-SA 4.0
2024-02-03T16:11:42.190Z
Sorry, I might be reading the answer complete wrong, but to me this reads as this is an AI generated answer. Please comment if (a) if it is AI generated, and (b) why did you mention the BLTouch, when the OP doesn't have one (no G29), not configured if you look into the configuration.h linked in the question. This doesn't really answer the question.
0scar
CC BY-SA 4.0
2024-02-02T19:29:25.143Z
2024-02-03T16:14:17.923Z
2024-02-03T16:14:17.923Z
Karl10
<p>I bought an Ender 3 recently. Auto-home is on the right front moving away from the end stop. I did reverse the wiring of the X axis motor, it did not work. I had Marlin 2.x uploaded, it didn't work too.</p>
<p>Marlin 2.x:</p>
<ul>
<li><a href="https://pastebin.com/gfKKgHin" rel="nofollow noreferrer">Configuration.h</a></li>
<li><a href="https://pastebin.com/amyfeTQ1" rel="nofollow noreferrer">Configuration_adv.h</a></li>
</ul>
<p>The print starts off with a boundary line in the middle and goes off the bed on the right corner to print. Y and Z axes are fine. X axis seems to be bumping into the right front, every time while homing. I had tweaked little bit of Marlin, but I'm a beginner and I don't understand it completely.</p>
<p>I'm using Cura, printer settings, max X=235, max Y=235, max Z=250, origin at the center: unchecked.</p>
<p>This might help...</p>
<pre><code>// The size of the print bed
#define X_BED_SIZE 235
#define Y_BED_SIZE 235


#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 250


#define MANUAL_X_HOME_POS 0
#define MANUAL_Y_HOME_POS 0
#define MANUAL_Z_HOME_POS 0
</code></pre>
<p>(left this after so many trails)</p>
<p>In Pronterface the mid point X117.5 is at the middle right corner.</p>
<p>I'm thinking the printer is behaving like the origin(0,0) is on the right front, for X at least and it has nothing to do with the slicer.</p>
<p>It's about centering the prints, but it doesn't print on the bed mostly.</p>
<hr />
<p>Start G-code:</p>
<pre><code>; Ender 3 Custom Start G-code 
G92 E0 ; Reset Extruder 
G28 ; Home all axes 
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed 
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position 
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line 
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little 
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line 
G92 E0 ; Reset Extruder 
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed 
G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish
</code></pre>
<p>End G-code:</p>
<pre><code>G91 ;Relative positioning 
G1 E-2 F2700 ;Retract a bit 
G1 E-2 Z0.2 F2400 ;Retract and raise Z 
G1 X5 Y5 F3000 ;Wipe out 
G1 Z10 ;Raise Z more 
G90 ;Absolute positionning 
G1 X0 Y{machine_depth} ;Present print 
M106 S0 ;Turn-off fan 
M104 S0 ;Turn-off hotend 
M140 S0 ;Turn-off bed 
M84 X Y E ;Disable all steppers but Z
</code></pre>

<homing><x-axis><print-axis-offset>
Creality Ender 3 X axis homing issue
navya teja
# Creality Ender 3 X axis homing issue

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

I bought an Ender 3 recently. Auto-home is on the right front moving away from the end stop. I did reverse the wiring of the X axis motor, it did not work. I had Marlin 2.x uploaded, it didn't work too.
Marlin 2.x:

Configuration.h
Configuration_adv.h

The print starts off with a boundary line in the middle and goes off the bed on the right corner to print. Y and Z axes are fine. X axis seems to be bumping into the right front, every time while homing. I had tweaked little bit of Marlin, but I'm a beginner and I don't understand it completely.
I'm using Cura, printer settings, max X=235, max Y=235, max Z=250, origin at the center: unchecked.
This might help...
// The size of the print bed
#define X_BED_SIZE 235
#define Y_BED_SIZE 235


#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 250


#define MANUAL_X_HOME_POS 0
#define MANUAL_Y_HOME_POS 0
#define MANUAL_Z_HOME_POS 0

(left this after so many trails)
In Pronterface the mid point X117.5 is at the middle right corner.
I'm thinking the printer is behaving like the origin(0,0) is on the right front, for X at least and it has nothing to do with the slicer.
It's about centering the prints, but it doesn't print on the bed mostly.

Start G-code:
; Ender 3 Custom Start G-code 
G92 E0 ; Reset Extruder 
G28 ; Home all axes 
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed 
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position 
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line 
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little 
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line 
G92 E0 ; Reset Extruder 
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed 
G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish

End G-code:
G91 ;Relative positioning 
G1 E-2 F2700 ;Retract a bit 
G1 E-2 Z0.2 F2400 ;Retract and raise Z 
G1 X5 Y5 F3000 ;Wipe out 
G1 Z10 ;Raise Z more 
G90 ;Absolute positionning 
G1 X0 Y{machine_depth} ;Present print 
M106 S0 ;Turn-off fan 
M104 S0 ;Turn-off hotend 
M140 S0 ;Turn-off bed 
M84 X Y E ;Disable all steppers but Z

**Tags:** homing, x-axis, print-axis-offset

---

## 2 answers

### Answer by username_1 on 2020-04-03. Score: 1 | Accepted answer

The issues you are facing can be caused typically by a defective X-axis endstop, an inverted logic of the X-axis endstop or a defective printer controller board. 
When the X-axis endstop is reporting being triggered, it will not move. After "homing" it will only go to the right of the "home position".
There a couple of things to troubleshoot the X-axis endstop working:

Command an M119 command over a printer console or connect your printer over USB to a printer software application like PronterFace, OctoPrint, Repetier-Host, etc. and look at the reported endstop triggers; these should be triggered when the endstops are pressed. Issue the M119 when you press the X endstop manually, if it reports "open" for X you need to invert the logic. If still triggered, the endstop is broken.
Swap the X-endstop for a any other endstop (Y or Z); then you can also check if the printer board is broken!


If it is the case to invert the polarity of the endstop, in the Marlin firmware Configuration.h, look up:
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.

Change the boolean value of the endstop you'd like to invert.

> **Comments:**
> **username_0**: You are right, the limit switch top is missing, can you tell me the revert instructions and then I will check for the board. I will and keep you posted, since it is very irritating to disassemble, i will take some time to update. Thank you, once again.  
> **username_0**: Oscar, I have a question, top one of the switch(one that makes 'click' sound) is missing, nothing of an electric component, I guess. Still x-axis should end up on it, right?  
> **username_1**: The click is the sound the switch makes internally, maybe you could add an image of the switch to the question? I do not fully understand what you mean by `the limit switch top is missing`. Is the metal lever missing? See [this question](/q/7591).  
> **username_0**: Yes, the metal lever(phew!) is missing. Does the machine know that, even before moving along the x-axis>  
> **username_1**: The lever presses the small micro-switch, if it is missing, the switch will not be pressed (as it relies on the lever), but that is not an issue as your printer does not home on X the switch is broken and should be replaced. Just buy a new one, literally a few cents at th electrical electronics components store or any online alternative!  
> **username_0**: Yes, would replacing be enough or do I have to invert the endstop polarity too?  
> **username_0**: Why I'm saying this, because, it's COVID-19 lock down in India till 14th of this month and it is said that it will extend till end of may or june, except for groceries and essentials, there will be no other online or local store for 'limit switch'. And my doubt is if the hardware component is missing does the motherboard and code know that beforehand? And can I use the end switch that is in the DVD player:-)  
> **username_0**: it's a silly question maybe.  

---

### Answer by username_2 on 2024-02-02. Score: -1

I realize this is an old post, but in the event someone is having a similar problem and this post turns up in a search....

All three axis-stop switches are normally closed, and go open when the axis carriage hits the little lever. What this switch is doing is providing an easy low-resistance path to ground for the 3.3 (or 5) volt control card rail. You have the rail feeding this circuit through a 10K resistor (or some other relatively high value resistor), then the path forks; one fork to the limit switch, the other through a 100 ohm resistor to the microprocessor pin that handles the stop input. As long as that limit switch is closed and the circuit is good, the 3.3 volts goes through it to ground and the microprocessor never sees the 3.3 volts, the pin is "LOW." Once that switch is opened, the easy path to ground is removed, and the 3.3 volts goes to the microprocessor, and the pin goes "HIGH." If that switch or harness wiring has failed in a manner that opens that branch of the circuit, the card thinks the stop is *already* tripped, and won't allow motion towards the switch.

You can verify this easily enough by putting a meter on the two contacts in the Z-stop plug where it plugs into the control card (remove it from the card first so you aren't reading the *card* too.) Using the continuity function (buzzer or just reading ohms), you should get straight continuity with the switch at rest, and it should go open (infinite ohms) when you push the lever.  
This checks both the switch *and* the harness wiring. If you don't see that state-change from continuity to open when you push the lever, go up to the switch itself and pull the wires off it, and read the switch pins directly with the meter. Same deal, should read continuity when in the at rest state, and go open when you push the lever. If it does, then the harness wiring is bad. If not, the switch is junk or failing, soon to be junk.

A LOT of people have a LOT of trouble adding a BLTouch to their machines, with many reporting that the gantry won't go down no matter what they do short of turning the Z-screw(s) by hand. This is a direct result of removing the Z-stop switch wiring and/or switch. That easy route to ground was removed when the switch was disconnected/removed, and even worse, now the microprocessor has conflicting inputs as to the status of the Z axis, one input from the BLTouch telling it the Z-axis is untripped, and the missing switch is telling it that it's already tripped... therefore, no downward motion, only up.

To fix this you have to edit the firmware (configuration.h) in the section covering the state of the stop switches. They are all defaulted to "HIGH," meaning that if the microprocessor sees that voltage, it's tripped. Remember, anything that opens that circuit makes the associated pin to high (including disconnecting the Z-stop wiring from the control board, OR removing the switch and mounting bracket completely.) Doesn't seem to matter if you use the five-pin dedicated Z-probe socket for all five wires or put the black and white wires in the Z-stop socket and the other three in the Z-probe socket. You have to change the "tripped state" of the Z-axis in firmware from "HIGH" to "LOW," then build the new firmware and flash the control card with it. I beat my head against that BLTouch for nearly four months before I stumbled across this little factoid that nobody else was talking about (not anywhere *I* was looking, anyway, which was pretty much everywhere.)

Schematics are a HUGE help (for some things) if you can read them!

> **Comments:**
> **username_1**: Sorry, I might be reading the answer complete wrong, but to me this reads as this is an AI generated answer. Please comment if (a) if it is AI generated, and (b) why did you mention the BLTouch, when the OP doesn't have one (no G29), not configured if you look into the configuration.h linked in the question. This doesn't really answer the question.  

---

