Powering Electron with and without LiPo

@RWB knows way more about this as he did a lot of work with solar panels, but be careful that you’re not going to accidentally recharge your LiSOCl2 with the solar panel in your setup. @RWB uses a solar panel to recharge his LiPo I believe, so there’s definitely a risk of recharging.

How do you plan to power your device? (i.e. what pins). Personally I use the JST connector, which would automatically recharge them if another power source is added (e.g. USB)

I was planning on using JST connection alone when using the Li-SOCl2 battery for locations with no sunlight and using the JST (LiPo) + VIN (6W solar panel) for locations where sunlight is present.

I could potentially also use a powerbank (5v 2A) via USB together with the LiPo connected to JST in some cases.

I don’t think I can use USB and/or VIN together with Li-SOCl2 battery Connected to JST, as it uses these to recharge the LiPo battery like you said. Am I right in this?

Yes, supplying power over USB/VIN would attempt to recharge whatever is connected to the JST socket if I’m not mistaken, because it was originally designed for a rechargeable LiPo.

@Mic, You really should accurately measure your sleeping current. Anything else is just a wild guess.
Your firmware can handle limiting the time the Electron stays awake if for some reason it cant connect.
Your Sleeping Current will be the major factor to the battery life.

If you don't have a way to accurately measure low currents, you can share your firmware code and possibly mail a sample of the reed switch and 4-20 board to someone that can.
I don't own any 2G Electrons, otherwise I'd be happy to test a copy of your hardware & firmware setup for you.

Measuring the Sleep Current removes the guesswork for your Power Budget, for battery only and Solar/Battery systems......IMHO :grin:

1 Like

In order to get to the 110 uA to 130 uA deep sleep current you have to use Li+/JST. If you use VIN, the regulator needs to be turned on and you won’t get to that low of a sleep current.

However, if you attach a Li-SOCI2 (or other non-rechargeable) battery to Li+/JST make sure you turn off the charger. It can be done in software.

3 Likes

This is correct.

It's not documented, and I only found out after some testing.

Any idea what that Charger OFF command is? Just so we can refer others to this code as the question comes up now and then.

2 Likes

So if I use the LiPo on JST and solar panel on VIN, i won’t get a good sleep current (100uA to 130uA)? - or is it only if I use the VIN alone?

And like @RWB said, how would one turn off the charger in software?

BTW, i just read that the spiral-type Li-SOCl2 battery has a higher self-discharge rate than a bobbin-type Li-SOCl2 battery. Is it substantial? I mean if it is around the same self-discharge rate as a LiPo’s 3% a month, it doesn’t really help my case :confused: Do you know if it is still much lower than the LiPo self-discharge rate, @Vitesze? Otherwise i will have to use the bobbin-type Li-SOCl2 battery with a supercapacitor in parallel, but i’m not really sure what Farad and other specs i should be looking for and it is pretty expensive compared to having just a LiPo or spiral-type Li-SOCl2.

Thanks!

You can still charge the Electron by VIN with a LiPo battery connected and get low current in deep sleep. The problem is only if you use only VIN.

Here’s the code to disable charging:

void setCharging(bool enable) {

	PMIC pmic;

	// DisableCharging turns off charging.
	if (enable) {
		pmic.enableCharging();
	}
	else {
		pmic.disableCharging();
	}

	// Disabling the PMIC watchdog is necessary, otherwise it will kick in and turns
	// charging at random times, even when sleeping.

	// This disables both the watchdog and the charge safety timer in
	// Charge Termination/Timer Control Register REG05
	// pmic.disableWatchdog() disables the watchdog, but doesn't disable the
	// charge safety timer, so the red LED will start blinking slowly after
	// 1 hour if you don't do both.
	byte DATA = pmic.readChargeTermRegister();

	if (enable) {
		DATA |= 0b00111000;
	}
	else {
		// 0b11001110 = disable watchdog
		// 0b11000110 = disable watchdog and charge safety timer
		DATA &= 0b11000110;
	}

	// This would be easier if pmic.writeRegister wasn't private (or disable
	// charge safety timer had an exposed method
	Wire3.beginTransmission(PMIC_ADDRESS);
	Wire3.write(CHARGE_TIMER_CONTROL_REGISTER);
	Wire3.write(DATA);
	Wire3.endTransmission(true);

}

There are some more options here:

3 Likes

It is a much lower self-discharge rate and why these batteries are good for this type of application if you can not solar recharge.

I don't think using a Capicator + smaller Li-SOC battery that is not specd to handle the continuous discharge current of the Electron would support the Electrons load. The capacitor is good for a short burst of power but it will not help if the battery cannot support the higher load during a connection process that lasts 1-60 seconds or even longer during an extended connection process.

Use the larger batteries that @Vitesze have proven to work with the boost circuit and you will be good.

1 Like

No, the difference is very minor. LiSOCl2-cells have a self-discharge rate of about 1-2% per YEAR. The low self-discharge is the reason they are popular in applications that need battery-powered for a very long duration.

With a single spiral-type LiSOCl2 and efficient code you could power an Electron for a few years.

1 Like

Hi, Just for additional info, a small part of the 2G transmission cycle is what requires the 1800mA peak current. The transmit intervals are well documented and have a defined maximum duty cycle (it's what makes that ticking sound you hear when a 2g phone is used near some audio equipment). You shouldn't need a 'supercapacitor' - a good quality low-leakage electrolytic is likely to have lower ESR (ie. better peak current response). It should be quite simple to calculate the size based on duration of current pulse and acceptable voltage sag that the battery can top-up between tx pulses.
HTH

2 Likes

For design parameters, Section 2.2 of the document “SARA-G3-U2_SysIntegrManual_(UBX-13000995).pdf” has sample designs for both LiPo and non-rechargeable battery options. The ‘tank’ capacitor needs to keep Vcc drop <400mV for a 1/8 duty cycle, with the battery able to provide average current during 2G GPRS (I think) operations.

The gist for capacitor size appears to be a 330uF tantalum with ESR <35mOhms, placed as close as possible to the modem module (or, in this case, the Electron board’s Li+). I’d increase the size to accommodate any concurrent activity in the uP and other devices on the Electron board (say 470uF tantalum). Going too large could be counter-productive, as the capacitor has to recover through its ESR, as well as discharge. Also tantalum caps don’t tend to come in large capacities, but have very low ESR making them preferable for this function. Also more electrically stable over their lifetime, if my memory serves.

The manual is downloadable from ublox web-site.
HTH.
[Edited: Vin to Li+]

2 Likes

Good information!

Would this be a good solution?:

The TPS would take care of the voltage drop after long usage and the capacitor would take the quick peak current pulses and also help with the battery voltage drop, right? Or could I completely discard the TPS?

In my opinion, for a 3.7V LiSOCl2, with its rapid voltage drop when exhausted (per the battery datasheet), I’d skip the booster circuit. I’d surmise the additional run-time gained is going to be quite small. From the battery datasheet, the peak current is measured over 100mS with a 2 minute recovery. The modem is going to consume peak current for about 2.3mS every 4.6mS in worst case 2G GPRS modes (at max power and worst antenna matching). So, the average current is roughly half the peak. If the battery can maintain 1A continuous, that should be enough.

I took a squiz at the Electron doc/schematic. The ublox modem is normally powered via the PMIC output (3V8 line), and has a 200uF cap. close to its Vcc.

In this case, you will need to directly connect to the Li+/Gnd, or JST battery socket, as the PMIC expects a minimum of 3.9V on VIN. The PMIC won’t be doing much, but it won’t charge the battery as there is no VIN (as long as you don’t connect both battery and USB at the same time!). You can, as Rick K mentioned above, disable the PMIC charging functions to be completely safe.

So, this is (almost) a direct connection from battery to the modem and its existing 200uF ‘tank’ capacitor. I’d say that you would be fine with just that battery and a 330uF tantalum in parallel, the latter as close to the Electron’s Li+ and Gnd as possible.

Note that the PMIC can disconnect the battery when it drops below 3.0V (adjustable) - but this is also the minimum operating voltage of the modem, anyway.

1 Like

Updated: The minimum/reliable startup Vcc for the ublox U2 series is ~3.3V, although it should continue running down to ~3.1V. Not sure about the STM32 and other devices on the Electron. So, it would in fact be wise (per @Vitesze’s lead) to use the boost circuit, as the LiSOCl2 gets down to ~3.2V under 2G mode 900mA average current, ie. well before the cliff -edge of exhaustion I was considering earlier.

1 Like

In real life examples, the boost circuit was needed for reliable operation and quick cellular connection times. Without the boost circuit, the lower voltage caused excessive cellular connection times which just waste battery capacity.

There are capacitors built into the boost circuit so you may try just the boost circuit before adding an extra capicator that is not needed.

2 Likes

Very good suggestions, thanks!

I’m buying the battery, the booster and a 330uF tantalum capacitor to test with. I’ll try with and without the capacitor and see whatever works best.

I will post the results here when I get the components home and get to testing (might take a while apparently :slightly_frowning_face:) but it’s looking good so far on a theoretical point of view, so hopefully it also will in praxis.

1 Like

Hello again,
I haven’t got the components yet but i have another quick question if you don’t mind :wink:

Can I use 2 Li-SOCl2 battery in series on Vin and the LiPo on the JST without a problem?
The voltage would be maximum 7.2V and there won’t be any big voltage drops with high current use, as the high currents would be handled by the LiPo, right?

So the Li-SOCl2 batteries would just charge the LiPo and be used for small mA loads, and the LiPo takes care of the high current loads.

Thanks!

That would be a inefficient setup since the Li-SOCI2 batteries would be constantly be used for charging the LiPo and would be quickly depleted.

The charging of the LiPo is handled by the PMIC which down converts the higher voltage to the batteries charged voltage of 4+ volts and this conversion is not 100% efficient so some power loss will happen there.

The RED charging LED will illuminate during charging also unless you turn it off.

The PMIC will always try to charge the battery even when the Electron is sleeping and this will also cause the Li-SOCI2 to drain more often than if they were connected to the JST battery input port.

If your looking for the longest battery run times then go with Li-SOCI2 in parallel + the https://www.tindie.com/products/onehorse/tps610995-36-v-booster-board/ boost circuit connected to the JST pin.

2 Likes

That makes a lot of sense, thanks!

1 Like