I'd like to have the option of powering from either 5v USB OR a single 18650 battery. The ESP32 port will be blocked and inaccessible, so the charging and aux power port is only through the TP-4056.
Powering from battery is absolutely essential, so the charging needs to be functional. Powering through the charging port would be a plus, but not critical - provided the battery works and can be re-charged.
Consider using SEPIC converters. While they aren’t as efficient as buck or boost converters, they are versatile and work well whether the battery voltage is higher or lower than the required output. I personally use them for most applications.
The D24V5F3 isn't available from Amazon... which I prefer in my case because of no hassle returns.
So if I scrap the TP-4056 charging option, could you recommend a module which supports load sharing?
For the voltage regulation, it's my understanding that the ESP32 dev board integrates a AMS1117 chip... my dev board has a chip labeled 1117C. In which case possibly safe to skip a regulator and wire directly to ViN on the dev board? I was only adding the TPS63020 as an added layer of protection.
I'm NOT using the ESP32 WiFi, only BLE (data from MPU6050). So I'm thinking the power hit and heat will be considerably less? At least the board doesn't even get warm on the breadboard powering with 5v through the USB-C port on the ESP32.
I'm also considering this:
LM2596 DC to DC Buck Converter 3.0-40V to 1.5-35V Adjustable Voltage Regulator Electronic Voltage Stabilizer Power Supply Step Down Module
At $1.60 each they're definitely cheap... but necessary??
There seems to be endless options... ?? I'm trying to settle on some relatively affordable components I can wire up and test.
With a TP4056 you could use a SPDT configured so that in one position (Charge) the battery+ goes to the TP4056, in the other position (Run) battery+ goes to the ESP.
If it's the center-off type - then (surprise) it will be Off.
(Maybe it's Off if connected to the TP4056 without that being plugged into USB/supply. IDK.)
You waste power as heat first by stepping up the voltage, then again stepping it back down with the linear regulator on the ESP32.
In contrast, the output of the suggested 3.3V regulator is applied directly to the ESP32 3.3V pin.
There are very few options for load-sharing chargers other than this one, or the MCP73831/2 which is built into several of Adafruit's Feather modules, like this one.
The ESP32C3 sounds perfect! Smaller footprint too. My schematic in the first post shows the pins used on the ESP32... power & ground, then two data pins.
Could you give a brief description? Is this a "wire battery direct to pins" setup? Then use the integrated USB-C port for both power AND charging? As mentioned before, does this support "load sharing"... as in power from 5v USB or battery, and will switch automatically depending on source? If so, this solution would eliminate both TP-4056 and TPS63020 modules... correct??
I would like to suggest another feature of your connection.
The consumption of the circuit according to the diagram will not decrease even in SLEEP to the value according to the ESP32 pdf (10 .. 50 uA) due to the following:
The own consumption of the power supply IC on the ESP32 adapter panel (if there is no external load) is hundreds of uA!.
Do not use USB (program via the serial port of the ESP32),
since the USB IC also consumes a lot.
I don't know how much the TPxxxx's own consumption is, but if it is more than 5-10 uA, it should only work if an external power supply is present.
No. You are not using the "out" terminals on the charger module and you have connected the battery directly to the buck-boost module. Like this, the battery will not be protected from over-discharge. Over-discharging Li-ion batteries is dangerous because it damages them in a way that, later, during re-charging, they can explode or catch fire.
Note: not all tp4056 modules have over-discharge protection built in. These modules don't have the "out" terminals. If your module is like this, you must add an over-discharge module to the circuit.
Some 18650 batteries have a tiny, built-in over-discharge protection circuit, but most do not. Those that do often have a thin circuit board at the -Ve terminal and a metal strip running the length of the battery that enables the board to measure the battery's voltage.
Most Li-Po battery packs also have a built-in over-discharge circuit, inside the yellow tape where the wires emerge.
Updated wiring for battery powered XIAO ESP32C3. I corrected the SDA and SCL pins which were wired wrong in the previous schematic.
The main concern is does anyone see any issue powering this in the following manner:
Directly from the battery as shown (wired to the battery pads on back of device).
From USB 5v plugged into the ESP-32 USB-C port.
I understand that with USB-C (5v) plugged in the XIAO ESP32C3 will be powered AND charge the 18650 battery (load sharing).
" XIAO can be connected to your computer device via data cable while using the battery, rest assured that XIAO has a built-in circuit protection chip, which is safe."