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
sheets/SdReader.tsx
import { SchematicNote } from "../components/SchematicNote";
import { SdBypass } from "../components/Decoupling";
import { placementFor } from "../design/placement";
import { SdSocket } from "../imports/SdSocket";
import { TPS2553DBVR } from "../imports/TPS2553DBVR";
import { readerPinLabels, sdPinLabels } from "../design/pinouts";
import { Passives, Indicator, type PassiveSpec } from "../components/Passives";
import { EsdBank } from "../components/EsdBank";
const parts: PassiveSpec[] = [
{
name: "R_SD_CTRL",
kind: "resistor",
rating: "10k",
pcbX: -16,
pcbY: -13,
from: "VDD33",
to: "PWR5",
},
{
name: "R_SD_ILIM",
kind: "resistor",
rating: "43.2k",
pcbX: -16,
pcbY: -14.5,
from: "SD_ILIM",
to: "GND",
},
{
name: "C_SD_IN",
kind: "capacitor",
rating: "1uF",
pcbX: -16,
pcbY: -16,
from: "VDD33",
to: "GND",
},
{
name: "C_SD_MAIN",
kind: "capacitor",
rating: "10uF",
footprint: "0805",
pcbX: -12,
pcbY: -22,
from: "SD_VDD33",
to: "GND",
},
{
name: "C_SD_18",
kind: "capacitor",
rating: "1uF",
pcbX: -11.5,
pcbY: -18,
from: "SD_VDD18",
to: "GND",
},
{
name: "C_SD_PLL",
kind: "capacitor",
rating: "1uF",
pcbX: -9,
pcbY: -10.5,
from: "SD_VDD18PLL",
to: "GND",
},
{
name: "C_SD_33A",
kind: "capacitor",
rating: "4.7uF",
footprint: "0603",
pcbX: -10,
pcbY: -10.5,
from: "SD_VDD33",
to: "GND",
},
{
name: "C_SD_33B",
kind: "capacitor",
rating: "4.7uF",
footprint: "0603",
pcbX: -11.5,
pcbY: -14,
from: "SD_VDD33",
to: "GND",
},
{
name: "R_SD_BIAS",
kind: "resistor",
rating: "12k",
pcbX: -6,
pcbY: -10.5,
from: "SD_RBIAS",
to: "GND",
},
{
name: "R_SD_RESET",
kind: "resistor",
rating: "10k",
pcbX: -4,
pcbY: -23,
from: "SD_VDD33",
to: "SD_RESET_N",
},
{
name: "C_SD_RESET",
kind: "capacitor",
rating: "100nF",
pcbX: -2,
pcbY: -23,
from: "SD_VDD33",
to: "GND",
},
{
name: "R_SD_VBUS1",
kind: "resistor",
rating: "100k",
pcbX: -1,
pcbY: -10,
from: "VBUS_HUB",
to: "SD_VBUS_DET",
},
{
name: "R_SD_VBUS2",
kind: "resistor",
rating: "200k",
pcbX: 1,
pcbY: -10,
from: "SD_VBUS_DET",
to: "GND",
},
{
name: "C_SD_X1",
kind: "capacitor",
rating: "18pF",
pcbX: -10,
pcbY: -26,
from: "SD_XTAL1",
to: "GND",
},
{
name: "C_SD_X2",
kind: "capacitor",
rating: "18pF",
pcbX: -4,
pcbY: -26,
from: "SD_XTAL2",
to: "GND",
},
{
name: "R_SD_CLK",
kind: "resistor",
rating: "22",
pcbX: -14,
pcbY: -10,
from: "SD_CLK",
to: "SD_CLK_SOCKET",
},
{
name: "C_CARD",
kind: "capacitor",
rating: "10uF",
footprint: "0805",
pcbX: -18,
pcbY: -10,
from: "CRD_PWR",
to: "GND",
},
{
name: "C_CARD_HF",
kind: "capacitor",
rating: "100nF",
pcbX: -20,
pcbY: -10,
from: "CRD_PWR",
to: "GND",
},
{
name: "R_CARD_CD",
kind: "resistor",
rating: "47k",
pcbX: -34,
pcbY: -10,
from: "SD_VDD33",
to: "SD_CD_N",
},
{
name: "R_CARD_WP",
kind: "resistor",
rating: "47k",
pcbX: -32,
pcbY: -10,
from: "SD_VDD33",
to: "SD_WP",
},
{
name: "R_EEP_SDA",
kind: "resistor",
rating: "4.7k",
pcbX: 0,
pcbY: -17,
from: "SD_VDD33",
to: "SD_EEP_SDA",
},
{
name: "R_EEP_SCL",
kind: "resistor",
rating: "4.7k",
pcbX: 2,
pcbY: -17,
from: "SD_VDD33",
to: "SD_EEP_SCL",
},
{
name: "C_EEP",
kind: "capacitor",
rating: "100nF",
pcbX: 4,
pcbY: -17,
from: "SD_VDD33",
to: "GND",
},
...["SD_D0", "SD_D1", "SD_D2", "SD_D3", "SD_CMD"].map(
(signal, index): PassiveSpec => ({
name: `R_PULL_${signal}`,
kind: "resistor",
rating: "47k",
pcbX: -28 + index * 2,
pcbY: -12,
from: "CRD_PWR",
to: signal,
}),
),
];
export const SdReader = () => (
<schematicsheet
name="Full-size SD Reader"
sheetIndex={2}
sheetWidth="841mm"
sheetHeight="594mm"
>
<group
pcbAnchorAlignment="center"
pcbX="0mm"
pcbY="0mm"
pcbLayout={{ layoutMode: "none" }}
schAutoLayoutEnabled
>
<group
pcbAnchorAlignment="center"
pcbX="0mm"
pcbY="0mm"
pcbLayout={{ layoutMode: "none" }}
schTitle="Full-size SD / SDHC / SDXC; internal USB 2.0 card reader"
schGrid
gridCols={2}
gridGap={6}
>
<schematicbox
name="SD_READER"
chipRef=".U_SD"
width={6}
height={6}
title="USB2642: 3.3 V SD/MMC reader; 24 MHz clock"
pinLabels={readerPinLabels}
/>
<SchematicNote
chipName="SD_READER"
text={
"USB2642 SD / SDHC / SDXC reader\nUSB 2.0; 3.3 V supply; 24 MHz"
}
/>
<SdSocket
name="J_SD"
manufacturerPartNumber="DM1AA-SF-PEJ(82)"
pcbX={-25}
pcbY={-20}
pinLabels={sdPinLabels}
connections={{
DAT3: "net.SD_D3",
CMD: "net.SD_CMD",
VSS1: "net.GND",
VDD: "net.CRD_PWR",
CLK: "net.SD_CLK_SOCKET",
VSS2: "net.GND",
DAT0: "net.SD_D0",
DAT1: "net.SD_D1",
DAT2: "net.SD_D2",
CD: "net.SD_CD_N",
WP: "net.SD_WP",
SWITCH_COMMON: "net.GND",
SHIELD1: "net.GND",
SHIELD2: "net.GND",
SHIELD3: "net.GND",
SHIELD4: "net.GND",
}}
/>
<TPS2553DBVR
name="U_SD_POWER"
pcbX={-15}
pcbY={-18}
connections={{
IN: "net.VDD33",
GND: "net.GND",
EN: "net.PWR5",
FAULT: "net.PWR5",
ILIM: "net.SD_ILIM",
OUT: "net.SD_VDD33",
}}
/>
<chip
name="U_SD_RESET"
manufacturerPartNumber="TLV803EA29DBZR"
footprint="sot23"
pcbX={-1}
pcbY={-26}
pinLabels={{ pin1: "GND", pin2: "RESET_N", pin3: "VDD" }}
pinAttributes={{
pin1: { requiresGround: true },
pin3: { requiresPower: true, requiresVoltage: "3.3V" },
}}
connections={{
GND: "net.GND",
RESET_N: "net.SD_RESET_N",
VDD: "net.SD_VDD33",
}}
{...placementFor("U_SD_RESET")}
>
<SchematicNote
text={"Reader supply supervisor\n2.9 V threshold; active-low reset"}
/>
</chip>
<crystal
name="Y_SD"
pinVariant="four_pin"
frequency="24MHz"
loadCapacitance="12pF"
footprint="crystal_w3.2mm_h2.5mm_4pin"
manufacturerPartNumber="ABM8-24.000MHZ-12-1-U-T"
pcbX={-7}
pcbY={-23.5}
connections={{
pin1: "net.SD_XTAL1",
pin2: "net.GND",
pin3: "net.SD_XTAL2",
pin4: "net.GND",
}}
{...placementFor("Y_SD")}
/>
<chip
name="U_SD_EEPROM"
manufacturerPartNumber="24LC04BT-I/SN"
footprint="soic8"
pcbX={4}
pcbY={-21}
pinAttributes={{
pin4: { requiresGround: true },
pin8: {
requiresPower: true,
requiresVoltage: "3.3V",
requiredVoltageTolerance: "10%",
},
}}
pinLabels={{
pin1: "A0",
pin2: "A1",
pin3: "A2",
pin4: "GND",
pin5: "SDA",
pin6: "SCL",
pin7: "WP",
pin8: "VCC",
}}
connections={{
A0: "net.GND",
A1: "net.GND",
A2: "net.GND",
GND: "net.GND",
WP: "net.GND",
VCC: "net.SD_VDD33",
SDA: "net.SD_EEP_SDA",
SCL: "net.SD_EEP_SCL",
}}
{...placementFor("U_SD_EEPROM")}
>
<SchematicNote
text={"Reader configuration storage\n4 Kbit; 2.5–5.5 V supply"}
/>
</chip>
</group>
<Passives parts={parts} />
<SdBypass />
<EsdBank
prefix="SD"
signals={[
"SD_CMD",
"SD_CLK_SOCKET",
"SD_D0",
"SD_D1",
"SD_D2",
"SD_D3",
]}
pcbX={-29}
pcbY={-3.8}
/>
<Indicator name="LED_SD_POWER" net="CRD_PWR" pcbX={-36} pcbY={-3} />
<resistor
name="R_CARD_LED"
manufacturerPartNumber="RC0402FR-072K2L"
{...placementFor("R_CARD_LED")}
resistance="2.2k"
footprint="0402"
pcbX={-36}
pcbY="0mm"
connections={{ pin1: "net.SD_VDD33", pin2: "net.CARD_LED_A" }}
/>
<led
name="LED_CARD_PRESENT"
{...placementFor("LED_CARD_PRESENT")}
color="blue"
footprint="0603"
manufacturerPartNumber="LTST-C190TBKT"
pcbX={-33}
pcbY="0mm"
connections={{ anode: "net.CARD_LED_A", cathode: "net.SD_CD_N" }}
/>
</group>
</schematicsheet>
);