ESP32-S3 USB power management circuit USB2.0 USB3.0 USB PD

Roger_Venotec
Posts: 1
Joined: Wed Apr 12, 2023 6:16 am

ESP32-S3 USB power management circuit USB2.0 USB3.0 USB PD

Postby Roger_Venotec » Wed Apr 12, 2023 6:59 am

Hello and thank you for joining the forum.
I have a question, I would like to currently realize a new project in which I want to use for the first time an ESP from the S3 series with integrated USB.

Until now I always had an ESP with CP2102N in the QFN28 housing in use which has taken over the communication with the USB interface and fittingly also had outputs with which the charging current of the Lipo could be adjusted.

But now this chip can stay away. But I still want to stay largely in the USB standard. And also communicate with the USB host how much current this can provide me.

With Type C / USB PD you can do that via the voltage level at CC1 and CC2. With USB 2.0 and 3.0 but about the enumeration I can realize this with the ESP32-S3 without the special drivers are used so to offer the greatest possible flexibility to charge the battery?
According to USB 2.0 specification in this case should also be drawn max. 2.5mA.

I actually thought that this is a problem in many projects, however, I could not find anything at all in my research to the solution. I know that many devices simply prinzipell charge with 500mA without taking into account the specification of USB, but I want to stick to it.

I want to program the whole thing later with Arduino and would like to know how I solve the whole thing now while developing hardware best.
Thank you very much!
Roger

MicroController
Posts: 1739
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: ESP32-S3 USB power management circuit USB2.0 USB3.0 USB PD

Postby MicroController » Sun Apr 16, 2023 11:16 pm

Implementing USB PD negotiations in software should be possible. However, apparently nobody has done that yet.
I found a lot of useful information about PD in general starting from https://github.com/manuelbl/zy12pdn-oss
Yet the consensus seems to be that a dedicated chip for PD handling is the way to go. I'm looking into reprogramming the STM chip on one of the ZY12PDN board to act as a "bridge" between my main controller and the USB-PD chip. The STM will handle the lower-level stuff and inform the upstream controller, e.g. via UART, if, when and how much power is available from USB.

Who is online

Users browsing this forum: No registered users and 48 guests