What does the usb hub do? - Page 1
Forum section: electronics / beginners

author: eeguy
author_rank: Regular Contributor
timestamp: May 24, 2020, 01:35:29 pm
content: Hi, on the market there are some hubs that are powered and there are some they don't. I read that if I want to drive hard disks or power hunger devices, powered hub is recommended. Just curious:1. Given that usb devices are connected together either directly or indirectly to the laptop, why we need to supply power to the hub?2. Besides offering more ports, what is the purpose of hub? Does the number of hubs matter? Given that I need to drive several power hunger devices, what is the different between using 1 powered hub vs. 2 or more powered hubs?3. If one hub is powered and it is connected to other hubs and all these hubs are connected to power hunger devices. Do I need to power the other hubs or that one powered hub will share the power with the others?

author: ataradov
author_rank: Super Contributor
timestamp: May 24, 2020, 04:50:01 pm
content: 1. Because USB port on the laptop itself can only supply limited amount of power by itself. The power supply is not to power the hub, but to power the connected devices.2. Makes no difference as long as total consumption is within the specs of everything.3. All hubs that have high-power devices connected to them must be powered on their own.Each USB port has maximum current specification. Even if the hub is powered, you still can't draw more than a certain amount from each individual port. So connecting more hubs hoes not magically replicate that power to all ports of the new hub.

author: eeguy
author_rank: Regular Contributor
timestamp: May 24, 2020, 06:30:28 pm
content: Thank you.1. Buy limited amount of power, you mean limited current from your last statement. Please correct me if I am wrong.3. Supposing that I have two hubs each of which has four ports. Each port connects to four power hunger devices. In this case, what are the differences between the following two approaches? What are the pros and cons of each? Is approach b) not being able to provide as much current as approach a) and if I use the same fully charged batteries for each hub, approach b) can only supply half as much current as approach a)?a) separate power source for each hub (seems to be the one you suggested in 3)b) both hubs share the same power source.

author: ataradov
author_rank: Super Contributor
timestamp: May 24, 2020, 06:35:12 pm
content: Current. Voltage is fixed in USB (if you don't consider more recent standards, which are completely nuts). In USB 2.0 each port can supply up to 500 mA.If you have 4 ports, each consuming 500 mA, you would need a 2 A power supply. If you share it between the hubs, it would need to be 4 A power supply. If your power supply can deliver 4 A, then there should be no issues sharing it between the hubs.

author: Nusa
author_rank: Super Contributor
timestamp: May 24, 2020, 06:40:17 pm
content: https://en.wikipedia.org/wiki/USB_hardware#Power

author: eeguy
author_rank: Regular Contributor
timestamp: May 24, 2020, 06:45:32 pm
content: Quote from: ataradov on May 24, 2020, 06:35:12 pmThanks. Since for LIPO less mAh means smaller and lighter, perhaps better to use two smaller mAh but higher C value LIPO for each hub rather than one big mAh but smaller C value LIPO shared by more than a hub? Since all the devise are somehow connected either directly or indirectly, will there be issues if the batteries are of different capacities? Perhaps better charge them at the same time?

author: ataradov
author_rank: Super Contributor
timestamp: May 24, 2020, 06:47:55 pm
content: What batteries? There is no configuration where you directly connect batteries to the USB. Also mA and mAh is not the same thing.

author: Nusa
author_rank: Super Contributor
timestamp: May 24, 2020, 07:10:40 pm
content: Sounds like you might be confusing USB charging ports that can deliver 1 or 2 amps (something industry did outside of the USB spec) with computer USB ports that are only required to deliver 500 milliamps. You only use USB hubs with computer ports, since that's the specification they're designed for.

author: Raj
author_rank: Frequent Contributor
timestamp: May 25, 2020, 04:27:54 am
content: sounds like an xy problemhttp://xyproblem.info/(got the link from some other eevblog user...Thank you )

author: eeguy
author_rank: Regular Contributor
timestamp: May 25, 2020, 11:28:47 am
content: Quote from: ataradov on May 24, 2020, 06:47:55 pmThanks.I mean LIPO batteries that can charge devices through a usb cable.Yes, I was talking about mAh. If I recall correctly, the larger the mAh the larger and heavier the batteries while larger C means higher discharge rate. So if I don't like heavy batteries and I only use the devices for a short period of time, I wonder if it is better to get two smaller batteries with smaller mAh and larger C rather than one larger mAh battery with smaller C.

author: Nusa
author_rank: Super Contributor
timestamp: May 25, 2020, 12:58:31 pm
content: So long as whatever you select meets the demand of the devices you haven't specified, you're the only one who can decide what's best for you.

author: ataradov
author_rank: Super Contributor
timestamp: May 25, 2020, 05:20:15 pm
content: Can you actually describe what are you doing? The whole conversation about battery capacity is pointless, you don't connect batteries directly to the USB connector. There is usually a boost converter with a regulator. And this changes things a lot.So read that XY problem site, and describe your actual final goal.

author: eeguy
author_rank: Regular Contributor
timestamp: May 25, 2020, 05:26:14 pm
content: Quote from: ataradov on May 24, 2020, 06:35:12 pmHello, what are you referring "it" to when you wrote "If you share it between the hubs..."? Could you please explain why 4A?

author: ataradov
author_rank: Super Contributor
timestamp: May 25, 2020, 05:28:35 pm
content: Quote from: eeguy on May 25, 2020, 05:26:14 pmI meant the power supply. And 4A is the current it should be able to deliver to fully power 8 USB ports.

author: eeguy
author_rank: Regular Contributor
timestamp: May 27, 2020, 06:51:17 pm
content: Thanks. I have a usb hard drive that requires plugging in of two usb cables from a laptop. Very inconvenience.Now I am considering a project to control many motors from a PC. I know that the USB port is not powerful enough to drive the motors. I will use LIPO batteries. What are the pros and cons of the following power distribution approaches:1) PC to USB adapter to a central hub with X ports. Each of the X ports connects to a separate smaller hub that has Y ports. Each of the Y ports connect to some motors. For example, if X is 4 and Y is 2, there will be four smaller hubs each has 2 ports.2) PC to USB adapter to a smaller hub with Y ports. Each of the Y ports connects to a larger hub which in terms connects to some motors.

author: ataradov
author_rank: Super Contributor
timestamp: May 27, 2020, 06:56:49 pm
content: What does motor power has to do with USB power? You can power the control MCUs from the USB and they will control the power to the motors from the battery. Use whatever configuration of hubs you like, it does not matter.

author: eeguy
author_rank: Regular Contributor
timestamp: May 27, 2020, 07:26:34 pm
content: Thanks. No relation between motor power and usb power. In 2), will there be different between supplying external power to the smaller central hub from supplying individual external power separately to each of the larger hubs?

author: ataradov
author_rank: Super Contributor
timestamp: May 27, 2020, 07:31:24 pm
content: You don't need powered hubs for that. If all you are attaching is just a few MCUs controlling motors, then you should be fine with a plain port power.

author: Raj
author_rank: Frequent Contributor
timestamp: May 28, 2020, 04:36:42 pm
content: Quote from: eeguy on May 27, 2020, 06:51:17 pmHopefully, you'll post us a schematic so we can mitigate some explosions from happening.