Need a 0.5 sec UPS (prolonging agony for resurrection)
-
@dc42 I wanted to wrap up some informations about this topic but found that I am not allowed to post links - I need two "reputations".
That's a pity. Would anyone be so kind to enable posting links for me? At least for this time. (Assuming that my findings are of general interest for the furure).
-
@Triet you should be able to now
-
There is quite a discussion here:
Also - if you don't want to build - something like this may be OK for your needs.
https://github.com/bigtreetech/BIGTREETECH-MINI-UPS-V2.0/tree/master/BTT UPS 24V V1.0 -
@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. -
@Triet said in Need a 0.5 sec UPS (prolonging agony for resurrection):
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.
M911 is only triggered when the supply voltage falls below the auto save threshold while a print from SD card is in progress. So turning off the printer when idle will not trigger it.
@Triet said in Need a 0.5 sec UPS (prolonging agony for resurrection):
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.
M911 is triggered by a voltage drop. If there's no voltage drop, because the UPS has kicked in, then the firmware would be oblivious. If there's an output from the UPS to indicate that it's running, that can be connected to a Duet input, then you could create a trigger and macro to accomplish this.
Ian
-
Triet
15 Jan 2025, 02:19
@Triet said in Need a 0.5 sec UPS (prolonging agony for resurrection):
I just read that discussion, looks a bit chaotic ...Fee flowing discussions usually are
@Triet said in Need a 0.5 sec UPS (prolonging agony for resurrection):
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.I use Shelly products for this type of functionality (there are of course others). They are essentially WIFI equipped relays with built in http commands. The ones I use are powered by and switch mains voltage.
https://www.shelly.com/collections/smart-switches-dimmers
They are small and can even be fitted in a wall socket (if its deep enough). I have a Shelly 1 mounted in a small box (printed of course!) attached to my printer. That way I can remotely turned the printer on / off from a browser (or app that issues http).
Hope this helps.
-
@stuartofmt I am looking at different options and learned about a switch with a ESP8266 NodeMCU microprocessor, which is more elegant and flexible. It runs a Webserver as well.
If you are interested:
ESP8266 Button -
@Triet said in Need a 0.5 sec UPS (prolonging agony for resurrection):
@stuartofmt ...which is more elegant and flexible.
Than ? I guess it all depends on build vs buy. If you want to go down the buy route - you will find the Shelly has way more out-of-the box capability (than ESP8266 NodeMCU microprocessor) with no need for programming / building.
I'm not plugging Shelly just offering an idea. Way back, I considered building but for ~$15 to buy ... well you see where I am coming from
-
@dc42 I followed your advice and installed two supercap boards, connected through Schottky diode and resistor (both in parallel).
The printer is kept alive for about ten seconds after disrupting power supply - enough for any preparation for resurrection.
BUT:
I have an unexpected effect I dislike: When trying to switch off the printer from the PanelDue ("STOP") or from the DWC ("Emergency Stop") the printer shows a short flickering and... stays "alive". I can't switch the printer off remotely anymore
I suspect this is because PS_ON will still be kept high as the emergency power supply seems to be quite brisk, a good thing in principle. I don't like that I have to completely separate the mains leads to switch the printer off (I do have such a mains switch installed, but it is on the back side and it is intended for emergency cases, but I have to be physically in front of the printer to do that). My printer has no "soft" off switcher.
Interestingly, after every print job I execute
M81 S1 ; shutdown after all thermostatic fans have turned off
in my end-gcode script, and that seems to work well until now (why?). I will have to try the "M81" command from the console and check if it works manually when no print is running.
I am thinking about a solution to this - perhaps disrupting the PS_ON line using a mechanical momentary switch that I would press longer? But how long??
I just wanted to let you know, in case anyone tries such a solution.
-
@Triet said in Need a 0.5 sec UPS (prolonging agony for resurrection):
I don't like that I have to completely separate the mains leads to switch the printer off (I do have such a mains switch installed, but it is on the back side and it is intended for emergency cases, but I have to be physically in front of the printer to do that). My printer has no "soft" off switcher.
Can you show us a drawing on how you have things (electrically) connected. From your description, it almost sounds like the results could be as expected.
How long does it take for your UPS to completely run out of power? If the UPS is triggered by a power outage - its not clear what the comment about manually turning off the power means.
In the documentation for M112 it states:
"PSU power (if controlled by the Duet via the PS_ON pin) is NOT turned off"Also the "Emergency Stop" in DWC (M112 followed by M999) will restart the board - so it sounds like your UPS is still providing enough power to allow this to happen.
-
@stuartofmt Yes, I think I can follow, after reviewing the Duet3D documentation, particularly:
Connecting an Emergency StopThe board is switched on by mechanically closing the lead going through the SSR (purple) for at least 1 sec, thus enabling PSU and allowing the board to start, and then it would maintain PS_ON by itself, at which point the momentary start switch can be released. The board keeps itself alive by keeping the SSR output closed.
```
In order to get the "Stop" button in the PanelDue and the "Emergency Stop" button from the DWC to work as usual, they would need to have the M81 command before the M112. The "Emergency Stop" has never reset my printer, the printer has always been shut down.
Describing what behaves "as expected" is relative to your expectation. I would expect an Emergency Stop to always unconditionally stop the printer if it is an emergency.
Anyway, if I can't redefine those buttons (and I think I can't without recompiling something) I will need to
a) install and configure a mechanical emergency stop as per docu
b) use M81 on the console, or use the BtnCmd plugin to create my own "Emergency Stop" button on the DWC. -
@Triet
A few questions to better understand your goal and in what circumstance? Sometimes that will free up some suggestions from others.Is it to provide enough time to gracefully shutdown in the event of a power failure? If so how are you detecting that?
Emergency Stop is defined in a particular way. It will stop a print job and turn off heaters etc. It will not, with your design, cut the power because you have effectively latched the SSR.
Why are you using an SSR in this manner? What functionality does it provide in your intended use-case? Earlier you mentioned that your printer is in the attic and you wanted to be able to remotely turn it on / off I can see that the current design does not allow turning off but how are you turning on?
Simple solutions usually take longer to think through the alternative strategies
-
@stuartofmt I wanted an emergency power supply, and I got it (thanks again to all participants in this thread). I won't have more spurious short plunges of the power supply. As a side effect, I can more comfortably rely on preparing resurrection.
My last comment was about a new issue, which is a consequence of this mod: Not being able to shut down the printer remotely as I was used to. But I just checked: Using M81 on the DWC console works; the printer has a delayed/starving shutdown and after about 10-12 sec it will be completely off. That is OK for me for the time being.
I expressed my surprise about how the term "Emergency Stop" is intended to work but ultimately I accept its definition, although it does not match my expectation. I can technically comprehend the modus operandi but since I prefer a more explicite, unconditional and reliable way of shutting down the printer (also remotely) I still have a follow-up task and depicted two solutions for that - feel free to contribute yours.
Until now and still currently, I can only switch the printer on when physically present in front of it - that's a different question that I will also address in the future and the modification should consider the option to keep an attached SBC alive if present. This is not an "issue" as such, just my belatedly request while modifying my custom printer.
So I am in peace with Duet and the world. Just a bit surprised, and not yet done (I think I will never be).
-
Understood …
Have a think about replacing the SSR with an ip relay e.g. Shelly 1. You can turn it on / off from a browser and/or a momentary switch. You would not need to use PS_ON to latch it. It would also operate independently of your emergency supply.
-
@stuartofmt I slowly tend to that Shelly thing as it looks like a manageable and straightforward solution, until I am forced to do something more fancy. Thanks.