Firmware erroneously adds 4.25-4.50mm to Z height



  • Hello I have been setting up a COREXY with Z max homing but have become stuck in the process because the firmware seems to be wrongly adding 4.25 (or sometimes 4.50) to the Z axis height. I have not done much with the printer beyond running homing and G32 routines, so it's doubtful that I accidentally changed something to cause this... but who knows! My Z probe trigger distance is around 7.2mm, changing that value does not affect anything as far as I can tell. Here's my config file. Thanks for taking a look!

    ; Configuration file for Duet WiFi (firmware version 1.21)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Wed Feb 27 2019 21:47:03 GMT-0800 (Pacific Standard Time)

    ; General preferences
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves

    M667 S1 ; Select CoreXY mode
    G29 S1 ; Enable leveling
    ; Network
    M550 P"Big Printer" ; Set machine name
    M551 P"Password" ; Set password
    M552 S1 ; Enable network
    M587 S"SSID" P"PASSWORD" ; Configure access point. You can delete this line once connected
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet

    ; Drives
    M584 X0 Y1 Z2:4 E03 ;Map drive 4 to second Z motor
    M569 P0 S1 ; Drive 0 goes forwards
    M569 P1 S0 ; Drive 1 goes backwards
    M569 P2 S1 ; Drive 2 goes forwards
    M569 P3 S0 ; Drive 3 goes BACKWARDS
    M350 X32 Y32 Z32 I0 ; Configure microstepping without interpolation
    M350 E16 I1 ; Configure microstepping with interpolation
    M92 X200.00 Y200.00 Z2400.00 E420.00 ; Set steps per mm
    M566 X900.00 Y900.00 Z12.00 E120.00 ; Set maximum instantaneous speed changes (mm/min)
    M203 X6000.00 Y6000.00 Z400.00 E1200.00 ; Set maximum speeds (mm/min)
    M201 X100.00 Y100.00 Z20.00 E250.00 ; Set accelerations (mm/s^2)
    M906 X800.00 Y800.00 Z1000.00 E800.00 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Axis Limits
    M208 X0 Y0 Z0 S1 ; Set axis minima
    M208 X775 Y700 Z700 S0 ; Set axis maxima

    ; Endstops
    M574 X1 Y1 Z2 S0 ; Set active low and disabled endstops

    ; Z-Probe
    M558 P5 I1 H5 F400 T6000 ; Set Z probe type to switch and the dive height + speeds
    G31 P500 X0 Y0 Z7 ; Set Z probe trigger value, offset and trigger height
    M557 X0:775 Y0:700 S20 ; Define mesh grid

    ; Heaters
    M140 H-1 ; Disable heated bed
    M305 P1 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 1
    M143 H1 S280 ; Set temperature limit for heater 1 to 280C

    ; Fans
    M106 P0 S0 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S0 I0 F500 H-1 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned off

    ; Tools
    M563 P0 D0 H1 ; Define tool 0
    G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
    G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C

    ; Automatic saving after power loss is not enabled

    ; Custom settings are not configured



  • We'd need to see your homing and bed.g files as well.
    Also what firmware version?



  • Sure! here they are... This is 1.21RC1

    ; homeall.g
    ; called to home all axes
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Wed Feb 27 2019 21:47:03 GMT-0800 (Pacific Standard Time)
    G91 ; relative positioning
    ;G1 Z5 F6000 S2 ; lift Z relative to current position
    G1 S1 Y-705 F1800 ; move quickly to X or Y endstop and stop there (first pass)
    G1 S1 X-780 F1800 ; move quickly to X or Y endstop and stop there (first pass)
    G1 S1 Y-705 ; home Y axis
    G1 S1 X-780 ; home X axis
    G1 X5 Y5 F1000 ; go back a few mm
    G1 S1 Y-705 ; then move slowly to Y axis endstop
    G1 S1 X-780 F360 ; move slowly to X axis endstop once more (second pass)
    ;G1 Z-5 F6000 S2 ; lift Z relative to current position
    G1 S1 Z723 F1800 ; move Z up stopping at the endstop
    G90 ; absolute positioning
    ;G92 Z718 ; set Z to axis minimum (you may want to adjust this)

    ; Uncomment the following lines to lift Z after probing
    ;G91 ; relative positioning
    ;G1 S2 Z5 F100 ; lift Z relative to current position
    ;G90

    ; homex.g
    ; called to home the X axis
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Wed Feb 27 2019 21:47:04 GMT-0800 (Pacific Standard Time)
    G91 ; relative positioning
    ;G1 Z5 F6000 S2 ; lift Z relative to current position
    G1 S1 Y-780 F1800 ; move quickly to y axis endstop and stop there (first pass)
    G1 S1 X-780 F1800 ; move quickly to X axis endstop and stop there (first pass)
    G1 X5 F6000 ; go back a few mm
    G1 S1 X-780 F360 ; move slowly to X axis endstop once more (second pass)
    ;G1 Z-5 F6000 S2 ; lower Z again
    G90 ; absolute positioning

    ; homey.g
    ; called to home the Y axis
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Wed Feb 27 2019 21:47:04 GMT-0800 (Pacific Standard Time)
    G91 ; relative positioning
    ;G1 Z5 F6000 S2 ; lift Z relative to current position
    G1 S1 Y-705 F1800 ; move quickly to Y axis endstop and stop there (first pass)
    G1 Y5 F6000 ; go back a few mm
    G1 S1 Y-705 F360 ; move slowly to Y axis endstop once more (second pass)
    ;G1 Z-5 F6000 S2 ; lower Z again
    G90 ; absolute positioning

    ; homez.g
    ; called to home the Z axis
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Wed Feb 27 2019 21:47:04 GMT-0800 (Pacific Standard Time)
    G91 ; relative positioning
    G1 Z5 F6000 S2 ; lift Z relative to current position
    G1 S1 Z723 F1800 ; move Z up until the endstop is triggered
    ;G92 Z718 ; set Z position to axis minimum (you may want to adjust this)

    ; Uncomment the following lines to lift Z after probing
    ;G91 ; relative positioning
    ;G1 S2 Z5 F100 ; lift Z relative to current position
    ;G90 ; absolute positioning

    ; bed.g
    ; called to perform automatic bed compensation via G32
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Wed Feb 27 2019 21:47:03 GMT-0800 (Pacific Standard Time)
    M557 X0:775 Y0:700 S36.8
    M561 ; clear any bed transform
    G29 ; probe the bed and enable compensation



  • I think you may be affected by a z height bug that was present in that firmware version. Eitherway, release candidates aren't supported once the stable release is available. I would strongly suggest backing everything up and upgrading to 2.02 before proceeding with any more troubleshooting.



  • I just now noticed the web interface said the "Maximum deviations: -4.265 / -2.827 mm" so I assumed the 4.25 is from the bed height map. I disabled the line "G29 S1 ; Enable" and it now shows the "true" z height value. I will try to get my deviation values lower with some manual leveling to see if it helps that value out... Is that normal or do I have a problem?



  • One thing about Z max homing is that you need to know exactly how far your z max endstop is from the bed surface. As your homing files are now, it will set your height to be whatever the z axis maxima is set to from config.g. In this case 700mm. So I suspect that this isn't accurate.

    There are a few ways to address this. Here's how I do it with my Z max optical endstop. I have a macro that allows me to move the nozzle to just touch the nozzle to the bed, sets Z0, and then moves the z axis to my max z height, in my case, 300mm. I then adjust the flag of the endstop until it's just triggered so that I'm confident when the endstop triggers, it's actually 300mm from the bed surface.



  • @absensmentis said in Firmware erroneously adds 4.25-4.50mm to Z height:

    or do I have a problem?

    Yes, as I said, I think you should update your firmware.

    What is your z probe type? Do you only use it for probing?



  • This is the most recent version available so I'm afraid updating again won't do much. I uploaded with SAM-BA and verified the MD5 hash when downloading to be 100% positive that every last bit was correct. I did this because my (real!) duet arrived in an erased state. For now I am using a nozzle mounted microswitch with a Z offset of 7.18mm and the actual Z height is about 718.55 at room temperature. I only use it for probing, I would like if I could use it to calculate Z also but I haven't seen anything about this FW being able to do such a thing. I just put "safe" values in to prevent a nozzle crash because my Z axis is strong enough to absolutely demolish the machine should it fail to stop at an appropriate distance



  • re-uploading the DC42 firmware has not changed anything sadly



  • Just to confirm, firmware version 2.02?
    https://github.com/dc42/RepRapFirmware/releases/tag/2.02



  • @absensmentis said in Firmware erroneously adds 4.25-4.50mm to Z height:

    I just put "safe" values in to prevent a nozzle crash because my Z axis is strong enough to absolutely demolish the machine should it fail to stop at an appropriate distance

    One way to minimize the risk of this is to reduce the motor current to the bare minimum during probe and homing moves and reverting to normal afterwards.

    If you're confident that your microswitch accurately sets Z0 you can use it to home Z. Is there a particular reason you need to home to Z max, especially on such a long Z axis.



  • I am rather confused, I downloaded it from that github but my version is 1.21???... I will get the actual latest version uploaded. As for the reduced current during homing, I will have to do that. thanks for the great suggestion.



  • You'll need to update to firmware 2.0 first using the normal method described here: https://duet3d.dozuki.com/Wiki/Installing_and_Updating_Firmware
    https://github.com/dc42/RepRapFirmware/releases/tag/2.0

    Then you can use the new simplified update method by uploading the entire 2.02a zip file. The Duet will extract the binaries and install what needs updating automatically.'
    https://github.com/dc42/RepRapFirmware/releases/download/2.02/Duet2Firmware-2.02a.zip

    I would recommend taking a look at the release notes between 1.21 and 2.02 as well.



  • No matter what I do it wont change from the following versions.

    Firmware Electronics: Duet WiFi 1.02 or later
    Firmware Version: 1.21RC1 (2018-01-25)
    WiFi Server Version: 1.21
    Web Interface Version: 1.21.2-dc42

    it recognizes the bin files and claims to upload them but it lies. I guess now nuke the board and use SAM-BA again?



  • Now I believe the current 2.02 bin file is incorrect, if I upload it to the board it becomes entirely unresponsive



  • Can you try the full version of 1.21 first?
    https://github.com/dc42/RepRapFirmware/releases/tag/1.21

    Then if that works, 2.0.

    Then if that works, 2.02.

    Are you using the "Usual procedure" as shown here? https://duet3d.dozuki.com/Wiki/Installing_and_Updating_Firmware#Section_Usual_procedure

    Samba should be the last option if the other fall back procedures don't work.



  • May not be your problem but I had a similar problem when homin it would stop above the bed by about that amount
    found out it was my Z probe that if it was moved evey so little would get a bad read and trigger early.
    Checking it was tight straight etc. it would home correctly. It drove me crazy as I thought it was something in the config.g
    and tried so many things to no avail.


  • administrators

    As you are on 1.21RC1 you may need to follow the procedure for updating from 1.20 to 1.21 or later. See https://duet3d.dozuki.com/Wiki/Installing_and_Updating_Firmware#Section_Upgrading_a_Duet_2_WiFi_or_Ethernet_to_firmware_1_21_or_later_from_1_20_or_earlier.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.