USB transient load question

Status
Not open for further replies.

peterpops

Junior Member level 3
Joined
Mar 17, 2010
Messages
26
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Sweden
Visit site
Activity points
1,492
Hi!

Scenario:
I have a USB port powering 20 relays and a microcontroller (uC) relaycontrol

Relay current consumption ~15mA each
uC current consumption ~1mA

Questions: (I'm looking for the ways to calculate/model this theoretical, and what equations should I use)
1. If I have all the relays deactivated and then activates all of them at the same time (total current ~300mA). Will this impact the USB voltage, will I see a significant drop in voltage, maybe enough to reset the uC?
2. If it affects the voltage significantly, should I use a condensator (except the one the uC probably wants)? If so, what value?
3. Even if it does not affect the voltage significantly is it good pratice to have a condensator here (except the one the uC probably wants)?

Thanks in advance!
 

The maximum USB current which I've always heard is 500 mA.

A capacitor will help it get through sudden voltage drops.

As far as I can tell, a computer manages the USB port for how much current is flowing. Occasionally I have plugged in a device (a portable hard drive, maybe) which brings up an error onscreen, saying "A device has drawn more power than this USB port can provide." Then the port shuts off.

I think I remember the message gives me a choice to reset the port. This allows me to unplug the device and try again.
 

make sure your USB is well communicated with the uC or you will only get 100mA maximum. No communication = 5V, 100mA, with communication = 5V 500mA. (This was done to protect the port), and yes what Brad would happen if you exceeded.
 


Yep the max is 500mA so 300mA would not be a problem regarding the max limit.
However I did a simple test today with a switch and a 17Ohm resistor. When the resistor is not connect I measure 5.05V over the USB port. When I connect the resistor the voltage suddenly drops to 4.8 - 4.9V and stays there (at least for the 5sec I kept the circuit closed).

So my thought before the test was that the voltage would suddenly drop to some limit and then quickly recover up 5.0V again.. but this was not the case. So I guess a capacitor will not help with that. Ofcourse it will help with very short transients that drop the voltage even further down than 4.8V
 

Your test indicates the source impedance of your USB port is (5.05-4.85)*17/4.85 = 0.7 Ω.
This seems normal to me. With 10mF precharged with constant current, you could improve the drop slightly for pulses <1% of RC or 1% of 0.7ms or 7us. So may not be feasible unless there was such a thing as cheap 5V battery with a charge limiter.
 

That's not the maximum, that's the minimum a port should be able to supply, you can buy hubs and such that will power a lot more than 500 mA with a proper power supply. I've used them on various dev boards, especially when you are using something power hungry like the usb wifi dongles.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…