gokul/usb3-sd-hub

Engineering draft: four-layer, computer-powered USB 3 hub with one USB-C host socket, two USB-C and two USB-A accessory sockets, and a full-size SD slot. Board and three schematic previews are available. Routing and production checks are incomplete; not fabrication ready.

Version
0.1.5
License
MIT
Stars
0

imports/UsbAReceptacle.tsx

import { Fragment } from "react";
import type { ConnectorProps } from "@tscircuit/props";
import { placementFor } from "../design/placement";
import { usbAModel, usbAPins } from "../design/connector-models";

// Amphenol GSB311131HR, recommended top-view PCB layout, rev B2.
// Origin at the centre of USB2 contact row; mating direction is local -Y.
export const UsbAReceptacle = (props: ConnectorProps) => (
	<connector
		allowOffBoard
		isSmt={false}
		cadModel={{
			jscad: usbAModel,
			modelOriginPosition: { x: 0, y: -0.775, z: 0 },
			zOffsetFromSurface: 0,
		}}
		footprint={
			<footprint>
				{usbAPins.map((pin) => (
					<Fragment key={pin.pin}>
						<platedhole
							portHints={[`pin${pin.pin}`]}
							shape="circle"
							pcbX={pin.x}
							pcbY={pin.y}
							holeDiameter={0.7}
							outerDiameter={1.2}
						/>
					</Fragment>
				))}
				{[-6.57, 6.57].map((x) => (
					<Fragment key={x}>
						<platedhole
							portHints={["pin10"]}
							shape="circle"
							pcbX={x}
							pcbY={-2}
							holeDiameter={2.3}
							outerDiameter={3.3}
						/>
					</Fragment>
				))}
				<courtyardrect pcbY={-5.53} width={16.94} height={17.5} />
				<fabricationnoterect pcbY={-5.53} width={14.4} height={16.5} />
				<silkscreenpath
					route={[
						{ x: -7.35, y: -13.93 },
						{ x: 7.35, y: -13.93 },
					]}
					strokeWidth={0.12}
				/>
				<silkscreentext pcbY={4.1} text={props.name ?? ""} fontSize={0.7} />
			</footprint>
		}
		{...props}
		{...placementFor(props.name)}
	/>
);