How to turn off PS_ON on heather failure?
-
My printer uses external 5V and a PS_ON relay that cuts mains power from the 24V PS and bed heather. Manually executing M81 does turn the relay off (good). I am trying to set it up such that a nozzle thermal runaway will turn off PS_ON (equivalent of M81) but am not sure how.
This is how I test
- Set nozzle temp to 200c in paneldue.
- Short pin Out1 to ground to simulate a power mosfet short.
- wait a few seconds until the duet detects the anomaly and print the message "Heater 0 fault: exceeded allowed temperature excursion: target 200.0°C actual 249.3°C"
How should I configure the printer such that the fault will also turn off PS_ON (similar to M81)? I am using the latest 3.4/stable.
I also have a file 0:/macros/heater-fault.g with the line below but I don't see that message on heather fault.
echo "heater-fault.g invoked"
My sys/config.g:
; Configuration file for a Voron V2.4 250 with Duet 3 Mini 5+ ; Initial neopixels color. M150 R0 U255 B0 P255 S20 ; General Settings M575 P1 S1 B57600 ; Enable support for PanelDue G90 ; XYZ absolute mode. M83 ; Extruder relative mode. M550 P"Voron" ; Printer name M669 K1 ; CoreXY mode ; Wait a moment for the CAN expansion boards to start ;G4 S2 ; Network M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S1 ; enable FTP M586 P2 S0 ; disable Telnet ; Stepper Drives (top view) ; ; X (0.5) back Y (0.6) ; +----------+----------+ ; | Z1 (0.2) | Z2 (0.3) | ; +----------+----------+ ; | Z0 (0.1) | Z3 (0.4) | ; +----------+----------+ ; front ; M569 P0.0 S1 ; E drive 0.0 goes FORWARD M569 P0.1 S0 ; Z0 drive 0.1 goes BACKWARDS M569 P0.2 S1 ; Z1 drive 0.2 goes forwards M569 P0.3 S0 ; Z2 drive 0.3 goes BACKWARDS M569 P0.4 S1 ; Z3 drive 0.4 goes forwards M569 P0.5 S0 ; X drive 0.5 goes BACKWARDS M569 P0.6 S0 ; Y drive 0.6 goes BACKWARDS M584 E0.0 Z0.1:0.2:0.3:0.4 X0.5 Y0.6 ; Axis -> driver, mapping M350 X16 Y16 Z16 E16 I1 ; Enable 16 microstepping with interpolation M92 X80.00 Y80.00 Z400.00 E562 ; Microsteps per mm M906 X1200 Y1200 Z1200 E600 I30 ; Motor currents (mA) and motor idle factor in percents M84 S30 ; Motors idle timeout (secs) ; Axis travel limits (NOT print area) M208 X0 Y0 Z-0.3 S1 ; Axis minima M208 X248 Y253 Z210 S0 ; Axis maxima ; Z Belt Locations. By Z motor order. ; S20 is max correction in mm to apply in QGL. M671 X-65:-65:315:315 Y0:345:345:0 S20 M557 X25:225 Y25:225 S40 ; Bed mesh probing grid (Probe X/Y offset is applied automatically) ; Select normal speed/acceleration parameterts. M98 P"/macros/speed_printing" ; Axis endstops M574 X2 S1 P"^io1.in" ; Active-high (open circuit) X max endstop on pin io1.in M574 Y2 S1 P"^io2.in" ; Active-high (open circuit) Y max endstop on pin io2.in M574 Z0 P"nil" ; No Z endstop ; CLICKY probe ; -------------- ; NOTE: Keep diving height (H arg) high, otherwise we risk ; a crash during mesh calibration. M558 K0 P8 C"io5.in" T18000 F500:100 H20 A10 B1 S0.03 ; Use the Z arg to adjust Z height. G31 K0 P500 X-2 Y19 Z7.39 ; Increase Z offset to lower the nozzle. ; Bed heater ; ----------- M308 S0 A"Bed" P"temp0" Y"thermistor" T100000 B3950 ; Define temp sensor 0. Using Kenovo NTC therminstor spec M950 H0 C"out0" T0 Q10 ; Define heater at out0 and controlled by temp sensor 0. PWM 10Hz. M140 P0 H0 ; Mark heater H0 as bed heater 0 (for DWC) ; NOTE: Failure temp should be higher than max temp to accomodate ; for temp overshoot. M143 H0 P1 A0 S130 C0 ; Heater failure if reaching this temp. M143 H0 S120 ; Max temp 120C M307 H0 B0 R0.808 C129.0 D2.22 S1.00 ; S = max PWM %, calibrated for 100c ; Nozzle heater ; -------------- ; https://e3d-online.zendesk.com/hc/en-us/articles/4409926923665-Revo-Six-RepRap-Firmware-Guide M308 S1 A"Nozzle" P"temp1" Y"thermistor" T100000 B4725 C7.060000e-8 ; Define temp sensor 1 (Revo) M950 H1 C"out1" T1 ; Define heater at out1 and controlled by temp sensor 1 M307 H1 B0 R4.199 C119.5:100.0 D1.74 S1.00 ; PID parameters M143 H1 S260 ; Max temp 260C ; Material fan ; ------------ M950 F0 C"out5" Q50000 ; 50Khz for the Fan Smoother M106 P0 S0 H-1 C"Material Fan" ; Heatshink fan. ; -------------- M950 F1 C"out6" Q50000 ; 50khz for the Fan Smoother. ; NOTE: Thermostatically controlled fans are not shown in the DWC fan list. M106 P1 X0.7 H1 T50 C"Heatsink Fan" ; Set hot-end fan 50% (thermostatically) ; Electronic bay fans ; -------------------- ; NOTE: The two fans are connected in parallel and get the same ; control M950 F2 C"!out3+out3.tach" F25000 M106 P2 S0.75 C"Bay Fan" ; 75% speed. ; ================================== ; TOOLS ; ================================== ; NOTE: This also create a TOOL FAN alias for the material fan. Confusing. M563 P0 D0 H1 F0 ; Define tool 0 using fan 0 (part cooling) for M106, Heater H1 is hotend ; P tool number# ; D extruder drive# - Drive 0 is the first drive in the machine after the movement drives (usually X, Y and Z) ; H Heater# ; F Fan# ; G10 Tool offset and temperatures G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C ; ================================== ; MISC ; ================================== M375 ; Load height map M572 D0 S0 ; Pressure Advance. We override in the slicer. M593 P"none" ; Input shaping. We override in the slicer. M376 H10 ; Fade out mesh compensation over 10mm Z M80 C"pson" ; ATX ON. Enable 24V rail. M150 U255 B255 P255 S20 ; Set neo pixel color. Daemon.g overrides it. T0 ; select first tool ; PS_ON relay Bed trigger M570 H0 P20 T10 S0 ; Allow a heat bed anomaly to persist for 10 seconds (P10) ; before raising a heater fault. Allow a 10C ; deviation from set point (T10) After 0 minutes of heater ; fault cancel the build (S0). ; PS_ON relay Nozzle trigger M570 H1 P20 T10 S0 ; Allow a hot end anomaly to persist for 10 seconds (P10) ; before raising a heater fault. Allow a ; 10C deviation from set point (T10) After 0 ; minute of heater fault cancel the build (S0). M300 S4000 P50 G4 P200 M300 S4000 P50 ; double beep
-
@zapta
You should be able to invoke a simulated fault by using M957
Although it must be noted that the documentation for the event names is incorrect
EDIT: Now correctedM957 E"heater_fault" D1
works for me to test heater 1.
in my heater-fault.g I have
;0:/sys/heater-fault.g - runs when heater fault detected M291 R"Heater fault" P{"Heater fault detected on heater " ^ param.D} S0 T3 echo "Heater fault :- " ^ param.S if (state.status=="processing") || (job.file.fileName!=null) echo "Pausing print" M25 ; pause print else echo "shutting down" M0 ; shut down printer
If print is running I just want to pause it as I may be able to correct the fault and continue.
Otherwise I call M0 (stop.g) which will shut down all heaters and then call M81You could just put M81 in filament-error.g
I've running 3.4 stable on a duet 2 wifi in stand alone mode. -
@
owend@zapta looks like your issue is that your heater-fault.g is in the macros folder when it should be in sysHowever if you only what it to shut down the printer, I believe adding the A3 parameter to your M143 still works to automatically down via the PS_ON. However, I have found (tested up to rrf3.2) that this alone shuts down the PSU but doesn't give any notification in some circumstances (e.g. pure over temperature) can lead to a bit of confusion! So I'd recommend using the new heater-fault.g at least to echo which heater had faulted
Edited to tag OP!
-
@engikeneer said in How to turn off PS_ON on heather failure?:
@owend looks like your issue is that your heater-fault.g is in the macros folder when it should be in sys
Wrong person, but I think you're right.
I missed that in the OP's details -
@engikeneer said in How to turn off PS_ON on heather failure?:
@owend @zapta looks like your issue is that your heater-fault.g is in the macros folder when it should be in sys
Thanks. I moved it to the sys directory and it is now invoked, so I guess I can just add there whatever shutdown procedure I need. Also, heater fault simulator suggested by @OwenD is also useful for testing.
The 3.4 release notes say " ...RRF runs macro file heater-fault.g ..." and this threw me to the macros directory.
-
@zapta & anyone else who stumbles across this thread...
One thing I have just spotted in the RRF3.4 changelog:
Currently, RRF does not attempt to turn off power to the whole machine if the user does not respond to the heater fault. We plan to reinstate this or a similar function in release 3.5.0.
So I believe my answer of using M143 A3 may not work for RRF3.4...
-
@engikeneer said in How to turn off PS_ON on heather failure?:
Currently, RRF does not attempt to turn off power to the whole machine if the user does not respond to the heater fault.
I am not sure what 'user does not response' means. When I tested the thermal runaway behavior of the nozzle heater on my printer, I didn't see anything to respond to.
-
@zapta reading the full section, I think it means the user has to put the command to turn of the printer (M80/M81) in the heater-fault.g, rather than it doing itself by default.
Looks like the plan is to restore that behaviour in RRF3.5 -