Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    SPI Thermocouple daughterboard issue icm Stepper motors

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    2
    4
    204
    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.
    • Bart1992undefined
      Bart1992
      last edited by Bart1992

      Hi,

      I've hooked up 2 SPI thermocouple daughterboards and connected 3 J-type thermocouple's to it ( 3 seperated bed heaters ).
      The sensor readings are perfectly fine, until the Z-axis stepper motors start moving. The readings of the sensor go to 2000, indicating open/circuit/ fault reading.

      I've used fully shielded thermistor cable, and grounded the shield. The thermistor cables are as far away from the stepper motor wires as possible.

      I really tried everything regarding the hardware, but i'm running out of options....

      Could it be possible that there is something wrong in my firmware config file? Or in the firmware itself? Since I think it's suspicious that all 3 thermistors ( on the SPI daughterboards ) run into this error.

      M18 ( turn steppers of ) resolved the issue. However when turning the steppers on, the error occurs again immediately.

      Error: Temperature reading fault on heater 2: sensor short to other wiring
      

      Any one some advice/ideas on how to solve this?

      M122 output:

      m122
      === Diagnostics ===
      RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3 (2021-06-15 21:44:54) running on Duet WiFi 1.02 or later + DueX5
      Board ID: 0JD0M-9P6B2-NJ4S4-6J9FL-3SN6J-KS2GK
      Used output buffers: 3 of 24 (24 max)
      === RTOS ===
      Static ram: 23876
      Dynamic ram: 77144 of which 0 recycled
      Never used RAM 13396, free system stack 128 words
      Tasks: NETWORK(ready,13.3%,226) HEAT(delaying,0.1%,314) Move(notifyWait,0.1%,305) DUEX(notifyWait,0.0%,24) MAIN(running,86.3%,441) IDLE(ready,0.1%,29), total 100.0%
      Owned mutexes: WiFi(NETWORK)
      === Platform ===
      Last reset 00:12:26 ago, cause: power up
      Last software reset time unknown, reason: User, GCodes spinning, available RAM 13604, slot 1
      Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a
      Error status: 0x0c
      Aux0 errors 0,1,0
      Step timer max interval 0
      MCU temperature: min 29.3, current 36.9, max 38.0
      Supply voltage: min 23.8, current 24.2, max 24.6, under voltage events: 0, over voltage events: 0, power good: yes
      Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
      Driver 0: position 5000, standstill, SG min/max 0/108
      Driver 1: position 95000, standstill, SG min/max not available
      Driver 2: position 12094, standstill, SG min/max not available
      Driver 3: position 0, standstill, SG min/max not available
      Driver 4: position 0, standstill, SG min/max not available
      Driver 5: position 0, standstill, SG min/max 0/111
      Driver 6: position 0, standstill, SG min/max 0/274
      Driver 7: position 0, standstill, SG min/max 0/275
      Driver 8: position 0, standstill, SG min/max 0/266
      Driver 9: position 0, standstill, SG min/max 0/297
      Driver 10: position 0
      Driver 11: position 0
      Date/time: 2022-02-09 13:46:14
      Cache data hit count 4294967295
      Slowest loop: 16.14ms; fastest: 0.17ms
      I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
      === Storage ===
      Free file entries: 10
      SD card 0 detected, interface speed: 20.0MBytes/sec
      SD card longest read time 3.2ms, write time 0.0ms, max retries 0
      === Move ===
      DMs created 83, maxWait 35109ms, bed compensation in use: mesh, comp offset 0.000
      === MainDDARing ===
      Scheduled moves 14, completed moves 14, 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 = 2 3 4 -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
      Daemon is idle in state(s) 0
      Autopause is idle in state(s) 0
      Code queue is empty.
      === DueX ===
      Read count 1, 0.08 reads/min
      === Network ===
      Slowest loop: 15.64ms; fastest: 0.00ms
      Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions
      HTTP sessions: 1 of 8
      - WiFi -
      Network state is active
      WiFi module is connected to access point 
      Failed messages: pending 0, notready 0, noresp 0
      WiFi firmware version 1.26
      WiFi MAC address f4:cf:a2:71:f6:e7
      WiFi Vcc 3.37, reset reason Power up
      WiFi flash size 2097152, free heap 24912
      WiFi IP address 192.168.1.245
      WiFi signal strength -69dBm, mode 802.11n, reconnections 0, sleep mode modem
      Clock register 00002002
      Socket states: 4 0 0 0 0 0 0 0
      

      Config.g :

      ;Generated by Modix - 1.4
      ;Modix Big-Meter, Duex Expansion, Dual Printhead, Testing
      ; Configuration file for Duet WiFi (firmware version 3.3)
      
      
      ; General preferences_________________________________________________________
      G90                                             			; send absolute coordinates...
      M83                                             			; ...but relative extruder moves
      M111 S0 								; Debug off
      M555 P2 								; Set output to look like Marlin
      M575 P1 B57600 S1							; Set auxiliary serial port baud rate and require checksum (for PanelDue)
      
      
      ; Network_____________________________________________________________________
      M550 P"Big Meter (RRF3.3)"                         			; set printer name
                    					; Set password (optional)
      M552 S1                                        				; enable network
      ;M552 P0.0.0.0								; Uncomment this command for using Duet Ethernet board
      M586 P0 S1                                      			; enable HTTP
      M586 P1 S0                                      			; disable FTP
      M586 P2 S0                                      			; disable Telnet
      
      ; Drives_________________________________________________________________________
      ;Main board______________________________________________________________________
      M569 P0 S0                                                     		; Physical drive 0 . X1
      M569 P1 S1                                                       	; Physical drive 1 . X2
      M569 P2 R-1                                                        	; Physical drive 2 . Canceled
      M569 P3 S1                                                       	; Physical drive 3 . Main Extruder
      M569 P4 S0                                                       	; Physical drive 4 . Secondary Extruder
      ;Duex5 board_____________________________________________________________________
      M569 P5 S0                                                       	; Physical drive 5 . Y
      M569 P6 S0                                                       	; Physical drive 6 . Z1 (0,1000) 
      M569 P7 S0                                                       	; Physical drive 7 . Z2 (0,0) 
      M569 P8 S0                                                       	; Physical drive 8 . Z3 (1000,0) 
      M569 P9 S0                                                       	; Physical drive 9 . Z4 (1000,1000) 
      
      ;Settings_________________________________________________________
      M584 X0:1 Y5 Z6:7:8:9 U1 E3:4 P3					; Driver mapping
      M671 X-181:-181:1049:1049 Y1066:-58:-58:1066 S10    			; Anticlockwise 
      ;___________________________________________________________________
      M350 X16 Y16 U16 I1  		                           		; Configure microstepping with interpolation
      M350 Z16 E16:16 I0              		                	; Configure microstepping without interpolation
      M92 X100.00 Y100.00 Z2000.00 E415.50:418.500 U100.00      	; Set steps per mm
      M566 X200 Y200 Z30.00 E120.00:120.00 U240 P1               	; Set maximum instantaneous speed changes (mm/min)
      M203 X9000.00 Y9000.00 Z200.00 E1200.00:1200.00 U9000.00    ; Set maximum speeds (mm/min)
      M201 X500 Y500 Z120.00 E250.00:250.00 U1000             	; Set accelerations (mm/s^2)
      M204 P300                                      				; Set print and travel accelerations  (mm/s^2)
      M906 X1800 Y1800.00 E1000.00:1000.00 U1800 I40 				; Set motor currents (mA) and motor idle factor in per cent
      M906 Z1800 I50											; Set motor currents (mA) and motor idle factor in per cent
      M84 S100                                          			; Set idle timeout - one minute
      
      ; Axis Limits
      M208 X0 Y0 Z-1 S1                               			; set axis minima
      M208 X1000 Y1000 Z1000 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 U1 S1 P"e0stop"                            			; configure switch-type (e.g. microswitch) endstop for low end on X via pin xstop
      M574 Y2 S1 P"ystop"                            				; configure switch-type (e.g. microswitch) endstop for low end on Y via pin ystop
      
      ; Z-Probe
      M558 P5 C"^zprobe.in" H5 F120 T6000 A1 R0.7  				; set Z probe type to bltouch and the dive height + speeds
      M950 S0 C"duex.pwm5"
      G31 P500 X-14 Y21 Z1.047                     				; set Z probe trigger value, offset and trigger height
      M556 S50 X0 Y0 Z0                               			; set orthogonal axis compensation parameters
      M557 X-14:974 Y21:1009 S66.5                 				; define mesh grid
      M376 H10			                						; Height (mm) over which to taper off the bed compensation
      
      ; Heaters___________________________________________________________
      ;M140 H-1    												; disable heated bed (overrides default heater mapping)
      ; bed heater0
      M308 S2 P"spi.cs1" Y"thermocouple-max31856" T"J"   ; configure sensor 0 as thermistor on pin bedtemp
      M950 H2 C"duex.e2heat" T2                              ; create bed heater output on exp.heater7 and map it to sensor 0
      M140 P0 H2                                              ; Define bed heater as heater 7 output
      M143 H2 S80                                          ; set temperature limit for heater 0 to 80C
      M570 H2 P420 T10 ; heater fault detection
      
      ; bed heater1
      M308 S3 P"spi.cs2" Y"thermocouple-max31856" T"J"   ; configure sensor 0 as thermistor on pin bedtemp
      M950 H3 C"duex.e3heat" T3                              ; create bed heater output on exp.heater7 and map it to sensor 0
      M140 P1 H3                                              ; Define bed heater as heater 7 output
      M143 H3 S80                                          ; set temperature limit for heater 0 to 80C
      M570 H3 P420 T10 ; heater fault detection
      
      ; bed heater2
      M308 S4 P"spi.cs3" Y"thermocouple-max31856" T"J"   ; configure sensor 0 as thermistor on pin bedtemp
      M950 H4 C"duex.e4heat" T4                              ; create bed heater output on exp.heater7 and map it to sensor 0
      M140 P2 H4                                              ; Define bed heater as heater 7 output
      M143 H4 S80                                          ; set temperature limit for heater 0 to 80C
      M570 H4 P420 T10 ; heater fault detection
      
      ;E0_________________________________________________________________
      M308 S0 P"e0temp" Y"thermistor" T100000 B4725   			; configure sensor 0 as thermistor on pin e0temp
      M950 H0 C"e0heat" T0                            			; create nozzle heater output on e0heat and map it to sensor 0
      ;M307 H0 B0 S1.00                               			; PID calibration
      M307 H0 B0 R1.933 C204.4:156.5 D5.51 S1.00
      M143 H0 S285                                    			; set temperature limit for heater 0 to 280C
      
      ;E1_________________________________________________________________
      M308 S1 P"e1temp" Y"thermistor" T100000 B4725   			; configure sensor 1 as thermistor on pin e1temp
      M950 H1 C"e1heat" T1                            			; create nozzle heater output on e1heat and map it to sensor 1
      ;M307 H1 B0 S1.00                               			; PID calibration
      M143 H1 S285                                    			; 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 on
      M950 F1 C"fan1" Q500                            			; create fan 1 on pin fan1 and set its frequency
      M106 P1 S0 H-1                                  			; set fan 1 value. Thermostatic control is turned on
      M950 F2 C"duex.fan7" Q500                            			; create LED on pin fan2 and set its frequency
      M106 P2 S0 H-1                               				; Disable fan channel for LED
      ;M106 P2 S255								; LED on by default
      M950 F3 C"duex.fan5" Q500                       			; create fan 3 on pin fan1 and set its frequency
      M106 P3 S255 H0 T45                             			; set fan 3 value. Thermostatic control is turned on
      M950 F4 C"duex.fan6" Q500                       			; create fan 4 on pin fan1 and set its frequency
      M106 P4 S255 H1 T45                             			; set fan 4 value. Thermostatic control is turned on
      
      
      ; Tools______________________________________________________________
      ;T0_________________________________________________________________
      M563 P0 S"E0 Primary" D0 H0 F0                  			; define tool 0
      G10 P0 X0 Y0 Z0                                 			; set tool 0 axis offsets
      G10 P0 R0 S210                                  			; set initial tool 0 active and standby temperatures to 0C
      
      ;T1_________________________________________________________________
      M563 P1 S"E1 Secondary" D1 H1 F1                			; define tool 1
      G10 P1 X0 Y49 Z0                                			; set tool 1 axis offsets
      G10 P1 R0 S210                                    			; set initial tool 1 active and standby temperatures to 0C
      
      
      ; Custom settings__________________________________________________
      
      M950 J0 C"exp.e2stop"  					  		; create Input Pin 0 on pin E2 to for M581 Command.
      M581 T1 P0 S0 R1							; Regular filament sensor for E0 As External Trigger
      ;M591 D0 P7 C"e1stop" S1 L4.2 E10 R10:300				; Clog Detector E0 [Add-On]
      
      M950 J1 C"exp.e3stop"  					  		; create Input Pin 1 on pin E3 to for M581 Command.
      M581 T1 P1 S0 R1							; Regular filament sensor for E1 As External Trigger
      ;M591 D1 P7 C"zstop" S1 L4.2 E10 R10:300				; Clog Detector E1 [Add-On]
      
      M950 J2 C"exp.e4stop"  					  		; create Input Pin 2 on pin E4 to for M581 Command.
      ;M581 T0 P2 S0 R0							; Crash Detector   [Add-On]
      
      
      M911 S21.0 R23.0 P"M913 X0 Y0 G91 M83 G1 Z1 E-5 F1000" ; auto save/restart on power loss
      
      dc42undefined 1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators @Bart1992
        last edited by

        @bart1992 please check the following:

        1. Which version of the thermocouple daughter board are you using? The original ones using MAX31855 chips were more affected by interference, although it is possible to add capacitors to mitigate this. Later ones use MAX31856 chips and have built-in filtering.

        2. Are the thermocouples electrically isolated from the metalwork of the hot end or other device that they are measuring? They need to be.

        3. Have you used twisted pair thermocouple wire all the way from the thermocouple to the Duet? Thermocouples produce very low voltages at low impedance, so they pick up interference by induction very easily. This means it is essential to use twisted pair wiring (more important than it is to use shielded cable).

        4. Do the thermocouple wires run in the same cable bundle as the Z motor stepper wires over any significant distance?

        5. Have you grounded the printer from to the Duet (as well as to mains ground)? If not, and the Z motor is bolted to the frame, then the frame may be picking up switching transients from the Z motor cables via the Z motor body.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        Bart1992undefined 1 Reply Last reply Reply Quote 0
        • Bart1992undefined
          Bart1992 @dc42
          last edited by

          @dc42

          Thanks for your reply!

          I managed to fix the issue ( point 3 helped me out ).
          I've extended the 'bare' thermocouple wire with regular shielded wire, apparently this caused all the issues. So after removing these extensions, and connecting the thermocouple wire directly to the MAX31856 daughterboard everything was working out fine.

          However the thermocouple wires are still a little too short, what is the correct way of extending thermocouple wire?

          Thanks

          dc42undefined 1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators @Bart1992
            last edited by

            @bart1992 you can buy thermocouple extension wire. It should be the same type as the thermocouple, for example K type extension wire if the thermocouple is K type. Twisted pair is better than flat pair. Here are some examples that I found by googling "thermocouple wire": https://uk.rs-online.com/web/c/automation-control-gear/sensors/thermocouple-extension-wire/.

            You can also buy purpose-made connectors for thermocouples cables, alternatively just use a very small terminal block.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

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