# Battery Charge doesn't work if starting when EN grounded

**URL:** <https://community.particle.io/t/battery-charge-doesnt-work-if-starting-when-en-grounded/56082>\
**Category:** Firmware\
**Tags:** boron\
**Created:** [May 11, 2020, 3:31am UTC](https://community.particle.io/t/battery-charge-doesnt-work-if-starting-when-en-grounded/56082 "2020-05-11T03:31:15Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![Rftop](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rftop/32/16896_2.png) [@Rftop](https://community.particle.io/u/Rftop)\
**Post date:** [May 29, 2020, 4:25pm UTC](https://community.particle.io/t/battery-charge-doesnt-work-if-starting-when-en-grounded/56082/19 "2020-05-29T16:25:52Z")

</div>

@ielec , I have a few observations from your results, and comments:

Your Li-Po being tested appears to be mostly charged. You might want to try one at a lower voltage. Maybe even log the VCell Voltage instead of SOC, since SOC is an assumption where as Voltage is a direct measurement ?

Looking at your log, it takes ~10 seconds before the Min Input Voltage is established after EN Pin Shutdown for the API.

> [@ielec](#):
>
> The log running my app for test mode 1:
> 
> > 0000000440 [app] application.cpp:98, loop(): TRACE: VIN Vmin: 4360  
> > 0000010527 [app] application.cpp:98, loop(): TRACE: VIN Vmin: 5080

I assume that's because System Power manager waits for the PMIC to perform it's startup duties, including `Datasheet Section 8.3.1.3 Power Up from DC Source`: , [(Link)](https://community.particle.io/t/pmic-get-setinputcurrentlimit-not-setting-correctly/48262/22)  
The linked post mentions the Data Lines (D+/D-) which may be playing a factor in my USB Connector Vs Vin results. But this gets tricky because (at that time), tying the Data lines together had different results based on Vin or USB Connector.

The diode that @tve mentions later on in the thread might also be the reason for the different results between Vin and USB,

> [@PMIC get/setInputCurrentLimit not setting correctly?](https://community.particle.io/t/pmic-get-setinputcurrentlimit-not-setting-correctly/48262/35):
>
> FYI, looking at the schematic, there’s a diode from the USB connector’s power pin to Vin, which is what goes into the PMIC (Vbus pin). The Vusb connector pin is the same as Vin, i.e., it doesn’t go through a diode to reach the PMIC (Vbus pin). The schematic doesn’t say what kind of diode, but it’s not a shottky symbol, so I suspect that explains the 0.5V-0.8V drop observed by @Rftop, specifically between what he labeled as V(PSU) vs V(USB). Something that strikes me as interesting from the data…

It also mentions `pmic.enableBuck()`. I started using it for an EN Pin Low Powered Solar Boron after a test way back in **2018** [(Link)](https://community.particle.io/t/low-power-boron-lte-using-the-en-pin/46257/2). I never understood why this had an impact based on the datasheet. I never did find any clarity on the subject.

> **Trial #1** required a modification to the Code during the experiment. Originally, the PMIC would not resume recharging the Li-Po if the input (solar) voltage dropped out completely. This means that charging would not resume after severe cloudy conditions, or night time. My solution was to add `pmic.enableBuck();` inside the Setup() routine which runs each time the Boron Starts-up from the external Timer.

* * *

While not specific to the EN Pin charging for @runfastman's (this) thread, these are most of the "issues/unknowns/variables/etc" that I'm aware of relating to the topic.

- Vin verses USB Connector
- D+/D- wires,
- Timing of PMIC's Power Up routine checks
- Diode on USB connector’s power pin to Vin
- enableBuck()'s influence on charging

For me, the answer is using the USB connector and the new API. I haven't personally discovered issues with that combination......but that can obviously change as the firmware matures.

---

_[View the full topic](https://community.particle.io/t/battery-charge-doesnt-work-if-starting-when-en-grounded/56082)._
