Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

USB port/Charger Detection

Status
Not open for further replies.

richas

Junior Member level 3
Joined
Jul 1, 2011
Messages
25
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,283
Activity points
1,464
Hi,
I have a design that uses a USB mini connector connected to a CP2102 USB to serial port IC. The Connector will also be used to charge a LiIo Battery. I will need to detect whether I am connected to a wall charger (high current) or a PC USB port. If I detect the wall charger then I will increase the battery charge current.

There is a lot of confusing information out there about different pull-up/down resistors on D+ and D- within the charger. Some chargers, evidently short D+/D- to indicate that they are a wall charger. I have a wall charger that I am interested in using but the D+ D- lines appear to have equal resistors pulling up and down for 2.5V on D+/D-. Apple, I guess has their own scheme.

I can put a couple extra microcontroller port pins on D+ and D- to apply and measure voltages.

Does anyone have experience with this? I have yet to find a wall charger with shorted D+/D- but my sample size is small.

Regards

Rich
 

Review the USB charging specification. It requires D+ and D- of a dedicated charging port (DCP) to be shorted with less than 200 ohm and have a leakage resistance > 300 kohm. Suggested detection methods are also described in the specification.
 
  • Like
Reactions: tpetar

    tpetar

    Points: 2
    Helpful Answer Positive Rating
All the chargers I have seem to use the Apple scheme. I am thinking of using two uC pins that can both detect shorted data lines as well as be reconfigured as ADC inputs. The USB spec shows comparators and logic gates which, while I am sure would work, is not practical.

Rich
 

The USB spec shows comparators and logic gates which, while I am sure would work, is not practical.
If you are designing a retail product that is intended to comply with the specification, you should observe the points fixed in the compliance plan document. Of course it doesn't require to implement exactly the detection circuit template, but some functional details are explicitely mentioned in the compliance plan.

If it's a hobby project, you are free to use any suitable detection method.
 
  • Like
Reactions: tpetar

    tpetar

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top