Using UPS as a backup power source for shutdown [discarded for overcomplicated]

Started by odoell, July 23, 2022, 09:47:12 PM

odoell

Hi,

i want to incorporate my Raspberry into my 3D Printer to enable Klipper.
I want a clean solution, integrate the Raspberry into the case of the printer using an additional LRS-50-5 power source. The additional power source is hooked to the main power switch of the printer sending 5V to the power input of the ATXRaspi and using another 5V and a n-mosfet as switch to simulate a latching button for the ATXRaspi.

But as i turn power off, all power sources are without power. So my idea was to use a USP Hat to ensure that the Raspberry has the time to cleanly shut down. I wanted to use the following hat: https://www.waveshare.com/wiki/UPS_HAT

But as the docs mention, no other power sources besides the ATXRaspi are recommended. I know, there are other solutions like MightyBoost or MightyHat, but these are retired.

Does anyone has some other idea to solve the problem?

Thanks in advance for your insights...

[Edit] Ok i realized the problem, shutting off the power also shuts off the ATXRaspi, so the shutdown script never will be called... But is this idea somehow possible to realize? One button to rule them all... :-) Also my printer and the Raspi

Felix

Quote from: odoell on July 23, 2022, 09:47:12 PM
sending 5V to the power input of the ATXRaspi and using another 5V and a n-mosfet as switch to simulate a latching button for the ATXRaspi.
ATXRaspi can already support the use of an external latching button, if that is what you want.

Quote from: odoell on July 23, 2022, 09:47:12 PM
But as i turn power off, all power sources are without power.
ATXRaspi works with power

Quote from: odoell on July 23, 2022, 09:47:12 PM
But as the docs mention, no other power sources besides the ATXRaspi are recommended. I know, there are other solutions like MightyBoost or MightyHat, but these are retired.
Indeed, ATXRaspi is not a power source, it is a power switch. MightyHat could have done the job with some custom coding, ie detect when mains power is shutoff then cutoff the power to the printer's Pi. The only problem to figure out is how to separately power that Pi, and not from the printer anymore (assuming originally it was powered by the printer). A similar HAT would do the same.

Otherwise I think what you want is some kind of temporary power that can keep the Pi on long enough to shutdown. But this gets complicated for no real reason, IMO. Me being lazy, I just have a switch at the mains power that feeds my printer, I shutdown the printer (Pi) then I just flip that switch, I will admit quite a chore in this ultra automated age we live in!  ;D

odoell

Quote from: Felix on July 25, 2022, 05:08:12 PM
Otherwise I think what you want is some kind of temporary power that can keep the Pi on long enough to shutdown. But this gets complicated for no real reason, IMO. Me being lazy, I just have a switch at the mains power that feeds my printer, I shutdown the printer (Pi) then I just flip that switch, I will admit quite a chore in this ultra automated age we live in!  ;D

You are right, i wanted to have this nice and clean solution, switching one button doing it all... Yes, the idea of the temporary power makes it absolutely overcompllicated. So after some more thinking about it, i already made myself the compromise, that i will use 2 buttons. As you suggest, because it is the simple and fast solution to my needs. :-)