Capacitor to keep a Pocket Beagle powered up long enough to perform a clean shutdown

I am designing a board with a pocket beagle and when the board is powered off (AC power removed), I want the pocket beagle to cleanly shut itself down cleanly. What I plan on doing is including a large capacitor on the 5V power supply to poser the pocket beagle when the main power is removed. I will also have an opto-isolator driving a GPIO pin that will be monitored by a daemon that will run /sbin/poweroff when main power is lost.

I am wondering just how large the capacitor needs to be.

You could also look into the posibility of running your rootfs as RO.

That way you could forget everything about requiring a clean shutdown.

composefs could be one way of going about it.

I want to be able to have persistent storage for the system state (mostly
“memory” of known locos and maybe some system configuration.

It’s only the root filesystem thats readonly, other mounts can be rw if desired.

Overlayroot is another option.

Regarding a capacitor - c=it/v is your friend. C is capacitance (Farads), V is the voltage drop across the capacitor, i is the current and t is the time.

1 Like

It’s only the root filesystem thats readonly, other mounts can be rw if desired.

Overlayroot is another option.

Regarding a capacitor - c=it/v is your friend. C is capacitance (Farads), V is the voltage drop across the capacitor, i is the current and t is the time.

Yes, but what is “i” for a Pocket Beagle?

That’s what a multimeter is for :slight_smile:

Hint: This is nowhere near as simple a task as it may appear. Estimating the current, the voltage drop and the time will all require some research.

The best option is just to make a bunch of estimates, round it up a lot, and see if what comes out is reasonable.

Haha! Paul, you beat me to it…

I know you don’t want to hear it @RobertPHeller,
but the only person who knows your load is you…

We can all guesstimate it, but ultimately, only you will have the right numbers.

I keep seeing talk about PocketBeagle; I assume you mean the PB-2,
so get one of those, load up your application, have it be reasonably busy,
and then take some measurements; it’s the only way to be sure.

As I eluded to in my first post, I was somewhat puzzled as to the why,
but I’m not going to try and talk your out of it; just be aware: Rough seas ahead.

Now me, I would long since have opted for a UPS on the AC side.
Just go with something reasonably cheap, that can still talk to nut and be done.

I know you don’t want to hear it @RobertPHeller,
but the only person who knows your load is you…

We can all guesstimate it, but ultimately, only you will have the right numbers.

I keep seeing talk about PocketBeagle; I assume you mean the PB-2,
so get one of those, load up your application, have it be reasonably busy,
and then take some measurements; it’s the only way to be sure.

As I eluded to in my first post, I was somewhat puzzled as to the why,
but I’m not going to try and talk your out of it; just be aware: Rough seas ahead.

Now me, I would long since have opted for a UPS on the AC side.
Just go with something reasonably cheap, that can still talk to nut and be done.

This is for a Model Railroad LCC/DCC command station. The design is still a
work in progress, but is on github here:
GitHub - RobertPHeller/CommandStationsAndBoosters: Command Stations and Boosters, specificly in the
PocketBeagleCommandStation_SMD sub directory.

Looks like there’s an awful lot of stuff there, although the links seem broken to me.

You’ll have to forgive me, but I don’t know what all of that is,
save for the assumption that it’s some kind of Digital Train Control.

I am not trying to berate you or your idea; it’s a great application for the PB-2.
All I’m saying is that you need to sit down and do some real-life measuring,
on a PB-2 running your intended application, and then work from there.

The ways to make a battery-powered circuit is virtually endless,
but they’re not all made the same, and definitely not easy to get just right.
(any google-search will show you that)