Multiple Teensy 3.2 boards connected to one USB 2.0 port via a USB 2.0 Hub

Status
Not open for further replies.

sn00Zerman

New member
Hello everybody,

I'm working on a "project enlargement". I currently have 3 Teensy boards running together to control each 6 of those sparkfun 32x32 RGB LED matrixes.
(making a total of 18 of those panels, and a current resolution of 192x96 pixels)
a little demo video
For the moment, this is giving me a stream of 10,5 Mbit/sec at 25 fps, 24bit colors. (theoretically, 12 Mbit/sec would be the highest possible rate)
This application is written in C#, and uses 3 simultanious worker threads, updating all 3 teensys in parallel. (using the last byte of the update as a "sync" signal, to keep the complete display in sync)

I'm currently in the process of planning an enlargement of this display. I want to upgrade it to 15 panels in width, and 6 panels in height, and bringing the FPS to 30 instead of 25.
I want to put 15 teensy boards in it, each controlling 6 panels. (making it a total of 90 32x32 panels, bringing the resolution up to 480 x 192 pixels)
That brings me to a calculation of 4,2 Mbit/sec for each Teensy, 63,2 Mbit/sec in total.

Will it work if I connect all 15 Teensys (12 Mbit/sec) to one USB 2.0 Hub / Port (480 Mbit/sec) ?

My USB knowledge is not enough for this, and while I created this initial project 3 years ago, completely on my own(electronics/PC software/Teensy software/wiring, even designing 3D parts (and printing) to get the whole thing as one giant display etc ...),
i suffered from an epileptic attack in the beginning of 2017, was 3 times re-animated and was in coma for 2 weeks, and I'm left with a little brain damage, so I'm not that "good" anymore in understanding datasheets and specs etc ...
But I still want to finish this project, for my wife ... (It's going to be a "virtual aquarium" once it's finished, because we both like fishes, but don't like the idea of having a huge tank of water in the livingroom, LOL)

P.S. For those who are interested in the man I was, before my "nightmare" came true, please check out my story of all my electronics an mechanics (and modelrailroading) projects on my personal blog



Best regards from Belgium,
Kris
 
Will it work if I connect all 15 Teensys (12 Mbit/sec) to one USB 2.0 Hub / Port (480 Mbit/sec) ?

It really depends on the type of USB hubs you use.

There are 2 types, called Single-TT and Multi-TT (or TT per port). Sadly, hub manufacturers almost never advertise which type their product really is. On Linux you can check with "lsusb -v", and on Windows 10 you can see it in the advanced properties tab in Device Manager. Macintosh and earlier versions of Windows don't have any easy built-in way to check (at least not any I know).

You definitely need Multi-TT to make this work. On a Single-TT hub, there is effectively a single 12 Mbit channel to all downstream ports. Yeah, that's totally lame, but it does allow making cheaper hubs. But these days some of the cheapest hubs turn out to be Multi-TT and some rather spendy ones turn out to be Single-TT design. Things like the color and retail packaging seem to impact the price more than the silicon inside.

Keep in mind there aren't any hubs with more than 7 ports, and even those are quite rare. Almost all are 4 ports. When you buy a 10 port hub, it's actually 3 four port hubs, where 2 of them are permanently connected to ports of the first 4-port hub. If you plug hubs into tier-connected hubs, it's best to figure out which ports are actually the top-tier ports.

Of course, all this depends on whether your software on the PC side can scale up to 15 outputs.

It's going to be a "virtual aquarium" once it's finished, because we both like fishes, but don't like the idea of having a huge tank of water in the livingroom, LOL

I hope you'll share a video or photos. Sounds like it'll be pretty awesome!
 
Thanks for your info, deep inside I knew there was something I forgot :)
The quest in on, searching for some USB 2.0 hubs with Multi-TT ...
I will surely post some photos,videos,design schematics and even my code, once this project is nearing completion, on my website. (Please feel free to copy anything from my blog)
Did you like the video with the smaller RGB LED matrix ?

best regards,
Kris
 
I saw single Teensy do ~25+% more usb output to a direct USB3 port than USB2 Hub. I'd have to check what port the USB Hub is in. Also a try USB 3 Hub in a USB3 port. I used the quick sketch in this post to see the number of printing loops a Teensy could do in a fixed time - some depends on the Serial Monitor (PC processing efficiency) in this case with Teensy doing the writing - but USB3 native port was faster - same may help in the HUB - easy sniff test with that sketch, your case is PC writing of course. TyCommander could send a fixed length file and the Teensy could track how long it takes to read from data start to end.
 
try USB 3 Hub in a USB3 port.

Every USB3 cable is actually 2 cables in 1. It has 2 wires for power, 2 twisted pairs for 5/10 Gbps, and 1 more twisted pair for 480 Mbit/sec USB 2.0 speed.

Every USB3 hub is actually 2 hubs, a USB3 hub for the 5/10 Gbps and a separate USB2 hub for the 480/12/1.5 Mbit/sec data. When you connect 12 Mbit/sec devices like Teensy, the data flows to the USB2 hub's transaction translator, which allows the PC to access the device using the USB2 split transaction protocol at 480 Mbit/sec. The USB2 wires and hub are used. None of the USB3 stuff is ever used to access Teensy or any other 12 Mbit/sec devices.

However, computers with USB3 tend to be newer and faster. Chipsets with USB3 might have improvements in their USB2 controllers, especially relating to how the USB2 EHCI controller gets bus master access to the PC's memory, how it interacts with the processor's cache, and whether it implements any caching (EHCI has a special "doorbell" handshake specifically to allow controllers to do more caching of the system memory they're repeatedly accessing). Improvements in the near-end-of-frame bandwidth calculations could also allow a better controller to squeeze more packets into the space just before the EOF, where simpler/cheaper controllers might leave the line idle. The EHCI spec leaves quite a lot of flexibility to the hardware implementation. Even though it's all still USB2, there are many ways different USB2 host controllers may not be created equal.

But one thing you can know with certainty is USB 2.0 devices running at 480, 12, & 1.5 Mbit/sec will *NEVER* have their communication sent over the 5 or 10 Gbps/sec USB 3 channel. There isn't anything like the Transaction Translators in USB2 (which convert 12 & 1.5 to 480) for the USB3 superspeed lines. Every USB3 hub has a USB2 hub built in, where all the USB2 devices communicate without any way to access the USB3 stuff.
 
Indeed - it won't magically become USB3 - but the hardware path involved as you show is newer and different. If only because of S .vs. M TT Hub, or where it hits hardware on the motherboard. I didn't actually test against my USB3 hub - but the USB2 Hub was slower by 25%+ than the direct USB3 port. Perhaps the same had I gone direct to USB2 port which I also didn't try - maybe my Amazon Basics Hub is just the 'slow' kind.
 
Status
Not open for further replies.
Back
Top