Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Z position after Auto Bed Leveling (HOME is fine) #4612

Closed
silvio-didonna opened this issue Aug 12, 2016 · 127 comments
Closed

Incorrect Z position after Auto Bed Leveling (HOME is fine) #4612

silvio-didonna opened this issue Aug 12, 2016 · 127 comments
Labels
Bug: Potential ? Needs: Discussion Discussion is needed Needs: More Data We need more data in order to proceed

Comments

@silvio-didonna
Copy link
Contributor

silvio-didonna commented Aug 12, 2016

As title when i issue G28 all is ok. Test with paper passed (some friction).
after send G29 the nozzle is higher than it should be. The same paper pass freely between the nozzle and the bed.
I don't know if there is a problem with my config file but seems ok.

Step to reproduce:
-Home (from display or G28)
//////////////////////////////////////optional
-Move Z to 0
-Move X and Y to center with a paper between nozzle and bed (position is ok)
/////////////////////////////////////
-Auto bed leveling (from display or G29)
-Move Z to 0
-Move X and Y with a paper between nozzle and bed (position is too high)

Latest RCBugFix: @405afec
Printer: Prusa i3 Hephestos
Configuration.txt

PS: same behavior with RC7. OK with RC6.
PPS: EEPROM activated (restored, reloaded ecc). I've tried to increment the distance between the probe and the nozzle (both in configuration file and EEPROM) and when with G28 the nozzle scratch the paper (obviously), with G29 the paper pass without friction.

@silvio-didonna
Copy link
Contributor Author

I've just re-uploaded correct Configuration.txt in previous post.

@nicksears
Copy link

nicksears commented Aug 12, 2016

I think there's an issue with gri(d) bed leveling? Try without "#define AUTO_BED_LEVELING_GRID". Comment it out to use the 3 point leveling and also try G29 with and without v4 ("G29 v4"). I've had luck with that, but I'm still trying to track down the issue.

@Roxy-3D Roxy-3D changed the title Incorrect Z position after Auto Bed Leveling (HOME if fine) Incorrect Z position after Auto Bed Leveling (HOME is fine) Aug 13, 2016
@bgort
Copy link
Contributor

bgort commented Aug 13, 2016

FYI, this is being discussed in both #4577 and #4593 also.

@silvio-didonna
Copy link
Contributor Author

@bgort I know but I didn't see any solution to this.
I'll do a test with ABL debug enabled.

@bgort
Copy link
Contributor

bgort commented Aug 13, 2016

@tnw513 As far as I know, there isn't one yet. Was just letting you know in case you hadn't seen the others.

@silvio-didonna
Copy link
Contributor Author

@bgort Actually I had not seen one of the two :)

@MrExo3D
Copy link

MrExo3D commented Aug 14, 2016

running into a similar issue. using UBL, after doing calibration. once I start a print it starts over 1mm above bed, i end up compensating in my slicer

@aljscott
Copy link

I see something similar on my delta.
The probe is calibrate so that it triggers at the same height as the nozzle so the Z offset is 0.
Yet the debugging seems to return probe values of around 2.00
Then once the print starts the head is above the bed 2mm or so.
I have thought about adjusting the Z offset of the probe in marlin by 2mm.
But this doesn't seem like the right thing to do.

@Roxy-3D
Copy link
Member

Roxy-3D commented Aug 17, 2016

running into a similar issue. using UBL, after doing calibration. once I start a print it starts over 1mm above bed, i end up compensating in my slicer

Hmmmmm... We may need to add more debugging code to find where the problem is. I'm not seeing that issue. But I haven't been printing much the last week. I've been re-writing the mesh_buffer_line() routine to be faster.

The good news (on the UBL) side is if we have to add debug code to figure this out, it shouldn't take too long to find the problem. Can you get a set of steps that reliably duplicates the problem?

@MrExo3D
Copy link

MrExo3D commented Aug 17, 2016

not sure.. ive tried too much stuff and now am confused more then ever.
trying to compensate in my slicer isn't working.

im trying G29 Z to get an offset
im changing Probe offset in config h.
ive tried set home offset from the menu

only way i seem to be able to get the nozzle to the right height is using babystepping during the first layer.

I need to start from scratch
I know that my z probe offset from my nozzle -17mm

@Roxy-3D
Copy link
Member

Roxy-3D commented Aug 17, 2016

I had to create a new mesh a bunch of times while writing the software. Here is a shortcut: Put the nozzle in the center of the bed and let it grab 10 points. That is enough you should be able to start printing a Mesh Validation pattern. Verify you can get those 10 points dialed in and accurate. You can keep adding to the Mesh a whole bunch of different ways.

@nicksears
Copy link

For others with the issue, is it exactly 1 and 2 mm as you say? Or approximate? I'm definitely getting variation: 1.37, 1.35, 1.36. Usually clustered, making me think its based on the bed leveling plane, but can change significantly over time.

This is definitely not an issue in rc4 with my configuration. I'm going to pull a fresh copy of rc7 (is this any different than rcbugfix?) And make as few changes as necessary to see if that even works with auto bed leveling.

@MrExo3D
Copy link

MrExo3D commented Aug 17, 2016

I just started over. reflashed, M502, M500
Created new mesh, Filled extra points with a similar value
Ran G26 test print. and it was too close. then i did a I did a G29 Z offset 0f .9mm
did a test print. it wasnt perfect but it was printing..

when i did a test print of a file.. the nozzle was aprox 2mm over the surface
slicing has zero Z compensation.

@aljscott
Copy link

I'm not at home at the moment so I can't pasted any output.
If I "G29 V4"
I get values returned in the range ~ 2.01, 2.02
Seems like its 2mm + - the bed levelling???
There are also a few 0.00 around the edges that was raised as concern on another issue.
The probe and the nozzle are at the same level, and I observe them both just touching the bed.

Then went I print a file from an SD card it would end up ~2mm off the bed.
Pretty much what @adamfilip describes.
If I don't auto level I get a pretty good print with just the MANUAL_Z_HOME_POS that I've set.

@Roxy-3D
Copy link
Member

Roxy-3D commented Aug 17, 2016

(is this any different than rcbugfix?)

RC is just there as a historical point in time. It is when RCBugFix started getting fixes applied to it (for the current RC-#). You really want to be using RCBugFix.

@Roxy-3D
Copy link
Member

Roxy-3D commented Aug 17, 2016

Ran G26 test print. and it was too close. then i did a I did a G29 Z offset of .9mm
did a test print. it wasnt perfect but it was printing..

OK! That helps! Remember G29 Z is pretty much untested. If it can print... Can you do a G26 C P O2 and dial in 10 or 15 points? Does it start to print almost normal? And a G29 W will tell you all of the current important numbers that control the system.

@Roxy-3D
Copy link
Member

Roxy-3D commented Aug 17, 2016

@adamfilip I just had an idea. The big difference between what you and I have is this: I have my Z_PROBE_OFFSET_FROM_EXTRUDER set perfectly so I don't have a Z_OFFSET. Can you try to move towards what I have? I'm going to do the exact opposite. I'm going to deliberately move my Z_PROBE_OFFSET_FROM_EXTRUDER out of calibration and try to do what you are doing (correcting with Z_OFFSET).

@Blue-Marlin
Copy link
Contributor

Dear contributors to this thread.
As long as all of you are talking about different levelling systems and branches in one tread, there is no realistic chance to find a solution for any of you. Please be very clear about what you are talking about. Ideally in every message. Ideally in separate issues.
UBL
MBL
Grid levelling
Delta levelling

UBL-branch
RC7
RCBugFix
older branches

Please let's return here to RCBugFix, Grid levelling, different Z_PROBE_OFFSET_FROM_EXTRUDER for G28 and G29.

@silvio-didonna
Copy link
Contributor Author

silvio-didonna commented Aug 17, 2016

With ABL (no UBL :-) ) and RCBugFix.
this matrix seems fine (for "3-point" mode as asked)?

Bed Level Correction Matrix:
+0.999999 +0.000000 +0.001470 
-0.000002 +0.999999 +0.001586 
-0.001470 -0.001586 +0.999998 
X:182.02 Y:128.02 Z:14.92 E:0.00 Count X: 14560 Y:10240 Z:61575

Seems that my probe is working fine:

M48 E V4 L8: Standard Deviation: 0.009595
M48 X 100 Y 100: Standard Deviation: 0.003785
M48 X 100 Y 100 E: Standard Deviation: 0.004267

@Blue-Marlin
Copy link
Contributor

@tnw513
No. The rotation matrix should be perfectly symmetrical along the [0,0]-[n,n] diagonal. The -0.000002 looks wrong to me.

@silvio-didonna
Copy link
Contributor Author

silvio-didonna commented Aug 17, 2016

mmm... and what can I do to test?

I've done a test with DEBUG_LEVELING_FEATURE defined.
So
-RCBugFix
-Grid

EDIT: new log. RCBugFix as of today:
log08172016.txt

and

>>> G29 v4
SENDING:G29 V4
G29 Auto Bed Leveling
Bed X: 190.000 Y: 25.000 Z: 9.851
Bed X: 10.000 Y: 25.000 Z: 9.617
Bed X: 10.000 Y: 160.000 Z: 9.842
Bed X: 190.000 Y: 160.000 Z: 10.136
Eqn coefficients: a: 0.00146388 b: 0.00188704 d: 9.54043579
Mean of sampled points: 9.86137580
Bed Height Topography:
   +--- BACK --+
   |           |
 L |    (+)    | R
 E |           | I
 F | (-) N (+) | G
 T |           | H
   |    (-)    | T
   |           |
   O-- FRONT --+
 (0,0)
 -0.01938 +0.27413
 -0.24413 -0.01062
Corrected Bed Height vs. Bed Topology:
 +0.00000 +0.03000
 +0.03000 +0.00000
Bed Level Correction Matrix:
+0.999999 +0.000000 +0.001464
-0.000003 +0.999998 +0.001887
-0.001464 -0.001887 +0.999997
sending:G29 V4G29 Auto Bed LevelingBed X: 190.000 Y: 25.000 Z: 9.851Bed X: 10.000 Y: 25.000 Z: 9.617Bed X: 10.000 Y: 160.000 Z: 9.842Bed X: 190.000 Y: 160.000 Z: 10.136Eqn coefficients: a: 0.00146388 b: 0.00188704 d: 9.54043579Mean of sampled points: 9.86137580Bed Height Topography:   +--- BACK --+   |           | L |    (+)    | R E |           | I F | (-) N (+) | G T |           | H   |    (-)    | T   |           |   O-- FRONT --+ (0,0) -0.01938 +0.27413 -0.24413 -0.01062Corrected Bed Height vs. Bed Topology: +0.00000 +0.03000 +0.03000 +0.00000Bed Level Correction Matrix:+0.999999 +0.000000 +0.001464-0.000003 +0.999998 +0.001887-0.001464 -0.001887 +0.999997

and after G29 head is at exactly 0.5mm over the bed.

@Blue-Marlin
Copy link
Contributor

In MarlinMain.cpp please add:

@@ -2259,11 +2259,14 @@ static void clean_up_after_endstop_or_probe_move() {
             DEBUG_POS(">>> set_bed_level_equation_lsq", current_position);
           }
         #endif

         vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1);
+        planeNormal.debug("plane_Normal");
+        planner.bed_level_matrix.debug("identity?");
         planner.bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
+        planner.bed_level_matrix.debug("directly after create_look_at");

         vector_3 corrected_position = planner.adjusted_position();
         current_position[X_AXIS] = corrected_position.x;
         current_position[Y_AXIS] = corrected_position.y;
         current_position[Z_AXIS] = corrected_position.z;

And repeat the test you made the log with - but with G29 V4 to get more intermediate results.

@Blue-Marlin
Copy link
Contributor

Blue-Marlin commented Aug 17, 2016

Example output:

14:04:27.616 : Bed X: 190.000 Y: 189.000 Z: 0.529
14:04:27.616 : <<< probe_pt
14:04:27.620 : current_position=(190.00, 139.00, 5.00) : set_probe_deployed
14:04:27.620 : deploy: 0
14:04:27.620 : do_probe_raise(15.00)
14:04:27.623 : >>> do_blocking_move_to(190.00, 139.00, 15.00)
14:04:28.402 : echo:busy: processing
14:04:30.400 : echo:busy: processing
14:04:30.794 : >>> do_blocking_move_to(190.00, 139.00, 15.00)
14:04:30.798 : current_position=(190.00, 139.00, 15.00) : clean_up_after_endstop_or_probe_move
14:04:30.798 : current_position=(190.00, 139.00, 15.00) : > probing complete
14:04:30.810 : Eqn coefficients: a: -0.00026620 b: -0.00013527 d: 0.65249114
14:04:30.810 : Mean of sampled points: 0.60963892
14:04:30.814 : uncorrected_position=(190.00, 139.00, 15.00) : >>> set_bed_level_equation_lsq
14:04:30.818 : current_position=(190.00, 139.00, 15.00) : >>> set_bed_level_equation_lsq
14:04:30.818 : plane_Normal x: 0.000266 y: 0.000135 z: 1.000000
14:04:30.818 : identity?
14:04:30.822 : +1.000000 +0.000000 +0.000000
14:04:30.822 : +0.000000 +1.000000 +0.000000
14:04:30.823 : +0.000000 +0.000000 +1.000000
14:04:30.827 : directly after create_look_at
14:04:30.827 : +1.000000 +0.000000 -0.000266
14:04:30.827 : -0.000000 +1.000000 -0.000135
14:04:30.831 : +0.000266 +0.000135 +1.000000
14:04:30.831 : corrected_position=(189.99, 138.99, 15.07) : <<< set_bed_level_equation_lsq
14:04:30.835 : current_position=(189.99, 138.99, 15.07) : sync_plan_position
14:04:30.835 : Bed Height Topography:
14:04:30.835 : +--- BACK --+
14:04:30.839 : |           |
14:04:30.839 : L |    (+)    | R
14:04:30.839 : E |           | I
14:04:30.839 : F | (-) N (+) | G
14:04:30.839 : T |           | H
14:04:30.843 : |    (-)    | T
14:04:30.843 : |           |
14:04:30.843 : O-- FRONT --+
14:04:30.843 : (0,0)
14:04:30.843 : +0.05736 +0.00486 -0.08089
14:04:30.847 : +0.03061 -0.01889 -0.03039
14:04:30.847 : -0.00214 -0.01389 +0.05336
14:04:30.851 : Corrected Bed Height vs. Bed Topology:
14:04:30.851 : +0.09033 +0.06179 +0.00000
14:04:30.855 : +0.05425 +0.02871 +0.04117
14:04:30.855 : +0.01217 +0.02437 +0.11558
14:04:30.855 : Bed Level Correction Matrix:
14:04:30.859 : +1.000000 +0.000000 -0.000266
14:04:30.859 : -0.000000 +1.000000 -0.000135
14:04:30.859 : +0.000266 +0.000135 +1.000000

If

14:04:30.827 : directly after create_look_at
14:04:30.827 : +1.000000 +0.000000 -0.000266
14:04:30.827 : -0.000000 +1.000000 -0.000135
14:04:30.831 : +0.000266 +0.000135 +1.000000

is not symetrc we have numerical problems in the calculation of the matrix from the normal. That would be not very nice but a thing we probably have to live with.
If

14:04:30.827 : directly after create_look_at
14:04:30.827 : +1.000000 +0.000000 -0.000266
14:04:30.827 : -0.000000 +1.000000 -0.000135
14:04:30.831 : +0.000266 +0.000135 +1.000000

!=

14:04:30.855 : Bed Level Correction Matrix:
14:04:30.859 : +1.000000 +0.000000 -0.000266
14:04:30.859 : -0.000000 +1.000000 -0.000135
14:04:30.859 : +0.000266 +0.000135 +1.000000

something is altering the matrix. Hard to find.

@MrExo3D
Copy link

MrExo3D commented Aug 17, 2016

@Roxy-3D

I just had an idea. The big difference between what you and I have is this: I have my Z_PROBE_OFFSET_FROM_EXTRUDER set perfectly so I don't have a Z_OFFSET. Can you try to move towards what I have? I'm going to do the exact opposite. I'm going to deliberately move my Z_PROBE_OFFSET_FROM_EXTRUDER out of calibration and try to do what you are doing (correcting with Z_OFFSET).

When I started over my Z Probe offset from extruder is set to the correct amount of -17mm and my Z offset was Zero. but then i needed to add Z offset .9mm

so Im adding the .9mm to my -17 to get -16.1 for my Z_PROBE_OFFSET_FROM_EXTRUDER
and Z_OFFSET is 0

@Roxy-3D
Copy link
Member

Roxy-3D commented Aug 17, 2016

Please let's return here to RCBugFix, Grid levelling, different Z_PROBE_OFFSET_FROM_EXTRUDER for G28 and G29.

I understand who has what... But I agree. @adamfilip let's start a separate thread for UBL Z_OFFSET issues. Otherwise, we are going to confuse everybody.

Here is one more thing you are doing differently than me. You are actually measuring things, and trying to plug in numbers. In theory, that should work just fine. But the way I operate is I've always looked at what the error was, and corrected most of it, but always made sure I would not drive the nozzle into the glass. So, it takes me 3 or 4 tries to get the nozzle's Z_OFFSET_FROM_EXTRUDER exactly correct. But it is perfect after those 3 or 4 iterations.

The reason I'm mentioning it is this: With the Z-Fade-Height active, it is possible there is a disconnect and either too much or too little Z-Height compensation is being done. And that compensation is going to change based on how much you are tying to correct.

Please try 3 or 4 (or 7) iterations to get Z_OFFSET_FROM_EXTRUDER set perfectly. And try to do it on a place on the bed where you know things are relatively flat. And don't forget to do a M502 and M500 each cycle (I always forget to do that!!!)

Mean while... I'm going to start setting up to go the opposite route and see what I find.

@silvio-didonna
Copy link
Contributor Author

@Blue-Marlin

New log:
log08172016-2.txt

Matrix seems non altered.
But it is not symmetric.

@Blue-Marlin
Copy link
Contributor

@tnw513

and after G29 head is at exactly 0.5mm over the bed.

The position after G29 (grid/3point) is mostly determined by your settings for Z_PROBE_DEPLOY_HEIGHT, Z_PROBE_TRAVEL_HEIGHT, Z_HOMING_HEIGHT.

To make a valid statement about the levelling, measure after G1 Z0 and also tell the related x/y coordinates.

@silvio-didonna
Copy link
Contributor Author

silvio-didonna commented Aug 17, 2016

@Blue-Marlin Sure.
After G1 Z0 there are 0.5mm under the nozzle.
X=100 and Y=100.
Same behavior for X=107.5 and Y=97.5 (center).

In addition I've disabled min software endstop and I can go down until -0.5mm (nozzle is touching standard paper 0.1mm) on z axis.

I've the following value defined:
#define Z_PROBE_DEPLOY_HEIGHT 15
#define Z_PROBE_TRAVEL_HEIGHT 15
//#define Z_HOMING_HEIGHT 4 //(commented)

Even with Z_HOMING_HEIGHT undefined Z will go up before home (probably in order to deploy z probe).

@Roxy-3D
Copy link
Member

Roxy-3D commented Aug 17, 2016

@Blue-Marlin

No. The rotation matrix should be perfectly symmetrical along the [0,0]-[n,n] diagonal. The -0.000002 looks wrong to me.

This is a little bit fuzzy for me to talk about. I don't remember all of the details. But I looked at this 3 or 4 months ago. I believe the non-symmetry is coming from the fact we don't have an .inverse() method to modify a matrix. Instead, in set_bed_level_equation_lsq() we use .create_look_at() to give us the correction matrix.

The problem is, it does not assume the ability to create an inverse matrix to do its math. I think I remember it approximates the solution. The y_row is not even scaled an appropriate amount to compensate for the scaling of the x_row (and the non-scaling of the z_row). As a first level correction, it might make sense to calculate the y_row to get the y entry, but then use the x and z rows to fill in values to force the symmetry.

And some extra reading I did at that time to understand things: stackoverflow.com/questions/349050/calculating-a-lookat-matrix

Note all the comments about 'inverse' and 'inversion' of a matrix. If I remember right, I finished with the opinion that create_look_at() is not exactly correct. But it is a reasonable approximation.

matrix_3x3 matrix_3x3::create_look_at(vector_3 target) {
  vector_3 z_row = target.get_normal();
  vector_3 x_row = vector_3(1, 0, -target.x / target.z).get_normal();
  vector_3 y_row = vector_3::cross(z_row, x_row).get_normal();
  matrix_3x3 rot = matrix_3x3::create_from_rows(x_row, y_row, z_row);
  return rot;
}

@thinkyhead
Copy link
Member

thinkyhead commented Feb 12, 2017

@ProffesorD Your bed seems to be too warped to produce a good flat matrix. Try using AUTO_BED_LEVELING_BILINEAR and see if you get better results.

@ProffesorD
Copy link

You are correct... I figured it out (had to dig out a straight edge). Even bilinear has a tough time. New bed ordered. Thanks again

@oderwat
Copy link
Contributor

oderwat commented Feb 14, 2017

I am now advising people to z-offset like this:

M851 Z0 ; reset a previous offset
G28 ; just for the printer to have coordinates
G1 X110 Y110 ; nozzle into center (on my bed)
; nozzle tip onto bed
G92 Z0 ; tell printer this is z = 0
G30 X110 Y110 ; read out Bed:Z .. this is where the sensor triggers
M851 Z-Bed:Z ; store Bed:Z negated
M500 ; store everything into the eeprom

This way you probe in the same point where the nozzle is. That helped some guys to get a better Z-offset when their bed is tilt. But if the angle between nozzle and sensor trigger moves with the X axis there is nothing you can really do besides of stopping to use "auto-level" and simply level manually but still using z-probing for easier overall setup.

@ProffesorD
Copy link

Good tip, G92 would definately save some trial and error with m851. Also, I found that I had to set the Z offset AFTER bed leveling procedure. Not every time, but definately on the first setup I found the G29 would mess up my offset.

@GesaP
Copy link

GesaP commented Feb 18, 2017

Hello,
I have similar problem.
I am using Kossel XL delta printer (RAMPS 1.4) with Marlin RC8
(specifically configured for this printer, downloaded from the Anycubic Google Drive https://drive.google.com/open?id=0B8VIB533cgdMSVMxNm43aG1OQ0U)
configured with BLTouch Z probe.

G29 probes like it should, but offset is wrong afterwards, even at 0,0 (midpoint in round bed) and even if the nozzle was perfectly leveled on this point before.
Pretty much like the problem of OP.
G30 probes single point but also does not correct Z0.

Have put log of G29 into gnuplot to see if probe measurements are way off, but
seems to correctly display my bed (the extreme one in the corner was a clamp in the way and printer thought it was way more down because of motor grinding)
some slight bending going on but mostly a tilt.
http://plotshare.com/sessions/921918436/Plot1.png

Have tried to put EEPROM on, off, deleted, reloaded multiple times.

Rotated the bed.

G29 gives also deviations across multiple measurements, but not always on all points, of up to 0.3.
BLTouch seems tightly secured.

@oderwat
Copy link
Contributor

oderwat commented Feb 18, 2017

@GesaP what kind of leveling are you using and are those values in the plotting mm, like +/- 2mm? That would be a lot. I would suggest you level the bed first manually and try again. You may also try to switch the leveling method. I wonder if there is a bug with leveling in a way that the G28 probing Z0 gets overridden by G29. Probably the whole G29 calculation should be normalised by the difference at the point where Z0 was taken. Or... G29 should "fail" if it is off by some amount.

@GesaP
Copy link

GesaP commented Feb 18, 2017

Hi oderwat, thanks for your reply.
I am using AUTO_BED_LEVELING_BILINEAR with the ABL_BILINEAR_SUBDIVISION turned on, but also turned off it doesn't change bad results.
If I try to switch on the other methods AUTO_BED_LEVELING_3POINT or
AUTO_BED_LEVELING_LINEAR, it won't compile because then Arduino says delta can only have bilinear.

Yes, the results in the plot are mm. Do you mean by "manually" to tilt the bed until it is somewhat accurate/turn the leveling screws or to do G30 and then M851 on every point?

And yes, my fixed delta height configured in the firmware gets overridden, but isn't that normal with the results of G29 stored in EEPROM? But my knowledge of how the printer stores the leveling results is limited (and they can't be accessed via M501).
It seems like a good idea to keep the G28 value included in the G29.

Just downloading the latest bugfix, can I just copy+paste all the files and migrate my config.h and config-adv.h changes? Maybe this will change things, though in the description it only says it fixed MBL.

@GesaP
Copy link

GesaP commented Feb 21, 2017

Used the latest bugfix now, still same behaviour.

@rhinorap
Copy link

rhinorap commented Feb 23, 2017

This is still an issue - i have had this for nearly a week, now with no reliable results.
with G29 z0 I get a better distance, but the correction rotation isn't enough, or is inverted....

prusa I3, rumba.

@Blisk
Copy link

Blisk commented Jul 24, 2018

I have the same issue with marlin 1.1.8

@DoneWorld
Copy link

I have the similar issue where it performs the auto bed levelling and if you get a piece of paper and check height it is fine but when you attempt to print it is approx 2-3mm off the bed, however this no longer is the issue when you turn off stealthchop and run the steppers noisy. works fine at that point. Just putting my problem out there, heck I even downloaded the latest version, changed my drivers over, recompiled and init the eprom and still exactly the same issue with bltouch 3.1 so I am at a loss but printing with noisy stepper motors.

@TravellingTechGuy
Copy link

Hi all.

I see this old thread is closed but people are still seeing the issue.

I have the same with my Ender 3 and Marlin 2.0.5.3

Anyone found a solution already?

@DoneWorld
Copy link

Yeah I found the Z-Offset issue is related to some sort of driver problems namely with stealth chop but not limited to that alone.

I originally had 2130 steppers and used the stepper drivers for those and in stealth chop it had the issue, I tried, with square wave, I tried with current settings (which made it better but still random issues), I tried with 0.9 deg steppers and 1.8 deg steppers and it was more obvious on 0.9 deg steppers, none the less anything I tried was still inaccurate with stealth chop mode on. (Finally found that S-Curve = off and Junction Deviation = off as well as Stealth Chop = off was the only way to get good performance and accurate prints and z-offset issues went away)

When I changed the stepper drivers to 5160's the problem went away, at this point I also noticed an issue that I had with the Hemera E3D direct drive unit went away, the Hemera use to click randomly at higher speeds making me think my maximum feed rate was lower than it is now, my printing of Nylon can be done at 120mm/s where as before the maximum was 80mm/s and printing of PLA can be done at 150mm/s where before maximum was 100mm/s so mathematically I gained 50% more performance with the new drivers that use a different driver set in the firmware.

Anyone who wants to challenge my finding can simply get those drivers and compare the two based on what I have placed above for information because I cant go back now as it put me out of action for 4 weeks chopping and changing.

The issue with S-Curve and Junction Deviation is a separate issue to the Z-Offset but two issues made it all that harder to work out.

Summary: 2130 Driver issue when using stealth chop and attempting maximum speeds increases problems and using stealth chop is impossible, this does not happen with 5160 drivers. Junction Deviation and S-Curve are separate issues to the inaccuracies of z-offset as those settings will mainly cause zitting issues and blobs on corners where speed changes on bends and hard corners effect the print quality and reverting back to original acceleration setting and classic jerk solve that issue and are not driver related.

@thinkyhead
Copy link
Member

Please test the bugfix-2.0.x branch to see where it stands. If the problem has been resolved then we can close this issue. If the issue isn't resolved yet, then we should investigate further.

@NeoMod
Copy link

NeoMod commented Jul 1, 2020

Same here. Tested latest bugfix-2.0.x branch, with TMC2209 (UART Mode) and BLTouch (Triangelab Clone, May 2020) the Z-Offset is completely wrong after a G29.

Tested the current scenarios, all failing at the end due to a wrong z-offset when print starts:

  • Stealthchop ON, Fade Leveling ON, Bilinear Bed Leveling
  • Stealthchop ON, Fade Leveling OFF, Bilinear Bed Leveling
  • Stealthchop OFF, Fade Leveling OFF, Bilinear Bed Leveling
  • Stealtchop ON, Unified Bed Leveling
  • Stealtchop OFF, Unified Bed Leveling

Various combinations of S-Curve and LinAdvance doesn't seem to afflict the problem, at least in my case.

While using Unified Bed Leveling I managed to "guess" by trial-and-error a usable value for Probe Z-Offset so that the first layer wasn't either printing in mid-air or scraping the bed. But of course, the value is completely wrong to what can be found with the proper calibration.

While using Biniliear Bed Leveling instead, the only thing that made a difference was the "fade at height" option: if it was enabled, the print started far away from the bed; when disabled, the nozzle scratched the bed during the first layer. Manually adjusting the Z-Offset via baby-stepping would lead to a successful print, but that should not be the case scenario when using a probe and a bed levelling system.

@TravellingTechGuy
Copy link

For what it is worth, I went back to 1.1.9 with this build below and don’t have the issue anymore on my Ender 3.

https://www.danbp.org/p/en/node/136

@thinkyhead
Copy link
Member

@NeoMod — It would be better to post a new issue. General issues like "leveling is weird" can be due to any number of bugs, not necessarily the same bug that was involved in this August 2016 issue.

@catalinbuica
Copy link

Had the same issue today with Marlin 2.06 on a Anet A8 after messing about with the capacitive sensor position.
Followed the Z probe offset calibration procedure and yet every print was roughly 0.5mm above the bed.
Turned out the sensor is pretty sensible to temp changes, do your G28, z probe offset and G29 with the bed and nozzle at print temperature (in my case 45 with 195 ). Problem solved !!!

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@Wpnx330
Copy link

Wpnx330 commented Jan 28, 2021

I had the same issue as OP.
Read a few other posts and came up with a fix that worked wonders for me.

My old Start G-Code I had:
G28 then G29 with RESTORE_LEVELING_AFTER_G28 in firmware
The result was the issues as described by OP.

My new Start Gcode is:
G28 Then G29 Then M500 Then G28
My Z height issue is resolved.

Theory behind this:
G28 always puts me into the right position, but G29 leaves me in the wrong position. Swapping them around works to set me into the proper place. However, G28 typically disables the use of the Mesh, unless the firmware has RESTORE_LEVELING_AFTER_G28 (Which I have set.) If you do not have that set in the firmware you could use M420 S1 after your final homing maneuver. I left in the initial G28 as the bed must be homed before performing G29. Yes, this process is a tad bit longer due to homing twice, but it is getting me by. I put a M500 in there, because I have seen many posts on various sites saying that G29 results are discarded if you do not save them.

For those interested, a Start Gcode without RESTORE_LEVELING_AFTER_G28:
G28 Then G29 Then M500 Then G28 Then M420 S1

@Wallby
Copy link

Wallby commented Feb 3, 2021

In my case it was fixed by tilting the bed a bit. I ran G29 V4 and one point was failing, causing the bed leveling to fail, which left my nozzle at the wrong height. It actually tried to go to "minus-two-ish", which is the distance it should go to (I think it tries to go to Z_PROBE_LOW_POINT, which is why it displays that value). However, when bed leveling fails, the Z value stays at the "minus-two-ish" value, and doesn't reset, causing the confusion in my case.

TL;DR:
I tried..
.. running G29 V4, and saw that the bed leveling failed.
.. adjusting the bed to be tilted differently.

@tekgamerpt
Copy link

My friend... You are a saviour...
I was strugling with bad offset height when printing after ABL and a simple G28 after G29 saved my life...

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug: Potential ? Needs: Discussion Discussion is needed Needs: More Data We need more data in order to proceed
Projects
None yet
Development

No branches or pull requests