I am trying to learn how to nicely power a wifi chip by a rechargeable battery, and have the following arrangement so far (decoupling not shown):
The ESP8266 spends most of its time in deep sleep, but wakes periodically to take a sensor reading and transmit it over WiFi.
- When asleep (10 minutes): current = 20μA
- When active (1.2 seconds): current = 80mA (increasing to 180mA for short spikes during transmission)
The battery I am using is a single cell 1200mAh LiPo battery, which then feeds the MCP1700-330 3.3V LDO. Using the arrangement above, I measure the battery voltage dropping as follows during operation:
Currently, the battery life is around 10 months. I am wondering if there is a better way to power the circuit that I can use? (which doesn't add much extra complexity / cost). I am just learning, and this is my first attempt to power something with a battery.
I chose this arrangement because the MCP1700 has a very low quiescent current (1.6μA), and it can regulate the maximum battery voltage of 4.1V nicely down to 3.3V, as accepted by the load devices. I know that the dropout voltage is around 180mV, but am not sure what happens when the battery voltage drops below this (couldn't find it in the datasheet). Does it just track the input? Is it bad practice to do this?
I was planning to add undervoltage detection next, to disconnect the battery when its voltage reaches 3V, in order to protect it. But it seems like the battery is pretty much empty at 3.4V (or is this an effect of the LDO becoming unregulated?).
None of my devices actually need 3.3V, so does it make more sense to use a lower regulator like 2.6V (minimum specified by the ESP)? Or would this then result in too much lost energy (burnt as heat on the LDO) for the largest battery voltages? Should I use a different battery even?
I have read about buck-boost converters being used for this kind of thing (because they can ensure for example 3.3V even when the battery voltage drops below this), but it seems to me that they add more complexity for not much efficiency gain (because the currents are low).
Any feedback would be great, as I am confused as to what the best / standard way would be to go about this. Thanks!
EDIT - Some estimations of wastage
Assuming 1.2 seconds awake time, and 600 seconds sleep time.
Current flowing through LDO regulator when ESP is asleep = 20μA (from my circuit) + 1.6μA (quiescent current of LDO) = 21.6μA.
Current flowing through LDO regulator when ESP is awake= 80mA (dominated by my circuit, i.e. neglect LDO quiescent current).
When the LiPo battery is fully charged to 4.2V:
Voltage dropped across the regulator is 4.2V - 3.3V = 0.9V
Power dissipated by LDO when ESP is asleep: P = I*V = 21.6μA x 0.9V = 19.4μW.
Power dissipated by LDO when ESP is awake: P = I*V = 80mA x 0.9V = 72mW.
Energy wasted by LDO when ESP is asleep: E = P*t = 19.4μW * 600 sec = 11.6 mJ per cycle.
Energy wasted by LDO when ESP is awake: E = P*t = 72mW * 1.2 sec = 86.4 mJ per cycle.
Total energy wasted per cycle = 86.4 + 11.6 = 98 mJ per cycle.
When the LiPo battery is discharged to 3.4V (before nonlinear behaviour starts):
Voltage dropped across the regulator is 3.4V - 3.3V = 0.1V
Power dissipated by LDO when ESP is asleep: P = I*V = 21.6μA x 0.1V = 2.2μW.
Power dissipated by LDO when ESP is awake: P = I*V = 80mA x 0.1V = 8mW.
Energy wasted by LDO when ESP is asleep: E = P*t = 2.2μW * 600 sec = 1.3 mJ per cycle.
Energy wasted by LDO when ESP is awake: E = P*t = 8mW * 1.2 sec = 9.6 mJ per cycle.
Total energy wasted per cycle = 1.3 + 9.6 = 10.9 mJ per cycle.
Over the linear part of the battery's discharge from 4.2V down to 3.4V:
- Average energy wasted due to asleep = (11.6 + 1.3)/2 = 6.5 mJ per cycle
- Average energy wasted due to awake = (86 + 9.6)/2 = 47.8 mJ per cycle
It takes 9.5 months to go from 4.2V to 3.4V, which equates to 41000 cycles. So the total energy wasted
- due to being asleep is 6.5 mJ/cycle x 41000 cycles = 266 J
- due to being awake is 47.8 mJ/cycle x 41000 cycles = 1960 J
Total wasted energy is 2.23 kJ of which 12% comes from being asleep, and 88% from being awake.
Note, for this calculation, I have only accounted for when the battery voltage is dropping linearly (not including the non-linear behaviour after the "knee"). I have also assumed that the LDO regulator's quiescent current, and the ESP8266 sleep current are constant at 1.6μA and 20μA, respectively. This may not be the case - especially with the LDO, but I couldn't find info in the datasheet.
Energy required by my circuit:
When asleep, energy required is 21.6μA x 3.3V x 600 seconds = 43 mJ per cycle. Total energy = 43 mJ x 41000 cycles = 1750 J.
When awake, energy required is 80mA x 3.3V x 1.2 seconds = 317 mJ per cycle. Total energy = 317 mJ x 41000 cycles = 13000 J.
Therefore, over the linear discharge time of 9.5 months:
- When awake, we have 13 kJ used by my circuit and 2 kJ wasted by the LDO.
- When asleep, we have 1.75 kJ used by my circuit and 0.26 kJ wasted by the LDO.
This makes me think that even if the power supply (LDO or buck-boost) could perfectly convert the battery voltage into 3.3V with zero wastage, the gains in battery life wouldn't be huge (on the order of 10%), because most of the energy is actually consumed by my circuit. So might be better to use 2.6V instead of 3.3V...
EDIT #2 - Effect of different supply voltages
As requested by Neil_UK, I have removed the LDO from the circuit and varied the power supply voltage from 2.5V to 3.6V (as can be tolerated by the ESP8266). It can be seen that the deep sleep current varies from around 15.5μA up to 21μA. There is no meaningful change in the active current, which sits at around 77mA always:
I did not measure any change in time required to connect, but this ofcourse could be because I always have a strong enough WiFi connection. It would be better to measure RF output power, but I don't have the equipment, so this will have to do as a proxy for now.