BeagleBone - boot after power outage

Hello,

I have a Beaglebone that is placed in a location which struggles with frequent power outages. After an outage, the device does not boot before someone unplugs and then plugs the power back in. Based on my (limited) understanding of the BeagleBone-schematics, the device should boot as soon as sufficient power is present.

In order to emulate a power outage, I unplug and plug in the power (not the part that is in the 5V of the device). When doing this, the device boots sucessfully. Is there something I am missing in order to emulate a proper power outage, and does someone have any tips on how to deal with it? I.e., make the device boot automatically when power comes back.

Thanks in advance for any tips.

-Kristian

How long is this power outage?
How does it differ from when you unplug and plug back in the power?
Is the USB port connected to anything?

Gerald

How long is this power outage?

The power outages can be anywhere from instant (just the light flickering) and to several hours. The latest one lasted for 1,5 hours (the time between the notifications from the electrical company). I was not at home during this outage, so I am not sure if there for example were several cycles where the power almost came back on.

How does it differ from when you unplug and plug back in the power?

I am not sure. I would think that power unavailable equals power off.

Is the USB port connected to anything?

No, not the one that can receive power. The normal USB port is connected to a hub.

-Kristian

It could be that the protection circuit on the BeagleBone is tripping. If the power is not well regulated and it shoots out a momentary spike, that could trip the circuit. The only way to reset it is to remove the power and plug it back in. Try a test by unplugging the power supply from the AC rail instead of the power jack and see what happens.

You may be able to put a cap on the input to the board and see if that helps.

Gerald

It could be that the protection circuit on the BeagleBone is tripping. If the power is not well regulated and it shoots out a momentary spike, that could trip the circuit. The only way to reset it is to remove the power and plug it back in. Try a test by unplugging the power supply from the AC rail instead of the power jack and see what happens.

This is what I have done the other times, and it works. I will try again tonight, as I dont have access to the device right now.

You may be able to put a cap on the input to the board and see if that helps.

Thank you very much for the tip. Is there any guide or similar to how you can do this?

-Kristian

You could just get a radial or axial cap and solder it across the power connector on the back side of the board. Or you could find a better power supply, maybe one with a switcher inside instead of a linear regulator.

Gerald

Thanks again. I went ahead and bought another power supply, which is supposed to be better. If you have any recomendations, I would be very interested.

I also discovered what had happened to this device. The device itself had survided just fine, but the memory card was toast. So while the device booted, it just spat out read errors from the memory card. I did not know that memory cards/ext4 filesystem was that vulnerable, but I guess it was just a case of bad luck and one of those things that can happen.

-Kristian

Dead sd card on power failure is fine. Just for an experiment remove the card from a running board and then try to boot with that card. You will see plenty of errors

Hello again,

Instead of starting a new thread, I thought I should resurrect this one. I have bought better power supplies and installed a cap on one of my BeagleBone, but I still see memory card corruption happening from time to time on all boards. Lately, it has also happened after the power has been cut by removing the plug from the rail.

What happens is that the bootloader is successful and is able to load the kernel. However, some time into boot, the kernel starts spitting out mmc errors, before a kernel panic occurs. The boards that this has occurred on have all been running the psp8-kernel, is this a known bug that has been fixed in later kernels? Also, the file system used is ext4. Are there any recomended alternatives, or must-use options when creating/tuning the fs?

Does anyone have any tips on how to improve or maybe even solve this, or is it just something that one have to consider? As the devices will be placed in remote areas, going around and inserting new memory cards all the time will be a bit cumbersome :slight_smile:

Thanks in advance,
Kristian

Yes, there's been many updates/bug fixes since then... Which "distro"
are you actually trying to run on the board?

Regards,

The boards that have crashed were running squeeze. I have updated them to wheezy/psp16 recently, to see if it helps.

-Kristian

I actually am having the same issue with my boards with power outages. Every time there is a power outage It seems to corrupt my sd cards. What I was thinking is maybe adding a usb battery pack and building a simple mosfet switch to have it auto switch over to the USB power to keep the board running and hence keep it from powering off which is where the corruption occurs since opened files weren’t correctly closed. I want to also maybe add a script that senses when the USB battery is being used and maybe have it execute soft shutdown after a small period of time so like that when battery cuts out it wont corrupt the SD card.

Ill report back if and when I complete the project.

John

Also take a look at setting up your root partition as 'ro/read
only'... If done right, you can use the system exactly like you do
now, except it'll be much more tolerant of power failures.

Regards,

When power is lost, an interrupt can be sent to the processor by the PMIC. This requires that a battery be connected to the battery header. Something that can keep things up until the SW shuts down.

Gerald

Would there be a problem with just running off a battery, and charging the battery via AC mains ?

No. I would think you need to setup the PMIC to handle this. Usually you run off the mains and only switch to battery when they go away.

Gerald