SD Card Corruption and Board Reset Issue
-
I am in the process of building a large-format 3d printer and I am using a duet 2 ethernet board at the moment.
A few weeks ago the board would start to shut off and reset itself intermittently, with resets becoming more and more frequent the more the board was being used. The MCU temperature was also rising, and the shut-offs would usually occur between 55 and 70 degrees (before, it never really got above 45 during use). I tried lots of hardware solutions as well as re-uploading the firmware (I was using 3.4.6 when the problem first started and now I am using 3.5.1), but the problem persisted.
Finally, I tried using a different SD card and it solved the problem, or at least, it fixed the problem temporarily. A week later the same problem popped up again and so I switched to yet another SD card. This worked for about a week again and now the problem is back.
It seems the board is corrupting the SD cards, but I don't know why and I'm not sure this is the root of the problem. Does anyone have any ideas of what it might be and how I can troubleshoot this? Happy to provide copies of my config.g files and such if necessary but as a new user here it seems I don't have the privilege of uploading files yet
-
@Growlix what current are you running the stepper drivers at? Is the board tightly enclosed? Do you have a fan to cool the board?
Yes, please provide config.g and send M122 in the console (ideally after an unplanned shut off) and copy and paste the response in your reply.
Ian
-
@droftarts thanks so much for your response, sorry I somehow missed it until now. I'll keep a better eye out in the future.
I am using Clearpath SDSK servo motors that are powered independently of the board, but in my config.g file I have the currents set to 800mA each.
The board is enclosed but I do have a fan that is cooling the enclosure and the board. When I take the board out of the enclosure into open air I see no change in behavior.
Since my last SD card switch (May 22) the machine hasn't shut down like before and unfortunately I did not save any of my M122 reports from after a crash. Here is one from today though:
M122 === Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.5.1 (2024-04-19 14:40:46) running on Duet Ethernet 1.02 or later Board ID: 0JD0M-9P6M2-NWNS4-7J9DJ-3SN6L-KT2HK Used output buffers: 1 of 26 (18 max) === RTOS === Static ram: 23256 Dynamic ram: 68052 of which 0 recycled Never used RAM 18980, free system stack 186 words Tasks: NETWORK(1,ready,21.6%,220) HEAT(3,nWait 5,0.1%,328) Move(4,nWait 5,0.0%,359) MAIN(1,running,78.1%,761) IDLE(0,ready,0.2%,29), total 100.0% Owned mutexes: === Platform === Last reset 00:07:51 ago, cause: power up Last software reset at 2024-05-31 13:49, reason: User, Gcodes spinning, available RAM 18748, slot 0 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 MCU temperature: min 25.2, current 33.4, max 34.1 Supply voltage: min 23.9, current 24.0, max 24.1, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 99/6, heap memory allocated/used/recyclable 2048/164/60, gc cycles 0 Events: 0 queued, 0 completed Driver 0: standstill, SG min n/a Driver 1: standstill, SG min n/a Driver 2: standstill, SG min n/a Driver 3: standstill, SG min n/a Driver 4: standstill, SG min n/a Driver 5: Driver 6: Driver 7: Driver 8: Driver 9: Driver 10: Driver 11: Date/time: 2024-06-03 11:32:16 Cache data hit count 4294967295 Slowest loop: 249.36ms; fastest: 0.18ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 9 SD card 0 detected, interface speed: 20.0MBytes/sec SD card longest read time 15.8ms, write time 0.0ms, max retries 0 === Move === DMs created 83, segments created 0, maxWait 0ms, bed compensation in use: mesh, height map offset 0.000, max steps late 0, min interval 0, bad calcs 0, ebfmin 0.00, ebfmax 0.00 no step interrupt scheduled Moves shaped first try 0, on retry 0, too short 0, wrong shape 0, maybepossible 0 === DDARing 0 === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters 0 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0 Heater 0 is on, I-accum = 0.2 === GCodes === Movement locks 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 doing "G4 S1" in state(s) 0 0, running macro Autopause is idle in state(s) 0 Q0 segments left 0 Code queue 0 is empty === Network === Slowest loop: 16.44ms; fastest: 0.01ms Responder states: HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) HTTP sessions: 1 of 8 Interface state active, link 100Mbps full duplex Socket states: 5 2 2 2 2 2
And here is a copy of my config.g file
;Configuration file for Duet WiFi (firmware version 3.3) ; executed by the firmware on start-up ; ; generated by Scotty on Apr 3, 2024 ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Choco Milk 2" ; set printer name M669 K2 Z1:0:-1 ; select CoreXZ mode with no kinematic adjustment factors for z axis M911 S19.8 R22.0 P"M913 X10 Y10 G91 G1 Z3 F500 G90" ;power loss protocol ; Network M552 S0 M552 P192.168.2.1 ;Set the IP address M553 P255.255.255.0 ;Subnet mask (for use with internet sharing from Mac comnputer M552 S1 ;enable network access ; Drives M569 P5 S0 T1.25:1.25:1.25:1.25 ; physical drive 0 goes backwards M569 P6 S0 T1.25:1.25:1.25:1.25 ; physical drive 1 goes forwards M569 P8 S0 T1.25:1.25:1.25:1.25 ; physical drive 2 goes backwards M569 P9 S1 T1:1:1.25:1.25 ; physical drive 3 goes forwards M584 X6 Y5 Z8 E9 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X255.74 Y1027.6 Z255.74 E50 ;steps/mm for CoreXZ mode M566 X900 Y250 Z900.00 E1000.00 ; set maximum instantaneous speed changes (mm/min) M203 X10000.00 Y3000.00 Z10000.00 E10000.00 ;max feedrate M201 X4000.00 Y1000.00 Z4000.00 E6000.00 ; set max accelerations (mm/s^2) M906 X800 Y800 Z800 E800 I30 ; set motor currents (mA) and motor idle factor in per cent M204 P4000 T4000 ;set print vs travel accelerations M84 S120 ; Set idle timeout ; Axis Limits ;M206 X0 Y-170 Z0 ;Offset Axes (not using anymore. now using G90 in home command bc more robust) M208 X0 Y-55 Z0 S1 ; set axis minima M208 X575 Y650 Z500 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 S1 P"!zstop" ;Probing and Mesh bed compenstion parameters M558 P5 C"^!zprobe.in" H10 F1200:200 T2400 ;probe type, pin, probe depth, probe speed, travel speed G31 P500 X-55 Y30 Z0.2 ;Probe threshold and offsets M557 X0:520 Y0:620 S52.5:51.66 ; define mesh grid (note that I think you have to do this after setting the Z probe offsets) M376 H25 ;Taper off bed compensation after 25 mm G29 S1 P"May28-Bed51Water52.csv" ;load this height map as the default ; Heaters M308 S1 P"bedtemp" Y"thermistor" T95000 B3950 A"BedThermistor" V-0.028 ;Setup the thermistor M308 S2 P"urxd0" Y"thermocouple-max31855" A"BedTC" ;not using this currently bc thermistor was easier M950 H0 C"bedheat" T1 ;use sensor 1 for bedheating M307 H0 R0.161 K0.159:0.000 D15.17 E1.35 S1.00 B0 ;These are the PID parameters for bed heating M140 H0 ; Fans M950 p5 C"spi.cs3" ;This one is for controlling the relay which controls the cooling fans M42 P5 S1 ;initial state of relay = off ; PWM for testing water control servo M950 p6 C"fan2" Q50 M42 P6 S0.5 ; Tools M563 P0 S"MD PE10" D0 ; 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 M302 P1 ;allow "cold" extrusion ;Water control M950 p3 C"spi.cs2" ;This one controls the relay that turns on the auxilary tank drain pump M950 p4 C"connsd.7" ;This one is for turning on/off the solenoid tank drain valve M42 P3 S1 ;initialize these pins so that the relays are off to begin with M42 P4 S1 M308 S3 P"e0temp" Y"thermistor" A"WaterLevelSensor" ;Water level sensor to the e0temp pin ; Get 'er ready cuz i'll forget G4 S5 M140 H0 S51 echo "bedtemp set to 51"