1.3.1-rc.1+ change to Boron solar charging (via VUSB) behavior

Thanks @avtolstoy for working on this - fingers crossed for a successful merge and release so we can get the Particle solar train back on track! :+1:

1 Like

I’m having some issues with the power manager that aren’t solar related. Our application does not use solar.

We do the following power management:

  • Enable disable charging for ambient temperature
  • Enable disable batfet for ambient temperature
  • Disable watchdog, then sleep and wakeup for LOW_BAT_UC. We do this for a wake on power feature.
  • We have a coprocessor that has the ability to power cycle the electron via LiPo and VUSB

Our application was running OK until we started upgrading devices to 1.0.1 then 1.4.4. The problems we are seeing are:

  • Buck is being disabled. We have to manually reenable in our application
  • Charging is being disabled, we cannot reenable in our code without your workaround here. Devices seem to get stuck in a weird state where battery_manager thinks the battery is disconnected, then it won’t go back to charging.

Is the intention with battery_manager for the user application to avoid making settings changes to PMIC? Is there a way to disable battery_manager? I don’t see that option implemented in your PR.

1 Like

@hwestbrook, I agree, the issues are NOT limited to Solar Borons.
I’m planning on starting a new Thread that contains all my test results for the Boron’s, with the hopes that compiling/discussing the issues (that started to appear in 1.3.1) in one place will help find the answer.

In the meantime, here are a few links:

I have many projects sitting on the Shelf because of 1.3.1 firmware and newer.

Its my opinion that Particle assumed (incorrectly) that these issues were only for Solar Recharged Borons which is limited Scope/Customers. Hopefully the Boron will get the attention it deserves in the near future after the smoke clears from the Mesh :wink:

@Rftop in the same vein of putting together a new thread with your test results, I have been thinking it may be helpful to put together a current best setup/practice for borons that are are setup for remote locations with solar power etc.

For example general current best setup could be described as:

  • Firmware: 1.1.0 (I believe the consensus is that 1.1.0 is the best current update that still behaves well with solar)
  • Panel Wattage: 1W (6V panel)
  • Lipo Capacity: 5000 mAh
  • Sleep Cycle: System.sleep(D1,RISING,SLEEP_NETWORK_STANDBY,600); (network standby w/ 5min sleep interval
  • PMIC settings: pmic.setInputVoltageLimit(5080); // for 6V Solar Panels
  • Antenna setup: Aftermarket antenna and pigtail

What do you think?

Just to be clear — these are issues I’m having with Electron 3G and Electron LTE. It makes sense the Boron and Electrons would share the issue as they have essentially the same charging circuit. Electron users probably aren’t complaining because most haven’t upgraded to these later firmwares. We wouldn’t be upgrading to these except for we need support of LTE on Electron.

I think this power manager program has pretty serious issues for all of the cellular particle devices.

I’d like to know what particles firmware team intends for us to do with battery manager — it would be nice if they outlined what use case they were thinking of when they implemented these features and how we should be interacting with them. There is almost no documentation related to PMIC.

Have you tried running the new PR that @avtolstoy posted above? I have it running on a (solar powered)
Boron and charging is back to normal.

The ideal setup would always have the device running the latest DeviceOS. Running 1.1.0 puts you at risk of bricking your uBlox due to lack of changes brought later on. LTE is also a lot less reliable <1.2.1.

PR 1992 introduces the power manager, and you can run it on a custom DeviceOS build if you cannot wait for DeviceOS 1.5 that is due in the next week.
This has solved the issue with Solar charging, I have been testing it for two weeks now.

Hi @hwestbrook ,

@avtolstoy indicated documentation will be provided once DeviceOS 1.5 is released. The focus right now is to get everything ready, tested and released.

Reviewing that PR, I don’t see where I can disable this new power management scheme. I see there is a new flag HAL_POWER_MANAGEMENT_DISABLE but its got a TODO label and I don’t see that it is implemented.

What I am trying to get at in my last post is that Particle has completely changed how it manages the PMIC between 0.6.1 and 1.4.4 and not provided any justification or use cases.

  • What problem is being solved with this new PMIC management?
  • How are users intended to interact with it?
  • How did Particle gather requirements for these changes?
  • How is Particle messaging breaking changes?

We are trying to implement a PMIC scheme that seems pretty simple and well within the abilities of the Electron:

  • LiPo charging enable / disable based on temperature
  • Sleep and then wake on power source changes

Is this possible? Its unclear to me after reviewing that PR.

I don’t use Workbench, so I’ll wait a week instead of using the PR.

I’d also suggest a repeatable approach to future testing, maybe even using the Tripler, OLED, and INA219 from the Particle Store (so we can all perform tests using standardized and inexpensive equipment). Those (3) items plus a pigtail make quick work for checking the Current entering and leaving the Li-Po, as well as Vin. Works great for everything except drilling down on the Sleep Current.

I typically set my Minimum Input Voltage for the PMIC in the Code, and use a variable power supply to sweep through a wide input voltage range, and record the V, mA, an mW, entering the Li-Po (3.8-4.0V) throughout the Voltage Sweep. After about 1 min I’ll have the Boron enter Sleep for 1 minute. The Charging Results are also recorded during and after the Sleep event.
Remove Li-Po and replace for a spot check.
Shutdown via EN Pin for another spot check.

Then change the Min Input Voltage in the Code and repeat all tests, etc, etc, etc.

IF everything seems in order, I’d try a Li-Po at a low voltage, maybe 3.5V to confirm nothing funny happens.

I’m sure others will add to those suggestions, but that’s what I’d consider a minimum before releasing a Candidate.

@hwestbrook, I believe I remember one of the reasons was an attempt to have the Boron and Electron’s charging characteristics more aligned. And the ability to operate a Boron 2/3G without a Li-Po.

That is a great little unit test you’ve laid out @Rftop. I have the requisite hardware kicking around - could I convince you post a couple of code snippets to save me bumbling through it this weekend? Coding is my weakest area. Come to think of it, I’m not sure what my strong area actually is :rofl:

So pleased to see progress on this topic. I’ve been very nervous with only a month or so to go before I need solar to be rock solid, and not on 1.1.0 - @Backpacker87 there are other firmware fixes (that were mentioned above) that make v1.3 a necessity in area of poor coverage.

Thanks all

@epbwhiz, I’m guessing that this will all change next week when Particle incorporates DeviceOS 1.5.
See the Pull Request that @avtolstoy linked to in Post #11.

I haven’t studied the proposed SystemPowerConfiguration yet, but it appears the intent is to have it manage/police the PMIC settings in the future.

Hopefully we will know more next week :wink:

@avtolstoy Is the correct person to answer all your questions, but I can point you to this: https://github.com/particle-iot/device-os/pull/2015 to disable the Power manager.

1 Like

I performed a few preliminary Solar tests w/ 1.5.0 RC-1 on a Boron LTE.

SystemPowerConfiguration does appear to behave with Solar Panels.
I’ve only tested Li-Po recharging while operating, and with EN pin Shutdown.

I perform my own Curve Traces for each Solar Panel, with a High Powered LED test Stand.

For Instance:
A 0.5 W Seed Studio Panel will produce at 480 mW at 5.1Volts on my test stand during a Curve Trace (max power is actually at 6V, but the PMIC doesn’t have a setpoint above 5.08V).

The Boron LTE on 1.5.0 rc1 will manage the Li-Po charging Current to keep the panel at 5.1 volts [based on conf.powerSourceMinVoltage(5080)] .
After connecting the 0.5 W panel to the Boron Vusb Pin, the Power entering the Li-Po was measured at 390 mW. Once you add the 64 mW that the Boron consumes, that’s 454 mW being harvested from the 500 mW “rated” solar Panel. That’s very close to the 480 mW from the Solar Panel’s Curve Trace for my test stand…or ~95% efficiency.
The tests used a discharged Li-Po at 3.82V resting for Re-Charge.

A 1W Seed Studio Panel charged the Li-Po at 760 mW.
A 2W Voltaic Panel charged at 1055 mW.
These were just quick tests, so I may be hitting the current limits of my quick wiring, so don’t let the 1W and 2W results discourage you.

I haven’t measured charging currents during or after Sleep events yet.
The charging does work with EN Pin shutdown, like the good-ole days.

Code based on the Example App provided in the PR


void setup()  {
 SystemPowerConfiguration conf;
    conf.powerSourceMaxCurrent(900)  // Set higher than I need
        .powerSourceMinVoltage(5080) // Most important for Solar Panels.
        .batteryChargeCurrent(1024)  // Set higher than I need
        .batteryChargeVoltage(4208)  // Be Careful here.

 int res = System.setPowerConfiguration(conf); // returns SYSTEM_ERROR_NONE (0) in case of success
} // end setup()

void loop()   {

Update: I haven’t found any problems with Li-Po Recharging using Sleep Modes yet (on 1.5.0.rc1 ) :smiley:
The bug with a Boron waking from Deep Sleep when the Solar Panel output cycles (clouds) appears to be gone also.

I’ll start a new thread in a few days with test results for anyone interested.

Thanks for DeviceOS 1.5 !


Thanks so much Ryan for the updates, and thanks @avtolstoy for getting this done! Yes please do start a new thread with the State of Solar on 1.5 so it doesn’t get mixed up with this history. Cheers

@no1089 or @avtolstoy,

How can I use the new API to turn on and off charging based on temperature? Can I implement this concept with power manager, or do I need to disable power manager and then manage 100% with my application?

1 Like

@hwestbrook I too would love to see some example code using the new 1.5.0 methods to dynamically enable/disable charging on the fly. I am thankful that Particle has given this the necessary attention it deserved and soon will have time to try-out 1.5.0-rc1

@epbwhiz, here’s a link to the Thread I started w/ Hardware and Code: