Power Failure Resume not working - STM32 boards RRF
-
Hi all,
BTT Octopus Pro board (Firmware - RepRapFirmware for STM32F4 based Boards 3.4.0_1 (2022-03-17))
Meanwell 24V power supply with output of 24.2V.
We are trying to use Power resume function - M911 S23.2 R23.7 P"M913 X0 Y0 " ;
We gave one XYZ cube. Turned the power off. Then switched on. It didn't write to the resurrect.g. We stopped the print.
Again gave one XYZ cube. In the middle we paused the print. Then again resumed.
We checked the resurrect.g. it has written the pause condition.
; File "0:/gcodes/Tpro abs temp check test1.gcode" resume print after print paused at 2022-07-03 12:00"
Then we did power off and on. The resurrect.g was not overwritten.
We tried with various Voltages in S parameter. M911 S23.2 R23.7 P"M913 X0 Y0 "
STM based RRF is having this facility?
resurrect-prologue.g:
M116 ; wait for temperatures
G28 X Y ; home X and Y, hope that Z hasn't moved
M83 ; relative extrusion
G1 E4 F3600 ; undo the retraction that was done in the M911 power fail script -
@selva_tvi it won't work as that board doesn't monitor the PSU voltage (there are only a small handful that do). You'll have to use the BTT UPS module for that functionality
-
@jay_s_uk oh..k.
I hope Marlin is doing without any external circuit also.
Any chance of going by the same way?
-
@selva_tvi there are no plans to add anything like that. We basically track the duet version of RRF and as all duet boards have power monitoring, it won't get added
-
@jay_s_uk Marlin does it by constantly writing the current resume state to the SD card. No idea how well it works (the save state will pretty much always be behind that actual print state and the constant saving will probably reduce the life of the SD card). As Jay has mentioned, RRF monitors the state of the 12/24V supply and saves the state when it detects a drop in the voltage. But you need a board that has a built in voltage monitor (like the Duet3D boards and some of the Fly boards). You could create a voltage monitor circuit to track the 24V supply state (this needs a couple of resistors hooked up to a free ADC capable pin, take a look at one of the Duet3D board schematics to see what is needed), or you could use one of the external solutions like the board jay mentioned.
-
@gloomyandy Thank you. Understood.
-
@jay_s_uk Hello, as per your suggestions, I am trying to use MKS UPS 24V.
Connected between the power supply and the MKS module.
As per this post, I made as T1 in M581
https://forum.duet3d.com/topic/28967/power-loss-with-ups/2In config.g, added the below lines:
M950 J3 C"e3stop" ; input 1 e3 filament sensor
M581 P3 T1 S0 R1 ; PLR sensor P1 triggers Trigger3.g always (R0) TRIGGER OFFConnected the 3pin from MKS UPS module to BTT Octopus pro e3stop.
trigger1.g:
M140 S0 R0 ; set bed temperature to 0C
M140 S-1 ; set bed temperature to 0K to turn it off
M104 S0 T0 ; set extruder temperature to 0C
M107 ; turn off fan
M913 X0 Y0 Z0.3 ;turn motors off
M25 ; Pause the print
G91 ;Set to Relative Positioning
M83 ;Set extruder to relative mode
G1 Z5 E-5 F1000 ;raise Extruder 5mmWhen the power is switched off, it didn't show any change. It continued the print, till MKS UPS drains.
Pls guide me on this. Thanks
-
@selva_tvi that looks in terms of your setup, although you may need to add a pulled using ^ to the pin name.
Can you confirm you have it wired like this?
-
@jay_s_uk Absolutely the same. Our setup is connected to BTT Octopus Pro board e3stop.
'although you may need to add a pulled using ^ to the pin name.'
Is it in M950? can you pls point it?
M950 J3 C"e3stop" ; input 1 e3 filament sensor -
@selva_tvi yes, in M950.
-
@jay_s_uk M950 J3 C"^e3stop" ; input 1 e3 filament sensor ?
-
@selva_tvi yes
-
@jay_s_uk I tried the above 'M950 J3 C"^e3stop"'
And switched off the power. The machine just paused. And it didn't show any movement.
I changed the trigger1.g :
G91;
G1 Z5 E-5 F1000 ;raise Extruder 5mm
;M140 S0 R0 ; set bed temperature to 0C
;M140 S-1 ; set bed temperature to 0K to turn it off
;M104 S0 T0 ; set extruder temperature to 0C
;M107 ; turn off fan
M913 X0 Y0 Z0.3 ;turn motors off
M25 ; Pause the print
G91 ;Set to Relative Positioning
M83 ;Set extruder to relative mode
;G1 Z5 E-5 F1000 ;raise Extruder 5mmI thought least Z will move by 5mm. But no movements.
For M25, will it call the pause.g? I hope it didn't call pause.g also.
Once the power in UPS is drained, it will be switched off?
How to resume back? by using M916?
-
@selva_tvi T1 just pauses so if you want to do more than that you'll have to use a different trigger and create a trigger file accordingly.
See here about setting up power resume https://docs.duet3d.com/en/User_manual/Tuning/Resume