SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By chrisjx
#157185
I'm starting a project where we'll be adding a pre-designed daughter board onto our main board. It has 2 USB devices (each with their own USB ports). On our main board, we'll have an Arduino Micro. That makes 3 usb devices...

Anyway, I'm investigating USB Hub chips. It seems there are some chips out there that can provide a single downstream port; and 4 upstream ports.

Would love any advice about how to approach this. I'm sure some will say, "just buy a hub", but that would mean yet another PCB in the mix. Eventually I suspect we'll distill this down to one PCB.

Here's one of the chips from TI:
http://www.ti.com/lit/ds/symlink/tusb2046b.pdf

Page 11 has a basic diagram...

The kind of issues I'm wondering is how deep into the USB protocol does one need to go in order to implement one of these. Programming required to set up the eprom with USB port info. How about the drivers for Linux?

Any advise would be appreciated. Thanks.
User avatar
By CircuitBurner
#157192
Use of this chip would be a simple, easy way to stay form-compliant to USB standards while having to provide load balancing and power supply to a variable set of possible peers.
If the set of connected devices present an appreciable load regarding signal traffic, the presence of this chip and its host oscillator (6mhz crystal) determine signal timing across multiple paths, reducing collision much the way network switches would....although the signals wouldnt be unitized in package form such as ethernet packets like the switch would handle.
Apparently, as in the specs, use of these chips for downstream load handling provides node addressing, thus offering the ability to have multiple layers or tiers for timed signal handling. (intelligent pecking order)
If your complete set of devices that get interconnected do not have much requirement for signal load balancing (addressing) or power supplied via the bus itself, a dedicated USB controller like this wouldnt be mandatory... as long as there is a host controller at the end that can provide any addressing and power supply needed for passive device interconnection. (ie- 2 or 3 conventional ball-mice or joysticks not loading the host-supply side)
I have built low load interconnect for passive, low traffic overhead USB devices before that joined at the end to a PC USB port without needing serialized addressing chips like this before...but that itself created limitations in what exactly I could do with the combination of possible devices.
Chips like this give you mission flexibility for USB bus interconnects, because of the serial addressing and power load leveling it offers, plus of course the way it would become a signal buffer effectively extending physical distances bus connected devices could have between them. (the chip acts as a repeater)
Also, this controiler chip is from Texas, and if it senses an inferiority complex in the designer/engineer, it might create artificial problems in functionality just to screw with you. Just go into this with an attitude of 'Im gonna kick your *** and make you spill your magic smoke spirits' to mitigate this kind of interoperability conflict. :hand:
By chrisjx
#157319
Thanks, CircuitBurner, for your words of encouragement. I'll stare back and never flinch. I realize it could be a complicated part of my project but I won't let that scare me. Perseverance furthers...

The devices on the daughter board probably won't draw much power nor will they likely demand much bandwidth. The ATmega32u4 (arduino micro) on the main board will probably be more demanding. The TI reference designs show how to manage over-current and transient events with, surprise, more TI chips. I'm not sure if all these extra parts will be needed for our simple requirements.

I looked at the PCB of a simple 4 port hub and it had an Alcor chip and half a dozen smt resistors and caps. I think that's all we should need.
By MichaelN
#157385
You should be fine using one of these chips by just using the manufacturer's reference designs. Make sure you follow any recommendations for board layout etc, as there are high frequencies involved.
By falingtrea
#157418
SMSC (now part of Microchip) has some USB 2.0 and 3.0 hub chips. Usually the chips are desoigned per the USB spec and need no additional firmware loaded. USB hub driver is generic and will usually work with any hub.