Discussion:
[beagleboard] How to avoid shutdown with BBB directly connected to a battery-backup when removing 5V power supply
m***@gmail.com
2014-10-16 12:40:21 UTC
Permalink
Hello everybody,

I am using a BeagleBone Black version A6A with Debian distribution on a µSD
card.

***@beaglebone:~$ uname -a
Linux beaglebone 3.8.13-bone50 #1 SMP Tue May 13 13:24:52 UTC 2014 armv7l
GNU/Linux

I want to avoid BBB shutdown during power outage. Therefore a battery
backup is directly connected to BBB as described on the following link: BeagleBone
Black UPS
<http://www.beaglebone-asterisk.org/uninterruptible-power-supply-ups-for-beaglebone-black-a-diy-project/>

Unhappily, as soon as a power outage occurs, the BBB performs a clean
shutdown within approx. 60 seconds as battery is still connected.

In fact, quite a lot of applications must still run during and after power
outage.
I didn't find in the BBB reference manual and documentation any tips
related to "no shutdown" procedure. When Googling, every topic, I could
find, is related to the way shutdown occurs. Monitoring battery level
before shutdown procedure also exists on some forums but nothing preventing
shutdown when a battery backup is available. I must admit that I am not
skilled enough to handle very complicate programming tasks. Therefore
trying to dig in source code is difficult. I only use Python for basic
tasks.

I tried Angström distribution installed on the BBB (Rev A6A) and
encountered the same shutdown problem when removing 5V DC power supply.

There is an interesting Power Cape on the market that may be configured for
different BBB behaviours. It is certainly the best solution. But I want to
keep budget and power consumption as low as possible.
Last comment to avoid misunderstanding: for my application, during power
outage, I only need 3.3V power supply...not 5V.
Only Ethernet interface and some GPIO are used.


Does anyone knows how to avoid this shutdown procedure? Some guidelines
would be appreciated

Kind regards

Michel.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michel Gerin
2014-10-16 17:00:19 UTC
Permalink
Thank you for your quick reply.
No shutdown is a function of the SW.The SRM covers the hardware.
OK, than I suppose that somewhere in the whole Debian package, a routine
is permanentely checking (polling) if 5V DC power supply is still "ON".
When it is not the case an event is fired in order to start a clean
shutdown procedure? Am I correct ? Does this happen via the I²C bus ? Does
this routine makes a polling to the TPS65217C PMIC ?
No shutdown means you have enough battery power to keep running until
power is restored.
The battery lasts more than 6 hours in my case but is of no need 60 seconds
after power "OFF" because of a self shutdown due to the actual system
behaviour. I don't blame this because it prevents corrupting datas in most
systems but it doesn't suit the most important requirement when monitoring
systems 24h a day: it must run even during power outage like an alarm
system.
You would need to add that function into your SW.
Logically, I suppose that a register is modified somewhere when power off
occurs ? I don't quite understand what you mean by adding that
function. This function has to be modified in order to prevent shutdown I
suppose ? But where is it located ?

The RasPBX (VoIP) running on BBB doesn't have this drawback but I hesitate
to post a message on their forum because this issue is out of VoIP topic

Configuration of this power management behaviour would be ideally perform
right during OS installation like it occurs on PC within the BIOS.

This battery backup feature is a major advantage over Raspberry pi but
perhaps am I requesting to much from the BeagleBone Black :-).



Kind regards

Michel.
Gerald
Post by m***@gmail.com
Hello everybody,
I am using a BeagleBone Black version A6A with Debian distribution on a
µSD card.
Linux beaglebone 3.8.13-bone50 #1 SMP Tue May 13 13:24:52 UTC 2014 armv7l
GNU/Linux
I want to avoid BBB shutdown during power outage. Therefore a battery
backup is directly connected to BBB as described on the following link: BeagleBone
Black UPS
<http://www.beaglebone-asterisk.org/uninterruptible-power-supply-ups-for-beaglebone-black-a-diy-project/>
Unhappily, as soon as a power outage occurs, the BBB performs a clean
shutdown within approx. 60 seconds as battery is still connected.
In fact, quite a lot of applications must still run during and after
power outage.
I didn't find in the BBB reference manual and documentation any tips
related to "no shutdown" procedure. When Googling, every topic, I could
find, is related to the way shutdown occurs. Monitoring battery level
before shutdown procedure also exists on some forums but nothing preventing
shutdown when a battery backup is available. I must admit that I am not
skilled enough to handle very complicate programming tasks. Therefore
trying to dig in source code is difficult. I only use Python for basic
tasks.
I tried Angström distribution installed on the BBB (Rev A6A) and
encountered the same shutdown problem when removing 5V DC power supply.
There is an interesting Power Cape on the market that may be configured
for different BBB behaviours. It is certainly the best solution. But I want
to keep budget and power consumption as low as possible.
Last comment to avoid misunderstanding: for my application, during power
outage, I only need 3.3V power supply...not 5V.
Only Ethernet interface and some GPIO are used.
Does anyone knows how to avoid this shutdown procedure? Some guidelines
would be appreciated
Kind regards
Michel.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Robert Nelson
2014-10-16 17:04:24 UTC
Permalink
Post by Michel Gerin
Thank you for your quick reply.
No shutdown is a function of the SW.The SRM covers the hardware.
OK, than I suppose that somewhere in the whole Debian package, a routine
is permanentely checking (polling) if 5V DC power supply is still "ON".
When it is not the case an event is fired in order to start a clean
shutdown procedure? Am I correct ? Does this happen via the I²C bus ? Does
this routine makes a polling to the TPS65217C PMIC ?
Nope you need to tell it..

Either via: "sudo halt" or.. setup a pin/interrupt to trigger systemd
to shutdown the system..

Regards,
--
Robert Nelson
http://www.rcn-ee.com/
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michel Gerin
2014-10-16 17:49:56 UTC
Permalink
Hello Robert,

Thank you spending your time to help me.

First of all, sorry if I didn't explain things correctly. I think there is
a misunderstanding (I am French speaking) .

I don't want BeagleBone to perform a shutdown during power outage. I want
BBB running continuously like my VoIP PBX also based on BeagleBone Black.
But I think, that in this later case, the developper used Ubuntu (neither
Debian nor Angström). As these OS are official BBB OS, I prefer using them
for my application. I am electrician, I don't really want to spend too much
time on SW bugs as I am not skilled for that task.

One word perhaps about the application: it is very simple. I must monitor
mains power supply in different locations and have to log power outage
events on a file with time stamps. I have also to log grid
switching events ... The specialized 230V AC monitoring system has no
Ethernet connection but can be associated with BBB GPIO's. So that log file
could be downloaded when power outage is over.

The problem is that, even with battery plugged in, the BeagleBone Black
perform a self shutdown within 60 seconds after mains power off (5V DC
power supply)...

Hope my explanation is now better.

Kind regards

Michel.
Post by Michel Gerin
Post by Michel Gerin
Thank you for your quick reply.
No shutdown is a function of the SW.The SRM covers the hardware.
OK, than I suppose that somewhere in the whole Debian package, a
routine
Post by Michel Gerin
is permanentely checking (polling) if 5V DC power supply is still "ON".
When it is not the case an event is fired in order to start a clean
shutdown procedure? Am I correct ? Does this happen via the I²C bus ?
Does
Post by Michel Gerin
this routine makes a polling to the TPS65217C PMIC ?
Nope you need to tell it..
Either via: "sudo halt" or.. setup a pin/interrupt to trigger systemd
to shutdown the system..
Regards,
--
Robert Nelson
http://www.rcn-ee.com/
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
David Funk
2014-10-16 22:13:20 UTC
Permalink
Maybe use a battery backup UPS to run your 5 volt power supply to the BBB?



-david
Post by Michel Gerin
Hello Robert,
Thank you spending your time to help me.
First of all, sorry if I didn't explain things correctly. I think there is
a misunderstanding (I am French speaking) .
I don't want BeagleBone to perform a shutdown during power outage. I want
BBB running continuously like my VoIP PBX also based on BeagleBone Black.
But I think, that in this later case, the developper used Ubuntu (neither
Debian nor Angström). As these OS are official BBB OS, I prefer using them
for my application. I am electrician, I don't really want to spend too much
time on SW bugs as I am not skilled for that task.
One word perhaps about the application: it is very simple. I must monitor
mains power supply in different locations and have to log power outage
events on a file with time stamps. I have also to log grid
switching events ... The specialized 230V AC monitoring system has no
Ethernet connection but can be associated with BBB GPIO's. So that log file
could be downloaded when power outage is over.
The problem is that, even with battery plugged in, the BeagleBone Black
perform a self shutdown within 60 seconds after mains power off (5V DC
power supply)...
Hope my explanation is now better.
Kind regards
Michel.
Post by Michel Gerin
Post by Michel Gerin
Thank you for your quick reply.
No shutdown is a function of the SW.The SRM covers the hardware.
OK, than I suppose that somewhere in the whole Debian package, a
routine
Post by Michel Gerin
is permanentely checking (polling) if 5V DC power supply is still
"ON".
Post by Michel Gerin
When it is not the case an event is fired in order to start a clean
shutdown procedure? Am I correct ? Does this happen via the I²C bus ?
Does
Post by Michel Gerin
this routine makes a polling to the TPS65217C PMIC ?
Nope you need to tell it..
Either via: "sudo halt" or.. setup a pin/interrupt to trigger systemd
to shutdown the system..
Regards,
--
Robert Nelson
http://www.rcn-ee.com/
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michel Gerin
2014-10-17 05:25:13 UTC
Permalink
Hello David,

Yes you are right. If I cannot solve this shutdown problem it's probably
the only solution.

But it's frustrating when you think that the BeagleBone Black has its own
battery charger and own UPS that can only run during 60 seconds because of
this self shutdown problem !
Why does it work correctly on a BBB running a VoIP PBX (probably running
with Ubuntu) and not with a Debian or Angström distribution ?
I would prefer Debian or Angström built for BeagleBone Black distribution
not to be able to make a self shutdown and let this possibility to the
user.

An external backup UPS draws also additional current when running. I wanted
to keep power consumption as low as possible. Moreover, I don't need 5V
from the BBB when running under UPS mode.

If a know that a SW solution exists, I won't give up so easily. :-)

Kind regards

Michel.
Post by David Funk
Maybe use a battery backup UPS to run your 5 volt power supply to the BBB?
-david
Post by Michel Gerin
Hello Robert,
Thank you spending your time to help me.
First of all, sorry if I didn't explain things correctly. I think there
is a misunderstanding (I am French speaking) .
I don't want BeagleBone to perform a shutdown during power outage. I want
BBB running continuously like my VoIP PBX also based on BeagleBone Black.
But I think, that in this later case, the developper used Ubuntu (neither
Debian nor Angström). As these OS are official BBB OS, I prefer using them
for my application. I am electrician, I don't really want to spend too much
time on SW bugs as I am not skilled for that task.
One word perhaps about the application: it is very simple. I must monitor
mains power supply in different locations and have to log power outage
events on a file with time stamps. I have also to log grid
switching events ... The specialized 230V AC monitoring system has no
Ethernet connection but can be associated with BBB GPIO's. So that log file
could be downloaded when power outage is over.
The problem is that, even with battery plugged in, the BeagleBone Black
perform a self shutdown within 60 seconds after mains power off (5V DC
power supply)...
Hope my explanation is now better.
Kind regards
Michel.
Post by Michel Gerin
Post by Michel Gerin
Thank you for your quick reply.
No shutdown is a function of the SW.The SRM covers the hardware.
OK, than I suppose that somewhere in the whole Debian package, a
routine
Post by Michel Gerin
is permanentely checking (polling) if 5V DC power supply is still
"ON".
Post by Michel Gerin
When it is not the case an event is fired in order to start a clean
shutdown procedure? Am I correct ? Does this happen via the I²C bus ?
Does
Post by Michel Gerin
this routine makes a polling to the TPS65217C PMIC ?
Nope you need to tell it..
Either via: "sudo halt" or.. setup a pin/interrupt to trigger systemd
to shutdown the system..
Regards,
--
Robert Nelson
http://www.rcn-ee.com/
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
bremenpl
2014-10-17 15:36:13 UTC
Permalink
Hello there Michael,
I have just tested my BeagleBone Black. I have connected the power through
USB + battery. Then I disconnected the USB and left the BeagleBone Black on
the battery. It havent shutdown after a minute or anything. I am using the
console Debian image.

W dniu piątek, 17 października 2014 07:25:54 UTC+2 uÅŒytkownik Michel Gerin
Post by Michel Gerin
Hello David,
Yes you are right. If I cannot solve this shutdown problem it's probably
the only solution.
But it's frustrating when you think that the BeagleBone Black has its own
battery charger and own UPS that can only run during 60 seconds because of
this self shutdown problem !
Why does it work correctly on a BBB running a VoIP PBX (probably running
with Ubuntu) and not with a Debian or Angström distribution ?
I would prefer Debian or Angström built for BeagleBone Black distribution
not to be able to make a self shutdown and let this possibility to the
user.
An external backup UPS draws also additional current when running. I
wanted to keep power consumption as low as possible. Moreover, I don't need
5V from the BBB when running under UPS mode.
If a know that a SW solution exists, I won't give up so easily. :-)
Kind regards
Michel.
Post by David Funk
Maybe use a battery backup UPS to run your 5 volt power supply to the BBB?
-david
Post by Michel Gerin
Hello Robert,
Thank you spending your time to help me.
First of all, sorry if I didn't explain things correctly. I think there
is a misunderstanding (I am French speaking) .
I don't want BeagleBone to perform a shutdown during power outage. I
want BBB running continuously like my VoIP PBX also based on BeagleBone
Black. But I think, that in this later case, the developper used
Ubuntu (neither Debian nor Angström). As these OS are official BBB OS, I
prefer using them for my application. I am electrician, I don't really want
to spend too much time on SW bugs as I am not skilled for that task.
One word perhaps about the application: it is very simple. I must
monitor mains power supply in different locations and have to log power
outage events on a file with time stamps. I have also to log grid
switching events ... The specialized 230V AC monitoring system has no
Ethernet connection but can be associated with BBB GPIO's. So that log file
could be downloaded when power outage is over.
The problem is that, even with battery plugged in, the BeagleBone Black
perform a self shutdown within 60 seconds after mains power off (5V DC
power supply)...
Hope my explanation is now better.
Kind regards
Michel.
Post by Michel Gerin
Post by Michel Gerin
Thank you for your quick reply.
No shutdown is a function of the SW.The SRM covers the hardware.
OK, than I suppose that somewhere in the whole Debian package, a
routine
Post by Michel Gerin
is permanentely checking (polling) if 5V DC power supply is still
"ON".
Post by Michel Gerin
When it is not the case an event is fired in order to start a clean
shutdown procedure? Am I correct ? Does this happen via the I²C bus ?
Does
Post by Michel Gerin
this routine makes a polling to the TPS65217C PMIC ?
Nope you need to tell it..
Either via: "sudo halt" or.. setup a pin/interrupt to trigger systemd
to shutdown the system..
Regards,
--
Robert Nelson
http://www.rcn-ee.com/
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michel Gerin
2014-10-18 11:36:04 UTC
Permalink
Hello bremerpl,

GREAT !! you had the correct suggestion.
I installed the console version and BBB seems indeed not to shutdown.

I didn't know these different behaviours between the ldxe and console
version when a battery backup was installed on the BBB

Thank you for your help.

Kind regards

Michel.
Post by bremenpl
Hello there Michael,
I have just tested my BeagleBone Black. I have connected the power through
USB + battery. Then I disconnected the USB and left the BeagleBone Black on
the battery. It havent shutdown after a minute or anything. I am using the
console Debian image.
W dniu piątek, 17 października 2014 07:25:54 UTC+2 uÅŒytkownik Michel Gerin
Post by Michel Gerin
Hello David,
Yes you are right. If I cannot solve this shutdown problem it's probably
the only solution.
But it's frustrating when you think that the BeagleBone Black has its own
battery charger and own UPS that can only run during 60 seconds because of
this self shutdown problem !
Why does it work correctly on a BBB running a VoIP PBX (probably running
with Ubuntu) and not with a Debian or Angström distribution ?
I would prefer Debian or Angström built for BeagleBone Black distribution
not to be able to make a self shutdown and let this possibility to the
user.
An external backup UPS draws also additional current when running. I
wanted to keep power consumption as low as possible. Moreover, I don't need
5V from the BBB when running under UPS mode.
If a know that a SW solution exists, I won't give up so easily. :-)
Kind regards
Michel.
Post by David Funk
Maybe use a battery backup UPS to run your 5 volt power supply to the BBB?
-david
Post by Michel Gerin
Hello Robert,
Thank you spending your time to help me.
First of all, sorry if I didn't explain things correctly. I think there
is a misunderstanding (I am French speaking) .
I don't want BeagleBone to perform a shutdown during power outage. I
want BBB running continuously like my VoIP PBX also based on BeagleBone
Black. But I think, that in this later case, the developper used
Ubuntu (neither Debian nor Angström). As these OS are official BBB OS, I
prefer using them for my application. I am electrician, I don't really want
to spend too much time on SW bugs as I am not skilled for that task.
One word perhaps about the application: it is very simple. I must
monitor mains power supply in different locations and have to log power
outage events on a file with time stamps. I have also to log grid
switching events ... The specialized 230V AC monitoring system has no
Ethernet connection but can be associated with BBB GPIO's. So that log file
could be downloaded when power outage is over.
The problem is that, even with battery plugged in, the BeagleBone Black
perform a self shutdown within 60 seconds after mains power off (5V DC
power supply)...
Hope my explanation is now better.
Kind regards
Michel.
Post by Michel Gerin
Post by Michel Gerin
Thank you for your quick reply.
No shutdown is a function of the SW.The SRM covers the hardware.
OK, than I suppose that somewhere in the whole Debian package, a
routine
Post by Michel Gerin
is permanentely checking (polling) if 5V DC power supply is still
"ON".
Post by Michel Gerin
When it is not the case an event is fired in order to start a clean
shutdown procedure? Am I correct ? Does this happen via the I²C bus
? Does
Post by Michel Gerin
this routine makes a polling to the TPS65217C PMIC ?
Nope you need to tell it..
Either via: "sudo halt" or.. setup a pin/interrupt to trigger systemd
to shutdown the system..
Regards,
--
Robert Nelson
http://www.rcn-ee.com/
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google
Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...