I am making a Li Ion 1 cell charger that will draw power from a USB cable. How do I know how much current is available? I don't know if I am plugged into a wall wart that can supply 2A or a computer that can only supply 500mA. Is there a chip that will talk to the USB and let me know how much current my charger can draw? Do I just keep drawing more current until the supply dips? I have spent hours looking, but have not found an answer...
Asked
Active
Viewed 63 times
0
-
2There are USB power control IC's See https://www.ti.com/interface/usb/type-c-and-power-delivery/overview.html , for example. E.G: The TPS65981 is a stand-alone, USB Type-C, and power-delivery (PD) controller... [It] communicates on the CC wire using the USB PD protocol... [It] provides default (900 mA), 1.5-A, or 3-A current for Type-C power sources, detects a plug event, determines the USB Type-C cable orientation, and autonomously negotiates USB PD contracts by adhering to the specified biphase-marked coding (BMC) and physical-layer (PHY) protocol. – DrMoishe Pippik Jun 13 '21 at 21:00
-
2Before PD older chargers used resistor biasing of the D+ and D- lines to advertise output capacity. See, for instance, https://electronics.stackexchange.com/questions/223221/on-an-apple-12w-usb-charger-how-are-the-d-and-d-lines-configured – ErikR Jun 13 '21 at 21:09
-
I'm trying to keep things as simple as possible. I've taken apart an off the shelf powerbank and it doesn't look like there is anything too sophisticated going on. I don't want to get as complex as USB-C and PD. I don't want to to have to enumerate. @MarcusMüller is it as easy as looking to see if the voltage is higher than 5.0V or data lines being shorted? I've seen chips like the TPS2514 that put 2 or 2.7V on the data lines to indicate 5 or 10W – jmadsenee Jun 13 '21 at 22:44
-
no, it's not that simple. – Marcus Müller Jun 13 '21 at 23:06
-
@jmadsenee USB will always provide 5±0.5 volts until a device negotiates a higher voltage, otherwise you'd destroy any non-PD USB device upon plugging it into a USB-PD power supply. – Hearth Jun 14 '21 at 00:09