z-offset increasing 3mm on every subsequent calibration



  • I found this older thread on the same topic: https://forum.duet3d.com/topic/7607/z-offset-increasing-after-a-print/10

    After every calibration of the z-offset, the offset increases with 0.3mm. I reboot between settingschanges, but only cutting the power to the printer allows me back to have the initial (correct) value for the z-offset). I suspect this issue also affects subsequent prints, as a second print fails more often than a first.

    Firmware Name: RepRapFirmware for Duet 2 WiFi/Ethernet
    Firmware Electronics: Duet Ethernet 1.02 or later
    Firmware Version: 2.03 (2019-06-13b2)
    Web Interface Version: 1.22.6

    My Z-probe is a bltouch... no idea where to start looking



  • @vj said in z-offset increasing 3mm on every subsequent calibration:

    My Z-probe is a bltouch... no idea where to start looking

    by posting your all your configuration and homing files



  • I dumped the entire sysfolder into a zip file here: https://drive.google.com/open?id=1__yCyD3UbG1hOE54KUNkAppYJNVAUjkl

    The config files were all generated using the web-configurator and not modified (apart from the z-offset). Printer is a CoreXY (Ratrig kit) with dual Z-motors (same channel, no automatic leveling). All motors are 0.9Β°.



  • Hi JΓΆrg!

    Much better to chat here instead of FB. I'm allergic to it. πŸ˜‰
    Looking at your files now...



  • Yeah, as I suspected, the way you have things set up, if the Z axis steppers don't stay in sync, you have no way of correcting that.
    That's not going to help, particularly when your Z homing is performed at the front left of the bed with a single probe.

    You need to separate the two Z motors and drive one from the Z output and the other from the E1 output. Then, you can use your probe to probe the bed next to each lead screw and automatically remove any tilt.

    Looking at your config.g, 800mA drive current for the motors seems a little low. I know you said the motors are 0.9 degree ones, but what is the rated current for your motors?



  • You are right about the 800mA; the motors are these: https://e3d-online.com/motors-high-torque-motor ; probably a setting I forgot to adjust when redoing configurations over and over (I redid the configs quite often πŸ™‚ )...

    But... how do unsynced z-axis steppers affect the z-offset of the probe and the hotend?

    Still, if there is something with the z-steppers it also needs to be fixed... I was hoping to keep the E1 available to later go to dual extrusion... so there is no way to do that it would work without resorting to using E1? I mean, when I put a level on the bed and move it repeatedly up and down, the level keeps showing center. I know a level is not as accurate as probing, but it seems ok.



  • post the start of a g code file that you have printed



  • This is a small file I printed today. It was a very small object (probably too small to have the detail using a 0.6 nozzle, but taking that into account it looks quite good. It was the racecar from here ( https://www.thingiverse.com/thing:3336875 ), sliced using Cura. Bottom layers seems to have been a bit too high from the bed, and the wheels don't spin (but it is my first in-place print). All files I printed I sliced with Cura, with similar settings (fine or normal, only changing the amount of infill and the skirt/brim).

    ;FLAVOR:RepRap
    ;TIME:878
    ;Filament used: 0.341947m
    ;Layer height: 0.1
    ;MINX:121.343
    ;MINY:128.326
    ;MINZ:0.3
    ;MAXX:159.796
    ;MAXY:151.668
    ;MAXZ:9.8
    ;Generated with Cura_SteamEngine 4.2.1
    T0
    M190 S60
    M104 S210
    M109 S210
    M82 ;absolute extrusion mode
    G28 ;Home
    G1 Z15.0 F6000 ;Move the platform down 15mm
    ;Prime the extruder
    G92 E0
    G1 F200 E3
    G92 E0
    M141 S28
    M83 ;relative extrusion mode
    G1 F1500 E-6.5
    ;LAYER_COUNT:96
    ;LAYER:0
    M107
    G0 F3600 X125.095 Y135.357 Z0.3
    ;TYPE:SKIRT
    G1 F1500 E6.5
    G1 F1800 X125.658 Y134.88 E0.03681
    G1 X126.172 Y134.485 E0.03234
    G1 X126.903 Y133.987 E0.04413
    ....



  • Just in case, this is the end of the file:

    ...
    G0 F7200 X150.825 Y137.674
    G1 F1800 X149.978 Y138.521 E0.01992
    G1 X149.908 Y138.591
    ;TIME_ELAPSED:878.734137
    G1 F1500 E-6.5
    M140 S0
    M141 S0
    M82 ;absolute extrusion mode
    M107
    M104 S0
    M140 S0
    ;Retract the filament
    G92 E1
    G1 E-1 F300
    G28 X0 Y0
    M84
    M83 ;relative extrusion mode
    M104 S0
    ;End of Gcode
    ;SETTING_3 {"extruder_quality": ["[general]\nversion = 4\nname = Fine #2\ndef
    ;SETTING_3 inition = fdmprinter\n\n[metadata]\ntype = quality_changes\nsetti
    ;SETTING_3 ng_version = 8\nquality_type = normal\nposition = 0\n\n[values]\
    ;SETTING_3 n\n", "[general]\nversion = 4\nname = Fine #2\ndefinition = fdmpr
    ;SETTING_3 inter\n\n[metadata]\ntype = quality_changes\nsetting_version = 8
    ;SETTING_3 \nquality_type = normal\nposition = 1\n\n[values]\n\n", "[genera
    ;SETTING_3 l]\nversion = 4\nname = Fine #2\ndefinition = fdmprinter\n\n[met
    ;SETTING_3 adata]\ntype = quality_changes\nsetting_version = 8\nquality_type
    ;SETTING_3 = normal\nposition = 2\n\n[values]\n\n", "[general]\nversion =
    ;SETTING_3 4\nname = Fine #2\ndefinition = fdmprinter\n\n[metadata]\ntype =
    ;SETTING_3 quality_changes\nsetting_version = 8\nquality_type = normal\nposi
    ;SETTING_3 tion = 3\n\n[values]\n\n", "[general]\nversion = 4\nname = Fine
    ;SETTING_3 #2\ndefinition = fdmprinter\n\n[metadata]\ntype = quality_change
    ;SETTING_3 s\nsetting_version = 8\nquality_type = normal\nposition = 4\n\n[
    ;SETTING_3 values]\n\n", "[general]\nversion = 4\nname = Fine #2\ndefinitio
    ;SETTING_3 n = fdmprinter\n\n[metadata]\ntype = quality_changes\nsetting_ver
    ;SETTING_3 sion = 8\nquality_type = normal\nposition = 5\n\n[values]\n\n",
    ;SETTING_3 "[general]\nversion = 4\nname = Fine #2\ndefinition = fdmprinter
    ;SETTING_3 \n\n[metadata]\ntype = quality_changes\nsetting_version = 8\nqual
    ;SETTING_3 ity_type = normal\nposition = 6\n\n[values]\n\n", "[general]\nv
    ;SETTING_3 ersion = 4\nname = Fine #2\ndefinition = fdmprinter\n\n[metadata]
    ;SETTING_3 \ntype = quality_changes\nsetting_version = 8\nquality_type = norm
    ;SETTING_3 al\nposition = 7\n\n[values]\n\n"], "global_quality": "[general]
    ;SETTING_3 \nversion = 4\nname = Fine #2\ndefinition = fdmprinter\n\n[metad
    ;SETTING_3 ata]\ntype = quality_changes\nsetting_version = 8\nquality_type =
    ;SETTING_3 normal\n\n[values]\nadhesion_type = brim\n\n"}



  • For a start, you have not activated any levelling mesh that you may have created!

    In your bed.g, you probe and create a levelling mesh, but there's no call to G32 here and neither is there a G29 S1 to load a previously created mesh.

    So, you're running with no mesh levelling at all.



  • Your motors are rated for 1680mA, so I'd set the current to 80% of that or around 1300mA.

    Your lead screws are near the rear of the printer (if you've put them at the balance point of the bed assembly), and you're using a single probe at the front of the bed to set the Z height when you home the Z axis. There's probably around 200mm between your lead screws and the point you probe to home the Z axis.

    That's a lot of distance to magnify even a small error in how level the bed is between the two lead screws!

    If you want to keep the E1 output to use in a future dual extrusion configuration, then you'll need to add two microswitches to home your Z axis. They need to be positioned at exactly the same height so that when both are triggered, you can be sure that your bed is as level as possible and that the lead screws both have exactly the same position each and every time you home the Z axis.

    You won't be able to use any automatic tilt correction though unless you drive both Z motors independently.



  • @vj said in z-offset increasing 3mm on every subsequent calibration:

    ...when I put a level on the bed and move it repeatedly up and down, the level keeps showing center. I know a level is not as accurate as probing, but it seems ok.

    You're not going to see a tilt that might mean three tenths of a millimetre error with a spirit level!



  • I made a new config starting from the webconfigurator, to also set the motors correctly and noticed that one of the settings is the firmware version. I loaded my old json config, and it filled that field in with firmware 1.6. So maybe the issue I was seeing with the z-probe offset is due to that and the issue that was fixed in later firmware versions.

    I was not aware I was not using mesh leveling, but maybe it is a good thing I was not using the mesh level correction: according to it, there is a 3mm difference (see the csv file, the corner at the back and to the right), which is completely not true. I agree I would not see 0.3mm difference, but 3mm should be visible with the spirit level and would for sure make prints impossible. So I will have to figure out why mesh leveling deviates that much from reality before I activate it: the prints work quite fine as it is, so any deviation cannot be that much (0.3 might be possible as I have not yet gone all the way to the far end of the bed, but noticed a bit of warping in that corner on a bigger print yesterday). However, as long as it gives me such big values (3mm), I would be worried that the compensation would make the head dive into the bed.

    My Z-screws are quite to the front, as the balance point of the bed is a lot more forward due to my bed construction (from top to bottom: ultrabase, alu plates, heatpad, cork insulator and another alu plate), but the Z-probe still is about 14 cm in front of the left Z-screw. I don't care that much about automatic z-leveling at this point, although it may be something easy to do as I have all the hardware needed for that (dual extrusion is long term planning) and for sure easier than the microswitch solution (for which I have not seen any tutorials or so on how to configure that).

    I'm keeping printing some parts to properly wire everything and will have to get back to it in 2 weeks time (no possibility for me to do it now).



  • @vj said in z-offset increasing 3mm on every subsequent calibration:

    But... how do unsynced z-axis steppers affect the z-offset of the probe and the hotend?

    If the lead screws are not both at exactly the same starting positions after homing the Z axis, the bed will be tilted either to the left or right. Imagine the pyramid formed by the bed at the two lead screws and the point at the front left of the bed where you do a single probe to home the Z axis.

    Your homing point is going to vary in height considerably with even a tiny difference in the position of the lead screws. Once homed, they should keep their positions until you either power off the printer, or the steppers time out and the idle current which holds the steppers at their current position is turned off. Then, you'll be forced to home the Z axis again and it won't home to exactly the same height as it did the previous time. Homing the Z axis sets the firmware's idea of where Z=0 is. If that isn't perfectly repeatable and perfectly accurate, everything you subsequently do on the Z axis is going to be inaccurate.

    I'd also say that you shouldn't be probing the front left of the bed to establish your Z=0 point. The middle of the bed is a much better place.

    My V-Core uses a hotend piezo probe rather than a BLTouch. It's a great probe on a core-xy machine and there are no offsets to make its readings less accurate. Anyway, when I home my machine, the procedure goes like this:

    Home X and Y axes against the limit switches, establishing X0 and Y0.
    Then, to do the initial Z homing, I first probe the bed at the centre point between the two lead screws. On my machine, this point is at X145 Y233.
    Then, I probe at X0 Y233 followed by X290 Y233. The Duet firmware is then asked to correct for any tilt between these two probes and adjusts the lead screws appropriately.
    Finally, I go back to X145 Y233 and probe the bed again to set Z=0. This is done because the lead screw tilt correction may have changed where the initial Z=0 was.

    This way of doing things requires independently driven lead screw steppers.

    If you're prepared to give up the E1 output for a Z stepper, you could do this as well. If you still want to keep E1 free and don't want to get a Duex expansion board to get some more stepper drivers, you have to find some other way of synchronising the lead screws. Dual Z homing switches at Z minimum is normally the way you would do this.



  • Just for a laugh, I turned my printer on, homed all axes and put a spirit level on the bed. It tells me that my bed is leaning backwards towards the rear of the machine and that it is higher on the left hand side than the right.

    Here's my current levelling mesh:

    alt text

    The thing is, the spirit level is telling me how my bed is in relation to the earth and not in relation to my X and Y axes. I live on the second floor of a '40's apartment block. I very much doubt if the house is perfectly level. Neither is my kitchen floor or the table which the printer sits on.

    "Level" in printer terms refers to relationships between the printer's axes, not the planet!



  • Interesting!

    Ok, so we have 2 separate issues: first is the offset of the bltouch with the hotend (which for some odd reason is increasing every time I re-run it, until cut the power, but I do run this one in the center of the bed, every time on the same location). I think it may be related to the bug (the thread I linked to) that was in earlier firmwares and possibly due to an incorrect selection in the reprap web configurator (where it was set to firmware 1.6 rather than the 2.03). I cannot test this now with the new setting, as my printer is printing. πŸ™‚

    Second issue is the error in the mesh grid. If you compare your mesh grid to mine (in the zip file), mine shows :
    min error -3.076 max error -0.011 mean -1.625 deviation 0.790
    Good point on the level, but if the bed would move unequally left/right with a difference of 3mm, the level should show some variation (3mm difference on 30cm is for sure visible) and printing would be for sure impossible. It would make more sense if it would be 0.3mm, but that is not what it outputs. So this mesh probing is doing something wrong as these readings don't match at all with reality. This is the output from another run today (so values may differ from the ones in the zip file):
    0_1567344814899_mesh.png

    Third aspect is the z-motors not being synced. I agree it is an issue which I will have to solve (probably will move one to E1 to allow for autoleveling, as that is the easiest), but does this alone explain the issues above?



  • Trying another print, and again the same issue: the z-offset is wrong (print head is too high). This time the configurator was set to the correct firmware. Unplugging the printer does not fix it, neither does running the calibration again (modifying config.g but putting the same old value) and rebooting.



  • There's something very wrong with that levelling map!

    If you are running 2.03 and you created a config file for 1.6, it would have commands which are incorrect and probably wouldn't work at all.

    Specifying the wrong version of firmware in the configurator can't change the firmware on your machine and bring back a bug which has been fixed in your firmware, it would only make a file which won't be understood properly.

    Thinking back to my fun installing the BLTouch on my Anycubic, it was absolutely essential that the distance between the base of the BLTouch and the bottom of the nozzle was exactly 8mm. As per this diagram:

    alt text

    I remember that I found an alignment tool on Thingiverse which made getting this right quite easy. Instead of using the springs that they provide, I used M2 washers to get the distances right and then lock them in once they were correct. Until I got that right, I had no end of troubles.



  • Sorry about the multiple edits to my previous post. The fingers can't quite keep up with the brain!

    Verify that you have the distances set as in the diagram. Then set your trigger height by following the procedure in the Duet Wiki



  • I have the BLTouch smart, which is less critical to the z-offset installation (according to the diagram here https://www.antclabs.com/bltouch-2 , between 2.3 and 4.3, so I'm nicely within range with my 3.84).
    (see below)

    I will start rewiring everything, maybe there is some bad cable somewhere as now I cannot seem to get the correct z-trigger height. I know from my successful prints that it should be 3.84, and I have not changed anything to the hardware, but it keeps the head higher when it thinks Z=0. Previously, when I changed from 3.84 to a higher value, it cause a headcrash, which I want to avoid.
    So I'll rewire everything and make order in the cabling: best is to first rule out some bad wire or something that may cause issues. Don't get me wrong, I will change the Z-motors as a next step, but as you see, there is something very wrong with the mesh map and the z-trigger height. So, starting to rewire everything, but I will only be able to get back to this in 2 weeks. Thanks for the help, for sure I will keep you posted.

    EDIT: I may have a BLTouch Smart v2.0, which has the range at 3mm+/- 0.3, but I'm out of range (my 3.84 is when it is deployed, but when it is not I for sure have less than 2.7mm). That my indeed explain the inconsistent readouts! Ok, so going to rewire and reattach the bltouch: If I put it at 3mm, I should be fine regardless of whether I have a v2 or a v3 (but I'm 99% sure I have a v2). THANKS!!!! Not sure if this is the cause, but it seems possible.



  • @vj said in z-offset increasing 3mm on every subsequent calibration:

    EDIT: I may have a BLTouch Smart v2.0, which has the range at 3mm+/- 0.3, but I'm out of range (my 3.84 is when it is deployed, but when it is not I for sure have less than 2.7mm). That my indeed explain the inconsistent readouts! Ok, so going to rewire and reattach the bltouch: If I put it at 3mm, I should be fine regardless of whether I have a v2 or a v3 (but I'm 99% sure I have a v2). THANKS!!!! Not sure if this is the cause, but it seems possible.

    Your words are very familiar to me. This is exactly the pain I went through with the BLTouch. There's a set of slightly different instructions and no simple way to tell exactly which version you have in your hand. Incredibly frustrating!

    Once you get it set up properly, it's very repeatable and reliable though. Not as repeatable or accurate as my Precision Piezo, but that wouldn't have been a good option for a cartesian printer.

    I just checked my other printer and the Z trigger height (or offset) for my BLTouch is 1.3mm. 3.84 doesn't sound right to me. Like I said, make sure that the base of the sensor (not the pin) is 8mm from the bottom of the nozzle.

    Good luck and we'll hear from you in a couple of weeks!



  • Ok, finally getting back to this...

    I've got it ... I think... If you do a mesh compensation, and afterwards determine the Z-offset with the mesh compensation in effect, it will affect the determination of the Z-offset... As I was doing the homing in the front left corner, but the Z-offset calibration in the center, it added the mesh offset calibration which I did before the print (but which was not used in the print) when the z-offset is calculated again afterwards. As I was using the mesh calculation to check how level everything is, it enabled it, giving me an increase equal to the amount it is compensating with the mesh (and that was a magnitude off due to other wrong settings)... Does this make sense?

    I currently started repeating Z-offset calibration without mesh compensation in between, and it seems correct...


  • Moderator

    @VJ said in z-offset increasing 3mm on every subsequent calibration:

    Does this make sense?

    Yes.



  • Thanks!
    Perhaps a note on https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe should be added that mesh calibration should be off, or that at least you should test at a point where the calibration has 0 effect...? πŸ™‚


  • Moderator

    @VJ Done.


Log in to reply