# Battery shut-off?

**URL:** <https://mangoh.discourse.group/t/battery-shut-off/3321>\
**Category:** mangOH Yellow\
**Created:** [January 2, 2020, 11:08pm UTC](https://mangoh.discourse.group/t/battery-shut-off/3321 "2020-01-02T23:08:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dougbrown](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dougbrown/32/2006_2.png) [@dougbrown](https://mangoh.discourse.group/u/dougbrown)\
**Post date:** [January 2, 2020, 11:08pm UTC](https://mangoh.discourse.group/t/battery-shut-off/3321/1 "2020-01-02T23:08:50Z")

</div>

Hi,

I want to use the mangOH Yellow (with WP7702) in an application where it’s powered by a vehicle (using some kind of regulator to bring the voltage down to 5V). When the vehicle turns off (and thus the input 5V goes away), I was envisioning that the LiPo battery could provide enough backup power to keep it alive for a couple of minutes, then shut the WP7702 down cleanly. Then, the WP7702 could power itself back on as soon as the voltage input is supplied again (e.g. the vehicle starts back up), which might be days later.

Is the hardware on the mangOH Yellow capable of doing this, or am I going to have to add additional circuitry to “disconnect” the LiPo battery after I shut down cleanly? Or, is there some kind of super low power mode that we could enter that runs off the battery and lasts for a long time, and it automatically wakes out of it when 5V comes back?

Thanks for any ideas.  
Doug

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [January 2, 2020, 11:48pm UTC](https://mangoh.discourse.group/t/battery-shut-off/3321/2 "2020-01-02T23:48:18Z")

</div>

> [@dougbrown](#):
>
> Is the hardware on the mangOH Yellow capable of doing this, or am I going to have to add additional circuitry to “disconnect” the LiPo battery after I shut down cleanly? Or, is there some kind of super low power mode that we could enter that runs off the battery and lasts for a long time, and it automatically wakes out of it when 5V comes back?

Hi Doug,  
You can use ADC3 to monitor the input voltage. ADC3 is available at the IoT card interface( you will need to add/remove some 0Rs)  
You can go into ULPM mode when your main power is removed and come back into full operational mode after that.  
ULPM power consumption is \< 100ua (not sure if that is low enough).

regards,  
Ashish

---

<div class="post-metadata">

**Author:** ![dougbrown](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dougbrown/32/2006_2.png) [@dougbrown](https://mangoh.discourse.group/u/dougbrown)\
**Post date:** [January 2, 2020, 11:59pm UTC](https://mangoh.discourse.group/t/battery-shut-off/3321/3 "2020-01-02T23:59:06Z")

</div>

Hi Ashish,

Thanks for the suggestion. That’s an interesting idea that I hadn’t considered. I assumed it would draw too much current, but with a 1200 mAh battery it seems like 100 uA will last a really long time. That just might work!

Forgive me if this is too basic of a question, but as soon as I enter ULPM, how can I boot back up? I’m assuming in ULPM I won’t have access to continue reading ADC3? Would I need to put a circuit on my IoT card that wakes it back up out of the ULPM through one of the GPIO pins?

Thanks,  
Doug

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [January 3, 2020, 12:06am UTC](https://mangoh.discourse.group/t/battery-shut-off/3321/4 "2020-01-03T00:06:49Z")

</div>

ADC3 is connected to ULPM section of the module.  
IT only works up to 1.8V so you will need to add some additional circuit (resistor divider) to allow detection of 5V input.  
You can write an app that allows the unit to remain in full operational mode when ADC3 shows the 5V input, switches into ULPM when 5V is removed, and comes out of ULPM when 5V is restored

---

<div class="post-metadata">

**Author:** ![dougbrown](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dougbrown/32/2006_2.png) [@dougbrown](https://mangoh.discourse.group/u/dougbrown)\
**Post date:** [January 3, 2020, 4:18pm UTC](https://mangoh.discourse.group/t/battery-shut-off/3321/5 "2020-01-03T16:18:51Z")

</div>

Thanks for your very helpful information! This really seems like the way to go. It’s too bad that one of the ULPM-enabled GPIO pins isn’t available on the IoT card interface because that would be even simpler.

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [January 3, 2020, 4:31pm UTC](https://mangoh.discourse.group/t/battery-shut-off/3321/6 "2020-01-03T16:31:32Z")

</div>

Actually GPIO36 is routed to IOT card. IT is also a ULPM gpio You will need add remove 0R resistors there…  
It is shared with the light sensor, so just make sure that the light sensor is not firing interrupts.

---

<div class="post-metadata">

**Author:** ![dougbrown](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dougbrown/32/2006_2.png) [@dougbrown](https://mangoh.discourse.group/u/dougbrown)\
**Post date:** [January 3, 2020, 4:35pm UTC](https://mangoh.discourse.group/t/battery-shut-off/3321/7 "2020-01-03T16:35:02Z")

</div>

You’re right, I missed that completely. Thanks! Looks like I have plenty of options.
