@stuartofmt I just read that discussion, looks a bit chaotic but the hint about the BTT Supercap UPS is valuable.
@T3P3Tony Thanks!
I just wanted to clarify that it is really not necessary to build a pack of supercaps yourself. I was looking around and found some solutions. Often, supercap modules are offered to be used in automotive applications to protect the vehicle battery from to sudden current surge or to stabilize board voltage to satisfy hifi equipment (music listening people tend to be very demanding when it comes to sound quality).
For example, this one:
5PCS 1Set Super Capacitor 13.5V 12F Single Row Farad Capacitor2.7V 60F Automotive Super Farad Capacitor Module Supply Rectifier
Of course this would only be suitable for a 12V power supply, but you can connect two of them in series. This boards have voltage protection and balancing built-in. They are even oversized for this case (remember: the purpose is to allow a controlled shutdown, not to run the printer on UPS).
For more ambitious people, a 24V module is also available, for about $100 on Amazon, or around $21 on AliExpress:
GDCPH 24V5.5F Supercapacitor Electronic Rectifier Module 2.7V50F Super Farad Capacitor Backup Power Supply 24.3V Electrolysis
Note that it is composed of 9x50F supercaps in series (resulting in 5.5F), which is plenty of energy.
Still, these are not full fledged UPS - you still need the combo of resistor and Shottky (in parallel to each other) between the module and the PSU.
I even found a supercap module exactly as @dc42 proposed, if using two of them in series:
[16V 1F/2F Farad Capacitor Module 2.7V 10F Super Capacitors With Protection Board]
(https://www.aliexpress.com/item/1005002715223142.html)
You get one module for $6 or two for about $12, fairly affordable. That is currently my preferred option. The BigTreeTech 24V UPS mentioned above does not add any value because the Duet already has a power failure detection built-in.
My impression is that supercap based UPS are becoming popular. There are some professional solutions, for example customized for a Raspberry Pi (if you use one):
Andino-UPS - Supercapacitor UPS for the Raspberry Pi
but I also found some DIY projects. They should be considered as "emergency power supply" rather than UPS due to the limited length of time they can keep a printer running.
Engaging in this matter I have some new questions and ideas, namely: I would like to switch my printer on remotely (it is in an attic and I always have to go upstairs to switch it on) - a reversed question in comparison.
But also: What happens when I just switch the printer off in a regular manner when resurrection has been configured? The voltage will drop to the defined threshold in this situation too- will then the power failure procedure defined by M911 be executed? I have never checked that. OK, as a rule, no print job is running when I deliberately switch my printer off, so I suppose the procedure is only triggered in this case.
Why I come up with this question?
Assume that I have a small UPS that is able to detect failure of the mains power. It does not have to wait until DC voltage drops below say 22.5V to kick in. I can then save current coordinates and take some other precautions to prepare the resurrection, even before the voltage threshold is reached. Will then the power failure procedure defined with M911 still be executed a 2nd time when the DC voltage falls?
A real UPS has one key advantage compared to an emergency power supply, even when it is not meant to run the printer accross the powerless time, since it allows to keep the hotend fan running for a couple of minutes until the hotend gets cold enough, so to avoid nozzle clogging. In this case, the question whether M911 kicks in and saves the current state a 2nd time would be relevant.
I am done.
Thanks again.