What Is the Maximum Number of Usb Devices That Can Be Connected to a Single Usb Host Controller?
How many USB devices can you connect ?
The USB specification plans for 127 device adresses on the USB bus, and information technology is tempting to deduce from this that yous can connect up to 127 devices on a USB port. Unfortunately, life is not as simple: this naive reasoning does not take into business relationship all constraints imposed by USB controllers. To give yous a meliorate and more useful answer, we have decided to test what works in real life...
Our goal is to determine how many Yoctopuce USB devices, either sensors or actuators, you can hope to get working properly on a machine. At the same time, we will let you know what are the platonic weather to maximize this limit. In social club to get existent numbers, we take congenital a batch of USB examination devices, which acquit like Yoctopuce sensors. Really these are just Yocto-Demo with a custom firmware allowing to setup at will the number of measures reported per 2nd. In this mode, we will be able to run specific tests with devices creating USB trafic at 1Hz, 10Hz, 100Hz or even 1 KHz, which is the maximum message transfer rate immune past the USB Full Speed standard used by Yoctopuce devices.
The first thing to know is that the maximum number of USB devices that you tin can use depends as much from the USB hubs every bit from the USB host controller. Nosotros will therefore test these 2 aspects separately.
We take tested quite a few USB hubs.
USB hub comparing
Our first examination is designed to notice how various USB hubs react to a pocket-sized number of devices configured to transport data at loftier frequency. This reproduces what would happen when yous connect for instance several Yocto-3D-V2 inertial sensors, or a few analog interfaces similar the Yocto-0-10V-Rx reading fast-changing signals. From this exam, we can immediately distinguish betwixt ii groups of USB hubs:
- Those who loose packets, and happen to exist more often than not cheap ones purchased from retail outlet;
- Those who don't loose packets, and take usually been a chip more than expensive
A USB bus is non expected to loose packets: USB is supposed to provide a lossless transport layer. Contrarily to Ethernet or WiFi networks, where parcel loss are expected and taken into account, USB protocols are not designed to handle retransmissions. So when a USB hub looses packets, it might go unnoticed for a mouse, but it creates real trouble for measure out and control applications.
Multi-TT vs Single-TT USB hubs
Price is obviously non the most relevant factor to determine if a hub might loose packets. What matters is its chipset, and in detail if the chipset tin can handle Full Speed transactions on all ports simultaneously, or if it can but handle i Full Speed parcel at a fourth dimension considering information technology has only 1 Transaction Translator. In the start case, we accept a Multi-TT hub (MTT), which normally works well. In the second example, it is a Unmarried-TT hub (STT), which will loose packets when they come up also chop-chop.
With a Single-TT hub, when there is heavy Full-Speed traffic, i tin notice packet loss as soon as there are 2 devices connected. With moderate traffic, it may piece of work properly up to 3 or four devices, merely as the number of device increase, packet loss may quickly announced and trigger communication errors.
Using exclusively multi-TT hubs, nosotros have been able to connect up to 30 Total-Speed devices configured to ship the virtually intensive traffic possible, i.east. yard messages per second, without seeing any packet loss.
You will notice a summary of Single-TT and Multi-TT hubs that we have tested on the table below. If your hub is non in this list, y'all can try to find on Net the blazon of chipset that it uses. You can also open up the OS device manager and check the VendorID and DeviceID of the hub. The most mutual Unmarried-TT chipset is Genesys GL850, which can be recognized by its DeviceID 0x0608.
By the fashion, we were sad to observe out that the Moxa UPort 207 et Uport 407 hubs, based on a SMSC chipset capable of doing Multi-TT, are nevertheless dropping packets. The manufacturer should probably have spent a little bit more time to bank check this rather than spending time for replacing SMSC VendorID by its own VendorID.
Moxa industrial hubs look expert, but during our load tests they exercise oftentimes loose Full-speed packets like any cheap Single-TT hub
Connection topology
Another limiting factor for connecting many USB devices is the hub connection topology, or in simpler words, the way hubs are connected to each other. Indeed, you cannot link blindly ane hub to another indefinitely until all devices are connected: there is a maximum number of hubs that a bulletin can cross between the host controller and the device. Starting from the USB controller and the Root Hub embedded on the host motherboard, a message can merely cross 5 external hubs at most. And then the best way to connect as many devices every bit possible is to organize them in a tree, rather than linking them in a chain: on the outset external hub, but connect other hubs, on which you can as well connect further hubs if needed. This volition create a big number of USB ports, with a minimal number of hubs to the host controller.
It looks like shooting fish in a barrel, but there are three traps. First, you must have intendance nigh power supply: the USB standard does not permit you to connect a USB hub to another if they don't take their own power supply. Some hubs will fifty-fifty disable their downstream ports when they detect that they are second-layer hubs without external ability supply. Mostly speaking, if you want to connect many devices, always start past powering all hubs from the kickoff, without exception. This is the safest manner to become.
2nd, if y'all need some distance between your USB devices and the PC that drives them, exist prepared to spend 1 level of hub for this. Indeed, over 2m distance, USB active extension cables are the only ane you can rely on, as long passive cables crusade packet loss due to weak signal. But an active extension cable is actually a cablevision with a built-in USB hub to re-amplify the betoken.
Tertiary, you lot may promise that using 7-port or 10-port hubs tin can make it much easier since you become more USB ports using less hubs. Nevertheless it is oftentimes not the case: most USB 7-port hubs and 10-port hubs are really made of two or 3 USB hubs embedded in the same box. Therefore, they yet count equally multiple chained hubs for the maximum depth limit. To create an optimized topology and chain them properly as a tree, you demand therefore to use the device manager and bank check the depth of each hub port, which makes it a little bit more difficult to build an optimal tree.
From a topology perspective, the best USB hubs that we take tested are those based on Terminus FE2.1 chipset: they provide 7 flat USB 2.0 ports within a single hub. The hub models which use this chipset are the LogiLink UA0148 and the ExSys EX-1177. Another interesting topology option is the ExSys EX-1116HVMS, which offers 16 USB 3.0 ports, fabricated from 5 hubs organised as a balanced tree of depth 2.
The ExSys EX-1116HVMS hub provides sixteen USB 3.1 Gen 1 ports, and is made of 5 hubs connected as a tree
On the other extreme, in the 10-port hubs category, the IcyBox IB-AC6110 is the worst from a topology perspective, as it connects three hubs in a chain without making a tree.
USB i.ane, USB 2.0 and USB three.ten
Yoctopuce devices piece of work in USB Full-Speed mode, as defined in USB 1.1 standard and inherited past USB 2.0. One outstanding question is to know if at that place is an reward for this type of traffic to utilise an hub USB 2.0 hub over a more contempo USB 3.10 host.
According to the specifications, USB 3.x remains uniform with 2.0 devices. If you wait at the datasheet of USB 3.ten chipsets, you will notice that they all include a USB 2.0 hub in one form or another.
This is verified in existent life: we have observed identical performances for Full-Speed traffic routing on USB two.0 and USB iii.ten hubs. The simply reward in favor of USB 3.x hubs is that they commonly include an private condition LED on each port, which is seldom the example for USB 2.0 hubs. The only USB 2.0 hub with private condition LEDs that we accept seen is the LogiLink UA0148.
The USB 2.0 hub LogiLink UA0148 is Multi-TT and includes private condition LEDs for each port
USB hub comparison table
Hither is a summary table to conclude this UBS hub exam bench. Notation that our comparison is focused on the performance for handling multiple Yoctopuce devices. We have not tested high-speed USB 3.x throughput, nor fast-charging capabilities for case. We have also added at the finish of the list our own Micro-USB-Hub-V2 for comparison purpose, even though information technology does non actually belong to the same category since it is designed to exist embedded rather than used stand up-alone.
Model | Chipset | Ports | MTT | topology | form cistron | price |
---|---|---|---|---|---|---|
Maxxtro MX-USL | Genesys GL850 | 7xUSB2 | 3+4 | desktop | xv€ | |
Maxxtro MX-UA6 | Genesys GL850 | 10xUSB2 | 2+4+4 | desktop | 30€ | |
Maxxtro MX-U3HU05 | Realtek 5401 | 7xUSB3 | 3+4 | desktop | 34€ | |
D-Link DUB-H7 | Genesys GL850 | 5xUSB2 | iii+2 | desktop | 37€ | |
IcyBox IB-AC618 | VIA VL812 | 7xUSB3 | 3+4 | desktop | 52€ | |
IcyBox IB-AC6110 | VIA VL812 | 10xUSB3 | 3+3+4 | desktop | 74€ | |
LogiLink UA0126 | Moai MA8601 | 13xUSB2 | 1+iv+iv+four | desktop | 19€ | |
LogiLink UA0148 | Terminus FE2.1 | 7xUSB2 | 7 | industrial | 19€ | |
Moxa UPort 207 | SMSC USB2507 | 7xUSB2 | 7 | desktop | 181€ | |
Moxa UPort 407 | SMSC USB2507 | 7xUSB2 | 7 | industrial | 255€ | |
ExSys EX-1177HMV | Terminus FE2.1 | 7xUSB2 | 7 | industrial | 48€ | |
ExSys EX-1181 | Genesis GL3520 | 10xUSB3 | 2+four+4 | industrial | 83€ | |
ExSys EX-1187HMVS | Genesis GL3520 | 7xUSB3 | 3+4 | industrial | 86€ | |
ExSys EX-1188HMS | Genesis GL3520 | 7xUSB3 | 3+iv | industrial | 82€ | |
ExSys EX-1189HMVS | Genesis GL3520 | 7xUSB3 | 3+4 | industrial | 89€ | |
ExSys EX-1116HMVS | Genesis GL3520 | 16xUSB3 | 4+4+4+4 | industrial | 225€ | |
Yoctopuce MHUB0002 | SMSC USB2514BI | 4xUSB2 | four | embedded | 29€ |
The best quality/toll ratio for an industrial Multi-TT hub is clearly the LogiLink UA0148. At this price point, we tin only promise that the workers who built information technology accept received plenty money to brand a living.
Alternatively, the ExSys hubs are both affordable and of good quality. Most of them feature an industrial 7-24V concluding connector for power supply.
Load test with ExSys industrial USB hubs
USB host comparison
Once we know how to connect many USB devices using hubs, we must still make sure that the host will exist able to handle them all. First the CPU must be powerful enough to handle all traffic. Simply in addition, in that location are sometimes constraints in the USB controller itself which limit the maximum number of usable devices. Hither is the results of our experiments.
PC (Windows 7.0 and 10.0)
On slightly older motherboards featuring several USB 2.0 controllers, we have been able to connect without problem up to 16 devices on the "Enhanced" controller and up to vii devices on each of the standard USB controller. Make certain not to get tricked past the fact that several USB ports may actually correspond to the same controller: you need to verify how devices are spread on controllers using the Device Manager. With a bit of care, we have been able in this manner to use well-nigh fifty devices on a unmarried car, each sending 1000 letters per 2d.
On some recent machines, in that location is just 1 Intel xHCI USB 3.0 controller, which handles all USB ports. The problem is that, by blueprint, this controller cannot talk to more than than well-nigh twenty USB 2.0 devices in total. So if y'all have a mouse, a keyboard and a few hubs, you will not exist able to use more than 13 to 15 Yoctopuce devices.
Mac
On the iMac that we have tested, nosotros take been able to connect 30 devices, each sending 1000 messages per second, on each of the two USB two.0 ports. The EHCI controller used by Apple seems to be robust.
Raspberry Pi ii
The Raspberry Pi 2 appears to piece of work with x devices sending letters at 100Hz: this eats upwardly nearly 12% of its CPU time. Over x devices, the handling of High-Speed devices seems to dull down exponentially, and it is fifty-fifty impossible to go 17 devices to piece of work simultaneously, even when they send almost no data.
Intel Edison
The Intel Edison is capable of handling 12 devices sending letters at 100Hz: this eats up 9% of its CPU fourth dimension. Information technology is impossible to connect more than 13 devices, equally the USB controller does non have enough ressources. Even so the Intel Edison is as well capable of handling devices sending messages at 1 KHz, equally long as you don't push to far: it is still a small-scale machine...
Conclusion
Here is what you should keep from these tests:
- If you use more than ane USB device per USB port, always utilize Multi-TT hubs. Forget cheap USB hubs sold in retail outlets, they are no good for USB Total-Speed traffic.
- As before long as you use more than 4 devices per port, provide a ability supply to all USB hubs.
- To connect many devices, you must create a tree topology.
- Don't await to employ more than 10 devices on a mini-PC like the Raspberry Pi or the Intel Edison.
- No more than 13 devices in total on recent PC using Intel USB3 xHCI controller.
- Apart from than, on a robust motorcar, y'all can connect upward to 50-threescore devices USB in total if yous select properly your USB hubs and the connection topology.
And don't forget that your existent-earth tests are the only proof that your design works. We can requite you lot hints at how to get the best results, but ultimately it is your hardware and your pattern that will make the deviation.
1 more comment nearly the Moxa hubs: a quick check with an USB analyzer shows that the hub advertise itself equally Multi-TT... but for some reason they are nevertheless loosing packets. Strange...
What are "loose packets"? What kind of packets are attached to hubs and go loose on cheap ones. I idea packets consisted of data and not a physical part and therefore would never loosen.
Welcome to the existent globe :-) if a poorly designed USB hub accepts more USB packets than information technology can handle, it will just driblet some of them.
Looking into designing or ordering some USB hub to embed information technology to my network appliance.
If you'd have to get somewhere embeddable 4x, 7x or 24 port USB hub or design information technology by yourself, what chipset yous'd choose for that chore?
@konstantin: we use a multi-TT USB2514BI chipset from SMSC (now Microchip) in our Micro-USB-HUB-V2 (www.yoctopuce.com/EN/products/micro-usb-hub-v2). Never had to complain virtually it.
Fantastic article, only I'm wondering how much of this however applies in 2021? In particular I'm wondering near limits on the newer Raspberry Pi 4, and also I have been reading people on various forums saying that with usb 3.0 MTT isn't something to worry most anymore. Is that true?
@emissary: nosotros will rerun tests on newer chipsets to write an updated version of this commodity, but there were already some USB 3.0 hubs back in 2016 and some of them did non handle USB 1.1 traffic amend than USB 2.0 hubs. The problem of split transactions to handle remains the aforementioned in 2021...
@emissary: The new serie of tests is now available: see https://www.yoctopuce.com/EN/article/how-many-usb-sensors-can-you-connect-in-2021
Source: https://www.yoctopuce.com/EN/article/how-many-usb-devices-can-you-connect
0 Response to "What Is the Maximum Number of Usb Devices That Can Be Connected to a Single Usb Host Controller?"
Post a Comment