I have am using an LM5017 to step down a relatively high voltage solar panel (VOC over 90V) to 5V. I have bench tested my circuit and it is providing good buck regulation with input voltages up to 95V. I connect this to a type A USB port to provide a charging port for USB devices. The LM5017 is only capable of supplying 600mA. I would like to emulate a Standard Downstream Port so that the client will draw up to 500mA from the charger.

I tried tying D+/- to ground via a 15kohm resistor. But the port is not being recognized by some devices as SDP. I assume I am doing something wrong.

does anyone have any advice.

I could try shorting the data pins together to emulate a dedicated charging port, but I do not want the client to attempt to draw greater than 500mA.

In general is there a circuit which will emulate a USB Standard Downstream Port without implementing logic?


  • \$\begingroup\$ Which device are you using? A Samsung Phone? An iPhone? A different usb device? \$\endgroup\$ – Passerby Dec 12 '13 at 0:30
  • \$\begingroup\$ Oh, and are you tying D+ and D- together, then a single 15k resistor, or each through a 15k to ground? \$\endgroup\$ – Passerby Dec 12 '13 at 0:52

As noted in this Maxim whitepaper (Tutorial 4803: The Basics of USB Battery Charging: A Survival Guide):

Battery Charging Specification, Rev 1.1, 4/15/2009 (BC1.1) goes beyond the power distribution described in USB 2.0 by defining additional power sources for charging. It defines three different source types:

Standard downstream port (SDP) This is the same port defined by the USB 2.0 spec and is the typical form found in desktop and laptop computers. The maximum load current is 2.5mA when suspended, 100mA when connected and not suspended, and 500mA (max) when configured for that current. A device can recognize a SDP with hardware by detecting that the USB data lines, D+ and D-, are separately grounded through 15kΩ, but it still needs to enumerate to be USB compliant. In USB 2.0, it is not strictly legal to draw power without enumerating, although much of present-day hardware does just that, and in violation of the spec.

Charging downstream port (CDP) BC1.1 defines this new, higher current USB port for PCs, laptops, and other hardware. Now the CDP can supply up to 1.5A, which is a departure from USB 2.0 because this current can be supplied before enumeration. A device plugged into a CDP can recognize it as such by means of a hardware handshake implemented by manipulating and monitoring the D+ and D- lines. (See USB Battery Charging Specification, section 3.2.3.) The hardware test takes place before turning the data lines over to the USB transceiver, thus allowing a CDP to be detected (and charging to begin) before enumeration.

Dedicated charging port (DCP) BC1.1 describes power sources like wall warts and auto adapters that do not enumerate so that charging can occur with no digital communication at all. DCPs can supply up to 1.5A and are identified by a short between D+ to D-. This allows the creation of DCP "wall warts" that feature a USB mini or micro receptacle instead of a permanently attached wire with a barrel or customized connector. Such adapters allow any USB cable (with the correct plugs) to be used for charging. Additional details on these port types are described in the USB Battery Charging Specification, Rev 1.1, 4/15/2009.

Some devices do not use the standard. Apple for one, created a different standard (before BC 1.1 was released) for their own devices, allowing them to distinguish between non-supported chargers, 500mA standard chargers (enumerated usb), 1A high current chargers, and 2.1A highest current chargers. This is done with varying voltage dividers on the DP and DM pins. Some other manufacturers have adopted that, and the regular standard, at the same time. Some IC manufacturers have created USB host/battery charger detection ICs which figure out what kind of charger is being used and adapt accordingly.

enter image description here

iPhones are one type of device that will not charge on an unenumerated standard downstream port. The Sony Playstation3 Wave Controller is another. Another method is that some require the ID pin on the mini/micro-usb connector to be grounded or otherwise connected.

You have two options if you need to limit to 500mA. 1, if the device requires enumeration, you will need to enumerate. 2, use a usb charging/host ic that can current limit (or a current limiting regulator or a current limiting ic)


When you wrote "I tried tying D+/- to ground via a 15kohm resistor" it sounds like you are tying D+ and D- together and then grounding via a 15 kOhm resistor.

This is not correct. Each data line needs a separate 15 kOhm resistor to GND.

The detection algorithm of the USB device drives one data line, measures the voltage of each line, then drives the other data line and repeats the measurement.

Shorting D+ and D- together is likely causing the device to detect your host as a DCP (dedicated charging port) instead of SDP (Standard Data Port) because CDP has D+ and D- shorted together.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.