# Supply power to USB with external power supply

I have a device (pyro-electric array detector) that connects to the Pc vis a usb. The device itself has an additonal power supply as well.

Now a strange thing happens: If I connect the device to a Pc-tower, it works. But if I connect to a Laptop it does not work. On my colleagues laptop it works but only if he plugs in his laptop's power supply.

My assumption was that there must be a difference in the volatage/current supplied by the individual computers. And indeed there are small differences. 4.7V from the laptop and 5.23V from the PC. The current seems to be low 0.16mA and therewith well below the USB max spec.

What I tried next is to connect an external power supply to be able to adjust the power to the device's need.

For that I cut the USB cable, connected the D+/D- cables for data and connected the power leading to the device to the external power supply. From a control LED on the device I can see that it is happy with that. Now, however, the device is not recognized on the PC any more (Windows device manager).

Any advice on how I can

a)power the USB device by an external power supply and

b) have it working on the PC?

Any hints are appreciated. Forgive me if what I tried is foolish. My last electronics lecture was about five years ago and I never tempered with USB before.

• Did you have the -ve line from the external power supply commoned with the PC's USB GND (-) line? – MikeJ-UK May 29 '12 at 10:59
• Assuming that data and power lines are not wrongly interconnected by the device, it sounds like a USB power negotiation issue. The device MAY be negotiating for more current than the laptop wishes to supply, regardless of what it actually draws. | Using a resistor, what resistance is required to load the laptop port down to 4.7V. | When the external power supply is set to 4.7V does the device work correctly? – Russell McMahon May 29 '12 at 11:17
• @Martin H Just an idea: Check using a multimeter resistance between the shield of the USB cable for the device and the laptop power supply's ground pin (if it has one). Does the device PSU have ground connection? The PC tower working and plugged laptop working lead me to suspect some unusual ground issues. – AndrejaKo May 29 '12 at 11:45
• Ever considered getting a powered USB hub? That could guarantee your device gets enough power. – kevlar1818 May 29 '12 at 15:08
• @kevlar1818 we indeed tried a powered usb hub but it did (to our surprise) not work. The problem might be what has been mentioned before. The device tries to negotiate for more power but does not get it. Neither from the hub nor from the PC port. – Martin H May 29 '12 at 17:10

It sounds like your device needs more than the 100 mA it is guaranteed, but does not enumerated properly to request the extra current. You can get up to 500 mA from a USB port if you ask for it and the host grants it.

There is no guarantee that the host will grant the request, but desktop machines pretty much always do since they have plenty of power available. In fact, the desktop motherboard schematics I have seen show only a polyfuse between the 5V supply and each USB port. There is no active electronics limiting current. On those machines, you get the full 500 mA even if you don't ask for it.

Laptops however have limited power and therefore actively monitor and control USB power in most cases. Some machines may limit the sum of all USB devices to a certain current, or limit it more when running on battery only, or when the battery is low, etc. Note that USB powered hubs can't ever grant the full 500 mA since that is all they are getting themselves.

The reason your device won't enumerate anymore is because you broke the ground connection. All three lines D+, D-, and ground are required for communication. You can cut the power line if the device is self-powered. Self powered devices generally have no connection to the USB power line. That's perfectly OK, but they still have to connect via ground.

Martin H, Does your friend's laptop have a grounded charger on the DC side? Normally that is a UL/CE safety violation.

Does your friend's laptop have a VGA port connected to a grounded LCD monitor?

If so then that would explain why it works. If my assumption is correct it is the high impedance stray hum or noise and poor common mode rejection is causing an error or difference noise level that is intolerable.

It can be 50/60Hz stray hum on the order of 100V on this floating sensor array or any switching regulator nearby.

If and only if (IFF) these assumptions are true, then the simple solution is to shunt the CM noise by shielding, grounding, ferrite absorpion with a clam-shell CM choke around the interface cable to the array, such as on every VGA video cable. Get CM chokes from your favorite supplier or ground the Laptop via LCD or put on a ground plane with aluminium foil grounded. Any of these methods will work.

I learnt everything I knew about EMC from Dr Ott's book in the late 70's.

98% of engineering is defining the problem well enough, so engineer can explain it and then the solution is simple. Otherwise it's voodoo magic with uncertainty on all the test conditions.

The same is true for cheap external mic hum on laptops when the charger is connected and no noise when disconnected. However your friend's situation was the opposite, so I am guessing it does not match your situation. I hope this sheds some light even if it does not apply to your situation.

• The Laoptop has a ground connection on AC side, but I am not aware of any other ground connection. No further display is attached. I agree with you that this ground issue may exist still and that this was causing the problems. I will lokk into it. Thanks for the advice. – Martin H May 29 '12 at 16:20

The ground need to be shared between both power supplies (USB and external). Have done a several experiments with an USB soundcard. I want to seperate/isolate it (with an isolated DC/DC converter) from the USB power because an amplifier is also powered by USB. There is a ground loop and want to avoid a ground loop but can't get it to work with an external power source UNTIL i connect ground again (I think because the D- is connected to the USB ground).

For me it is useless because the ground cause a ground-loop. In your case it might be a solution to connect the ground to get the device working on an external power source without any problems.