ESP8286 Power Management

I’ve got a power supply problem with a project. I use a solar panel to power/recharge a 1000mAhr LiPo battery that ultimately drives the SparkFun Thing Dev board. During testing, as the battery wore down below 3V the board continued to draw power. The battery was drawn down to the point that it provided insufficient power to drive the WiFi component. The board got into a loop where it continued to boot, fail and boot again. This continued until the battery was nearly completely depleted. That was a problem.

I started looking for solutions and came across an article by Ondřej Hruška titled ESP8266 killing itself? that was published two years ago. It specifically addressed power management and low power conditions with the ESP8266 chip. At the end of the “self-destruct” article was a comment that suggested a Microchip Voltage Supervision IC might be a solution.

Microchip’s MCP100 is a voltage supervisory integrated circuit. In general, voltage supervisors and detectors circuits monitor system voltages to eliminate problems during operation. The supervisor monitors the power supply voltage and resets the system if the voltage falls below a predetermined level. On power-up, the supervisor holds the system in reset until the voltage has stabilized.

The MPC100 can be set to pull the RST pin low on the ESP8266, preventing it from booting and rebooting in low power situations. That would eliminate the LiPo depletion issue I was facing.

I added the MCP100-270 to my breadboard with the supply voltage and common ground connected. Then I connected the MCP100 RST pin to the ESP8266 RST pin and ran some tests. The supply line was providing 3.65 VDC and the board booted and ran fine. Using a set of resistors, I created a voltage divider circuit with various voltages.

I implemented the ESP DeepSleet Mode as a means of reducing power consumption. To do that, I placed a ESP.DeepSleep(900000000) command in my code to put the board into DeepSleep for 15 minutes (15(minutes) x 60(secs) x 1000(ms) x 1000(us)). At the end of 15 minutes GPIO16 sends a wakeup pulse to the reset pin, whereupon the microcontroller restarts and repeats the sensor sampling.

The problem was that both the MCP100 and GPIO16 needed to manage the RST pin. GPIO16 pulses the RST pin to exit DeepSleep Mode and The MCP120 Voltage Supervisor holds RST low when the voltage is too low on VIN. Using either one alone worked fine, but together they seemed to be battling and I could not get a clean boot cycle from the ESP8266. Without a DSO I can’t be sure what’s going on, but it definitely didn’t work. So, I needed a new solution.

Now, as an alternative, I’m looking at managing the battery supply voltage with a 3VDC LDO Voltage Regulator. The LDO voltage regulator should provide power from when the battery is at a full charge (3.7VDC) down to levels close to 3VDC where the voltage regulator drops offline. That profile coincides with the optimal supply profile for the LiPo battery. Bonus!

The next step is to get a LDO regulator and test. More to come.

About Tim Porter

Tim retired after over 30 years in various technology roles. He's worked in application development, infrastructure, database management and network engineering. In his spare time, Tim also also dables in electronics and microcontroller programming.