- Sat Apr 02, 2022 6:16 am
#94155
Jakub Kubny wrote:Hello,
In my ESP8266 project, I would like to have one universal USB interface for a battery charging and also for serial communication and firmware uploading.
The ESP8266 is powered by a Li Ion cell and I've got a following thought: When I connect the device to a (for example) mobile charger, it would be nice, if a cell starts charging. And also, when I connect the device to a computer using same USB interface, it should be possible to upload new firmware or debug the device using a serial monitor.
Is this setup possible and how to do that?
Thanks.
You have several options...
(1) With these type of boards you can charge your battery and power your ESP at the same time. This one is a WeMos shield. However, it has a separate USB input. I don't think these create a pass through for USB programming.
(2) Get a dedicated board that does both. It has only one input, so I would have to assume it both charges and programs.
(3) Not being a hardware guy... I could not recommend how to build a circuit external to an ESP board that could do both, but I'd bet it is possible.
(4) Simply connect the USB cable for powering/charging only and use OTA for your programming needs.