Mounting USB-B connector off-board in device enclosure. Is there a standard component for this?
It's quite often the case that you need to mount connectors to enclosures in a separate part from the main PCB, and there are a couple of options of doing this.


If you can get hold of connector of the correct type which is "Chassis Mount" or "Panel Mount", then you can go down that route. Typically these connectors mount into the case using some form of bolt or screw. You can get many switches in this form, but also quite a few standard connectors like USB and Ethernet along with barrel jacks. As an example:



For cases which are expected to be exposed to the elements or be otherwise used outside, typically you want to get one with a suitable IP rating. These tend to be bulkier but are more rugged.




The other option is you go for your chosen connector in a PCB mount variant and then make a small daughter board. Basically the board contains the connector, some mount holes for screwing it to the case or other support structure, and a second internal cable connection to go back to your main board. This is typically the sort of board you find in computer cases amongst others as it is usually the cheapest approach (chassis connectors can be pricy).

An example would be the front panel connection PCBs that are in most computer cases: