I'm working on a project based on the EasyLogger project. My interface works great, but the sensor I'm attempting to power requires around 120mA. The total current requirement for my circuit is around 140mA. The problem, though, is that USB ports seem to not be sourcing more than 100mA of current. I noticed that I can change the definition for maximum power in the V-USB configuration file (USB_CFG_MAX_BUS_POWER), but does this require a hardware change be made as well in order to implement it?
Basically, using either software or hardware, how do I get a USB port to output more than 100mA current?
Thanks in advance!
Changing USB maximum current ouput
Re: Changing USB maximum current ouput
I'm not aware of a limitation or fixed current in v-usb but make sure to use the USB_CFG_MAX_BUS_POWE define in the usb device descriptor as well or also make the needed change.
Re: Changing USB maximum current ouput
Hi
Of course the host must, but need not agree in such cases (>100mA). So it is possible you won't get 500mA, even you requested it.
Also note that USB's 5V supply voltage isn't guarantied to be stable. It might drop down to -10%.
(The USB supply only is intended to be regulated down to 3.3V at devices end)
BR vouvoume
suncm wrote:Basically, using either software or hardware, how do I get a USB port to output more than 100mA current?
Of course the host must, but need not agree in such cases (>100mA). So it is possible you won't get 500mA, even you requested it.
Also note that USB's 5V supply voltage isn't guarantied to be stable. It might drop down to -10%.
(The USB supply only is intended to be regulated down to 3.3V at devices end)
BR vouvoume
Re: Changing USB maximum current ouput
I've been researching answers to this same question, and I might be able to help out a little. (Caveat: I am a complete novice at this, so, please double-check anything I tell you!)
From what I've read and observed, there many different ways to increase the power available to your project above 100mA.
First, the 100mA limit is the maximum a non-self-powered device can draw from a USB port (v1.1 or v2) without reconfiguring itself.
I'm still fuzzy on how the reconfiguring part works, but I believe the device must have 2 configuration descriptors, one for default operation (100mA) and then a second that defines the higher power limit. The device will then disconnect from the bus and when it reconnects it uses the second config. (Like I said, I don't know the gritty details of how this works).
Lots of hardware vendors work around the 100mA limit by simply providing a Y-cable with two USB plugs, which allows the device to draw up to 200mA.
The thing I *just* learned is that there is also a "USB Battery Charging Spec" that defines up to 1.5A on a port for an unconfigured device. This gibes with the current draw I've measured using an inductive charger; it can pull ~800mA, and is not detected as a USB device. I believe all that is necessary for this config is to connect a specific resistance between the power and data lines, and if the port supports "dedicated charging" mode, it will supply up to 1.5A.
I've been meaning to measure the resistance between the power and data lines for my inductive charger, but I haven't had time yet. My idea is that if the Y-cable can be used to support 2x100mA connections, why can't one of the cables be configured as a "dedicated charger", and then provide 1.5A instead of 100mA? I'm sure that probably violates some spec, but what I've seen so far in USB descriptors doesn't make me think that hardware vendors spend a lot of time worrying about violating the USB spec.
Anyways, something to think about. You can probably solve your problem by just picking up a Y-cable.
Here's some reading, if you'd like to look into it more:
http://en.wikipedia.org/wiki/USB#Power
From what I've read and observed, there many different ways to increase the power available to your project above 100mA.
First, the 100mA limit is the maximum a non-self-powered device can draw from a USB port (v1.1 or v2) without reconfiguring itself.
I'm still fuzzy on how the reconfiguring part works, but I believe the device must have 2 configuration descriptors, one for default operation (100mA) and then a second that defines the higher power limit. The device will then disconnect from the bus and when it reconnects it uses the second config. (Like I said, I don't know the gritty details of how this works).
Lots of hardware vendors work around the 100mA limit by simply providing a Y-cable with two USB plugs, which allows the device to draw up to 200mA.
The thing I *just* learned is that there is also a "USB Battery Charging Spec" that defines up to 1.5A on a port for an unconfigured device. This gibes with the current draw I've measured using an inductive charger; it can pull ~800mA, and is not detected as a USB device. I believe all that is necessary for this config is to connect a specific resistance between the power and data lines, and if the port supports "dedicated charging" mode, it will supply up to 1.5A.
I've been meaning to measure the resistance between the power and data lines for my inductive charger, but I haven't had time yet. My idea is that if the Y-cable can be used to support 2x100mA connections, why can't one of the cables be configured as a "dedicated charger", and then provide 1.5A instead of 100mA? I'm sure that probably violates some spec, but what I've seen so far in USB descriptors doesn't make me think that hardware vendors spend a lot of time worrying about violating the USB spec.
Anyways, something to think about. You can probably solve your problem by just picking up a Y-cable.
Here's some reading, if you'd like to look into it more:
http://en.wikipedia.org/wiki/USB#Power
Re: Changing USB maximum current ouput
razorboy wrote:Lots of hardware vendors work around the 100mA limit by simply providing a Y-cable with two USB plugs, which allows the device to draw up to 200mA.
Y-cables are prohibited by the USB spec:
Use of a 'Y' cable (a cable with two A-plugs) is prohibited on any USB peripheral. If a USB peripheral requires more power than allowed by the USB specification to which it is designed, then it must be self-powered.
Re: Changing USB maximum current ouput
Yeah, apparently hardware vendors don't care that it violates the spec. I have 3 bus-powered 2.5" external hard-drives, and 2 DVD drives (by name-brand manufacturers), and they all came with Y-cables.