Part of the problem I've been seeing with inexpensive IoT dev boards, is that the design around the power system hasn't been very good. Here's my attempt to fix that. This is a battery-ready module with a proper lithium battery charge circuit, lithium battery protection circuit, power supply, and antenna, all in a 1 inch by 1 inch package.
The battery/power circuitry is surprisingly complex, which is why the built-to-a-price-point applications often don't have the "proper" battery control, opting instead for "good enough".
The main interface to the world (other that WiFi or Bluetooth) are castellated headers on the left and right side. Those grant access to input voltage, battery voltage, output voltage, TX/RX pins, bootmode selection, and a few GPIO. Because of them, this module can be soldered directly down to a larger host board if necessary, and can even provide regulated 3.3V output to it if given battery power.
What sets this apart in terms of battery handling are a few things:
- There is a buck-boost power supply to provide a constant 3.3V to the ESP32 through a battery's entire range (3.0V-4.2V)
- There is a cut off for battery when it hits 3.0V, to prevent over discharging it
- When the module is plugged in (through castellations or through the USB connector), it will switch over to using that as a power source
- Also while plugged in, there is circuitry for constant-current/constant-voltage charging of the battery