Rack mounted USB for Teensy

jonweisw2

Member
Does anyone have a rack mounted, multi-USB port hub that will work with multiple Teensy 4.1's (say 12 or more) that they can recommend for use in a PC/Windows based platform?

Thank you!
Jon
 
Last edited:
Have a generic 7 port here - 7 seems to be the common limit as the hub math works to the ports.
On that though have plugged at least a few Teensy's at one time or another.
This 7 port replaced another that worked for some time then was acting up. From AMZN they are typically desk mount flat - may be other options.
 
Have a generic 7 port here - 7 seems to be the common limit as the hub math works to the ports.
On that though have plugged at least a few Teensy's at one time or another.
This 7 port replaced another that worked for some time then was acting up. From AMZN they are typically desk mount flat - may be other options.
 
So, to your knowledge there is no large-hub, rack mounted, usb solution that can accommodate a dozen teensy’s… I should focus on multiple, smaller, satellite hubs?
 
I don't really understand your question. Maybe it would make more sense (to me, maybe for others too) if you give a little more context of what you're trying to accomplish?

But I can give you some facts I know about USB hubs.

Large USB hubs internally are really just a network of smaller hubs. Almost all hub chips implement 4 ports. When you shop for large USB hubs, you'll see 7 and 10 ports are common. The reason is 7 port hubs are usually a pair of 4 port hubs, and 10 port models have 2 extra hubs permanently connected to the first tier hub.

Though rare, 7 port hub chips do exist. I've only 7 port chip that implements USB2, never any for USB3, but maybe they do exist?

USB3 hubs actually implement 2 parallel hubs, one for USB2 speeds (1.5, 12, 480 Mbit/sec) and another for USB3 speeds (5, 10 Gbit/sec). So when you plug in 10 port USB3 hub, if you watch closely you'll see it's actually 6 separate hubs in Windows Device Manager or Linux "lsusb" or MacOS System Repory, because it physically has 3 chips inside and each 4-port chip implements separate USB2 and USB3 hubs.

USB hubs are pretty much all the same for data. They mainly differ by the amount and quality of power they deliver.

Back in the days of Teensy 3.x and earlier, when we had only 12 Mbit/sec speed, the hub's Transaction Translator (TT) design mattered if you wanted many boards communicating simultaneously at nearly their maximum speed. Most hubs have a single TT that is shared by all downstream ports. But some have a TT on every port. Your PC communicates with the TT at 480 Mbit/sec, and the TT then communicates with the USB device at 12 or 1.5 Mbit/sec. Not really an issue for Teensy 4.x which has 480 Mbit/sec speed.

There is nothing like TTs in USB3. When they added 5 and 10 Gbit/sec speed, it was done by adding a completely separate system. Teensy 4.x connected to a USB3 hub will use the USB2 hub portion to communicate at 480 Mbit. USB3 never does anything like USB2 TTs that allow slower speeds to communicate at the higher speed between your PC and the USB hub.

Whether any of this really matter to you, I don't know, because I really don't understand why you're asking this question. But if you're thinking very large hubs are somehow different especially if made in rugged or professional form factors, the reality is they're actually made from the silicon as smaller hubs. For example, this expensive 16 port rackmount hub is almost certainly 5 small hubs interally, a 4 port hub with 4 more 4 port hubs connected to it. But it does have impressive power output specs, which maybe justifies the price.
 
However, if you plan to have 12 Teensy 4.x boards all communicating simultaneously at their maximum speed (which is usually about 25% to 50% of the possible 480 Mbit/sec bandwidth), you will probably need a PC with several USB host controllers. No USB hub can make that scenario work, because the USB spec doesn't have anything like the TT in USB2 which would allow your PC to communicate with the hub at 5 Gbit/sec speed and the hub then communicates at 480 Mbit/sec. Such a capability would have been pretty awesome, but it simply does not exist. The entire design approach of USB3 added a separate system for 5-10 Gbit/sec speed.

Even more frustrating is typical PCs with many USB ports often have only a small number of actual USB host controllers. So even if your PC has 10 USB ports, odds are groups of several ports are on the same host controller and effectively share the same 480 Mbit/sec bandwidth.

Again, I don't really understand your question. But if you're looking for a way to have a dozen Teensy boards communicate at high sustained speeds to a PC using only a single cable, USB simply won't get you there. The protocol and hawrdware simple doesn't support that usage case. No USB hub can give you capability that the USB protocol simply can't provide!

Ethernet is probably the only viable option, if that really is your goal. You can have a PC communicate with an Ethernet switch at 2.5 or 10 Gbit/sec speed over a single cable. The switch can then communicate with many Teensy 4.1 at 100 Mbit/sec speed. Ethernet is designed to work this way and the pretty much all Ethernet switches on the market will give you this capability.
 
Paul-

Thank you SO much for taking the time to reply to my admittedly novice question.

For context, I am well into the build of a Boeing 727 simulator using all OEM parts, a unique and very daunting task for one with little IT experience. Over the last year, I have interfaced and coded all of the Main Instrument Panel components using Teensy 4.1 and have procured and started to populated a cockpit shell as well as the overhead and flight engineer panels. Recognizing that USB resources are limited, I have designed PCB's to manage the volume of switches and lights (for example) which total around 350 individual lights and another few hundred switches using shift registers and solid state relays (lights are all 28v) so that all of that can be controlled using about 4 Teensy 4.1's. I am now in the process of doing the final installation of many of these components (which were tested and coded on the bench and then shelved) and am trying to manage the number of simultaneous USB ports in use as well as their organization.

Recently, I moved everything over to a rack and bought a large, powered, USB-3.0 hub with the hope that this would suffice for the first traunch of Teensy's used in this installation but right out of the gate am having trouble getting my machine to recognize any teensy's plugged into it, hence my original question regarding a rack mounted, industrial hub which can handle multiple teensys.

I expect that the build will use between 16-24 Teensy's. Speed is a little less of an issue (in some cases I have had to dial down the processor speed on the Teensy in order to get good results). I would MUCH rather go the ethernet route, but am not sure if that is possible in this situation (and for some reason am under the impression that it is not for reasons that I cant remember). I am OK going with modular 7/10 port hubs if that is what works, but had hoped for a cleaner setup.

Does this make sense (and not in the overall way because I know this project is crazy!)?
 
I wouldn't immediately jump at either USB or ethernet for such a network. I'd keep things cheap and simple and use something like RS485, DMX512, CAN, etc using a single twisted pair multi-drop network.
 
StarTech makes one I'd trust for something like this. (Amazon ID# B0BZSY93HH ) It's pricey compared to most offerings, but USB does have an inherent design limit on the BUS of 5 levels from the root controller. By design, each hub is one USB in and four USB out. All physical hubs hide this by cascading multiple hubs in a module. There is also a signaling overhead that limits you to about 50% of the bus speed if you have a lot of objects trying to talk all the time. I've included a quick overview of the five most common versions on the market. All will use two of the levels from the USB root controller. An output port may also be used as an endpoint for an SD card reader, an HID device, an Ethernet controller, or a sound jack. There is an absolute design limit of 127 points on the USB tiered star bus. Each hub controller and the root controller also count towards this limit. For instance, a full 16-port hub requires 22 addresses and four levels. (Root Controller, root hub, initial hub, each downlink hub, each of the 16 client devices) Multifunction devices typically use an internal hub.

Since this is for a flight simulator, your data rate should be about 100 - 128 I/O cycles per second. (8 - 10 ms) Anything more is unlikely to benefit anyone, as human vision, let alone reflexes, can't keep up. Sixteen 64-byte payloads per Teensy per I/O cycle should cover a short integer value on every pin. ~1mbit per teensy. Out of 5000Mbit per root controller, you're using about 16Mbit of bandwidth with a full 16-port hub. The Teensy is also a USB 2.0 device, so it's limited to 480 Mbps, but I think its practical limit is closer to 90 Mbps. The root controller and hubs will buffer traffic to maintain speeds on the uplinks. So a USB3.0 root controller could talk to about 64 teensy microcontrollers max. ATX-style computers typically will have 2 - 4 root controllers. The most I've seen for an add-on board is four controllers with no root hub. So, the obnoxious upper-end limit is 20 root controllers giving you 1,280 teeny controllers talking to one standard PC. Each controller handling about 32 I/O pins gives a bit over 40,000 GPIO lines for the whole project. Windows will probably crash if you try to get even close to this limit. It may be able to handle it with registry editing. Linux, I'm sure, would need some editing to the kernel source to allocate enough resources.

Others have pointed out that you can use a mix of technologies to widen this, as Teensy has plenty of I/O bandwidth to spare if you are only using about one Mbps. Chain several boards together using SPI communication or even ancient serial. RS422/RS485/DMX512/CAN are standard bus communication technologies that can pass data reliably. Still, the major drawback is that they have a practical limit of around 16 devices before the bus is way too slow and prone to electrical noise.

On a larger scale, LED wall displays are based on this design, with a few caveats. Instead of sending values for individual pixels, they use a dynamic form of PWM to reduce the need for microcontrollers.

Root Hub 7 Port
  1. Output
  2. Output
  3. Output
  4. Link to Next Hub
    1. Output
    2. Output
    3. Output
    4. Output
Root Hub 10 Port
  1. Output
  2. Output
  3. Link to Next Hub
    1. Output
    2. Output
    3. Output
    4. Output
  4. Link to Next Hub
    1. Output
    2. Output
    3. Output
    4. Output
Root Hub 13 Port
  1. Output
  2. Link to Next Hub
    1. Output
    2. Output
    3. Output
    4. Output
  3. Link to Next Hub
    1. Output
    2. Output
    3. Output
    4. Output
  4. Link to Next Hub
    1. Output
    2. Output
    3. Output
    4. Output
Root Hub 16 Port
  1. Link to Next Hub
    1. Output
    2. Output
    3. Output
    4. Output
  2. Link to Next Hub
    1. Output
    2. Output
    3. Output
    4. Output
  3. Link to Next Hub
    1. Output
    2. Output
    3. Output
    4. Output
  4. Link to Next Hub
    1. Output
    2. Output
    3. Output
    4. Output
 
Back
Top