Duex I2C and Motor Driver Failures



  • Hello, for Christmas I received a duex5 for my IDEX corexy (triple z-axis) machine. Prior to using the duex5, I was using a PCB I soldered myself allowing me to additional external stepper drivers to allocate all of the motor needs. However I want to continue adding more extruder motors and heaters, hence the duex5 expansion purchase.

    Description of problems:
    During any medium to long print utilizing both extruder heads, the stepper drivers on the Duex expansion will fail to work properly. The exact stepper driver to fail is unpredictable, and at what point in the print it will fail is also unpredictable. I notice this because :

    • (A) one of the lead screws on the z-axis is no longer moving (this actually partially broke my machine due to the three lead screws being out of alignment more than 100 mm during an overnight print. I have two Z motors connected to the duex5, they never fail together, just one, and each time it's unknown which will fail.
    • (B) the second extruder motor will fail to work properly. In both instances, the steppers will still turn, however they continually skip steps and turn at the wrong speed, leading to failed prints.

    Diagnostics I have done:

    • Checked all wiring and terminals, the pins are remaining in contact and there are no loose wires.
    • I installed a 2.3k ohm resister and shortened my power cables as per one I2C thread suggested.
    • Drastically reduced accelerations/jerk/currents, made no difference
    • Problem occurs 5min - 3 hours into a print.
    • In addition to the x4 40mm fans I have blowing on the duet+duex5, I positioned a large room fan in front of the boards to ensure they have proper cooling, max board temperatures were ~24C.
      -Changed motor drivers being used for z-axis and extruder motors, same result with unpredictable failure of which driver and at what time.
    • Checked the ribbon cable, it was the one included with the board and does not appear to be damaged in any way. No other wires are near the ribbon cable either.

    When using the machine in single extrusion mode, the problems do not appear. I had the machine working with both heaters and nozzles on my own custom made PCB, but I really do not want to go down that road again. Is there something wrong the duex5, my mainboard, configuration, ribbon cable?

    Here are a few logs I captured with M122 during the problem, if you notice some SG max values are 0, but they should be closer to 200 or 300..

    M122
    === Diagnostics ===
    RepRapFirmware for Duet 2 WiFi/Ethernet version 2.03 running on Duet WiFi 1.02 or later + DueX5
    Board ID: 08DJM-9178L-L4MSJ-6J1DA-3S86T-T826P
    Used output buffers: 1 of 24 (24 max)
    === RTOS ===
    Static ram: 25680
    Dynamic ram: 94868 of which 0 recycled
    Exception stack ram used: 540
    Never used ram: 9984
    Tasks: NETWORK(ready,524) HEAT(blocked,1104) DUEX(suspended,156) MAIN(running,3756) IDLE(ready,160)
    Owned mutexes:
    === Platform ===
    Last reset 00:40:58 ago, cause: software
    Last software reset at 2020-01-11 17:52, reason: User, spinning module GCodes, available RAM 9928 bytes (slot 1)
    Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0441f000 BFAR 0xe000ed38 SP 0xffffffff Task 0x4e49414d
    Error status: 4
    Free file entries: 9
    SD card 0 detected, interface speed: 20.0MBytes/sec
    SD card longest block write time: 0.0ms, max retries 0
    MCU temperature: min 22.6, current 22.9, max 23.0
    Supply voltage: min 21.0, current 21.8, max 21.8, under voltage events: 0, over voltage events: 0, power good: yes
    Driver 0: ok, SG min/max 80/1023
    Driver 1: ok, SG min/max 143/1023
    Driver 2: standstill, SG min/max 0/1023
    Driver 3: ok, SG min/max 297/1023
    Driver 4: ok, SG min/max 0/208
    Driver 5: standstill, SG min/max not available
    Driver 6: standstill, SG min/max 0/297
    Driver 7: standstill, SG min/max not available
    Driver 8: standstill, SG min/max not available
    Driver 9: standstill, SG min/max 0/0
    Date/time: 2020-01-11 18:33:41
    Cache data hit count 4294967295
    Slowest loop: 17.81ms; fastest: 0.08ms
    I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
    === Move ===
    Hiccups: 0, FreeDm: 164, MinFreeDm: 147, MaxWait: 0ms
    Bed compensation in use: mesh, comp offset 0.000
    === DDARing ===
    Scheduled moves: 21618, completed moves: 21578, StepErrors: 0, LaErrors: 0, Underruns: 0, 0
    === Heat ===
    Bed heaters = 6 -1 -1 -1, chamberHeaters = 7 -1
    Heater 1 is on, I-accum = 0.6
    Heater 6 is on, I-accum = 0.2
    === GCodes ===
    Segments left: 1
    Stack records: 3 allocated, 0 in use
    Movement lock held by null
    http is idle in state(s) 0
    telnet is idle in state(s) 0
    file is doing "G1 X4.229 Y-18.101 E0.00021" in state(s) 0
    serial is idle in state(s) 0
    aux is idle in state(s) 0
    daemon is idle in state(s) 0
    queue is idle in state(s) 0
    autopause is idle in state(s) 0
    Code queue is empty.
    === Network ===
    Slowest loop: 200.38ms; fastest: 0.08ms
    Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0)
    HTTP sessions: 1 of 8

    • WiFi -
      Network state is running
      WiFi module is connected to access point
      Failed messages: pending 0, notready 0, noresp 7
      WiFi firmware version 1.23
      WiFi MAC address b4:e6:2d:60:3f:42
      WiFi Vcc 3.38, reset reason Turned on by main processor
      WiFi flash size 4194304, free heap 25664
      WiFi IP address 192.168.0.2
      WiFi signal strength -67dBm, reconnections 0, sleep mode modem
      Socket states: 0 0 0 0 0 0 0 0



  • M122
    === Diagnostics ===
    RepRapFirmware for Duet 2 WiFi/Ethernet version 2.03 running on Duet WiFi 1.02 or later + DueX5
    Board ID: 08DJM-9178L-L4MSJ-6J1DA-3S86T-T826P
    Used output buffers: 1 of 24 (20 max)
    === RTOS ===
    Static ram: 25680
    Dynamic ram: 94868 of which 0 recycled
    Exception stack ram used: 540
    Never used ram: 9984
    Tasks: NETWORK(ready,524) HEAT(blocked,1104) DUEX(suspended,156) MAIN(running,3756) IDLE(ready,160)
    Owned mutexes:
    === Platform ===
    Last reset 00:34:05 ago, cause: software
    Last software reset at 2020-01-11 17:52, reason: User, spinning module GCodes, available RAM 9928 bytes (slot 1)
    Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0441f000 BFAR 0xe000ed38 SP 0xffffffff Task 0x4e49414d
    Error status: 0
    Free file entries: 9
    SD card 0 detected, interface speed: 20.0MBytes/sec
    SD card longest block write time: 0.0ms, max retries 0
    MCU temperature: min 22.7, current 22.9, max 22.9
    Supply voltage: min 21.3, current 21.4, max 21.9, under voltage events: 0, over voltage events: 0, power good: yes
    Driver 0: ok, SG min/max 83/1023
    Driver 1: ok, SG min/max 350/1023
    Driver 2: ok, SG min/max 130/269
    Driver 3: ok, SG min/max 90/1023
    Driver 4: standstill, SG min/max not available
    Driver 5: standstill, SG min/max not available
    Driver 6: ok, SG min/max 0/125
    Driver 7: standstill, SG min/max not available
    Driver 8: standstill, SG min/max not available
    Driver 9: ok, SG min/max 0/128
    Date/time: 2020-01-11 18:26:47
    Cache data hit count 4294967295
    Slowest loop: 12.62ms; fastest: 0.08ms
    I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
    === Move ===
    Hiccups: 0, FreeDm: 165, MinFreeDm: 161, MaxWait: 4ms
    Bed compensation in use: mesh, comp offset 0.000
    === DDARing ===
    Scheduled moves: 16210, completed moves: 16170, StepErrors: 0, LaErrors: 0, Underruns: 0, 0
    === Heat ===
    Bed heaters = 6 -1 -1 -1, chamberHeaters = 7 -1
    Heater 2 is on, I-accum = 0.4
    Heater 6 is on, I-accum = 0.2
    === GCodes ===
    Segments left: 1
    Stack records: 3 allocated, 0 in use
    Movement lock held by null
    http is idle in state(s) 0
    telnet is idle in state(s) 0
    file is doing "G1 X-23.905 Y21.134 E0.08346" in state(s) 0
    serial is idle in state(s) 0
    aux is idle in state(s) 0
    daemon is idle in state(s) 0
    queue is idle in state(s) 0
    autopause is idle in state(s) 0
    Code queue is empty.
    === Network ===
    Slowest loop: 203.18ms; fastest: 0.08ms
    Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0)
    HTTP sessions: 1 of 8

    • WiFi -
      Network state is running
      WiFi module is connected to access point
      Failed messages: pending 0, notready 0, noresp 4
      WiFi firmware version 1.23
      WiFi MAC address b4:e6:2d:60:3f:42
      WiFi Vcc 3.38, reset reason Turned on by main processor
      WiFi flash size 4194304, free heap 25664
      WiFi IP address 192.168.0.2
      WiFi signal strength -67dBm, reconnections 0, sleep mode modem
      Socket states: 0 0 0 0 0 0 0 0

    And my configuration file......
    ; General preferences
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves
    M564 S1 H0 ; Allow movement outside axis limits without homing

    ; Network
    M550 P"CrusaXY" ; 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 P1 S0 D3 ; Physical drive 1 goes backwards
    M569 P2 S0 D3 ; Physical drive 2 goes forwards
    M569 P3 S0 D3 ; Physical drive 3 goes backwards
    M569 P4 S1 D3 ; Physical drive 4 goes backwards
    M569 P6 S0 D3 ; Physical drive 6 goes backwards
    M569 P7 S0 D3 ; Physical drive 7 goes backwards
    M569 P8 S0 D3 ; Physical drive 8 goes backwards
    M569 P9 S1 D3 ; Physical drive 9 goes backwards
    M584 X0 Y1 U3 Z2:6:9 E4:8 ; create the U axis and assign stepper driver 3 to it
    M669 Y-1:1:0:-1 X1:1:0:0 U0:0:0:1 Z0:0:1:0
    M350 X16 Y16 U16 Z16 E16 I1 ; Configure microstepping with interpolation
    M92 X80.65 Y80.65 U80.65 Z1200 E138:138 ; Set steps per mm
    M566 X360.00 Y360.00 U360.00 Z60.00 E600.00 ; Set maximum instantaneous speed changes (mm/min)
    M203 X33941 Y33941 U33941 Z900.00 E12000.00 ; Set maximum speeds (mm/min)
    M201 X2400.00 Y2400.00 U2400.00 Z300 E2400.00 ; Set accelerations (mm/s^2)
    M906 X1000.00 Y1000.00 U1000.00 Z1000 E900.00 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S300 ; Set idle timeout

    ; Axis Limits

    M208 U-160 X-244 Y-261 Z0 S1 ; Set axis minima
    M208 U251 X167.9 Y235 Z470 S0 ; Set axis maxima

    ; Stall Detection
    M915 P0:1:3 S10 F0 H200 R0 ; (Pxx:xx:xxx - Motor drivers, Snnn - Sensitivity to stall (-63->+63), Fn - Filtering (1-Y 0-N), Rn - Action to take (0 -none,
    ; 1- report, 2- pause, 3- pause/home/resume), min steps/sec)

    ; Endstops
    M574 X2 S1 ; Use sensored homing
    M574 Z1 S2 ; Set active high endstops for low ends (S1=regular endstops S2=z-probe S3= sensorless)
    M574 Y2 U2 S3 ; Set active high endstops for high ends (S1=regular endstops S3= sensorless)

    ; Z-Probe
    M307 H3 A-1 C-1 D-1
    M558 P9 H5 A10 S0.06 F180 T12000 R0.15 Z1
    G31 X35 Y2 Z0.76 P25
    M557 X-200:193 Y-192:210 P5:5 ; Define mesh grid
    M376 H10 ; Set taper off distance to 10mm

    ; Heaters
    M305 P6 T100000 R4700 X0 ; Set thermistor + ADC parameters for heater 6
    M143 H6 P6 S190 ; Set temperature limit for heater 6 to 190C
    M570 H6 P400 ; Set Heater 6 fault parameters
    M140 H6 R0 S0 ; Enable heated bed - Use heater 6 and NTC100k on channel 0
    M305 P1 X200 W2 ; Set PT100 parameters + ADC parameters for heater 1
    M143 H1 S450 ; Set temperature limit for heater 1 to 450C
    M570 H1 T120 P40 ; Set Heater 1 fault parameters
    M305 P2 X201 W2 ; Set PT100 parameters + ADC parameters for heater 2
    M143 H2 S450 ; Set temperature limit for heater 2 to 450C
    M570 H2 T120 P40 ; Set Heater 2 fault parameters
    M141 H7 ; heater 7 is the chamber heater
    M143 H7 S90 ; Set temperature limit for heater 6 to 190C
    M570 H7 P40
    M305 P7 T100000 R4700 B4138 X7 ; heater 7 is monitored by a 100K thermistor with B=3950 and a 4.7K series resistor

    ; Heater Tuning

    M307 H0 A491.9 C235.6 D6.3 V21.3 B0
    M307 H1 A491.9 C235.6 D6.3 V21.3 B0
    M307 H2 A491.9 C235.6 D6.3 V21.3 B0
    M307 H6 A270.7 C420.2 D10.3 V22.0 B0
    M307 H7 A19.5 C34.3 D4.3 V22.1 B0

    ; 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
    M106 P2 S0 I0 F500 H-1 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P6 S255 I0 F500 H2 T80 ; Set fan 6 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P7 S100:255 I0 F500 H100:101:102 T20:24 ; Set fan 7 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P8 S255 I0 F500 H1 T80 ; Set fan 8 value, PWM signal inversion and frequency. Thermostatic control is turned off

    ; Tools
    M563 P0 S"Main Extruder" D0 H1 ; Define tool 0
    G10 P0 X0 Y0 Z0 R225 S245 ; Set tool 0 axis offsets
    ; Set initial tool 0 active and standby temperatures to 0C
    M563 P1 S"IDEX Extruder" D1 X3 H2 F1 ; Define tool 1
    G10 P1 U-0.7 Y-0.8 Z.24 X0 R170 S190 ; Set tool 1 axis offsets
    ; Set initial tool 1 active and standby temperatures to 0C

    ;Define "Ditto" Printing
    M563 P3 S"Ditto Printing" D0:1 H1:2 X0:3 F1:2 ; tool 2 uses both extruders and hot end heaters, maps X to both X and U, and uses both print cooling fans
    G10 P3 X105 Y0 U-105 S245 R225 ; set tool offsets and temperatures for tool 2
    M567 P3 E1:1 ; set mix ratio 100% on both extruders

    ; Automatic power saving
    M911 S15:18:20 R28 P"M913 U480 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; Set voltage thresholds and actions to run on power loss

    ; Custom settings
    M501
    M581 E1 S1 T0 C0 ; External Emergency Stop trigger
    M581 E6 S1 T2 C0 ; External SuperVolcano Activation
    M579 X1.0 Z1.0 Y1.0 U1.009 ; Axis scaling
    M572 D0:1 S0.044 ; Pressure advance
    M207 S1.2 R0 F2100 ; Set Firmware retraction
    M912 P0 S-10.8 ; Calibrate MCU Temperature
    M593 F56 ; Cancel ringing



  • And tool changing files......
    ; tfree0.g
    ; called when tool 0 is freed
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Sat Jul 27 2019 09:41:51 GMT-0600 (Mountain Daylight Time)
    M106 P0 S255
    M220 S100
    G1 E-3 F2100
    M913 E30
    G92 E0.0
    G91
    G1 Z4 F900 S2 ; lift Z relative to current position
    G90
    M98 P"/macros/NozzleBrushWipe"
    G1 X-241 F18000
    G10 R185 P0

    ; tpost0.g
    ; called after tool 0 has been selected
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Sat Jul 27 2019 09:41:51 GMT-0600 (Mountain Daylight Time)
    ; Wait for set temperatures to be reached
    M220 S100

    M104 S195 T0 ; Wait for temp
    M116 H1 S10

    G90
    G1 X-110 Y-260 F18000
    M913 E100
    G1 E3 F900
    G1 X-88 F9000
    G1 E-0.6 F1800 ; retract slightly
    G92 E0.0
    G1 X80 F10800
    G1 X-80 F10800
    G1 X80 F15000
    G1 X-80 F15000
    G1 X80 F18000
    G90
    M106 P0 S165
    M220 S100

    I will add some photos of the failed prints if needed, but they always fail because of the same thing -> a stepper driver is failing to operate properly causing the extruder motor to miss steps, or one of the three leadscrews to stop turning.



  • update to 2.05. there were a lot of i2c updates in between.



  • I updated to 2.05 this morning, tried the print again, and the extruder motor driver (8) failed around 10mm. Here is the M122 readout.

    M122
    === Diagnostics ===
    RepRapFirmware for Duet 2 WiFi/Ethernet version 2.05 running on Duet WiFi 1.02 or later + DueX5
    Board ID: 08DJM-9178L-L4MSJ-6J1DA-3S86T-T826P
    Used output buffers: 1 of 24 (22 max)
    === RTOS ===
    Static ram: 25712
    Dynamic ram: 94440 of which 0 recycled
    Exception stack ram used: 544
    Never used ram: 10376
    Tasks: NETWORK(ready,628) HEAT(blocked,1152) DUEX(suspended,160) MAIN(running,1664) IDLE(ready,160)
    Owned mutexes:
    === Platform ===
    Last reset 00:59:46 ago, cause: software
    Last software reset at 2020-01-12 09:48, reason: User, spinning module GCodes, available RAM 10424 bytes (slot 3)
    Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0441f000 BFAR 0xe000ed38 SP 0xffffffff Task 0x4e49414d
    Error status: 0
    Free file entries: 9
    SD card 0 detected, interface speed: 20.0MBytes/sec
    SD card longest block write time: 9.7ms, max retries 0
    MCU temperature: min 21.8, current 22.6, max 23.1
    Supply voltage: min 20.9, current 21.9, max 22.1, under voltage events: 0, over voltage events: 0, power good: yes
    Driver 0: ok, SG min/max 0/1023
    Driver 1: ok, SG min/max 11/1023
    Driver 2: standstill, SG min/max 0/1023
    Driver 3: ok, SG min/max 0/1023
    Driver 4: ok, SG min/max 0/1023
    Driver 5: standstill, SG min/max not available
    Driver 6: standstill, SG min/max 0/1023
    Driver 7: standstill, SG min/max not available
    Driver 8: standstill, SG min/max 0/1023
    Driver 9: standstill, SG min/max 0/1023
    Date/time: 1970-01-01 00:00:00
    Cache data hit count 4294967295
    Slowest loop: 151.26ms; fastest: 0.07ms
    I2C nak errors 1, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
    === Move ===
    Hiccups: 0, FreeDm: 152, MinFreeDm: 85, MaxWait: 155504ms
    Bed compensation in use: mesh, comp offset 0.000
    === DDARing ===
    Scheduled moves: 36095, completed moves: 36063, StepErrors: 0, LaErrors: 0, Underruns: 0, 0
    === Heat ===
    Bed heaters = 6 -1 -1 -1, chamberHeaters = 7 -1
    Heater 1 is on, I-accum = 0.5
    Heater 6 is on, I-accum = 0.2
    === GCodes ===
    Segments left: 1
    Stack records: 5 allocated, 0 in use
    Movement lock held by null
    http is idle in state(s) 0
    telnet is idle in state(s) 0
    file is doing "G1 X6.335 Y23.041 E0.05792" in state(s) 0
    serial is idle in state(s) 0
    aux is idle in state(s) 0
    daemon is idle in state(s) 0
    queue is idle in state(s) 0
    autopause is idle in state(s) 0
    Code queue is empty.
    === Network ===
    Slowest loop: 56.77ms; fastest: 0.00ms
    Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0)
    HTTP sessions: 1 of 8

    • WiFi -
      Network state is running
      WiFi module is connected to access point
      Failed messages: pending 0, notready 0, noresp 0
      WiFi firmware version 1.23
      WiFi MAC address b4:e6:2d:60:3f:42
      WiFi Vcc 3.38, reset reason Turned on by main processor
      WiFi flash size 4194304, free heap 25824
      WiFi IP address 192.168.0.2
      WiFi signal strength -63dBm, reconnections 0, sleep mode modem
      Socket states: 0 0 0 0 0 0 0 0

  • administrators

    Please post photos of the wiring, in particular the power wiring to the VIN terminal blocks of the Duet and the X5.



  • Here is a google drive folder for the wiring.

    https://photos.app.goo.gl/8fYeboJmFRjGxEaj6

    What's really strange about everything is I have only noticed the problem when I am using all of the stepper drivers, and heaters. If I do a single extrusion print, it can run for >10 hours without any problems on the Z-axis or extruder motors



  • Where was the board purchased from?



  • filastruder


  • administrators

    @hunterbrighton said in Duex I2C and Motor Driver Failures:

    Here is a google drive folder for the wiring.

    https://photos.app.goo.gl/8fYeboJmFRjGxEaj6

    What's really strange about everything is I have only noticed the problem when I am using all of the stepper drivers, and heaters. If I do a single extrusion print, it can run for >10 hours without any problems on the Z-axis or extruder motors

    I suspect the problems are caused by either noise on the DueX5 ground or intermittent +VIN power to the DueX2. I recommend you re-do the VIN and ground wires between the Duet and DueX. Use a thicker ground wire, the same thickness as the wire between Duet VIN and the PSU would be good. The +VIN feed to the DueX can come directly from the PSU if you prefer, it's only the ground wire that must come from the Duet.



  • I upgraded the wires to 10 AWG, this is the largest I can use with x2 entering the GND terminals. I noticed my config file was slightly wrong, so I modified that. In addition I changed the stepper wiring on the Duex board so it would only control the Z axis, and after running a test print it seems that it has once again failed for the same reason, this time was quite catastrophic. I have uploaded photos here. -> https://photos.app.goo.gl/TwkdnaHme8Bu8YQ79

    This is making me extremely upset, considering upon a software reset, all motor drivers immediately begin to work properly, the Duet board sometimes picks up on the error, but never stops the machine or gives me an error that I can actually diagnose. So far purchasing the Duex5 has only caused more problems than good since I have just been trying to re-calibrate my machine after installation, and it has resulted in drastic mechanical failures of my machine due to over travel of individual lead screws.....The PCB I soldered myself worked great at providing me 5 more additional external stepper drivers, but I want to use the fans, heaters, thermistor and servo capabilities of the Duex5. There is something going on with the TMC2660 onboard the Duex compared to the A4988 drivers I have kicking around so I am considering creating my own ribbon cable that branches the signals I need to the required boards. This isn't ideal, but I want my machine to be working right.


Log in to reply