2
\$\begingroup\$

I'm designing a makeshift mouse clicker using an RP2040 microcontroller. To keep this small and concise, I'm using a USB Type-A Male connector on the PCB to connect to the PC directly. From what I read, the RP2040 uses USB Full Speed (USB-FS). I have a few questions regarding the routing of the USB signal.

  1. Firstly, my PCB assembly manufacturer does not have a USB2.0 male connector in stock and only has USB3.0 connector. Can I use that and leave the other pins unconnected?

  2. The DP and DM pins of the RP2040 are not aligned to the USB connector, so I have to cross them. What is the best way to do this?

    a. Option 1 (Through the termination resistor) - Track length difference = -33mil enter image description here

    b. Option 2 (Through vias) - Track length difference = 0mil enter image description here

  3. How do I calculate what is the necessary trace width and length required for the signal? I plan to use the the standard 1.6mm FR4 board.

  4. I understand there needs to be a ground pour under signals. In the case of option B, do I put a ground pour on top and the bottom of the signals?

Any further suggestions on the routing will be much appreciated. Thank you in advance.

\$\endgroup\$
2
  • \$\begingroup\$ 1.6mm board, but how many layers? \$\endgroup\$
    – Justme
    Commented Jun 14, 2022 at 17:01
  • \$\begingroup\$ @Justme Two layers \$\endgroup\$
    – Max
    Commented Jun 15, 2022 at 1:23

2 Answers 2

2
\$\begingroup\$

For USB FS stubs of an inch length – what you seem to be showing – it doesn’t matter much what you do in terms of impedance. Just route the traces close together over a ground plane and all is good.

\$\endgroup\$
1
\$\begingroup\$
  1. USB connectors are compatible. If you use USB 3.0 but use only USB 2.0 pins, it is equivalent to plugging a USB 3 device to USB 2 socket, or plugging USB 2 device to USB 3 socket.

  2. "Best" way depends on what options and limitations you have and what you are willing to do to get good results. Your option 2 does not looks like how differential pairs should be routed so it might be worse than option 1. Better options may exist. USB chip manufacturers have made application notes what are the best practices when designing PCBs with USB. For example, you could put the IC or the connector to bottom layer, so you don't need to swap the pins and can avoid the extra pair of vias between top and bottom layers.

  3. You typically use a PCB trace width calculator to get correct trace geometry for the transmission line impedance USB requires. However, if I recall correctly, it is unlikely that a two-sided 1.6mm board ends up having reasonable trace geometry. If you can put the MCU close to connector, it may not matter much. The USB application notes that are available address this issue too.

  4. Yes, even if you switch layers there must always be a reference plane under the transmission line.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for the very helpful reply. I can't place the MCU on the bottom as I'm using a single-sided assembly. Is there a reason why option 2 is worst? Are there any problems with crossing the signals like so in option 1? \$\endgroup\$
    – Max
    Commented Jun 15, 2022 at 1:25

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.