I'm designing a USB device that will act as a host all the time. Instead of using a mini-AB OTG receptacle i'd like to use a classic female A receptacle on the PCB. Is this allowed and can this potentially cause problems?

Clarification: I'm asking this question because I have a device where I would like to use the OTG functionality, i.e. give the user the possibility to hook it up to the computer OR to a peripheral, but I can't use the mini/micro OTG connectors and want to use classic USB A and B connectors. Ideally I would want the OTG port to be able to communicate both as a device and a host but that is probably impossible (?) so if I can find a way to allow the user to EITHER connect the device as a host or as a device using ONE of the two ports, that would be enough.

Clarification #2: I primarily want to use the OTG port as a host port, but if I can use it as a device port as well that is an extra feature on the device I'm working on which will make it more attractive. However, I do not want to use mini or micro connectors. I get that they are the new trend and all that and that they are great for smartphones and tablets but for the application I'm working on we can't and don't want to use them. I'd like to thank all who answered already whether I can use a type A host port. Any hints on how I could add a B port as well connected to the same OTG port, and let the user connect the product as a host or as a device, but not at the same time, but using a type A and B connector rather than a single micro or mini USB connector are very welcome. Confusion for the user is not an issue here since we can make that perfectly clear in the manual (e.g. you can use the host or device port but not at the same time - if you use the host port then the device port won't work or the other way around). Hope this makes it clear.

  • \$\begingroup\$ Why do you think it could be a problem? This is how it is on all host-only appliances. \$\endgroup\$
    – dim
    Oct 24, 2016 at 18:59
  • \$\begingroup\$ If your design is host only, all the time, why do you mention OTG in the headline? \$\endgroup\$ Oct 24, 2016 at 19:32
  • \$\begingroup\$ @AliChen because the SoC I'm using has an OTG port, and I want to make sure I don't cause any problems when I actually use a female USB-A connector with the port. \$\endgroup\$
    – b20000
    Oct 30, 2016 at 10:47
  • 1
    \$\begingroup\$ So you DO want to use your system/device as OTG, as a dual-role port. Then your clarification contradicts to your first sentence, "act as host all the time". Please make your mind, and re-formulate your question without contradictions. \$\endgroup\$ Oct 30, 2016 at 16:44
  • \$\begingroup\$ @AliChen I added a clarification to clear up the confusion. Thanks for pointing it out. \$\endgroup\$
    – b20000
    Nov 1, 2016 at 12:50

4 Answers 4


You can certainly use OTG hardware in the microcontroller to do a USB host only. You don't need to use the OTG extensions for anything. In fact, you shouldn't even mention anything about OTG. What you are doing is a host, and thus you should use a female A connector. And if you intend to connect to a USB flash memory, what other connector could you use? Traditional USB flash memories generally are always plugged to A connectors.

So go right ahead and use the female A connector. You're using it exactly as it's supposed to be used. Remember that you need to provide 5V power to the female A connector.

  • \$\begingroup\$ thanks, what if I want to connect both a USB A and B connector (classic style) to the OTG port, and allow the user to use one of the two to either connect the device to his/her computer or connect a peripheral like a mouse to the device? In that case, the OTG port can probably only function as either host or device but not at the same time? is there a way to do this correctly electrically? On the SoC I can configure the OTG port to be a host (i.e. force it). The reason I'm asking is that I like the OTG functionality but hate the mini/micro connectors, in our application those are a problem. \$\endgroup\$
    – b20000
    Oct 30, 2016 at 10:49
  • \$\begingroup\$ @b20000: That's what the ID pin is for, so you can't get away from the 5-pin connectors for that. \$\endgroup\$ Oct 30, 2016 at 17:07
  • \$\begingroup\$ @b20000, and how do you plan to prevent your customers from plugging two cables, from a host, and to a device, simultaneously? \$\endgroup\$ Oct 30, 2016 at 17:07
  • \$\begingroup\$ @AliChen perhaps using ti.com/lit/ds/symlink/ts3usb30.pdf ? with this i should be able to connect 2 connectors to the same OTG port, and then perhaps use the VBUS supplied on the type B connector to detect that something was plugged into it, switching the D+/D- to the type B port? default could be type A port connected. \$\endgroup\$
    – b20000
    Nov 1, 2016 at 13:17
  • \$\begingroup\$ @b20000, yes a USB mux can help to separate B from A physically and reduce customer's confusion. Technically you can do whatever you want. Here is an example of another, more complex and confusing device, superuser.com/questions/1136864/… \$\endgroup\$ Nov 1, 2016 at 16:45

The physical connector is not mandatory for it to work. It's mandatory to be in compliance, and to frankly not confuse the end user. If your device is going to be a full time host, regardless of its OTG capabilities, then go right ahead and use the full size USB A female connector. That's a perfectly legit use. In this case, the ID pin of your microcontroller should be permanently wired on your PCB for host mode, if you can't do it in your code.

  • 4
    \$\begingroup\$ USB Type-A does not have ID pin :-) \$\endgroup\$ Oct 24, 2016 at 19:04
  • 3
    \$\begingroup\$ To clarify, the microcontroller with OTG capability may have a ID pin that would need to be tied, if it's not handled in code. \$\endgroup\$
    – Passerby
    Oct 24, 2016 at 19:20
  • \$\begingroup\$ Also, one cannot be "in compliance" when using non-standard non-compliant connectors. So it is either micro-AB (mini-connectors are retired), or type-A receptacle. Or type-C. \$\endgroup\$ Oct 24, 2016 at 19:26
  • 1
    \$\begingroup\$ ok, I see that the OP has "OTG" in the title, which might mean that the main confusion is about what to do with the extra OTG functionality. Then your remark about ID pin is well in place. \$\endgroup\$ Oct 24, 2016 at 19:39
  • \$\begingroup\$ What about having two connectors and a sliding piece of plastic that only exposes one at a time? Would the standards allow a piece of equipment to be a conforming host when the slider is in a position that only exposes a type-A connector, and a conforming device when the slider is in a position that only exposes the type-B connector? I've seen computers do that with a 5-pin DIN and PS/2-style keyboard port. \$\endgroup\$
    – supercat
    Nov 16, 2022 at 0:09

Yes, the standard Type-A receptacle is still a standard way to have the USB host design.

However, the industry is moving towards Type-C connectors. The Type-C may look over-complicated at first, but you can elect to use a minimal Type-C configuration (USB2.0 only, CC pins 56k pullup) to provide the basic host functionality, yet to be fully USB compliant.

But if you do want to use OTG functionality (as per question clarification), it is not possible to accomplish this with Type-A receptacle, because the A-connector does not have the necessary ID pin to switch the function.

The OTG port has only two physical data wires, D+, and D-. The bus CANNOT BE DEVICE AND HOST SIMULTANEOUSLY! It either one, or another. Inside your MCU there are two different logical functions/controllers, a host controller, and a device controller. They SHARE a single USB PHY, by means of internal multiplexer of two different data paths.

However, you can put two USB connectors, Type-B receptacle, and type-A receptacle, connect D+/D- electrically in parallel, but use the VBUS from B-connector as OTG switch signal. This will constitute an ugly kluge, it contradicts every USB specification, and it will cause massive user confusion.

  • \$\begingroup\$ Of course it will be a major user inconvenience for a while, but Type-C will make your design look contemporary cool (and more expensive for you to make :-( ) \$\endgroup\$ Oct 24, 2016 at 19:20

Any hints on how I could add a B port as well connected to the same OTG port, and let the user connect the product as a host or as a device, but not at the same time, but using a type A and B connector rather than a single micro or mini USB connector are very welcome.

Afaict what you want to do in this case is

  1. Use a USB mux chip.
  2. use the VBUS line from the B connector as a control line.

When Vbus is present on the B connector you switch the MUX to the B connector and signal the processor to go into device mode (e.g. by driving it's ID pin high*).

When Vbus is not present on the B connector you switch the MUX to the A connector and signal the processor to go into host mode (e.g. by driving it's ID pin low*).

If the two sockets are close together, you don't care about compliance with standards and you trust your users not to plug in both cables at the same time you may be able to skip the mux chip.

* Watch the voltage level specifications for the ID input pin though, you probablly don't want to connect it directly to Vbus.


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.