Looking for a USB PD & BC 1.5A charger detection solution - Page 1
Forum section: electronics / projects

author: Maik
author_rank: Newbie
timestamp: April 10, 2024, 09:15:32 am
content: Hey, I am working on an open source hardware project to use Elgato Streamdecks over ethernet.The project is designed around a Raspberry Pi CM4 and does not have a battery (but it uses a super cap backup operated by a LTC4041 to shutdown the CM4 when power is switched off). The CM4 consumes 1A in this application. The project is either powered by PoE or via an external USB port.The project has two USB-C Ports, one internal that connects to the internal StreamDeck (needs to source 500mA) and an external one that can either be used in three ways:a) to connect a second StreamDeck (source 500mA) when the project is powered via PoE.b) to connect to a USB charger when no PoE is available (sink 1,5A for CM4 + internal Streamdeck)c) to connect to a PD powered USB-C hub with multiple StreamDecks attached and receive power from the hub (sink 1,5A for CM4 + internal Streamdeck)So the external USB-C port always acts as a downstream facing port (DFP) when it comes to data but as a dual role port (DRP) when it comes to power. In scenario a) its a DPF and in b) and c) its a UFP. For PoE I use a MYBSP00502ABF module that provides 5V 2A. That should be a good fit, because the CM4 takes 1A, and both Streamdecks take 0,5A each (scenario a)).When the project is powered by USB I need to detect whether the charger is capable is supplying at least 1,5A. For a USB-C charger that’s easily done by a TUSB321 that monitors the CC lines and features two dedicated output pins that are switched high or low for chargers supporting 1,5A and 3A respectively. Plus it supports all the dual role port stuff and can be set to advertise 0,5A sourcing capability when in DFP mode all without any I2C communication.But what happens when the project is used with a USB-A to USB-C Cable and plugged in to a USB-A port? For reliable operation I only want the project to power on when the port is capable of at least 1,5A. That’s where USB BC1.2 comes in and I need to probe the D+ and D- lines. There are certain types of USB-A ports:- Standard downstream ports (SDP) can only supply 0,5A (USB2) or 0,9A (USB3) so I want the project to refuse to power on.- Charging downstream port (CDP) are required to be capable of at least 1,5A (according to BC1.2 spec) so that’s okay.- Dedicated charing ports (DCP) on the other hand can vary for 0,5A to 5A capability so its best to rule them out to.- Proprietary chargers use the D+ and D- lines to indicate sudo standards linke Apple 0,5A, Apple 1A, Apple 2A, Apple 2,4A, Samsung 2A and so on. So a few of them are okay but others aren’t.I searched a long time for a BC1.2 charger detection IC that is able to tell me the max allowed current by the charger but haven’t found any that fit my needs sadly. My requirements are:- ability to detect 1,5A or more chargers- non BGA package- capability to use the D+ and D- lines for normal USB operation when in DFP mode (scenario a))- preferably simple digital pin outputs instead of I2C (but that’s not a must)- JLCPCB availability would be nice because I want to assemble the prototypes and probably first small productions runs thereSome ICs like the FSA831/FSA831, MAX14576/MAX14636/MAX14637 or BQ24392 are small and simple but can only detect if chargers are capable of 0,5A. MAX14578 use I2C to get more detailed charger infos but still not able to determine whether 1,5A is okay. MAX77958 and others even combine CC and D+/D- detection in one IC but are only available in BGA.Do you know of any IC that fits the requirements? Thanks in advance!I attached a very much work in progress schematic of the USB section and a few impressions of the project in its case.

author: mariush
author_rank: Super Contributor
timestamp: April 10, 2024, 10:03:27 am
content: See if MPS MP2722 would work for you :https://www.monolithicpower.com/en/mp2722.htmlThe MP2722 is USB Type-C 1.3 complaint, and features dual-role power (DRP) mode with sink-preferred (try.SNK) and source-preferred (try.SRC) support. The device’s input source type identification algorithm supports USB battery charging specification 1.2 (BC1.2) and non-standard adapter detection.The serial interface offers complete operating control, including charging parameter configurations and status/interrupt monitoring.[ ... ]Also look on their website at parametric search/list and see what other ICs would match or get close to your needs.

author: coromonadalix
author_rank: Super Contributor
timestamp: April 10, 2024, 10:24:02 am
content: seems like another thread who derailed a bit for a similar project ?? , are you the same guy ? another profile ?

author: Maik
author_rank: Newbie
timestamp: April 10, 2024, 12:20:00 pm
content: Quote from: coromonadalix on April 10, 2024, 10:24:02 amNo, definitely not, can you point me to the thread? Maybe there are some useful infos in there.Quote from: mariush on April 10, 2024, 10:03:27 amI haven't looked at any ICs with integrated charger yet because I don't use a battery, but I will have a look if the charger in this one can be disabled. Thank you very much!

author: Maik
author_rank: Newbie
timestamp: April 12, 2024, 06:33:03 am
content: The MP2722 indeed offers nice max charger current detection and DRP functionality. But according to the manufacturer the bat_missing feature (seemingly required by BC1.2 spec) prevents it form operation without a battery. I could order a eval board and try simply feeding a voltage to the battery sense terminal but I managed to find the PI3USB9210 by Diodes Inc.:Its "just" a BC1.2 charging-type detector (no internal charger) with a USB switch for pass through and even dual role port functionality. It comes in a QFN package and talks I2C. I will sill need the TUSB321 (or similar) for USB PD negotiation and an additional micro controller as a SMC but I think I will go ahead with this part.You can find the full datasheet here:https://go.diodes.com/PI3USB9201Btw: There also exist a bigger version the PI3USB9281C.