0
\$\begingroup\$

I am building a device that connects to a Smartphone over USB C (USB 2.0). The phone can be plugged in in two different locations (basically landscape or portrait mode) and I want an USB plug in both locations, but the backend device (an ATMega32u4 based board) that I have only has one USB port. It is only possible to connect the phone to one of the two ports at any given time.

This device is only for my personal use, so it doesn't need to be fool-proof on this.

My question is, would it be possible to splice two USB-C plugs to the USB cable coming from the ATMega?

Each of the three parts of the cable would be about 10cm long.

The device is handheld, so there is not too much space for stuff like adaptors or connectors.

Is there anything I have to watch out for concerning shielding, reflections or anything like that?

\$\endgroup\$
10
  • 1
    \$\begingroup\$ get a 2 to 1 adapter - avoids shielding issues... \$\endgroup\$
    – Solar Mike
    Commented Jun 20, 2018 at 6:29
  • \$\begingroup\$ @SolarMike: It's going to be a handheld device, I don't have space for connectors or adaptors... \$\endgroup\$
    – Dakkaron
    Commented Jun 20, 2018 at 9:42
  • 1
    \$\begingroup\$ Well, how were we meant to know? Personal does not always mean handheld... \$\endgroup\$
    – Solar Mike
    Commented Jun 20, 2018 at 9:50
  • \$\begingroup\$ You are right, it is additional information that I didn't initially provide. I added it to the post. \$\endgroup\$
    – Dakkaron
    Commented Jun 20, 2018 at 10:03
  • \$\begingroup\$ Then yes, you can splice the cables. May I recommend using a "right angle" style connector to create a less bulky design \$\endgroup\$
    – MIL-SPEC
    Commented Jun 20, 2018 at 10:13

1 Answer 1

1
\$\begingroup\$

Ok, after clarification, it seems that the idea is to have two USB ports for a single USB device (pad controller). A host (smartphone), when plugged into different ports, would have two different display modes.

The question is if it is possible just to fork the single device port into two separate ports. The major concern here must be about impedance mismatches and reflections that might destroy signal shapes. Since the USB device is a FS-only device, I made quick LTspice simulation of the suggested transmission line configuration, with typical FS waveform shape - 80 ns pulses, with 5 ns edge rate, for two cases - transmission from device to host, and in opposite direction. Here is what would occur when the device has the fork (4" at 150 ps/inch = 600 ps propagation time) in the same 4" proximity, with a 40-cm cable to host:
enter image description here

and in the opposite direction: enter image description here

V(out) is the waveform at destination point.

The bottom line is that a 10-cm (4") fork doesn't affect full-speed waveform to any dangerous degree. However, I see no much reason why the two ports should be separated by 10 cm, they could be sitting side-by-side, so no question would arise for ports at such short proximity.

More important question for the idea is, how the host (phone) would know the difference between two ports. The only way I see is that plugging a host into different port would apply VBUS to that port, which should be sensed by "backend device", and the device will alter its descriptors (or PID/DID), so the host may be able to discriminate between ports and engage corresponding display mode. It looks like quite a complicated solution to a simple problem of display orientation control.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks, you gave me all the information I needed! The reason why I need two ports is not so the phone can detect the orientation (that's an easy task that the phone can do by itself). The phone lies flat within the controller (similar to the Moto Mod Gamepad), but I want to be able to use the phone for both landscape and portrait mode games. The center of gravity needs to be in roughly the same location for both display modes, so the USB socket of the phone is in a very different location depending on it's orientation. That's what I need two plugs for, so that I can plugin the phone either way \$\endgroup\$
    – Dakkaron
    Commented Jun 22, 2018 at 21:03

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.