Duet Wifi 3 Z axis issue



  • Hey guys,

    This seems to be a popular topic but I can't find a solution that works for me- I'm trying to setup 3 z axis leadscrews on my Duet Wifi. Two are connected to Z in series and one is on E1. After configuring, the two motors connected to Z always move on command but the motor connected to E1 just 'twitches'. I've swapped motors and cables between Z and E1 and I know they are not faulty. All motors are the same type. Can someone take a look at my config.h and tell me if I'm missing something? Thanks!!

    Note: I haven't even tried to home yet, I'm just trying to get them to move via the M564 H0 S0 command and then Z + 0.05 mm

    ; Configuration file for Duet WiFi (firmware version 3)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Tue Feb 04 2020 08:13:19 GMT-0600 (Central Standard Time)
    
    ; General preferences
    G90                                            ; send absolute coordinates...
    M83                                            ; ...but relative extruder moves
    M550 P"Printer1"                               ; set printer name
    
    M667 S1                                        ; select CoreXY mode
    
    ; Network
    M552 S1                                        ; enable network
    M586 P0 S1                                     ; enable HTTP
    M586 P1 S1                                     ; enable FTP
    M586 P2 S1                                     ; enable Telnet
    
    ; Drives
    M569 P0 S1                                     ; physical drive 0 goes forwards
    M569 P1 S1                                     ; physical drive 1 goes forwards
    M569 P2 S1                                     ; physical drive 2 goes forwards
    M569 P3 S1                                     ; physical drive 3 goes forwards
    M569 P4 S1                                     ; physical drive 4 goes forwards
    M584 X0 Y1 Z2:4 E3                             ; set drive mapping
    M350 X16 Y16 Z16:16 E16 I1                     ; configure microstepping with interpolation
    M92 X160.00 Y160.00 Z2560.00:2560.00 E420.00   ; set steps per mm
    M566 X900.00 Y900.00 Z12.00:12.00 E120.00      ; set maximum instantaneous speed changes (mm/min)
    M203 X6000.00 Y6000.00 Z180.00:180.00 E1200.00 ; set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z20.00:20.00 E250.00      ; set accelerations (mm/s^2)
    M906 X800 Y800 Z800:800 E800 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 X230 Y210 Z200 S0                         ; set axis maxima
    
    ; Endstops
    M574 X1 S1 P"xstop"                            ; configure active-high endstop for low end on X via pin xstop
    M574 Y1 S1 P"ystop"                            ; configure active-high endstop for low end on Y via pin ystop
    M574 Z1 S1 P"zstop"                            ; configure active-high endstop for low end on Z via pin zstop
    
    ; Z-Probe
    M558 P0 H5 F120 T6000                          ; disable Z probe but set dive height, probe speed and travel speed
    M557 X15:215 Y15:195 S20                       ; define mesh grid
    
    ; Heaters
    M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin bedtemp
    M950 H0 C"bedheat" T0                          ; create bed heater output on bedheat and map it to sensor 0
    M143 H0 S120                                   ; set temperature limit for heater 0 to 120C
    M307 H0 B1 S1.00                               ; enable bang-bang mode for the bed heater and set PWM limit
    M140 H0                                        ; map heated bed to heater 0
    M308 S1 P"e0temp" Y"thermistor" T100000 B4138  ; configure sensor 1 as thermistor on pin e0temp
    M950 H1 C"e0heat" T1                           ; create nozzle heater output on e0heat and map it to sensor 1
    M143 H1 S280                                   ; set temperature limit for heater 1 to 280C
    M307 H1 B0 S1.00                               ; disable bang-bang mode for heater  and set PWM limit
    
    ; Fans
    M950 F0 C"fan0" Q500                           ; create fan 0 on pin fan0 and set its frequency
    M106 P0 S0 H-1                                 ; set fan 0 value. Thermostatic control is turned off
    M950 F1 C"fan1" Q500                           ; create fan 1 on pin fan1 and set its frequency
    M106 P1 S1 H1 T45                              ; set fan 1 value. Thermostatic control is turned on
    
    ; Tools
    M563 P0 D0 H1 F0                               ; 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
    
    ; Custom settings are not defined
    
    
    

  • Moderator

    @sticks918 What firmware version are you running? I assume RRF 3, but send M115 and post the response.

    I'm not sure I've seen a printer set up this way before; usually each individual Z motor has it's own driver, particularly when there are three motors. But I can't think of a reason that this wouldn't work. You won't be able to use the 'true bed levelling', as the two motors attached to the Z motor driver cannot work independently.

    The only problem with your config.g I can see is that you have defined each of the motor configuration lines with Z[nnn]:[nnn], eg M350 X16 Y16 Z16:16 E16 I1. The firmware will ignore the second value, and use only the first, but in some versions of the firmware this causes problems. Remove all the second Z values, eg:

    M350 X16 Y16 Z16 E16 I1                     ; configure microstepping with interpolation
    M92 X160.00 Y160.00 Z2560.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 Z180.00 E1200.00 ; set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z20.00 E250.00      ; set accelerations (mm/s^2)
    M906 X800 Y800 Z800 E800 I30               ; set motor currents (mA) and motor idle factor in per cent
    

    If that doesn't help, configure just the E1 axis as Z, and test it, eg change M584 to:

    M584 X0 Y1 Z4 E3
    

    Try different motors if it continues not to work. It's also possible the E1 driver has failed.

    Ian



  • Thanks for the help Ian, here's what I've got:

    M115 response:

    FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 3.0 ELECTRONICS: Duet WiFi 1.02 or later FIRMWARE_DATE: 2020-01-03b3

    I swapped the motors and cables with the two others and all motors have the same effect.

    I also tried your config and just had one Z axis motor on E1 using the config here:

    ; Drives
    M569 P0 S1                                     ; physical drive 0 goes forwards
    M569 P1 S1                                     ; physical drive 1 goes forwards
    M569 P2 S1                                     ; physical drive 2 goes forwards
    M569 P3 S1                                     ; physical drive 3 goes forwards
    M584 X0 Y1 Z4 E3                               ; set drive mapping
    M350 X16 Y16 Z16 E16 I1                        ; configure microstepping with interpolation
    M92 X80.00 Y80.00 Z2560.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 Z180.00 E1200.00        ; set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z20.00 E250.00            ; set accelerations (mm/s^2)
    M906 X800 Y800 Z800 E800 I30                   ; set motor currents (mA) and motor idle factor in per cent
    M84 S30                                        ; Set idle timeout
    

    But unfortuantely the same problem. Actually I tried running a motor from every driver by running through these M584 lines one at a time:

    M584 X4 Y1 Z0 E3                               ; set drive mapping
    M584 X0 Y4 Z1 E3                               ; set drive mapping
    M584 X0 Y1 Z3 E4                               ; set drive mapping
    

    And none of them worked correctly. E0, E1, and X drivers made the motor 'twitch' and using the Y driver made the motor hum like crazy until I resetted. Again, I tried this with multiple other working motors and cables and the motors have nothing on the drive shaft.

    So basically only the Z driver is spinning motors correctly. Any ideas? I feel like I'm stuck at step 0 here...



  • Update:

    So I had one stepper motor from a different manufacturer laying around (a better quality e3d motor). When I plugged that in, it seems to work fine in any of the same configurations. Is there something in my config that would cause my original motors to only work from the Z driver, but a different motor (0.9 deg/step instead of 1.8) would work in any driver?

    I really would hate to have to buy 3 more motors...

    Thanks!


  • Moderator

    @sticks918
    Add this line back in:

    M569 P4 S1                                     ; physical drive 4 goes forwards
    

    Otherwise, perhaps change the motor settings, particularly steps per mm on Z. I have dual Z on my printer, with only one motor attached to Z and E0. Here's my motor config, perhaps copy it and see if it works:

    M584 X0 Y1 Z2:3 E4                                 ; Set drive mapping
    
    ; Drives
    M569 P0 S1                                         ; physical drive 0 goes forwards
    M569 P1 S0                                         ; physical drive 1 goes backwards
    M569 P2 S1                                         ; physical drive 2 goes forwards
    M569 P3 S1                                         ; physical drive 3 goes forwards
    M569 P4 S0                                         ; physical drive 4 goes backwards
    M350 X16 Y16 Z16 E16 I1                            ; configure microstepping with interpolation
    M92 X80.00 Y80.00 Z800.00 E612.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 Z600.00 E1200.00            ; set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z20.00 E250.00                ; set accelerations (mm/s^2)
    M906 X1000 Y1000 Z800 E1000 I30                    ; set motor currents (mA) and motor idle factor in per cent
    M84 S30                                            ; Set idle timeout
    

    Ian



  • Will do. Can you tell me if your Z motors are 0.9 or 1.8 deg / step? Thank you!


  • Moderator

    @sticks918 1.8, but it shouldn’t matter for testing.

    Ian



  • If you have 3 Z motors, it is better to connect each one to a driver connection, then you can have 3 Z motor bed leveling.
    Here is part of my config for my core XYUV machine
    ;Drives
    M584 X0:3 Y1:4 Z7:8:9 U10 V11 E2:5:6 ; Assign motors to axes
    M569 P0 S1 ; Drive 0 goes forwards X motor
    M569 P1 S1 ; Drive 1 goes backwards Y motor
    M569 P2 S0 ; Drive 2 goes backwards E1 extruder
    M569 P3 S1 ; Drive 3 goes forwards U motor
    M569 P4 S1 ; Drive 4 goes backwards V motor
    M569 P5 S0 ; Drive 5 goes backwards E2 extruder
    M569 P6 S0 ; Drive 6 goes backwards E3 extruder
    M569 P7 S1 ; Drive 7 goes forwards Z1 motor left
    M569 P8 S1 ; Drive 8 goes forwards Z2 motor rear
    M569 P9 S1 ; Drive 9 goes forwards Z3 motor right

    M671 X-40:156:340 Y120:338:120 ; Lead screw positions
    M350 X16 Y16 U16 V16 Z16 I1 ; Set XYUV 16 micro stepping with interpolation

    Hope that helps


  • Moderator

    @appjaws True, but then you need a Duex! I guess he's trying it out before getting one, or going to add a single driver, perhaps like https://duet3d.dozuki.com/Wiki/Using_external_stepper_motor_drivers#Section_Connecting_Pololu_style_drivers

    Ian



  • Appjaws and Ian are correct, I probably should be using a Duex but I wanted to get everything working as-is first and maybe upgrade to that later.

    But for now I'm about running out of things to try, I played with just about every motor setting: steps / mm, speed change, acceleration, and motor currents and cannot get any of these 1.8 deg motors to work on any driver except Z.

    The only other data point I can add is that if I boost the current (to say 2000 mA), the motor seems to move a bit closer to normal but I get a driver error saying there's a 'short-to-ground'. But only if it's above 1000 mA or so.

    Any last suggestions guys? Right now it seems my options are to either go down to two Z axis motors or buy 3 new E3D motors. Neither of those seem like great options... Appreciate the help so far though.



  • The only other thing I can think of is that for all the settings I was changing, I usually was lowering the setting (except for current). Would raising them help? Can you reach a point where you're driving the motor too slowly and it doesn't work properly?



  • I seem to remember in the distance past that I had motors integral with lead screws and they were twitching. I tried everything but could not get them to work. In the end I bought new motors and attached lead screws to them. They worked a treat, in fact I bought a third motor and changed my system to a 3 Z motor setup.
    Have you tried your other motors, stand alone connected as Z?
    these are my other motor settings.
    M566 X1000 Y1000 U560 V560 Z60 E3000 ; Maximum jerk speeds mm/minute
    M203 X12000 Y12000 U12000 V12000 Z100 E5000 ; Maximum speeds (mm/min)
    M201 X1600 Y1600 U1000 V1000 Z30 E1500 ; Accelerations (mm/s^2)
    M906 X1100 Y1100 U1100 V1100 Z1000 E950 ; Set motor currents (mA)


  • Moderator

    @sticks918 I'm wondering if your motors are wired incorrectly. Is the only setup that works is two motors plugged into the Z drive? This might be possible due to the series wiring of the 2 Z motor connectors (I can't quite work it out in my head), but could be driving the Z in parallel. Please check the phases of one of the other motors. The motor pins on the Duet are ordered 2B 2A 1A 1B, so it expects one wire pair to be connected to 2B and 2A, and the other coil pair connected to 1A and 1B. Check which wires are the coil/phase pair using a multimeter, or see https://duet3d.dozuki.com/Wiki/Choosing_and_connecting_stepper_motors#Section_Identifying_the_stepper_motor_phases

    I think the other thing to try is to define all motors as X, then Y, then Z, to see if it's a driver problem, a config problem, or a motor problem. ie try:
    M584 X0:1:2:3:4
    Try moving the X axis, then try
    M584 Y0:1:2:3:4
    and so on.

    Make sure you run either M564 S0 H0 or G92 X0 Y0 Z0 each time you restart, or motors won't be able to move anyway!

    Ian



  • Hey guys,

    I tired lowering and raising every setting under the sun but still no improvement. The only configuration that worked was 2 motors in series on the Z driver. Any single motor on any other driver did not work.

    Since I need 3 of the same motor for Z, I switched them all out for E3D motors and they worked immediately. Shame I couldn't get my existing motors to work but that's okay. Thanks for the all the help though!

    For anyone who stumbles across this, my motors were Tronxy sl42sth40-1684a-23 which are the standard issue from an upcycled Anet A8 (and probably other Anets).


  • Moderator

    @sticks918 I can't see anything on this page https://3dprint.wiki/reprap/anet/a8/steppermotor that would stop the stepper motor working with Duet. I think it's the wiring in the plug that connects to the Duet. Can you take a picture of the motor and plug wiring? Did you try and work out the motor phases?

    Ian


Log in to reply