Pages: [1]   Go Down
Author Topic: USB Powering projects  (Read 459 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 3
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So as I progress with my standalone projects, I'm coming to the conclusion that I tend to have USB power available everywhere, while providing > 7V to a 7805 means a specialty wall wart.  And even when I'm away from my PC, USB wall adapters can be purchased at the corner store while 7V supplies are less commonly available.

My stuff generally has low power demands (charlieplexed LEDs, the occasional sensor), so the 500mA cap isn't a problem.  But I imagine it's not simply a matter of soldering a USB jack onto my board and there's my 5V and GND.  So far I'm figuring on the following:

1) A PTC acting as a fuse in series to prevent a short from cooking off my USB port.
2) A cap bridging 5V and GND to smooth out the load.

Are there other best practices?  Passive components I can use to ensure I'm getting the full 500mA?  Additional safety or filtering components?

Or is this just a Bad Idea, and it doesn't work as reliably and universally as it seems like it should?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
1) A PTC acting as a fuse in series to prevent a short from cooking off my USB port.
2) A cap bridging 5V and GND to smooth out the load.
You can get away without doing any of these, but doing this makes it a better solution.
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2855
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
1) A PTC acting as a fuse in series to prevent a short from cooking off my USB port.

This makes people feel better but in practice it doesn't help as much as you think. PTC's are very "loose" devices and a 500mA PTC won't trip until about 1A or so. The Bourns MF-MSMF050 says it will take 0.15 seconds to trip at 8A -- that's more than enough time to cook the USB port.

Besides, computers are supposed to have built-in current monitoring and protection such that if a USB device does draw excessive current, the USB port is shut off and a dialog box appears telling you "Your USB device is malfunctioning, etc. etc."

Quote
2) A cap bridging 5V and GND to smooth out the load.

That's fine too, but don't go too high else the inrush current that occurs when you first plug in might just look like an overcurrent event to the PC.

Of bigger concern is that you are not supposed to draw more than 100mA from a USB port when you plug in, until the "USB chip" on your board (none for yours, but PC's expect that there is one) enumerates and identifies the board as needing 500mA. Again, you might get the nasty dialog message telling you you're drawing excessive current.

Ladyada has pretty good technical discussion on this: http://www.ladyada.net/make/mintyboost/icharge.html

--
The Rugged Audio Shield: Line In, Mic In, Headphone Out, microSD socket, potentiometer, play/record WAV files
Logged

Offline Offline
Newbie
*
Karma: 3
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
1) A PTC acting as a fuse in series to prevent a short from cooking off my USB port.

This makes people feel better but in practice it doesn't help as much as you think. PTC's are very "loose" devices and a 500mA PTC won't trip until about 1A or so. The Bourns MF-MSMF050 says it will take 0.15 seconds to trip at 8A -- that's more than enough time to cook the USB port.

Well, my feeling is that it's also intended to protect the project in the event the USB power source isn't fused.  Thirty cents of insurance, anyway.

Quote
Quote
2) A cap bridging 5V and GND to smooth out the load.

That's fine too, but don't go too high else the inrush current that occurs when you first plug in might just look like an overcurrent event to the PC.


Ah, good point.

Quote

Of bigger concern is that you are not supposed to draw more than 100mA from a USB port when you plug in, until the "USB chip" on your board (none for yours, but PC's expect that there is one) enumerates and identifies the board as needing 500mA. Again, you might get the nasty dialog message telling you you're drawing excessive current.

Ladyada has pretty good technical discussion on this: http://www.ladyada.net/make/mintyboost/icharge.html


And I'll admit that I need to sit down and test my current consumption.  Very rough back of the envelope calculations suggest that my typical projects come in under 100mA, but I suspect that if my USB ports are strictly following the enumeration requirement and I'm requiring more than 100mA, my project will just continually reset when it hits the current ceiling.  Annoying, but not catastrophic.  And I don't know how much enumeration USB wall warts do.  I guess I'm more concerned about smoke testing my circuit or burning down my house than failing to work.

Ultimately the problem that I've been running into while researching this is that there are any number of projects for providing USB power to your phones and other devices, there doesn't seem to be too much about using USB to power your projects. smiley-grin
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2855
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Well, my feeling is that it's also intended to protect the project in the event the USB power source isn't fused.  Thirty cents of insurance, anyway.

Thirty cents well spent.

Quote
Ultimately the problem that I've been running into while researching this is that there are any number of projects for providing USB power to your phones and other devices, there doesn't seem to be too much about using USB to power your projects.

Very common concern. The industry is starting to address the issue of using USB for power rather than data by publishing the USB Charging Specification (http://www.usb.org/developers/devclass_docs) and companies like FTDI are releasing relevant products (like FTDI's new X-CHIP devices).

--
The QuadRAM shield: add 512 kilobytes of external RAM to your Arduino Mega/Mega2560
Logged

Pages: [1]   Go Up
Jump to: