I'm designing a PCB for an astronomical observatory which needs several Arduino Micro to control different devices. Since the circuit must fit a very small space, I'm putting an onboard USB hub to connect all the three ATMega32U4 (instead of putting 3 full Arduinos, hub and USB cables). There will be one micro USB connected to the PC. Something like this:


However, I'm confused about:

  1. How to connect the various D+ and D- pins of the AVRs with the DP and DM pins of the Genesys GL850G USB 2.0 Hub Controller I'm using. Which shall be connected where? (I fear exchanging them)
  2. Whether or not I really need all the capacitors, ferrite filters and inductors shown in this example of GL850G usage: what are they used for? Why so many capacitors in parellel on the 3v3 line instead of one bigger capacitor? And why is +3.3V needed?
  3. Is this a valid circuit for a simple ATMega34U4? Same here, why so many capacitors in parallel (between VCC, AVCC and GND)?
  4. The hub and the whole circuit shall be powered by a bigger 5V power supply instead of the USB standard 500mA. Is it a good practise if I just leave unconnected the PC USB power and give the circuit another +5V?
  • 2
    \$\begingroup\$ This really seems to be the wrong approach to your problem. There doesn't appear to be anything here that a single MCU couldn't handle. Instead of messing with multiple CPUs and a USB hub, you should instead invest your time into combining the "sketches" into one MCU, possibly using a simple I/O expander if needed. \$\endgroup\$
    – Dave Tweed
    Jul 8, 2020 at 14:10
  • \$\begingroup\$ I wish I could do it! Unfortunately, astronomical softwares need each device to have a separate serial port, therefore a separate Arduino. E.g. COM1 for focuser, COM2 for power control, etc \$\endgroup\$ Jul 8, 2020 at 14:20
  • 1
    \$\begingroup\$ So use a Cortex M with 3 serial inputs? Any standard Cortex M0 got the processing power of some 100 crappy Arduinos... \$\endgroup\$
    – Lundin
    Jul 8, 2020 at 14:33
  • \$\begingroup\$ Would just make things worse, at that point I would need 3 USB-to-serial adapters and still the USB hub \$\endgroup\$ Jul 8, 2020 at 14:39
  • \$\begingroup\$ Unless there is a ARM processor with 3 USB native ports, which I really doubt. And I also need EEPROM, which isn't available on Cortext MCUs \$\endgroup\$ Jul 8, 2020 at 14:40

2 Answers 2


Here are my answers, although there is no reason to use a USB hub and three separate MCUs. There are MCUs that have enough endpoints to provide three COM ports over a single USB connection. There are USB UART chips that provide four UARTs over a single USB connection.

  1. One pair with DPx and DMx is one port. So DP0/DM0 pair is for one port, DP1/DM1 is for second port, and DP2/DM2 is for third port, etc. Port 0 is for upstream PC connection, and the rest of the ports are for downstream connections.

2&3) They are bypass capacitors. In short, yes, they are all needed, no they cannot be replaced by single larger capacitor somewhere far away. USB is a high speed signal, and the MCU runs at frequency of several MHz, so the chips need stable supplies when short bursts of current are needed. There are tons of info available on bypass caps.

  1. Sure, you can provide power only from the adapter, so that PC supply is not used. Hub chip datasheet or application notes may contain information how to do this.
  • \$\begingroup\$ So something like this FT4232H would make the trick I think! Yeah I understand about the pairs, but DP from the hub goes to D- or D+ of the MCU? That's what I'm trying to figure out. Thank you! \$\endgroup\$ Jul 8, 2020 at 19:32
  • \$\begingroup\$ Basically D+ sounds like it's a TX signal and therefore should go the RX pin of the hub, but I don't know if that is DP or DM. Of course regarless of which DP or DM, I know the choice is mine. \$\endgroup\$ Jul 8, 2020 at 19:35
  • \$\begingroup\$ @marcocipriani01 USB is differential with pair of positive and negative signal. DP/D+ goes to DP/D+, and DM/D- goes to DM/D- so there is no RX or TX. Don't do things based on how they sound, if you are unsure, you can always do some basic research about the subject. \$\endgroup\$
    – Justme
    Jul 8, 2020 at 20:00
  • \$\begingroup\$ Great, thanks again! \$\endgroup\$ Jul 8, 2020 at 20:07
  1. The first question would be guessing, so I leave that to (electronics) professional people.
  2. The capacitors are used to have some small 'energy storage' to compensate fluctuations. The Ferrite beads/inductors are used to improve EMI/high frequency reduction. It seems the analog part of the GL850G uses 3.3V.
  3. These capacitors are for the same reason as in 2. These are called bypass capacitors, sometimes multiple values are used.
  4. In principle it does not matter where the voltage comes from, but connect all GND's together.
  • 1
    \$\begingroup\$ Great, bypass capacitors make sense. I'll try to investigate about the choice of their values. \$\endgroup\$ Jul 8, 2020 at 14:04
  • \$\begingroup\$ The values are normally advised upon in the datasheet(s) \$\endgroup\$ Jul 8, 2020 at 14:08
  • 1
    \$\begingroup\$ As for question 1. AVR1 to DP0/DM0, AVR2 to DP1/DM1 and AVR3 to DP2/DM2. Or any other permutation \$\endgroup\$
    – Swedgin
    Jul 8, 2020 at 14:55
  • 1
    \$\begingroup\$ Your selection sounds right, however it does not matter which AVR goes to which hub port. Like the same way it does not matter which device you plug into which port of a standard USB hub or a PC. It's just that a pair of a single port must be connected to a single AVR, you obviously can't use DP3 with DM1. \$\endgroup\$
    – Justme
    Jul 8, 2020 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.