# Power on after shutdown

**URL:** <https://community.sixfab.com/t/power-on-after-shutdown/885>\
**Category:** Power Software\
**Created:** [November 10, 2020, 5:58am UTC](https://community.sixfab.com/t/power-on-after-shutdown/885 "2020-11-10T05:58:44Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![andre](https://community.sixfab.com/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@andre](https://community.sixfab.com/u/andre)\
**Post date:** [November 10, 2020, 5:58am UTC](https://community.sixfab.com/t/power-on-after-shutdown/885/1 "2020-11-10T05:58:44Z")

</div>

Is there a way to have it power-up again if the battery is not used using the API?

---

<div class="post-metadata">

**Author:** ![ensar](https://community.sixfab.com/user_avatar/community.sixfab.com/ensar/32/8_2.png) [@ensar](https://community.sixfab.com/u/ensar)\
**Post date:** [November 10, 2020, 11:27am UTC](https://community.sixfab.com/t/power-on-after-shutdown/885/2 "2020-11-10T11:27:37Z")

</div>

Hi @andre,

Could you please let me know more details on this?

---

<div class="post-metadata">

**Author:** ![andre](https://community.sixfab.com/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@andre](https://community.sixfab.com/u/andre)\
**Post date:** [November 10, 2020, 11:57am UTC](https://community.sixfab.com/t/power-on-after-shutdown/885/3 "2020-11-10T11:57:53Z")

</div>

Hi.  
I want to use the solar input (J4) for a 12V battery input. I’m not going to use the lithium battery as the board will never shutdown before the 12V battery is totally depleted as the the lithium battery will keep charging.

So I monitor the voltage of the solar input and send a shutdown command at let’s say 10.5V - which works.  
The thing is that the board will switch back on at almost 10.6V (Don’t know how it decides on that). If I have more equipment running of the same battery consuming power and it switches back on, the voltage will drop very quickly to 10.5 and I will have a constant oscillation effect.

I need for the board to switch on at let’s say 11V only after shutdown.

---

<div class="post-metadata">

**Author:** ![ensar](https://community.sixfab.com/user_avatar/community.sixfab.com/ensar/32/8_2.png) [@ensar](https://community.sixfab.com/u/ensar)\
**Post date:** [November 11, 2020, 8:37pm UTC](https://community.sixfab.com/t/power-on-after-shutdown/885/4 "2020-11-11T20:37:39Z")

</div>

Unfortunately, there is no way to configure it this way using the API.

---

<div class="post-metadata">

**Author:** ![shawnj007](https://community.sixfab.com/user_avatar/community.sixfab.com/shawnj007/32/982_2.png) [@shawnj007](https://community.sixfab.com/u/shawnj007)\
**Post date:** [November 15, 2020, 6:21pm UTC](https://community.sixfab.com/t/power-on-after-shutdown/885/5 "2020-11-15T18:21:52Z")

</div>

Check out my recent post for a possible solution…

> [@Immediate power up with external power, safe shutdown when removed](https://community.sixfab.com/t/immediate-power-up-with-external-power-safe-shutdown-when-removed/858/2):
>
> So, no real fix from sixfab, so I came up with something that does the trick. My solution is to simulate a button press when power comes on with hardware using a 555 timer IC. This works for me, it may work for you, but use it at your own risk. wink The circuit operates by sensing voltage on the power source and uses a mosfet to simulate a quick press on the button. Since the ‘short press’ has no effect when the system is already on, power can be applied/removed in cases where the normal saf…

---

<div class="post-metadata">

**Author:** ![shawnj007](https://community.sixfab.com/user_avatar/community.sixfab.com/shawnj007/32/982_2.png) [@shawnj007](https://community.sixfab.com/u/shawnj007)\
**Post date:** [November 15, 2020, 6:23pm UTC](https://community.sixfab.com/t/power-on-after-shutdown/885/6 "2020-11-15T18:23:24Z")

</div>

If you add a zener diode and a voltage divider, you can get a ‘minimum on’ threshold to trigger the ‘push’.

---

<div class="post-metadata">

**Author:** ![kev.oue](https://community.sixfab.com/user_avatar/community.sixfab.com/kev.oue/32/1113_2.png) [@kev.oue](https://community.sixfab.com/u/kev.oue)\
**Post date:** [February 17, 2021, 11:12am UTC](https://community.sixfab.com/t/power-on-after-shutdown/885/7 "2021-02-17T11:12:14Z")

</div>

Hi Shawn, would you be able to provide a quick diagram of the circuit you are using?

Thanks,

Kevin

---

<div class="post-metadata">

**Author:** ![ensar](https://community.sixfab.com/user_avatar/community.sixfab.com/ensar/32/8_2.png) [@ensar](https://community.sixfab.com/u/ensar)\
**Post date:** [February 18, 2021, 3:14pm UTC](https://community.sixfab.com/t/power-on-after-shutdown/885/8 "2021-02-18T15:14:17Z")

</div>

Hi all,

You can take a look at the “[power outage event](https://sixfab.github.io/sixfab-power-python-api/power_api.html#power_api.power_api.SixfabPower.get_power_outage_event_status)” newly added with the firmware.

Safely shuts down the Raspberry Pi as soon as external power is removed and turns it on as soon as external power is applied.

[https://sixfab.github.io/sixfab-power-python-api/power\_api.html#power\_api.power\_api.SixfabPower.get\_power\_outage\_event\_status](https://sixfab.github.io/sixfab-power-python-api/power_api.html#power_api.power_api.SixfabPower.get_power_outage_event_status)

I hope this helps.

---

<div class="post-metadata">

**Author:** ![shawnj007](https://community.sixfab.com/user_avatar/community.sixfab.com/shawnj007/32/982_2.png) [@shawnj007](https://community.sixfab.com/u/shawnj007)\
**Post date:** [February 19, 2021, 4:39pm UTC](https://community.sixfab.com/t/power-on-after-shutdown/885/9 "2021-02-19T16:39:48Z")

</div>

@ensar,

Thank you! This looks like what I was hoping for, I think… Could you please explain the run\_time and sleep\_time parameters and how they will affect the operation of the device?

Will the device ‘wake’ at the end of sleep\_time interval, and run for run\_time interval?

How do I configure to keep it off when there is no external power (without any momentary wake-ups) and have it boot immediately, while also immediately shutting down when external power stops?

@kev.oue,  
The git has the circuit info, usable in Kicad, but yes, I will grab a screenshot or something and post it.

S

---

<div class="post-metadata">

**Author:** ![ensar](https://community.sixfab.com/user_avatar/community.sixfab.com/ensar/32/8_2.png) [@ensar](https://community.sixfab.com/u/ensar)\
**Post date:** [February 24, 2021, 6:12pm UTC](https://community.sixfab.com/t/power-on-after-shutdown/885/10 "2021-02-24T18:12:50Z")

</div>

Hi @shawnj007 ,

When there is a power outage, it will run for the run\_time interval then shut down, then it will sleep for the sleep\_time interval, and when the time is up, the device will turn on. This cycle breaks when power is plugged in.

---

<div class="post-metadata">

**Author:** ![shawnj007](https://community.sixfab.com/user_avatar/community.sixfab.com/shawnj007/32/982_2.png) [@shawnj007](https://community.sixfab.com/u/shawnj007)\
**Post date:** [February 26, 2021, 2:45am UTC](https://community.sixfab.com/t/power-on-after-shutdown/885/11 "2021-02-26T02:45:05Z")

</div>

Hi @ensar,

How does one prevent it from ever waking with this functionality (eg infinite sleep\_time)?

Shawn

---

<div class="post-metadata">

**Author:** ![ensar](https://community.sixfab.com/user_avatar/community.sixfab.com/ensar/32/8_2.png) [@ensar](https://community.sixfab.com/u/ensar)\
**Post date:** [March 2, 2021, 9:29pm UTC](https://community.sixfab.com/t/power-on-after-shutdown/885/12 "2021-03-02T21:29:39Z")

</div>

This can be done by setting the _sleep\_time_ parameter to the maximum(1439 min).
