<p>I have a DIY 3D printer with Marlin firmware. I use an LJ12A3-4-Z/BY sensor for the Z probe. Recently I have had a ridiculous problem with Z homing.</p>
<p>In doing <strong>Z homing</strong>, it senses the bed, goes up, and stops, it doesn't go back to the bed...</p>
<p>In doing <strong>Bed leveling</strong>, it goes up without sensing the bed and in the next step goes even higher and higher.</p>
<p>If I ignore bed leveling, it starts printing in the air. If I still use bed leveling, the Z axis moves in long courses in every layer.</p>
<p>It looks like it is saving the wrong Z-axis position as home! These are some related settings that I think of:</p>
<pre><code>#define Z_PROBE_OFFSET_FROM_EXTRUDER 0.25   // Z offset: -below +above  [the nozzle]
</code></pre>
<p>and</p>
<pre><code>// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS -3
#define Y_MIN_POS -3
#define Z_MIN_POS 0
</code></pre>
<p>and</p>
<pre><code>// For M851 give a range for adjusting the Z probe offset
#define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX 20
</code></pre>

CC BY-SA 4.0
2021-09-12T20:03:17.527Z
What changed to have this happen? Did you change anything? Have you checked and replaced cables, remounted cables to the printer board?
0scar
CC BY-SA 4.0
2021-09-12T20:26:20.847Z
A few months ago sth in my power supply went wrong. It fried my MKS board and stepper drivers. I replaced them and I connected power supply earth to ground because I found some current leak in the Aluminum structure of the printer... I guess that was the reason it fried my board. Since then I have this problem randomly, sometimes. But now it is happening every time!
2012User
CC BY-SA 4.0
2021-09-13T08:09:58.907Z
So you have this issue since you swapped hardware, but now more frequently, did you replace the PSU and board (and stepper drivers). This does sound like a hardware failure, please check, replace and re-seat cables and connectors. Personally I would have bought another controller board and rewired the printer to be sure. This is most likely not a firmware issue.
0scar
CC BY-SA 4.0
2021-09-13T12:42:13.710Z
I replaced Board and drivers. didn't replace the PSU. It was happening frequently but it's been a while that happens every time and I can't print anything! still I'm not sure it is because of hardware failure only.
2012User
CC BY-SA 4.0
2021-09-13T16:43:06.273Z
I have a PNP proximity sensor with a 7805 regulator... inverted logic in marlin. Using M119 z probe is open before z homing, gets triggered after, even though sensor led is off. It keeps being triggered!!!
2012User
<diy-3d-printer><bed-leveling><z-axis><z-probe>
Z homing problem; starts printing in the air
2012User
# Z homing problem; starts printing in the air

(Asked by: username_0 on 2021-09-12)

I have a DIY 3D printer with Marlin firmware. I use an LJ12A3-4-Z/BY sensor for the Z probe. Recently I have had a ridiculous problem with Z homing.
In doing Z homing, it senses the bed, goes up, and stops, it doesn't go back to the bed...
In doing Bed leveling, it goes up without sensing the bed and in the next step goes even higher and higher.
If I ignore bed leveling, it starts printing in the air. If I still use bed leveling, the Z axis moves in long courses in every layer.
It looks like it is saving the wrong Z-axis position as home! These are some related settings that I think of:
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0.25   // Z offset: -below +above  [the nozzle]

and
// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS -3
#define Y_MIN_POS -3
#define Z_MIN_POS 0

and
// For M851 give a range for adjusting the Z probe offset
#define Z_PROBE_OFFSET_RANGE_MIN -20
#define Z_PROBE_OFFSET_RANGE_MAX 20

**Tags:** diy-3d-printer, bed-leveling, z-axis, z-probe
> **Comments:**
> **username_1**: What changed to have this happen? Did you change anything? Have you checked and replaced cables, remounted cables to the printer board?  
> **username_0**: A few months ago sth in my power supply went wrong. It fried my MKS board and stepper drivers. I replaced them and I connected power supply earth to ground because I found some current leak in the Aluminum structure of the printer... I guess that was the reason it fried my board. Since then I have this problem randomly, sometimes. But now it is happening every time!  
> **username_1**: So you have this issue since you swapped hardware, but now more frequently, did you replace the PSU and board (and stepper drivers). This does sound like a hardware failure, please check, replace and re-seat cables and connectors. Personally I would have bought another controller board and rewired the printer to be sure. This is most likely not a firmware issue.  
> **username_0**: I replaced Board and drivers. didn't replace the PSU. It was happening frequently but it's been a while that happens every time and I can't print anything! still I'm not sure it is because of hardware failure only.  
> **username_0**: I have a PNP proximity sensor with a 7805 regulator... inverted logic in marlin. Using M119 z probe is open before z homing, gets triggered after, even though sensor led is off. It keeps being triggered!!!  

---

## 0 answers

