EmbeddedRelated.com
Forums

USB power to external device

Started by martin griffith February 15, 2007
Not sure if this is the right place , but:

I need to power some analogue stuff from a USB port, and AFAIU the USB
on the PC/MAC will limit the current available to 100mA on connect. I
think I will need about 200mA, so how do I "simply" inform the source
to let me have it?

This is mainly to power a transformer isolated smps +-12v for opamps,
a (nonPIC) micro could be powered from the USB source.

Clutching at straws again.......


martin
On Feb 15, 2:38 pm, martin griffith <mart_in_medina@ya___.es> wrote:
> Not sure if this is the right place , but: > > I need to power some analogue stuff from a USB port, and AFAIU the USB > on the PC/MAC will limit the current available to 100mA on connect. I > think I will need about 200mA, so how do I "simply" inform the source > to let me have it?
You "inform" the bus by properly enumerating your gizmo as a valid USB device. -a
On 15 Feb 2007 14:20:40 -0800, in comp.arch.embedded "Andy Peters"
<google@latke.net> wrote:

>On Feb 15, 2:38 pm, martin griffith <mart_in_medina@ya___.es> wrote: >> Not sure if this is the right place , but: >> >> I need to power some analogue stuff from a USB port, and AFAIU the USB >> on the PC/MAC will limit the current available to 100mA on connect. I >> think I will need about 200mA, so how do I "simply" inform the source >> to let me have it? > >You "inform" the bus by properly enumerating your gizmo as a valid USB >device. > >-a
thanks, really helpful, any suggestions on a micro/usb widget that can do the enumeration? martin
On Fri, 16 Feb 2007 00:51:00 +0100, martin griffith
<mart_in_medina@ya___.es> wrote:

>On 15 Feb 2007 14:20:40 -0800, in comp.arch.embedded "Andy Peters" ><google@latke.net> wrote: > >>On Feb 15, 2:38 pm, martin griffith <mart_in_medina@ya___.es> wrote: >>> Not sure if this is the right place , but: >>> >>> I need to power some analogue stuff from a USB port, and AFAIU the USB >>> on the PC/MAC will limit the current available to 100mA on connect. I >>> think I will need about 200mA, so how do I "simply" inform the source >>> to let me have it? >> >>You "inform" the bus by properly enumerating your gizmo as a valid USB >>device. >> >>-a >thanks, really helpful, any suggestions on a micro/usb widget that can >do the enumeration? > > >martin
I cannot be much more helpful, but your device descriptor includes a "power required" field in milliamps. Any powered port (including the root hub in the pc) must be able to provide 500 ma. An unpowered hub port can only provide 100 ma. So you should be able to do what you want, but you will restrict the usb topology. Regards, Steve
On Feb 16, 9:46 am, nospamcal...@yahoo.com (Steve Calfee) wrote:
> On Fri, 16 Feb 2007 00:51:00 +0100, martin griffith > > > > <mart_in_medina@ya___.es> wrote: > >On 15 Feb 2007 14:20:40 -0800, in comp.arch.embedded "Andy Peters" > ><goo...@latke.net> wrote: > > >>On Feb 15, 2:38 pm, martin griffith <mart_in_medina@ya___.es> wrote: > >>> Not sure if this is the right place , but: > > >>> I need to power some analogue stuff from a USB port, and AFAIU the USB > >>> on the PC/MAC will limit the current available to 100mA on connect. I > >>> think I will need about 200mA, so how do I "simply" inform the source > >>> to let me have it? > > >>You "inform" the bus by properly enumerating your gizmo as a valid USB > >>device. > > >>-a > >thanks, really helpful, any suggestions on a micro/usb widget that can > >do the enumeration? > > >martin > > I cannot be much more helpful, but your device descriptor includes a > "power required" field in milliamps. Any powered port (including the > root hub in the pc) must be able to provide 500 ma. An unpowered hub > port can only provide 100 ma. So you should be able to do what you > want, but you will restrict the usb topology. > > Regards, Steve
Here's a question. How about those USB enclosures or other USB devices that use a USB Y-cable? Presumably 1 device can only enumerate once, so it'll get 500mA on 1 cable, but the other cable will only get 100mA? Or also 500mA? I believe it's 500mA since most drives will need more that much(or even more) to work? How does it work then?
On Feb 15, 4:51 pm, martin griffith <mart_in_medina@ya___.es> wrote:
> On 15 Feb 2007 14:20:40 -0800, in comp.arch.embedded "Andy Peters" > > <goo...@latke.net> wrote: > >On Feb 15, 2:38 pm, martin griffith <mart_in_medina@ya___.es> wrote: > >> Not sure if this is the right place , but: > > >> I need to power some analogue stuff from a USB port, and AFAIU the USB > >> on the PC/MAC will limit the current available to 100mA on connect. I > >> think I will need about 200mA, so how do I "simply" inform the source > >> to let me have it? > > >You "inform" the bus by properly enumerating your gizmo as a valid USB > >device. > > >-a > > thanks, really helpful, any suggestions on a micro/usb widget that can > do the enumeration?
There are various micros from Cypress, Microchip, Silicon Labs, TI, Atmel, etc, which have USB device interfaces. Choose one. Choose a device class with which your device will conform (HID is probably simplest), and be sure to include the desired current draw in the device/configuration descriptor. Once the device enumerates, which means it's recognized by the operating system and the device driver is loaded, then you'll be able to use the 500 mA available to the port. The point here is that you can't "steal" power from the bus ... you need to have a proper device connected to the bus before you are able to use all of the power. -a
On Feb 16, 12:30 am, "galapogos" <gois...@gmail.com> wrote:

> Here's a question. How about those USB enclosures or other USB devices > that use a USB Y-cable? Presumably 1 device can only enumerate once, > so it'll get 500mA on 1 cable, but the other cable will only get > 100mA? Or also 500mA? I believe it's 500mA since most drives will need > more that much(or even more) to work? How does it work then?
There's no such thing as a USB Y cable. And before you jump my shit: I'm sure somebody's out there making them, but I wouldn't plug one into my computer or my device and expect anything to work (or not explode). They're kinda like those USB turnaround thingies you see ... utterly pointless. -a
On 16 Feb 2007 09:19:44 -0800, in comp.arch.embedded "Andy Peters"
<google@latke.net> wrote:

>On Feb 15, 4:51 pm, martin griffith <mart_in_medina@ya___.es> wrote: >> On 15 Feb 2007 14:20:40 -0800, in comp.arch.embedded "Andy Peters" >> >> <goo...@latke.net> wrote: >> >On Feb 15, 2:38 pm, martin griffith <mart_in_medina@ya___.es> wrote: >> >> Not sure if this is the right place , but: >> >> >> I need to power some analogue stuff from a USB port, and AFAIU the USB >> >> on the PC/MAC will limit the current available to 100mA on connect. I >> >> think I will need about 200mA, so how do I "simply" inform the source >> >> to let me have it? >> >> >You "inform" the bus by properly enumerating your gizmo as a valid USB >> >device. >> >> >-a >> >> thanks, really helpful, any suggestions on a micro/usb widget that can >> do the enumeration? > >There are various micros from Cypress, Microchip, Silicon Labs, TI, >Atmel, etc, which have USB device interfaces. Choose one. Choose a >device class with which your device will conform (HID is probably >simplest), and be sure to include the desired current draw in the >device/configuration descriptor. Once the device enumerates, which >means it's recognized by the operating system and the device driver is >loaded, then you'll be able to use the 500 mA available to the port. > >The point here is that you can't "steal" power from the bus ... you >need to have a proper device connected to the bus before you are able >to use all of the power. > >-a
Thanks for that, especially the last paragraph, something that hadn't crossed my mind. martin
On 16 Feb 2007 09:19:44 -0800, in comp.arch.embedded "Andy Peters"
<google@latke.net> wrote:

>On Feb 15, 4:51 pm, martin griffith <mart_in_medina@ya___.es> wrote: >> On 15 Feb 2007 14:20:40 -0800, in comp.arch.embedded "Andy Peters" >> >> <goo...@latke.net> wrote: >> >On Feb 15, 2:38 pm, martin griffith <mart_in_medina@ya___.es> wrote: >> >> Not sure if this is the right place , but: >> >> >> I need to power some analogue stuff from a USB port, and AFAIU the USB >> >> on the PC/MAC will limit the current available to 100mA on connect. I >> >> think I will need about 200mA, so how do I "simply" inform the source >> >> to let me have it? >> >> >You "inform" the bus by properly enumerating your gizmo as a valid USB >> >device. >> >> >-a >> >> thanks, really helpful, any suggestions on a micro/usb widget that can >> do the enumeration? > >There are various micros from Cypress, Microchip, Silicon Labs, TI, >Atmel, etc, which have USB device interfaces. Choose one. Choose a >device class with which your device will conform (HID is probably >simplest), and be sure to include the desired current draw in the >device/configuration descriptor. Once the device enumerates, which >means it's recognized by the operating system and the device driver is >loaded, then you'll be able to use the 500 mA available to the port. > >The point here is that you can't "steal" power from the bus ... you >need to have a proper device connected to the bus before you are able >to use all of the power. > >-a
Found this, first hit on TI site, worth a read http://www.ti.com/litv/pdf/slyt118 martin
martin griffith wrote:

> Not sure if this is the right place , but: > > I need to power some analogue stuff from a USB port, and AFAIU the USB > on the PC/MAC will limit the current available to 100mA on connect. I > think I will need about 200mA, so how do I "simply" inform the source > to let me have it?
Have a look at: http://www.dontronics-shop.com/product.php?productid=16456 100ma and http://www.dontronics-shop.com/product.php?productid=16141 500ma, 5V, 3.3V, and USB RX and TX at TTL levels if you need them. May be an overkill for what you want, may not be, but at least an alternative. Don... -- Don McKenzie E-Mail Contact Page: http://www.dontronics.com/e-mail.html Crystal clear, super bright OLED LCD (128x128) for your microcontroller. Simple serial RX/TX interface. Many memory sizes. http://www.dontronics-shop.com/product.php?productid=16460 No More Damn Spam: http://www.wizard-of-oz.com