0
\$\begingroup\$

If I connect this very small load (3 LEDs) to a mains to USB adapter, it's fine. Full brightness, great.

I can't even measure the current it's so low.

However, if I connect it to my PC it does 3 things:

It flashes a bit from bright to dim, stays dim and windows says it's malfunctioning.

Nothing has shorted out or anything like that, so is there a minimum current I should be drawing from a PC's USB port?

\$\endgroup\$
  • \$\begingroup\$ I think you've measured, or connected something wrong, can you give more details of the setup and how you made the measurement \$\endgroup\$ – Jasen Dec 19 '16 at 21:23
  • \$\begingroup\$ It was measured correctly, just using one of the little USB testers that are so common nowadays. \$\endgroup\$ – DespairingSquid Dec 19 '16 at 21:27
  • 1
    \$\begingroup\$ How are the LEDs connected (series/parallel)? What is their forward voltage? Is there really no series resistor? \$\endgroup\$ – dim lost faith in SE Dec 19 '16 at 21:40
  • 1
    \$\begingroup\$ + most LEDs have a forward current somewhere between 5mA and 20mA – even the cheapest multimeters I've ever seen can measure that. You will have to add a drawing of your system, or else it remains unclear! \$\endgroup\$ – Marcus Müller Dec 19 '16 at 21:43
  • 1
    \$\begingroup\$ it could be that the measuring device is inaccurate, I have one that matches that description, and with it any current under 50mA reads as 0 \$\endgroup\$ – Jasen Dec 20 '16 at 0:44
1
\$\begingroup\$

A device on a USB 2.0 port can initially draw 100mA. It then negotiates a power budget and potentially draw up to 500mA.

When you use a USB phone charger, it will simply give you up to 1A.

So the PC is probably giving the port enough power for it to be bright. Then the device fails to negotiate and the PC cuts the power, making it dim. Note that what the PC does and what it is supposed to do may be very different.

There is a lot more information at this question: How to get more than 100mA from a USB port

\$\endgroup\$
  • \$\begingroup\$ I believe there exist special adapters that do the hard part for you, to negotiate with the computer for more current. \$\endgroup\$ – Bradman175 Dec 19 '16 at 22:37
  • \$\begingroup\$ This is incorrect. A device can't draw more than 100mA before it gets enumerated and configured. This is true for USB device. A normal port, however, must be capable to supply 500mA minimum. More, device does not negotiate anything. It only informs the host of power requirements. The host can refuse the connection, which may happen only in rare situations of "low power embedded hosts" or "bus-powered hubs" (which nobody produces these days). \$\endgroup\$ – Ale..chenski Dec 19 '16 at 22:41
  • \$\begingroup\$ The port, as you say, should default to 5 volts, 100 ma. This should be more than enough for three small LEDs. The OP needs to clarify exactly what is in his circuit that 100 ma isn't sufficient. \$\endgroup\$ – DoxyLover Dec 19 '16 at 22:43
  • \$\begingroup\$ You're assuming that the LEDs have a forward current of 20mA, and that they're not ultra-bright 75mA+ devices. \$\endgroup\$ – Polynomial Dec 19 '16 at 23:37
  • \$\begingroup\$ I would guess that OP uses 3 LEDs 300mW in parallel, and without any current-limiting resistor. They could be 4.2 V to start. Wall charging adapters usually are designed to gradually drop output voltage under over-load, so an intelligent consumer can reduce its charging current. So the 3 LEDs are having say, 4.4V and shine. The USB port might have a poly-fuse that protects the port/system from overload. With 5V the three LEDs are likely getting more than 500-600mA, so the port barfs off (out). \$\endgroup\$ – Ale..chenski Dec 19 '16 at 23:53
0
\$\begingroup\$

Depending on whether you have PC based USB or mobile device USB or USB-on-the-Go capable controllers there IS active current limiting built in. In the crudest and oldest systems there was a 500mA fuse. Blow that and you were essentially dead in the water.
Then came the era of PTC resistors, draw too much current and the voltage collapsed. At least these self reset, but as you increased load the voltage would droop.

Today controllers have high side current limiters either in the USB controller or around it as a support chip. Various kinds exist like this. These devices can do multiple duty, they can limit the current accurately at multiple levels, and can be controlled to increase the current or to turn it off completely. Many of the modern USB limiting controllers will supply up to a negotiated 2.5 A, and will even slow charge large capacitive loads in the devices.

With a modern current limited USB port the OS can be told when power is being drawn and even how much (usually in units of 100 mA) so that the OS can catalogue current budgets. For example in Windows you can examine any given USB port and find it's current demand in units.

Now to your problem. Since you can't have 3 LEDs in series (they won't ever light), they must be in parallel.
If the 3 LEDs are in parallel then I wonder what sort of LEDs you have. Since LEDs don't limit their current (unless it's a CC LED) and the forward voltage is like this:

enter image description here

You would need to have a series resister with any LED I know of to limit current. I can only imagine if this is not the case then your mains USB power supply was actually drooping due to the LEDs. You should have seen current values well above 100 mA.

To answer your question more directly you will be able to connect 3 LEDs in parallel to a PC based USB port but you'd need at least 1 series resistor to do this. You also may see the PC report no driver loaded or illegal device base don current flowing and device interaction.

Hope this helps.

\$\endgroup\$
  • \$\begingroup\$ Hey Jack, I don't think your optimistic review reflects reality accurately. First, yes, there are current limiters, but the active high-side switches are outrageously expensive. So no manufacturer uses them. 90% of all hubs on market use at most ONE resettable fuse for ALL FOUR PORTS. Therefore the limit is north of 2+ Amps, so each particular port can source all 2A. The other 18% might use individual polyfuses per port. I would challenge you to find a single hub with active port power control in your local electronics store. I have never seen any high-side switches on any PC mainboard. \$\endgroup\$ – Ale..chenski Dec 20 '16 at 1:22
  • \$\begingroup\$ @Ali Chen. You are right, you don't see high end current limiters in Hubs and do see a single PTC for all the ports....but these are very cheap devices. Most of the current protection provided by the USB power supply. But you do see them in PC's and tablets all the time....they can't afford not to. And unlike you I have seen high side protection in most decent motherboards. Intel, Dell, HP and the like \$\endgroup\$ – Jack Creasey Dec 20 '16 at 1:56
  • \$\begingroup\$ Jack. Ok. I am looking at INTEL reference design desktop board "LL2_CRB_MPI" socket LGA1155. It has a polyfuse for each pair of USB ports. 2A for USB3 ports, and 1.5A for USB2 port pairs. Is the Intel reference design a decent example? \$\endgroup\$ – Ale..chenski Dec 20 '16 at 2:49
  • \$\begingroup\$ @Ali Chen. Even my Raspberry Pi's have both active and adjustable USB current limit. \$\endgroup\$ – Jack Creasey Dec 20 '16 at 3:57
  • \$\begingroup\$ Jack, Rapsperry Pi might have it, because it is a subsidized developer kit. Given that they have uB connector as power jack (1.8A max), they have to have an accurate limiter. And then they have about 300 complaints from users that many USB HDD 2.5" USB enclosures cannot work with Pi's crippled power delivery. \$\endgroup\$ – Ale..chenski Dec 20 '16 at 4:48

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.