Wednesday, 20 January 2016

Identifying a USB charging port without enumeration


Is there a low cost and reliable way to identify a USB charging port?



I plan to charge a device via the USB port. The USB Battery Charging Specification 1.1 allows 1.5A current draw when connected to a Dedicated Charging Port (DCP) and 500mA when connected to a Charging Downstream Port (CDP). A DCP is typically a wall wart and a CDP is typically a computer. As far as I understand, a DCP is identified by shorted D+ and D-lines, a CDP id identified by D+ and D- being pulled to ground through 15k resistors.


It seems like identifying these ports takes quite a bit of extra hardware. I could probably bias the D+ line and connect D- to an ADC input to look for a DCP. And some similar arrangement to check for a CDP. I assume I would also need to disconnect the bias and ADC when done to not interfere with USB communication. The USB pads on my mcu are not 5V tolerant and are dedicated USB pads (I'm using an LPC1343).


Identifying the non-standard Apple and Sony chargers would be an added bonus, but not critical.


Does anyone see a simpler or better way to do this?


USB charge ports


From this datasheet



Answer



Although I don't have direct experience with this, from what I've read, IC's that perform this function usually sample the D+/D- lines on application of power with some sink on the D+/D- to detect the charger type, and disconnect their detection logic once a determination has been made of the connected source, AC adapter or USB port. More information is available from a TI app note here.


I sure from my previous part searches that some battery charger IC's have built in charger type detection, but I couldn't find an example part when searching just now.


There's the MAX14578 which also does the job, but it may not fit your criteria of low cost.



No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...