I need a circuit that utilizes the tp4056 breakout board to power a NodeMCU ESP like so:
- tp4056 USB port connected: 18650 battery charging and NodeMCU running of USB
- tp4056 USB port not connected: NodeMCU running of 18650 battery
The problem is that the load of the tp4056 should be disconnected while charging, otherwise it can mess with the overcharge protection of the tp4056 (see here).
I have designed the following circuit hoping it will achieve my goal. My reasoning is that when no USB is connected the relay will let the boost module run off the battery and when USB is connected the relay will close and power the boost module over USB while letting the battery charge as usual.
Does the circuit achieve my goal? Are there any other issues with the setup?
Please note that there will be more components connected to the NodeMCU, so the exact current draw remains unknown (<500ma though).