09-02-2021, 11:48 PM
(This post was last modified: 09-03-2021, 12:04 AM by Miss Sissy Princess.)
(09-02-2021, 06:26 PM)gilphilbert Wrote:(09-02-2021, 11:52 AM)Miss Sissy Princess Wrote: I agree with you. If you want to avoid corruption of a drive (MicroSD in this case) you need to have some kind of graceful shutdown in the event of an AC power failure. There are way too many ways to inadvertently lose power -- storm outage, utility work, someone accidentally trips on a cord or bumps a PDU switch, etc.
I may be purchasing one of the Hypnic devices since your posts brought it to my attention. My sole complaint concerns sequencing or, more specifically, lack thereof; it doesn't charge its supercaps first and then apply power to the Pi.
You could always ask the designer, I hear he's pretty good about answering questions...
You got a big grin out of me there! Thanks so much for jumping in with such a detailed and thoughtful reply.
I really like your design choice of using an AVR CPU. I used them extensively professionally, including in a custom chassis that provided power monitoring and emergency, sequenced shutdown for a satellite under integration and test. I did everything in AVR assembly language using a simple real time kernel and task scheduler that I wrote from scratch (trust issues with compilers and a need to exactly characterize interrupt and polling latency).
Quote:
- The Hypnic was designed specifically to address SD card corruption - kids pulling power cords, power outages, etc. - these are fairly common occurrences in my house! It won't protect against wear out, of course. For that you need a high-endurance card if you want to perform lots of writes to the SD card.
Hence my earlier recommendation of the Samsung Pro Endurance series which, though marketed for video recording, seem ideal for boot drives in Pi-based systems.
Quote:You've raised an interesting question around concurrency. The default firmware on the Hypnic will power the device and charge the supercaps at the same time - as soon as power is connected. This is the most common use-case and - as long as your power supply can supply enough current - it works faily well, even when loads are high. There are two downsides though: obviously it requires a larger power supply that provides more current, and your device is not fully protected until the supercaps are charged, so an outage within the first few minutes could lead to an ungraceful power down. I say could, as it depends on load, previous supercap charge levels, how long it takes for the SBC to power down, etc.
The Hypnic actually has all the hardware to charge the supercaps to a given level before powering on the device. There are downsides here too though, the biggest one being that you need to wait for the supercaps to be charged before you can power on the device. Depending on your power supply and the size of the supercaps, this may be a few minutes. For many applications, this may well be fine - but as a general rule of thumb, users expect devices to power on when they press the power button :
It would work for most Pi-based servers. I've got my moOde music server, a PiAware ADS-B aircraft tracking server (part of the FlightAware network), and two Pi's serving as web servers (those are on a commercial sine wave UPS). I don't care if they take a few minutes to reboot after power restoration since I probably would not even notice -- I'd much rather that happen than I find out a week later that, say, my PiAware server corrupted its MicroSD during a power outage and didn't come back online (I suspect that's what happened one time when I had to reflash).
Quote:I suppose you could "long-press" the button to force the device to power on even when the supercaps are not charged fully.
Makes sense since that's how many UPSs work when you want to turn the outputs back on before AC is restored or when batteries are too discharged to guarantee safe shutdown times.
I apologize if my ignorance prevented me from locating the Hypnic device schematic to which you referred. Also sorry for asking questions here, but I am not a diyAudio member (by choice as it would suck away what little time I have left).
Your wrote "[d]epending on your power supply and the size of the supercaps, this may be a few minutes." I'm assuming that you've got something like a current-limiting resistor between the supercaps and the power supply, so what is the worst-case current draw just for powering up the Hypnic, with nothing attached to it, when the supercaps are discharged?
This is not what the UPS folks call "line interactive" and, instead, it always powering the Pi via the supercaps, which are continually being charged from the supply, correct? If so does the 5V boost guarantee 5V even if the power supply input sags a bit under load? That would be really sweet (I'm thinking inrush to spin up a hard drive).
Hypnic V2 wishlist:
Multi-color LED: Maybe Green = input powered and caps charged, Yellow = Supercaps not fully charged, Red = Power-down signal sent.
Berg jumpers or dip switches to select features: Power on SBC after 5V input restored, Wait until supercaps charged before powering SBC, etc.
Faster charging of supercaps when not concurrent with powering board
- or-
current limiting the input such that the power supply is taxed at 3A (or 2.5A) during supercap charging, whether concurrent or not.
High-current (2.5A? 3A?) supercap charge rate when not concurrent with SBC power, reducing the delay before start significantly.
USB B and C power input connectors, possible with differing current limits (2.5A and 3A) for charging of supercaps.
Please accept my apologies if this is just another TL;DR type of post.
P.S. Yes, I'd be cool with paying another few bucks for a version 2 with (some of) those features.
Cheers,
Miss Sissy Princess
Miss Sissy Princess