Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Control panel power via USB  (Read 2150 times)

0 Members and 1 Guest are viewing this topic.

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Control panel power via USB
« on: January 19, 2009, 06:06:03 pm »
I am about to redo my control panel with all-USB devices.  I'd like to mount a small hub in the panel so I can have a single USB connection back to the computer.  What I am trying to decide is if I can get away with an unpowered hub.

The devices on the panel will be:

- A Happ 3" trackball (red boards) interfaced through a Belkin mouse motherboard
- An LED-Wiz driving about 16 LED's drawing 15-20 mA each
- Two Ultimarc U360 joysticks

If I understand properly, if I use a powered hub, I can draw 500 mA from each port on the hub, but if I use an unpowered hub I can only draw 500 mA total.  So I'm looking at 250-300 mA worth of LEDs, plus about 50 mA for the mouse board.  I'm assuming the joysticks will also draw a max of 50 mA each (similar to the Happ P360's).  So I'm looking at 350-400 mA before I take into account the power draw of the LED-Wiz itself and the trackball's optical boards, and of course the power draw from the hub itself.

So, for those more knowledgable than me, my questions are:

- Is drawing the full 500 mA from a single USB port acceptable or am I likely to burn something out?

- None of these are high-speed devices... can I get away with a USB 1.1 hub (if which I have a spare) or do I need to get a 2.0 hub (which I'd have to buy)?

- Is there something I'm not taking into account?

Thanks!

--Chris


--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

stephenp1983

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 691
  • Last login:March 24, 2024, 11:26:39 am
Re: Control panel power via USB
« Reply #1 on: January 19, 2009, 08:52:49 pm »
I'd be interested in knowing this too.  I'm running something similar, but less controls in my bartop.  I think 9 led's, one u360, and a usb trackball.  I was also curious if running any of these through usb 1.1 would cause a problem. 

Visitor Q

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1187
  • Last login:May 01, 2019, 09:09:30 am
  • The Saw Is Family
Re: Control panel power via USB
« Reply #2 on: January 19, 2009, 09:41:37 pm »
I've always found the non-USB powered hubs to work poorly.
“Woe be unto him who opens one of the seven gateways to hell, because through that gateway evil will invade the world."

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Control panel power via USB
« Reply #3 on: January 19, 2009, 11:39:29 pm »
The power situation on USB sadly sucks.  Just enough to get in trouble, but not enough to power big loads.

You get 500mA max from the host PC (assuming it's OK with that, which all desktops should be) until you hit a powered hub.  A powered hub can usually provide the full 500mA per port, too, but check the ratings on the brick (should be 0.5A * number of ports on the hub).  Also, there's a minimum of 100mA per port that has to be reserved for enumeration.  This means that an unpowered 4-port hub can only allow a max of 200mA on one port in order to guarantee that 100mA is still available on the other 3 ports.

Also note that you have to "ask" for power when you enumerate.  If you just plug in to the power and don't negotiate with the host for more power (and subsequently get approved), you can only "legally" draw 100mA.  Some hosts will shut you down if you exceed the limit, but most desktop PCs don't enforce any limits at all other than ~1A for safety reasons.  YMMV.  I do not know how much power your various devices will "ask" for.  Many broken USB devices just ask for the full 500mA even if they don't need it, and as such an unpowered hub will not allow them to start due to lack of available power.

If you must insist on powering everything via USB, the simplest solution is to use a powered hub.  If you don't buy the $1 newegg POS special, they tend to work fine.  Make sure it displays the appropriate USB IF logo (check http://www.usb.org/ for the logos).  Displaying the logo in theory means that the device has been through the compliance verification program though some "foreign" devices ignore the relevant trademark law and display it without authorization.  An old hub (USB 1.1 or 2.0 full speed only) should be fine and in fact is probably less likely to be broken than a new cheapie.

I would suggest running power loads (such as LEDs) off a dedicated supply line.  This can either be a brick or your PC supply.  This eliminates the need to try to power them off of USB.

Kevin Mullins

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4504
  • Last login:February 01, 2021, 01:29:34 pm
    • Me on Myspace
Re: Control panel power via USB
« Reply #4 on: January 20, 2009, 12:32:20 am »
Not having all the techy knowledge of the USB hubs.... I can say that I will never use an un-powered hub for anything ever again. You'll find things acting quirky, not working at all, certain things work fine, certain things don't, etc and rack your brain trying to figure out why.
Go with the powered hub.
Not a technician . . . . just a DIY'er.

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Control panel power via USB
« Reply #5 on: January 20, 2009, 12:40:32 pm »
To add to what MonMotha said, some hubs "take" 100 mA, leaving only 400 mA for the rest.  BTW, this is why most un-powered hubs are only 4 port, as there is only enough mAs left for four 100 mA ports.  And if any one USB device asks for 200-400 mA, that "removes" another port per extra 100 mA.

So if you didn't have the LED board, you might be okay (with the 2 u360s + the 1 mouse = 300 mA).  However, the 15 * 15 = 225, so the board has to ask for 300 mA minimum to work.  And 300 + 300 = 600; too high for the USB standard.
Robin
Knowledge is Power

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Control panel power via USB
« Reply #6 on: January 21, 2009, 12:01:34 am »
Actually, a USB device gets to ask for power in 2mA increments, not 100mA.  However, there still has to be the 100mA reserved for enumeration on enabled but unoccupied ports.   I don't remember if the USB spec allows power for devices that ask for less than 100mA (if that's even allowed, which I recall it is) to be "pooled" back and allotted to other ports or not.  I never had reason to really read up on the hub spec.

richms

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:January 07, 2025, 06:42:57 pm
  • s92a sucks
    • richms.com
Re: Control panel power via USB
« Reply #7 on: January 21, 2009, 06:31:43 am »
I have severly overloaded USB ports and its fine - how do you thing the USB port trash products like hand warmers, coffee warmers, vacuum cleaners etc get away with it.

The big killer is voltage drop over the cables - most USB devices just have a couple of diodes to drop to 3.3v internally, and if the voltage sags then you will start to see erratic operation.

I would get a powered hub, since that will solve any enumiration issues, and then run a nice thick red and black cable back to a molex or somewhere to get a stable nice 5v to it.

No motherboard I have seen has actually done anything with the power to the USB ports other then connect it straight to 5v, possibly via a PTC for some protection, but not proper current limiting.

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Control panel power via USB
« Reply #8 on: January 21, 2009, 07:00:38 am »
The big killer is voltage drop over the cables - most USB devices just have a couple of diodes to drop to 3.3v internally, and if the voltage sags then you will start to see erratic operation.
Most that I've torn apart (and designed) have an LDO linear to go from the 4.5-5.5V Vbus down to a stable 3.3V.  However, if you go below about 3.8-4V, the regulator will start to drop out (same result).  I guess REALLY cheap USB devices may use diodes.  Makes it harder to do proper soft-start (which most devices don't do anyway), though.

Note that the USB standard accounts for most of this.  That's why Vbus can vary so much and why it has soft-start provisions.  Unfortunately, everybody ignores all this stuff, violates the spec, then wonders why things don't always work right.

No motherboard I have seen has actually done anything with the power to the USB ports other then connect it straight to 5v, possibly via a PTC for some protection, but not proper current limiting.
Many laptops do enforce the limits.  Many these days (especially small stuff like netbooks, tablets, and ultraportables) will enforce the actual allocated limit (i.e. if you draw more than you ask for, you'll get cut off), but some do just enforce a 500mA hard limit on every port.  Sometimes that's done with a PTC, and sometimes it's done with an actual monitor/sense circuit which provides reliable error flag and on/off operation.

Most desktop motherboards I've seen create a dedicated "Vbus" rail that is connected to a 5V via a PTC that provides a limit at ~10% over max combined draw since it would be downright dangerous to connect Vbus directly to the 5V rail off the PSU (often capable of sourcing >25A!).  So, if the mobo has 4 ports, there will be a ~2.25A PTC that attempts to protect the ports.  Kinda a minimal protection if you ask me, but I guess it's cheaper than doing it the right way.

Some desktop motherboards support a "wake via USB" feature.  These motherboards are capable of supplying Vbus via ATX +5VSB when in soft-off.  Many of these mobos do enforce limits (at least a 500mA hard limit) since +5VSB has limited current capability (often 1A at best).

Of course, your LED-Wiz and similar have no idea how much power you're going to actually use.  I would suspect those kind of devices just ask for the full 500mA.  I'm guessing that's documented somewhere.  If it does this, it may cause a failure to complete enumeration due to apparent lack of power unless you use a powered hub or plug it directly into your PC.

Bottom line: power your USB devices via USB like they are designed to be, and power your power loads (e.g. blinkenlichten) via a dedicated power line (from a suitable wall wart or your PC PSU).  If you need more than 100mA per port on a 4-port (or larger) hub, make sure you use a powered hub.  The power source for the hub is up to you: most come with a wall wart, and I'd recommend using it, but you could also run dedicated lines (I'd suggest 20AWG or larger) from your PC PSU if that fits your fancy better.

I would reccommend installing a 1A (or other suitable) fuse in your +5V source line for your power loads (blinkenlichten) for safety reasons.  Large PC PSUs are capable of currents suitable for welding!

richms

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:January 07, 2025, 06:42:57 pm
  • s92a sucks
    • richms.com
Re: Control panel power via USB
« Reply #9 on: January 21, 2009, 08:16:43 am »
The computer I found in the inorganic collection with a nice burnt trail from the melted front USB port, along the flyleads, to a charred header on the motherboard and some darkened areas all the way to the ATX connector shows that some do absolutely nothing for protection.

The thing I find laughable is the HDDs that come with a Y cable to get more power, when there is nothing to request the power from the second port, so they are violating spec anyway, and since they are feeding the power straight to a 2.5" HDD they cant use diodes to prevent issues with connecting 2 5v supplies together. A friend had mystery problems with their PC with that plugged in, turns out some USBs were jumpered for 5vsb, some not, and joining them made for an unhappy computer.

Its crazy that the USB association dont go after the pervayors of non compliant junk for saying that they are USB for the stuff like warmers and chargers etc which are probably responsible for a hell of a lot of blown USB ports on office PCs that "just broke one day"

Malenko

  • KNEEL BEFORE ZODlenko!
  • Trade Count: (+58)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14021
  • Last login:August 01, 2025, 09:20:08 pm
  • Have you played with my GingerBalls?
    • forum.arcadecontrols.com/index.php/topic,142404.msg1475162.html
Re: Control panel power via USB
« Reply #10 on: January 21, 2009, 08:24:16 am »
I can understand the desire for a single USB cable, but wouldst it be a safer bet just to zip tie 2 together? run them from seperate USB ports (maybe one from the front, one from the back, I'm not 100% how the power works on your board) then go with 2 unpowered hubs to split the load?
If you're replying to a troll you are part of the problem.
I also need to follow this advice. Ignore or report, don't reply.

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Control panel power via USB
« Reply #11 on: January 21, 2009, 09:10:21 am »
The computer I found in the inorganic collection with a nice burnt trail from the melted front USB port, along the flyleads, to a charred header on the motherboard and some darkened areas all the way to the ATX connector shows that some do absolutely nothing for protection.

The thing I find laughable is the HDDs that come with a Y cable to get more power, when there is nothing to request the power from the second port, so they are violating spec anyway, and since they are feeding the power straight to a 2.5" HDD they cant use diodes to prevent issues with connecting 2 5v supplies together. A friend had mystery problems with their PC with that plugged in, turns out some USBs were jumpered for 5vsb, some not, and joining them made for an unhappy computer.

Its crazy that the USB association dont go after the pervayors of non compliant junk for saying that they are USB for the stuff like warmers and chargers etc which are probably responsible for a hell of a lot of blown USB ports on office PCs that "just broke one day"

Hosts and hubs that do not implement any meaningful form of overcurrent protection violate the specification and should not display the USB logo.  If they do, report them to the USB IF.  If it's a big enough vendor, they might manage to pressure them to fix things.

In theory that HDD can get 100mA off the "extra" port without enumerating on it, but you are right that there's no easy way to combine them together safely.  There are some solutions involving various SMPS converters, but I have yet to see anything employ them.  I'm not sure that pulling this 100mA unit load without any intent to enumerate is allowed (and you certainly won't comply with suspend current requirements), but I don't see anything in the spec to prohibit it.

As for the USB IF, they do occasionally go after people who use the USB logo on non-compliant products.  In theory, to use the logo, you have to actually have passed the USB IF's compliance testsuite and this has to be verified by one of their "blessed" agencies, though in practice they don't seem to care a whole lot as long as your device actually is pretty compliant.  The logo is trademarked, though, and they make it very clear that you cannot use it on non-compliant devices just because it has a USB connector.


Unfortunately, the USB spec is a giant quagmire of ugliness, so I can understand some minor deviations from the spec here and there.  Still, many of the things devices and hosts do that they shouldn't are clearly documented as being against the spec, yet devices and host do it anyway.

There was a working group to address many of these power concerns on USB.  Info appears to be at http://www.usbpluspower.org/ and appears unaffiliated with the USB IF.  The intent was to allow a USB port to power medium-power devices such as printers, scanners, hard drives, and larger battery chargers in mobile devices.  It involved adding on to the USB plug and making it larger (to add more power lines) in a backward compatible manner (standard USB 'A' plugs would still work).  Dell adopted one of their reccommendations on some of their laptop docking stations at one point.  I'm not really aware of anyone else adopting this stuff though it looks like it may be popular in PC based POS systems.

blind_dado

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 158
  • Last login:March 17, 2019, 07:34:32 pm
    • Arcade Odyssey
Re: Control panel power via USB
« Reply #12 on: January 21, 2009, 12:08:26 pm »
This is the powered hub I use in my cab, which is expensive, but will never fail you (there is a seven port version too).  It's metal, and I love its heavy duty feel.

Available at USB Gear:
http://www.usbgear.com/computer_cable_details.cfm?sku=USBG-4SU2MLA&cats=104&catid=187%2C188%2C104%2C653%2C210%2C212


Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Control panel power via USB
« Reply #13 on: January 23, 2009, 02:54:24 pm »
Wow, that thing is a tank.
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com