Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Not all stepper drivers working

    General Discussion
    4
    11
    167
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Ravs99
      Ravs99 last edited by

      Hi all. Im fairly new to DUET3 but I'm familiar enough with it. Im working on a hangprinter and after testing the motors individually using the g1 command, I have come to suspect that 2 of the 6 stepper drivers do not seem to be functioning correctly. The 2 "faulty" drivers rotate the motor much slowly and sound slightly different than the correctly working ones. All drivers have the same exact settings so i don't know whats wrong. The command i send to each motor is g91 and then G1 H2 Z-5 and for x Y and U respectively. Every motor responds fine except the Z which was tested on driver2(as per config) and driver 5. I know for a fact its not the motor because i tested different motors on that same driver and get the same result.

      From testing the drivers, it seems drivers 2 and 5 are not responding correctly and seem faulty. Is there anything I'm missing in software or is it indeed a faulty driver?
      I have posted my config file below. Note: it is not complete yet and I'm only concerned with getting the motors working individually right now.

      ; Enable network
      M552 P192.168.50.2 S1
      M550 P"hangprinter" ; change the name from the IP address of 192.168.50.2

      ;General Machine Settings/Conventions
      G21 ;work in mm
      G90 ;absolute coordinates
      M83 ;relative extruder moves

      ;No end stops

      ;Heaters and Temp Sensor
      ;first heater
      M140 H-1 ; disable heated bed (overrides default heater mapping)
      M308 S1 P"temp1" Y"pt1000" A"Extruder Sensor"; configure sensor 1 as PT1000 on pin temp1
      M950 H1 C"out1" Q8 T1 ; create nozzle heater output on out1 and map it to sensor 1, limit pwm frequency to 10Hz
      M307 H1 B0 R0.665 C577.5 D48.27 S1.00 V24.3 ; disable bang-bang mode for heater and set PWM limit
      M143 H1 S300 ; set temperature limit for heater 0 to 240C

      ;second heater
      ;M308 S2 P"temp2" Y"pt1000" A"Barrel Sensor"; configure sensor 2 as PT1000 on pin temp2
      ;M950 H2 C"out2" Q10 T2 ; create nozzle heater output on out1 and map it to sensor 2, limit pwm frequency to 10Hz
      ;M307 H2 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
      ;M143 H2 S240 ; set temperature limit for heater 0 to 240C

      ;Fans
      ;Heatsink Fans 1 and 2
      M950 F1 C"!out4+out4.tach" Q25000 ; Fan 1 uses out4, but we are using a PWM fan so the output needs to be inverted, and using out4.tach as a tacho input
      M106 P1 T45 H1
      M950 F2 C"!out5+out5.tach" Q25000 ; Fan 2 uses out5, but we are using a PWM fan so the output needs to be inverted, and using out5.tach as a tacho input
      M106 P2 T45 H1

      ;Part Cooling Fan

      ;Stepper Motors-Extruder
      M18 ;disable default driver assignments;
      M569 P0 S1 ; physical drive 0 goes forwards (depending on how motor coils connected to the connector, may need to switch to backwards)
      M584 E0 ; assign extruder motor to driver0

      M350 E16 I1 ; configure microstepping with interpolation
      M92 E100 ; set steps per mm
      M566 E120.00 ; set maximum instantaneous speed changes (mm/min)
      M203 E9000.00 ; set maximum speeds (mm/min)
      M201 E200.00 ; set accelerations (mm/s^2)
      M906 E800 I30 ; set motor currents (mA) and motor idle factor in per cent
      M84 S30 ; Set idle timeout

      ;Bltouch

      ; Tool Definitions
      M563 P1 S"Pellet Extruder" D0 H1 F1:2 ;assign extruder(T1), drive(E1),Heater(h1) to tool1
      G10

      ;Kinematics
      M669 K6 ; Configures the Duet 3 to identify as a Hangprinter Kinematics

      ;set anchor distances
      M669 K6 A0.0:-2163.0:-75.5 B-1841.0:741.0:-75.5 C1639.0:1404.0:-75.5 D2250.5 ; set Hangprinter kinematics parameters
      M669 P1000.0 ; Hangprinter printable radius (unused for now)
      M669 S430 T0.1 ; Segments per second and min segment length

      ;M666 Q0.0083333 ; buildup compensation factor for ABCD
      ;M666 R64.965:64.965:64.965:64.975 ; ABCD radii
      ;M666 U2:2:2:2 ; Mechanical advantages on ABCD spools - 2 stands for doubled lines
      ;M666 O1:1:1:1 ; Number of lines per spool or "coil mode" (each line has it's own coil). 1 = coil style
      ;M666 L20:20:20:20 ; Motor gear teeth of ABCD axes
      ;M666 H255:255:255:255 ; Spool gear teeth of ABCD axes
      ;M666 J200:200:200:200 ; Full steps per ABCD motor revolution

      M208 S0 Z1750 ; maximum height 1750mm or some distance below D anchor
      M208 S1 Z-5 ; minimum height -5mm

      ; Uncomment M564 S0 if you don't want G0/G1 moves to be be limited to a software defined volume
      ; M564 S0

      ;Drives
      M569 P1 S1 ; drive 1 for D axis, goes forwards; need to create another "U" axis for D motor
      M569 P2 S1 ; drive 2 (Z motor output aka C) goes forwards
      M569 P3 S1 ; drive 3 (Y motor output aka B) goes forwards
      M569 P4 S1 ; drive 4 (X motor output aka A) goes forwards

      M584 X4 Y3 Z2 ;assign X axis(Amotor) to drive4, assign Y axis(Bmotor) to drive 3, assign Z axis(Cmotor) to drive 2
      M584 U1 ; create U axis for the D motor and assign drive 1 to U axis(Dmotor)

      ;Speeds and Accelerations
      M92 X101.86 Y101.86 Z101.86 U101.86 ; set steps/mm for each spool
      M203 X9000 Y9000 Z9000 U9000 ; maximum linear speeds mm/minute

      ;Current Limites for Steppers

      M906 X3000 Y3000 Z3000 U3000 I30 ; set motor currents (mA)

      ;Miscellaneous
      M501

      Phaedrux 1 Reply Last reply Reply Quote 0
      • Phaedrux
        Phaedrux Moderator @Ravs99 last edited by

        @ravs99 said in Not all stepper drivers working:

        M350 E16 I1 ; configure microstepping with interpolation
        M92 E100 ; set steps per mm
        M566 E120.00 ; set maximum instantaneous speed changes (mm/min)
        M203 E9000.00 ; set maximum speeds (mm/min)
        M201 E200.00 ; set accelerations (mm/s^2)
        M906 E800 I30 ; set motor currents (mA) and motor idle factor in per cent
        M84 S30 ; Set idle timeout

        You may be having some problems by having the extruder config before the rest of the drive commands. Rather, there is an order of operations for some commands. Especially for commands that refer to axis.

        M584 must come earlier in config.g than any M350 and 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.

        Try cleaning that up and try again. Maybe use a generated config file from the config tool as a template for the order.

        ; Configuration file for Duet WiFi (firmware version 3.3)
        ; executed by the firmware on start-up
        ;
        ; generated by RepRapFirmware Configuration Tool v3.3.10 on Mon Mar 14 2022 23:21:55 GMT-0600 (Central Standard Time)
        
        ; General preferences
        G90                                            ; send absolute coordinates...
        M83                                            ; ...but relative extruder moves
        M550 P"My Printer"                             ; set printer name
        
        ; Network
        M552 S1                                        ; enable network
        M586 P0 S1                                     ; enable HTTP
        M586 P1 S0                                     ; disable FTP
        M586 P2 S0                                     ; disable 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
        M584 X0 Y1 Z2 E3                               ; set drive mapping
        M350 X16 Y16 Z16 E16 I1                        ; configure microstepping with interpolation
        M92 X80.00 Y80.00 Z400.00 E420.00              ; set steps per mm
        M566 X900.00 Y900.00 Z60.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
        
        ; 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 switch-type (e.g. microswitch) endstop for low end on X via pin xstop
        M574 Y1 S1 P"ystop"                            ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin ystop
        M574 Z1 S2                                     ; configure Z-probe endstop for low end on Z
        
        ; Z-Probe
        M558 P5 C"^zprobe.in" H5 F120 T6000            ; set Z probe type to switch and the dive height + speeds
        G31 P500 X0 Y0 Z2.5                            ; set Z probe trigger value, offset and trigger height
        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
        M307 H0 B0 S1.00                               ; disable bang-bang mode for the bed heater and set PWM limit
        M140 H0                                        ; map heated bed to heater 0
        M143 H0 S120                                   ; set temperature limit for heater 0 to 120C
        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
        M307 H1 B0 S1.00                               ; disable bang-bang mode for heater  and set PWM limit
        M143 H1 S280                                   ; set temperature limit for heater 1 to 280C
        
        ; 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
        
        ; Miscellaneous
        T0                                             ; select first tool
        

        You can also check for syntax errors by sending M98 P"config.g" which may catch some problems.

        Z-Bot CoreXY Build | Thingiverse Profile

        Ravs99 2 Replies Last reply Reply Quote 0
        • Ravs99
          Ravs99 @Phaedrux last edited by

          @phaedrux ah. That makes sense. I will try and report back. Thank you for the suggestion. Another thing I haven't tried is actually remapping another axis to the "suspected" driver. I'll try these fixes and let you know. Much appreciated for the prompt response.

          1 Reply Last reply Reply Quote 0
          • Ravs99
            Ravs99 @Phaedrux last edited by

            @phaedrux So ive tried what you've suggested but I still get the same result. The driver to which the C motor (zaxis) is connected still goes slowly than the rest. I have also tried the following file generated from the config tool (basic cartesian mode). I set all stepper drivers to the exact same settings but I still get driver 2(Z-axis) to move noticeably slower than the rest. I set to incremental using g91 then I send the command "G1 H2 Z-5"

            ; Enable network
            M552 P192.168.50.2 S1
            M550 P"hangprinter" ; change the name from the IP address of 192.168.50.2
            
            
            
            ; Configuration file for Duet 3 (firmware version 3.3)
            ; executed by the firmware on start-up
            ;
            ; generated by RepRapFirmware Configuration Tool v3.3.10 on Tue Mar 15 2022 12:24:57 GMT-0400 (Eastern Daylight Time)
            
            ; General preferences
            G90                                             ; send absolute coordinates...
            M83                                             ; ...but relative extruder moves
            M550 P"My Printer"                              ; set printer name
            
            ; Drives
            M569 P0.0 S1                                    ; physical drive 0.0 goes forwards
            M569 P0.1 S1                                    ; physical drive 0.1 goes forwards
            M569 P0.2 S1                                    ; physical drive 0.2 goes forwards
            M569 P0.3 S1                                    ; physical drive 0.3 goes forwards
            M569 P0.4 S1                                    ; physical drive 0.4 goes forwards
            M584 X0.0 Y0.1 Z0.2 E0.3:0.4                    ; set drive mapping
            M350 X16 Y16 Z16 E16:16 I1                      ; configure microstepping with interpolation
            M92 X192.00 Y192.00 Z192.00 E192.00:192.00      ; set steps per mm
            M566 X900.00 Y900.00 Z60.00 E120.00:120.00      ; set maximum instantaneous speed changes (mm/min)
            M203 X6000.00 Y6000.00 Z180.00 E1200.00:1200.00 ; set maximum speeds (mm/min)
            M201 X500.00 Y500.00 Z20.00 E250.00:250.00      ; set accelerations (mm/s^2)
            M906 X2000 Y2000 Z2000 E2000:2000 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
            ; WARNING: No endstops configured
            
            ; 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
            
            ; Fans
            
            ; Tools
            M563 P0 D0 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
            M563 P1 D1 F0                                   ; define tool 1
            G10 P1 X0 Y0 Z0                                 ; set tool 1 axis offsets
            G10 P1 R0 S0                                    ; set initial tool 1 active and standby temperatures to 0C
            
            ; Custom settings are not defined
            
            1 Reply Last reply Reply Quote 0
            • Ravs99
              Ravs99 last edited by

              is there any way to tell whether or not the drivers are bad?

              jay_s_uk 1 Reply Last reply Reply Quote 0
              • jay_s_uk
                jay_s_uk @Ravs99 last edited by

                @ravs99 can you get an output of M122?

                Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                Ravs99 1 Reply Last reply Reply Quote 0
                • Ravs99
                  Ravs99 @jay_s_uk last edited by

                  @jay_s_uk here it is

                  m122
                  === Diagnostics ===
                  RepRapFirmware for Duet 3 MB6HC version 3.3 (2021-06-15 21:45:47) running on Duet 3 MB6HC v1.01 or later (standalone mode)
                  Board ID: 08DJM-9P63L-DJMSS-6JKDL-3SD6M-1SDZ9
                  Used output buffers: 1 of 40 (12 max)
                  === RTOS ===
                  Static ram: 150904
                  Dynamic ram: 91288 of which 24 recycled
                  Never used RAM 111976, free system stack 193 words
                  Tasks: NETWORK(ready,31.5%,254) ETHERNET(notifyWait,0.1%,126) HEAT(delaying,0.0%,405) Move(notifyWait,0.0%,284) CanReceiv(notifyWait,0.0%,944) CanSender(notifyWait,0.0%,374) CanClock(delaying,0.0%,333) TMC(notifyWait,7.5%,59) MAIN(running,60.9%,1096) IDLE(ready,0.0%,29), total 100.0%
                  Owned mutexes:
                  === Platform ===
                  Last reset 00:05:04 ago, cause: software
                  Last software reset at 2022-03-15 12:30, reason: User, GCodes spinning, available RAM 111976, slot 0
                  Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task MAIN Freestk 0 n/a
                  Error status: 0x00
                  Step timer max interval 131
                  MCU temperature: min 29.2, current 33.1, max 33.3
                  Supply voltage: min 24.2, current 24.3, max 24.4, under voltage events: 0, over voltage events: 0, power good: yes
                  12V rail voltage: min 12.2, current 12.3, max 12.4, under voltage events: 0
                  Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
                  Driver 0: position 2880, standstill, reads 58345, writes 19 timeouts 0, SG min/max 0/447
                  Driver 1: position 1920, standstill, reads 58345, writes 19 timeouts 0, SG min/max 0/469
                  Driver 2: position 960, standstill, reads 58345, writes 19 timeouts 0, SG min/max 0/177
                  Driver 3: position 0, standstill, reads 58351, writes 14 timeouts 0, SG min/max 0/0
                  Driver 4: position 0, standstill, reads 58351, writes 14 timeouts 0, SG min/max 0/0
                  Driver 5: position 0, standstill, reads 58354, writes 11 timeouts 0, SG min/max 0/0
                  Date/time: 2022-03-15 12:35:42
                  Slowest loop: 7.62ms; fastest: 0.05ms
                  === Storage ===
                  Free file entries: 10
                  SD card 0 detected, interface speed: 25.0MBytes/sec
                  SD card longest read time 2.4ms, write time 0.0ms, max retries 0
                  === Move ===
                  DMs created 125, maxWait 24934ms, bed compensation in use: none, comp offset 0.000
                  === MainDDARing ===
                  Scheduled moves 6, completed moves 6, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
                  === AuxDDARing ===
                  Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
                  === Heat ===
                  Bed heaters = -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = -1 -1 -1 -1
                  === GCodes ===
                  Segments left: 0
                  Movement lock held by null
                  HTTP is idle in state(s) 0
                  Telnet is idle in state(s) 0
                  File is idle in state(s) 0
                  USB is idle in state(s) 0
                  Aux is idle in state(s) 0
                  Trigger is idle in state(s) 0
                  Queue is idle in state(s) 0
                  LCD is idle in state(s) 0
                  SBC is idle in state(s) 0
                  Daemon is idle in state(s) 0
                  Aux2 is idle in state(s) 0
                  Autopause is idle in state(s) 0
                  Code queue is empty.
                  === CAN ===
                  Messages queued 1521, received 0, lost 0, longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 49 (min 49), ts 1521/0/0
                  Tx timeouts 0,0,1520,0,0,0 last cancelled message type 30 dest 127

                  === Network ===
                  Slowest loop: 6.84ms; fastest: 0.02ms
                  Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions Telnet(0), 0 sessions
                  HTTP sessions: 1 of 8

                  • Ethernet -
                    State: active
                    Error counts: 0 0 0 0 0
                    Socket states: 5 2 2 2 2 0 0 0
                  jay_s_uk 1 Reply Last reply Reply Quote 0
                  • jay_s_uk
                    jay_s_uk @Ravs99 last edited by

                    @ravs99 looking at your config, Z will run slower due to the max speed settings etc
                    try these lines in your config

                    M584 X0.0 Y0.1 Z0.2 U0.3 V0.4  
                    M350 X16 Y16 Z16 U16 V16 I1                      ; configure microstepping with interpolation
                    M92 X192.00 Y192.00 Z192.00 U192.00 V192.00      ; set steps per mm
                    M566 X900.00 Y900.00 Z900.00 U900.00 V900.00      ; set maximum instantaneous speed changes (mm/min)
                    M203 X6000.00 Y6000.00 Z6000.00 U6000.00 V6000.00 ; set maximum speeds (mm/min)
                    M201 X500.00 Y500.00 Z6000.00 U6000.00 V6000.00      ; set accelerations (mm/s^2)
                    M906 X2000 Y2000 Z2000 U2000 U2000 I30           ; set motor currents (mA) and motor idle factor in per cent
                    M84 S30                                         ; Set idle timeout
                    
                    ; Axis Limits
                    M208 X0 Y0 Z0 U0 V0S1                                ; set axis minima
                    M208 X230 Y210 Z200 U200 V200 S0                          ; set axis maxima
                    

                    This sets each motor to a different axis (X, Y, Z, U, V).
                    They all have exactly the same settings so should move the same when jogging through DWC.
                    I'm assuming they aren't connected to anything.
                    Either use M564 H0 so set each axis to an arbitry value using G92

                    Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                    Ravs99 1 Reply Last reply Reply Quote 0
                    • Ravs99
                      Ravs99 @jay_s_uk last edited by

                      @jay_s_uk said in Not all stepper drivers working:

                      M584 X0.0 Y0.1 Z0.2 U0.3 V0.4
                      M350 X16 Y16 Z16 U16 V16 I1 ; configure microstepping with interpolation
                      M92 X192.00 Y192.00 Z192.00 U192.00 V192.00 ; set steps per mm
                      M566 X900.00 Y900.00 Z900.00 U900.00 V900.00 ; set maximum instantaneous speed changes (mm/min)
                      M203 X6000.00 Y6000.00 Z6000.00 U6000.00 V6000.00 ; set maximum speeds (mm/min)
                      M201 X500.00 Y500.00 Z6000.00 U6000.00 V6000.00 ; set accelerations (mm/s^2)
                      M906 X2000 Y2000 Z2000 U2000 U2000 I30 ; set motor currents (mA) and motor idle factor in per cent
                      M84 S30 ; Set idle timeout

                      ; Axis Limits
                      M208 X0 Y0 Z0 U0 V0S1 ; set axis minima
                      M208 X230 Y210 Z200 U200 V200 S0 ; set axis maxima

                      Ok thank you. I will try this. Yes currently they're not connected to anything. Originally, this is supposed to be a config file for a hangprinter but right now I'm just trying to find the cause of why that certain driver was slower than the rest in my original config file for the hangprinter which I pasted above.

                      Ravs99 1 Reply Last reply Reply Quote 1
                      • Ravs99
                        Ravs99 @Ravs99 last edited by

                        @ravs99 @jay_s_uk Hey. Thank you for the suggestion, that particular driver does seem to be rotating at the same speed now! However I need to make sure to apply this to my hangprinter config which I've posted above. It does seem to be an issue in my configuration so I will look into it. Thank you for the help so far.

                        jay_s_uk 1 Reply Last reply Reply Quote 1
                        • jay_s_uk
                          jay_s_uk @Ravs99 last edited by

                          @ravs99 good news. hopefully you get your config sorted

                          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Unless otherwise noted, all forum content is licensed under CC-BY-SA