template and source for hardware projects
Go to file
King Kévin 4eb4a1993d add physical case for USB hub 2022-12-21 02:15:07 +01:00
case add physical case for USB hub 2022-12-21 02:15:07 +01:00
coraleda/subc lib: add TJ2242 current limit 2022-07-24 17:31:49 +02:00
geda/symbols lib: add DIO7553 current limit 2022-09-12 12:01:53 +02:00
library@0028ca2570 lib: update repo 2022-12-21 02:14:07 +01:00
.gitignore add PnP export 2021-12-19 11:24:57 +01:00
.gitmodules update submodule source 2022-05-11 12:13:02 +02:00
.qeda.yaml lib: add DIO7553 current limit 2022-09-12 12:01:53 +02:00
CHANGELOG.md doc: add v2 changelog 2022-12-21 02:12:24 +01:00
DEVELOPMENT.md doc: add flashing instructions 2022-06-16 18:14:01 +02:00
LICENSE.txt add CERN-OHL-S license 2021-07-22 12:22:58 +02:00
README.md doc: add serial info 2022-12-21 02:13:51 +01:00
Rakefile rake: fix pdfcat 2022-09-12 14:00:11 +02:00
dfp_clone.rb fix dfp generation 2022-05-20 14:04:33 +02:00
eeprom.bin doc: add flashing instructions 2022-06-16 18:14:01 +02:00
eeprom.rb doc: add flashing instructions 2022-06-16 18:14:01 +02:00
gafrc add schematic configuration and template 2021-07-22 12:28:19 +02:00
mass_prop.sh add PnP export 2021-12-19 11:24:57 +01:00
pnp_fab.tab add PnP export 2021-12-19 11:24:57 +01:00
usb_hub-dfp1.sch sch/brd: fix 6-40V feedback 2022-10-15 15:37:47 +02:00
usb_hub-dfp2.sch sch/brd: fix 6-40V feedback 2022-10-15 15:37:47 +02:00
usb_hub-dfp3.sch sch/brd: fix 6-40V feedback 2022-10-15 15:37:47 +02:00
usb_hub-dfp4.sch sch/brd: fix 6-40V feedback 2022-10-15 15:37:47 +02:00
usb_hub-dfp5.sch sch/brd: fix 6-40V feedback 2022-10-15 15:37:47 +02:00
usb_hub-dfp6.sch sch/brd: fix 6-40V feedback 2022-10-15 15:37:47 +02:00
usb_hub-dfp7.sch sch/brd: fix 6-40V feedback 2022-10-15 15:37:47 +02:00
usb_hub.lht sch/brd: fix 6-40V feedback 2022-10-15 15:37:47 +02:00
usb_hub.sch sch: minor, fix connection 2022-06-17 16:36:30 +02:00
version switch to version 2 to add fixes 2022-06-16 18:04:17 +02:00

README.md

the CuVoodoo USB hub is a 7-port USB 2.0 hub meant for device testing.

purpose

most USB hubs are super cheap and crappy, leading to poor connection and data transfer. there are industrial USB hubs, but they are bulky and very expensive. to solve this issue I decided to design my own USB hub, tailored to my needs.

when developing and testing hardware, you often end with a lot of USB devices connected (serial debugger, programmer, logic analyzer, ...). USB allows to have up to 128 devices, but only with a maximum depth of 7. thus you are only allowed to have a maximum of 5 USB hubs between computer and devices, and I often have to plan my setup to not reach this limit. most 7-port USB hubs use two 4-port USB hub, the seconds being connected to the first. there are some exceptions to that, but they are rare, old, and often not advertised as such. this heavily limits the actual number of end devices. the CuVoodoo USB hub is a 7-port flat USB hub, preventing reaching this limit too fast.

the upstream and downstream USB ports are individually ESD protected. this safety becomes important when developing, testing, and handling bare electronic devices. this also comes in handy when connecting circuit with different ground potentials. ESD protections already saved my day twice this way. the issue is that they can blow without you noticing, but at least they protected the device once.

each output port is current limited to 500 mA. no USB 2.0 device should draw more that this specified limit. it if does, there is very probably an issue with the device. this protection allows to isolate the faulty device and not have it affect all other connected devices, or the hub itself. see current limitation below for more details.

each downstream port is power controlled. this allows to remotely switch on and off individual devices. this is an important requirement when developing and testing devices, which require a power cycle. additionally, a switch next to the USB port can force the power off state.

the USB hub can be self-powered (through the USB input port), externally powered by 5V, or externally powered by anything between 6 and 40V. this allows to use higher voltage power supplies to provide enough current to all ports. the 5V are not feed back to the host.

each USB port comes with a high voltage output power port, connected to the high voltage input port. this allows to power devices which require more than 5V, with a maximum or 5A, such as 12V externally powered devices. these power outputs are controllable along the USB port. as with the 5V USB power output, this allows to remotely switch on an off individual devices.

each port has status LEDs, indicating the speed and power status of the connected device.

the board uses proper impedance and differential signal routing to provide clean USB signals.

design choice

USB 2.0

this hub is only for USB 2.0 devices. these are by far most of the devices I develop. it makes it simpler and keeps the cost reasonable. I often even disable USB 3.0 because of the 13-device limitation of the Intel xHCI. when I need USB 3.0 for the very few devices, I connected them to the computer directly.

USB2517

I wanted to use the FE2.1 7-port USB hub chip. it does not need an external voltage regulator or crystal. it is easier to solder thanks to its TQFP package, and provides all required functionalities. sadly I could not find a source for the 64-pin packages, and the 48-pin variant does not provide all required functionalities. thus I had to fall back to the Microchip USB2517, which uses a harder to solder QFN package.

power control

some USB hub chips allow to remotely control the power output on individual ports. this capability is here also used to control the power on the higher voltage output. thus you can completely power off even larger target devices.

current limitation

the USB hub has current limitation on the output. this does limit the current to 500 mA, but only in constant current mode. following current limiters have been tested:

  • 0.5A PPTC fuse: it takes too long to trigger (> 1s), and switch off is not reliably detected
  • MT9700: it has no over-current signal
  • SY6288AAAC: the (fixed) current limit is not 0.6A, but around 1.5A
  • TJ2242GSF6: over-current is only detected after 3s (instead of specified 100us, probably caused by thermal shutdown), and it is not signaled
  • DIO7553ST6: works as expected and wished

the power distribution switch detects the over-current state and asserts the fault flag after 10 ms. after 0.1 ms (as set in OC_TIMER, in Configuration Data Byte 2, in EEPROM) the hub will switch off power. this also clears the over-current state. after 100 ms the HUB will re-enable power. this loop will repeat indefinitely. no over-current is reported to the host in this case (when the over-current is cleared while power is off). it is only reported when the OCS is asserted for longer (unknown time, with OCS kept low also when powered off). this is a flaw of the USB2517, where the over-current is only reported if it can't control the power state. I did not find a configuration option for this aspect in the datasheet.

LED color

the USB specification, LEDs are used as port indicator (section 11.5.3)

  • off: powered off/disconnected
  • amber: current limitation reached
  • green: enabled or transmitting

instead the following color scheme is used:

  • green off: power off or over-current
  • green on: power on
  • red: low speed device connected
  • blue: full speed device connected
  • purple (red+blue): high speed device connected
  • red and blue off: disconnected or in sleep

power output

switching the power of the USB port also switches the 6-40V forward output. when the 6-40V input is not connected, current/voltage feedback from the outputs is blocked.

usage

it mainly works like a regular USB hub, at least when it comes to the data transfer. just plug the device in a port.

power on the Downstream Facing Ports (DFPs) is only available when the Upstream Facing Port (UFP) is connected.

the hub can operate as bus powered (power coming from the UFP), but it would not be able to provide more than 500 mA across all DFPs. it is preferable to connect an external 5V power supply to be able to provide 500 mA on all DFPs. this will also turn the hub into self powered, not using any power from the UFP. alternatively, you can connect a 6 to 40V power supply on the other power input. the power for the hub and the 5V for the DFP will be derivate from this higher voltage supply. the same higher voltage will be available on the power output next to the individual DFPs. the hub will not switch on until the UFP USB port is connected.

a switch next to each DFP allows to turn off the power output on the USB and power ports. the green LED is on when power output is available.

the power output on the USB and power ports can also be turned on/off remotely using standard USB commands. this power output control is implemented in uhubctl:

# list controllable USB hub ports
sudo uhubctl
# switch of port
uhubctl --action off --location 1-1.4 --ports 5

EEPROM

the USB2517 USB hub chip gets its configuration from an EEPROM. to generate the configuration:

ruby eeprom.rb

this will create the eeprom.bin binary file. feel free to adjust the configuration in the generating script, such as the serial number.

after having soldered all the parts on the board, connect a programmer (here a MiniPRO TL866xx) on the J4 pin header to write the AT24C02 EEPROM:

minipro --device "AT24C02@SOIC8" --write eeprom.bin -s