BORON - VUSB as VIN + using Lipo connector to monitor voltage

Hello,
I am using the particle boron in a small scale fleet of temperature monitoring equipment. I have a question about using the Lipo connector to monitor voltage at the same time as using VUSB as the supply rail for the boron.

I am supplying VUSB with 5.0V as the power supply for the boron. The overall project has a battery backup and charging module elsewhere on the main PCB. My question is -

I would like to run a set of parallel leads to the Lipo connector from a lipo battery elsewhere in the project to allow me to use the boron fuel gauge to monitor the battery but use the VUSB as the power supply of the board.

Is this possible?

I would not do that. The Li pins are not only connected to the MAX17043 fuel gauge, but also to the bq24195 PMIC. There are so many possible cases where the PMIC could engage charging while your external circuit is also trying to charge, which could damage one or both chargers, or overcharge the battery.

It would be better to use an external fuel gauge than try to use the one on the Boron.

1 Like

I’ve got a related question, if you really wanted to, could you disable the charging function via a PMIC command in the code?

If this is possible, is this able to be done on an Argon Gen 3?

Thanks,
Sam

Yes it is possible. I recommend using Device OS 3.0.0 or later and it’s really just one call to disable charging, and the setting is saved in configuration flash.

void setup() {
    // Apply a custom power configuration
    SystemPowerConfiguration conf;

    conf.feature(SystemPowerFeature::DISABLE_CHARGING);
    int res = System.setPowerConfiguration(conf);
    Log.info("setPowerConfiguration=%d", res);
    // returns SYSTEM_ERROR_NONE (0) in case of success

    // Settings are persisted, you normally wouldn't do this on every startup.
}

https://docs.particle.io/cards/firmware/power-manager/systempowerfeature/

This call was only added in 3.0.0. In theory it’s possible to disable charging with older versions of Device OS, however it’s very hard to keep it turned off, because Device OS keeps turning it back on again in older versions. Using the API in 3.0.0 works reliably without any special hacks.

4 Likes

Thanks Rick, I get a SystemPowerConfiguration was not declared in scope along with a few other errors. Assuming to compile with 3.0.0, I need to click on Devices and select Device OS target 3.0.0 (prerelease)? Is there anything else i’m missing?

Does the device you are targeting have a gold star to the left of the name?

Both that and selecting the Target of 3.0.0 are required. Also make sure there is only one item with a gold star; sometimes more than one can be selected at the wrong target will be used.

1 Like

I don't believe it is. I did try it on an Argon and came up with similar compile errors with Workbench.

It’s not possible on the Argon (or Xenon) because they don’t have a bq24194 PMIC. The charger is hardwired on the Argon and cannot be turned off.

1 Like