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: usb wiring question: the 5V line  (Read 1588 times)

0 Members and 1 Guest are viewing this topic.

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
usb wiring question: the 5V line
« on: October 13, 2008, 10:48:25 pm »
I am routing 2 usb cables through my cab's DB37 connectors used for my swappable panels, so that I can support USB in my swappable panels without having to deal with additional hook ups (I want the DB37 to be the only hook up).

So I successfully have routed 1 USB cable through it, and I'm going to be doing the 2nd next. Since USB has 4 wires, and 2 are Gnd and 5V, I want to minimize the number of pins used in the DB37 cable. Obviously I can short the Gnd's of the 2 USB cables together by having them share a single pin, but what I want to know is if it's safe to short the 2 5V's together on one pin. I know there are devices like external hard drives which have special cables that allow you to draw additional power by plugging into 2 USB ports at once. What I don't know is if those cables simply short the 5V lines, or if there is additional circuitry for combining the 2 lines.

Does anyone know?
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

richms

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:January 07, 2025, 06:42:57 pm
  • s92a sucks
    • richms.com
Re: usb wiring question: the 5V line
« Reply #1 on: October 14, 2008, 12:26:27 am »
They usually just combine them since most motherboards just have a simple overload on the power to the ports.

I hope your not thinking you will be hotswapping these37 pin plugs tho?

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: usb wiring question: the 5V line
« Reply #2 on: October 14, 2008, 12:28:02 am »
Check the spec on your connector for current per pin.  For D-Sub types, it's usually about 1-2A max.  USB specifies a max of 500mA (0.5A) per port, so you COULD usually put 2-4 ports worth of power on a pin.  However, there are some caveats:

1) If the host end has per-port current limiting/monitoring, this will break it and possibly confuse the heck out of the host.  This is more common on laptops, but some desktop motherboards and add-on cards do have this feature.  This is perhaps the most detrimental problem, if it applies.

2) If the two host ports are powered off slightly different places (e.g. motherboard 5V vs. disk drive connector 5V, which can be separate rails on some PC supplies), you've just connected those two places together.  This may cause unanticipated current flow at the point of the connection if there is a difference due to them being on different PSU rails or due to line loss at another point.  A solution might be to diode 'OR' the two power lines, you you need a special diode for this as normal power diodes will exhibit far too much voltage drop.

3) The per-pin current ratings sometimes assume that other pins nearby are lightly loaded as one of the major issues giving rise to those limitations in the ratings is heating.  Check that this assumption is valid.  Note that current on ground counts, too!  (See below)

4) Be sure also not to exceed the rated current on your ground pin, which may have other things returning via it whether you intend for it to or not.  Ground isn't some magical figment or passive reference.  All the current that is supplied other places has to return on it.  This is one reason why disk drive connectors in PCs have two ground lines (Also, see below) to pair up with their two (different: +5V and +12V) power supply lines.

5) Heavily loading a couple pins will cause more voltage drop due to resistance at the connection than spreading the load out.  Making some simplifying assumptions, this can lead to a phenomenon known as "ground bounce" which can cause all manner of mysterious failures.  A similar thing happens where the power rail may droop during inrush or other heavy load transients, again possibly causing mysterious failures.  These problems cannot be easily diagnosed with just a multimeter, either.

In essence, if you can spare a few extra pins, use them.

Also note that high-speed USB 2.0 (480Mbps) can be pretty sensitive to cabling and connection quality.  Even full-speed (12Mbps) can exhibit some weird problems with poor cabling, but it's not overly common if things are at least reasonable.  You may have noticed that the data lines were twisted inside the USB cable if you cut one in the middle.  This is due to the way USB's signals work and is a major component of making things all work.  The connector itself shouldn't be too bad if you use two adjacent pins, but you should maintain the twist in the wire as much as you reasonably can.  Avoid placing two USB signal pairs near each other on the connector, too, and keep them away from anything else which would be high frequency such as video.

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: usb wiring question: the 5V line
« Reply #3 on: October 14, 2008, 01:08:05 am »
Thanks for the input MonMotha. Based on that, I'll probably separate the 5V lines simply because right now I do have the pins to spare, and later if I need an extra pin then I can play around with combining them. I do think that otherwise my situation meets the requirements as you spelled them out. And the device is only 1.1 so I think I'm ok as far as noise goes. So far I have noticed no issues with the one joystick I've done.

Richms, yes I do hot swap them. That should be no problem as USB devices are hot swappable anyway. Should be no different than hot swapping a USB device with a normal USB cable. Not sure why you think it would be such a problem.
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: usb wiring question: the 5V line
« Reply #4 on: October 14, 2008, 01:22:47 am »
USB connectors are specifically design for hot-swap.  The ground mates first, then VBUS (+5 power), then the two data lines mate simultaneously.  You can see the differing lengths of the connections if you look inside the connector on the cable side.  This allows the device to connect its pull-up resistor to the appropriate data line after all power is stable at which point the OS will detect the hot-plug.  Your DB37 does not guarantee the correct mating sequence.  If you mate things quickly and firmly, then it'll likely work, but if you get sloppy about it, then there may be problems...

...giggiddy.

richms

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:January 07, 2025, 06:42:57 pm
  • s92a sucks
    • richms.com
Re: usb wiring question: the 5V line
« Reply #5 on: October 14, 2008, 01:36:45 am »
The shell ground will mate first on the D plug, but unless you can shorten the data pins some how you will never get reliable hotswap. I tried with RJ45 plugs and it was hit and miss, so I tried shielded ones so the shell ground connected first, and it was still unreliable.

Gave up on the idea and just got some chassis mount USB sockets and all was fine after that.