Incorrect Z microstepping



  • So I'm starting to do my first few test prints and I'm having an issue with the z microstepping. I am using 1.8 deg motors and 8mm x 2mm pitch lead screws. When running the print the first layer will go down fine, however with subsequent layers the model gets stretched, which leads me to believe that the microstepping is the issue. Here is my current config.g. It should be worth nothing that I am using 4 independent lead screws for the Z axis, and they are connected to independent drivers.

    ; Configuration file for Duet WiFi (firmware version 1.21)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Fri Nov 16 2018 19:13:03 GMT-0500 (Eastern Standard Time)
    
    ; General preferences
    G90                                         ; Send absolute coordinates...
    M83                                         ; ...but relative extruder moves
    
    M667 S1                                     ; Select CoreXY mode
    
    ; Network
    M550 P"CoreXY"                              ; Set machine name
    M552 S1                                     ; Enable network
    ;*** Access point is configured manually via M587
    M586 P0 S1                                  ; Enable HTTP
    M586 P1 S0                                  ; Disable FTP
    M586 P2 S0                                  ; Disable Telnet
    
    ; Drives
    M569 P0 S1                                  ; Drive 0 goes backwards
    M569 P1 S1                                  ; Drive 1 goes backwards
    M569 P3 S0                                  ; Drive 3 goes backwards
    M569 P5 S0                                  ; Drive 5 goes forwards
    M569 P6 S0                                  ; Drive 6 goes forwards
    M569 P7 S0                                  ; Drive 7 goes forwards
    M569 P8 S0                                  ; Drive 8 goes forwards
    M350 X16 Y16 Z16 E16 I1                     ; Configure microstepping with interpolation
    M92 X80.00 Y80.00 Z1600.00 E96.00           ; Set steps per mm
    M566 X900.00 Y900.00 Z12.00 E120.00         ; Set maximum instantaneous speed changes (mm/min)
    M203 X3000.00 Y3000.00 Z600.00 E1200.00     ; Set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z20.00 E250.00         ; Set accelerations (mm/s^2)
    M906 X1300.00 Y1300.00 Z1000.00 E1000.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 X300 Y320 Z310 S0                      ; Set axis maxima
    
    ; Endstops
    M574 X1 Y1 S1                               ; Set active high endstops
    
    ; Z-Probe
    M574 Z1 S2                                  ; Set endstops controlled by probe
    M558 P1 H5 F120 T6000                       ; Set Z probe type to modulated and the dive height + speeds
    G31 P500 X-5 Y31 Z0.8                         ; Set Z probe trigger value, offset and trigger height
    M557 X15:290 Y15:370 S20                    ; Define mesh grid
    
    ; Heaters
    M307 H0 B0 S1.00                            ; Disable bang-bang mode for the bed heater and set PWM limit
    M305 P0 T100000 B4138 R4700                 ; Set thermistor + ADC parameters for heater 0
    M143 H0 S90                                 ; Set temperature limit for heater 0 to 90C
    M305 P1 T100000 B4388 C7.060000e-8 R4700    ; Set thermistor + ADC parameters for heater 1
    M143 H1 S280                                ; Set temperature limit for heater 1 to 280C
    
    ; Fans
    M106 P0 S1 I0 F500 H-1                    ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S1 I0 F500 H1 T45                   ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
    
    ; Tools
    M563 P0 S"Extruder 0" 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
    M584 X0 Y1 Z5:6:7:8 ; four Z motors connected to driver outputs 5, 6, 7 and 8
    M671 X6:0:312.5:312.5 Y-66:391:396:-66 S5 ; leadscrews at front left, rear left, rear right and front right
    
    ; Miscellaneous
    M591 D0 P5 C3 R40:120 E3.0  ; Duet3D laser sensor for extruder drive 0 is connected to endstop input 3 (E0), tolerance 40 to 120%, 3mm comparison length
    T0                          ; Select first tool
    
    

    My next step is to change it to 1x microstepping on the Z axis. I'm not sure if the interpolation is messing with it or what. Any ideas here? Not sure if there's something I am missing.



  • 1600 steps per mm looks right for your Z axis based on Z_steps_per_mm = (motor_steps_per_rev * driver_microstep) / thread_pitch

    (200*16)/2=1600

    Are the independent drivers on a Duex, or external drivers?

    If you jog the Z axis back and forth manually does it end up back in the same position?

    Is there any binding or misalignment?

    Are all of the drives identical?

    You might get some odd behaviour with x1 microstepping like some drives maybe turning the wrong direction. If you want to experiment with lower microsteps start with x4.

    If you want to test other microsteppings you can leave your current settings as they are set with x16, then simply add a new M350 Z4 command below the M92 command. The firmware will take the default values for x16 microsteps and adjust them for you, so you don't need to manually add the correct steps per mm value. Make sense?



  • @phaedrux said in Incorrect Z microstepping:

    1600 steps per mm looks right for your Z axis based on Z_steps_per_mm = (motor_steps_per_rev * driver_microstep) / thread_pitch

    (200*16)/2=1600

    Are the independent drivers on a Duex, or external drivers?

    If you jog the Z axis back and forth manually does it end up back in the same position?

    Is there any binding or misalignment?

    Are all of the drives identical?

    You might get some odd behaviour with x1 microstepping like some drives maybe turning the wrong direction. If you want to experiment with lower microsteps start with x4.

    If you want to test other microsteppings you can leave your current settings as they are set with x16, then simply add a new M350 Z4 command below the M92 command. The firmware will take the default values for x16 microsteps and adjust them for you, so you don't need to manually add the correct steps per mm value. Make sense?

    The independent drivers are on a duex5. If the bed is tilted too much it will bind, but when it is leveled there is no binding, but there is a little binding/slight misalignment if it's not level. I still need to add the pillowblock bearings in, but that should not be making my benchy layers like 5x as thick. All of the motors are identical, and I'm hoping all the drives are identical seeing as it's a duex5. I can test jogging the z-axis. Something to note is that when it is homing/leveling the bed it moves much faster in the +z direction (downwards because it's a corexy) than it does in the -z direction. I am assuming this was because of gravity, but I am unsure.



  • Do you have a video of the z axis movement in action? Pictures of the stretched prints?

    Are you sure the lead screws are 2mm pitch?



  • @phaedrux I can get a picture of the stretched print on here. I bought the screws from openbuilds. They are an ACME 8mm, so I'm 99% sure they are 2mm pitch.



  • https://i.imgur.com/dDIib1K.jpg

    https://i.imgur.com/IYOxH61.jpg

    As you can see the first layer went down fine, but it's FUBAR after that. I think there are only 10-20 layers there (so 2-4mm actual) but the whole print is about 20mm high.



  • Ok so if you move to Z0 and touch the bed, and then job the bed up 10mm and measure it with a ruler, is it actually 10mm?



  • @phaedrux So the Z axis is set at 30.8mm my calipers read out about 120mm (not exact, just around about there) and if I move it up it moves the same amount upwards. Maybe it's because I have 4 z motors? 30*4=120. It's definitely more than 30.8mm, I can tell you that.



  • Wait, it's a 4 start lead screw, could that be the issue?



  • @surgikill This is almost certainly it. For lead screw calculations we actually use the 'lead' (movement of the nut per complete turn) rather than the 'pitch' (peak-to-peak measurement of the threads). For single start screws these values are the same so it's easy to miss the distinction.

    So a 2mm pitch 4-start screw will have a 8mm lead (2mm pitch * 4 starts).

    so the calc becomes something like (200steps/rev * 16) / 8mm/rev = 400 steps/mm



  • @nhof Thanks man. That's what I thought but using the prusa calculator there's no input for start. I had to go looking for the calculation. Seems to be printing much better now, at least it's not moving 4x what it should.


  • administrators

    Microstepping is not the problem. Try reducing Z acceleration. Also try increasing Z motor current if you can do that without the motors overheating.


  • administrators

    I just spotted a big problem with your config.g. The M584 command must come before the M350 and M906 commands.



  • @dc42 It's a 4 start leadscrew so I needed to divide the microstepping by 4, so instead of 1600 it's 400. Did a test print last night and it came out fine, minus the z artifacts and lack of cooling. Why does the M584 need to come before M350 and M906? Looks like those are just microstepping and motor idle currents.

    I was also reading in some other documentation that I need to configure microstepping and steps/mm for each z-motor. Is this true? It seems to work fine now but I can't find anything in the official documentation about it.


  • administrators

    If you look up M584 in the GCode wiki, it says clearly that it must come before certain other GCode commands. That's so that the firmware knows which drivers to apply those settings to.

    You don't need to set the steps/mm or microstepping separately for the multiple Z motors.



  • @dc42 Is there any way I or somebody else could add this to the documentation?



  • @surgikill You can register and modify the dokuzi wiki . Should not need any special permissions. I have done this several times.



  • @dc42 I just looked up M584 in the g-code wiki and didn't see anything about the order. Can you point me to where you found it? I want to read up on it.



  • @surgikill It's actually listed under the M350 and M92 commands rather than the M584



  • From https://duet3d.dozuki.com/Wiki/Gcode#Section_M584_Set_drive_mapping :
    Order dependence

    M584 must come earlier in config.g than any M350amd M906 commands. If it creates new axes, it must also be earlier than any M92, M201, M203, M208, M350, M566, M574 , M667 and M669 commands.


 

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