pixalynx/usb3-hub-10g
A USB 3.2 Gen 2 six-port hub board with USB-C PD power input, regulated 5 V/3.3 V/1.15 V rails, one upstream and four protected downstream USB-A/USB-C ports, SuperSpeed muxes, ESD protection, and controlled port power.
- Version
- 0.0.1
- License
- unset
- Stars
- 0
parts/Power.tsx
import type { ChipProps } from "tscircuit"
import { JlcFootprint } from "../lib/jlc"
import { CAD } from "../lib/cad-models"
/** Power-path parts. Pin tables are JLC's symbols (scripts/jlc-part.py), checked against each datasheet in
* research/. Footprints are JLC's own land patterns (lib/jlc-footprints.json). */
/** Hynetek HUSB238_002DD USB PD sink, DFN-10 3x3 (research/husb238.txt): VSET open = 20 V, ISET sets the
* minimum current; GATE is an open-drain PMOS driver (on at POR on the _002 variant). */
export const husb238Pins = {
pin1: ["VIN"], pin2: ["DP"], pin3: ["DM"], pin4: ["CC1"], pin5: ["CC2"], pin6: ["SDA"], pin7: ["SCL"], pin8: ["VSET"], pin9: ["ISET"], pin10: ["GATE"], pin11: ["GND"],
} as const
export const Husb238 = (props: ChipProps<typeof husb238Pins>) => (
<chip {...props} manufacturerPartNumber="HUSB238_002DD" supplierPartNumbers={{ jlcpcb: ["C7471904"] }} pinLabels={husb238Pins}
footprint={<JlcFootprint part="husb238" />} cadModel={CAD.husb238} schWidth={1.4} schHeight={1.2}
schPinArrangement={{ leftSide: { direction: "top-to-bottom", pins: ["VIN", "CC1", "CC2", "DP", "DM", "GND"] }, rightSide: { direction: "top-to-bottom", pins: ["GATE", "VSET", "ISET", "SDA", "SCL"] } }}
pinAttributes={{ VIN: { requiresPower: true }, GND: { requiresGround: true } }} />
)
/** TI TPS56A37RPAR 4.5-28 V, 10 A synchronous buck, VQFN-HR-10 (research/tps56a37.txt, Figure 7-1). */
export const tps56a37Pins = {
pin1: ["EN"], pin2: ["FB"], pin3: ["AGND"], pin4: ["PG"], pin5: ["SS"], pin6: ["SW"], pin7: ["BOOT"], pin8: ["VIN"], pin9: ["PGND"], pin10: ["MODE"],
} as const
export const Tps56a37 = (props: ChipProps<typeof tps56a37Pins>) => (
<chip {...props} manufacturerPartNumber="TPS56A37RPAR" supplierPartNumbers={{ jlcpcb: ["C22392669"] }} pinLabels={tps56a37Pins}
footprint={<JlcFootprint part="tps56a37" />} cadModel={CAD.tps56a37} schWidth={1.4} schHeight={1.2}
schPinArrangement={{ leftSide: { direction: "top-to-bottom", pins: ["VIN", "EN", "SS", "MODE", "AGND"] }, rightSide: { direction: "top-to-bottom", pins: ["BOOT", "SW", "FB", "PG", "PGND"] } }}
pinAttributes={{ VIN: { requiresPower: true }, AGND: { requiresGround: true }, PGND: { requiresGround: true } }} />
)
/** TI LM74700QDBVRQ1 ideal-diode controller, SOT-23-6 (research/lm74700.txt Table 5-1). */
export const lm74700Pins = { pin1: ["VCAP"], pin2: ["GND"], pin3: ["EN"], pin4: ["CATHODE"], pin5: ["GATE"], pin6: ["ANODE"] } as const
export const Lm74700 = (props: ChipProps<typeof lm74700Pins>) => (
<chip {...props} manufacturerPartNumber="LM74700QDBVRQ1" supplierPartNumbers={{ jlcpcb: ["C2941042"] }} pinLabels={lm74700Pins}
footprint={<JlcFootprint part="lm74700" />} cadModel={CAD.lm74700} schWidth={1.6} schHeight={0.8}
schPinArrangement={{ leftSide: { direction: "top-to-bottom", pins: ["ANODE", "VCAP", "EN"] }, rightSide: { direction: "top-to-bottom", pins: ["CATHODE", "GATE", "GND"] } }}
pinAttributes={{ ANODE: { requiresPower: true }, GND: { requiresGround: true } }} />
)
/** TI CSD17578Q3A 30 V N-channel NexFET, SON 3.3 x 3.3 (pins 1-3 source, 4 gate, 5-8 + tab 9 drain). */
export const csd17578Pins = { pin1: ["S1"], pin2: ["S2"], pin3: ["S3"], pin4: ["G"], pin5: ["D5"], pin6: ["D6"], pin7: ["D7"], pin8: ["D8"], pin9: ["D9"] } as const
export const Csd17578 = (props: ChipProps<typeof csd17578Pins>) => (
<chip {...props} manufacturerPartNumber="CSD17578Q3A" supplierPartNumbers={{ jlcpcb: ["C205986"] }} pinLabels={csd17578Pins}
footprint={<JlcFootprint part="csd17578" />} cadModel={CAD.csd17578} schWidth={1.0} schHeight={1.0}
schPinArrangement={{ leftSide: { direction: "top-to-bottom", pins: ["S1", "S2", "S3", "G"] }, rightSide: { direction: "top-to-bottom", pins: ["D5", "D6", "D7", "D8", "D9"] } }} />
)
/** Alpha & Omega AO4407A -30 V P-channel MOSFET, SOIC-8 (pins 1-3 source, 4 gate, 5-8 drain), VGS +/-25 V. */
export const ao4407Pins = { pin1: ["S1"], pin2: ["S2"], pin3: ["S3"], pin4: ["G"], pin5: ["D5"], pin6: ["D6"], pin7: ["D7"], pin8: ["D8"] } as const
export const Ao4407a = (props: ChipProps<typeof ao4407Pins>) => (
<chip {...props} manufacturerPartNumber="AO4407A" supplierPartNumbers={{ jlcpcb: ["C16072"] }} pinLabels={ao4407Pins}
footprint={<JlcFootprint part="soic8" />} cadModel={CAD.soic8} schWidth={1.0} schHeight={1.0}
schPinArrangement={{ leftSide: { direction: "top-to-bottom", pins: ["S1", "S2", "S3", "G"] }, rightSide: { direction: "top-to-bottom", pins: ["D5", "D6", "D7", "D8"] } }} />
)
/** TI TLV75733PDBVR 3.3 V 1 A LDO with enable, SOT-23-5. */
export const tlv757Pins = { pin1: ["IN"], pin2: ["GND"], pin3: ["EN"], pin4: ["NC"], pin5: ["OUT"] } as const
export const Tlv75733 = (props: ChipProps<typeof tlv757Pins>) => (
<chip {...props} manufacturerPartNumber="TLV75733PDBVR" supplierPartNumbers={{ jlcpcb: ["C485517"] }} pinLabels={tlv757Pins}
footprint={<JlcFootprint part="tlv757p" />} cadModel={CAD.tlv757p} schWidth={1.2} schHeight={0.6}
schPinArrangement={{ leftSide: { direction: "top-to-bottom", pins: ["IN", "EN", "GND"] }, rightSide: { direction: "top-to-bottom", pins: ["OUT", "NC"] } }}
pinAttributes={{ IN: { requiresPower: true }, GND: { requiresGround: true }, OUT: { providesPower: true } }} />
)
/** TI TLV62569PDDCR 2 A buck with power-good, SOT-23-6 (FB reference 0.6 V). */
export const tlv62569Pins = { pin1: ["EN"], pin2: ["GND"], pin3: ["SW"], pin4: ["VIN"], pin5: ["PG"], pin6: ["FB"] } as const
export const Tlv62569 = (props: ChipProps<typeof tlv62569Pins>) => (
<chip {...props} manufacturerPartNumber="TLV62569PDDCR" supplierPartNumbers={{ jlcpcb: ["C398365"] }} pinLabels={tlv62569Pins}
footprint={<JlcFootprint part="tlv62569p" />} cadModel={CAD.tlv62569p} schWidth={1.2} schHeight={0.8}
schPinArrangement={{ leftSide: { direction: "top-to-bottom", pins: ["VIN", "EN", "GND"] }, rightSide: { direction: "top-to-bottom", pins: ["SW", "FB", "PG"] } }}
pinAttributes={{ VIN: { requiresPower: true }, GND: { requiresGround: true } }} />
)
/** Diodes AP22653W6-7 (active-high EN) / AP22652W6-7 (active-low EN) 2.1 A current-limited USB power switch,
* SOT-26: reverse blocking, 6 ms FAULT deglitch, output discharge when disabled. RLIM 15k = 1.735 A typ. */
export const ap2265xPins = { pin1: ["IN"], pin2: ["GND"], pin3: ["EN"], pin4: ["FAULT_N"], pin5: ["ILIM"], pin6: ["OUT"] } as const
export const PortSwitch = (props: ChipProps<typeof ap2265xPins> & { activeLow?: boolean }) => {
const { activeLow, ...rest } = props
return (
<chip {...rest} manufacturerPartNumber={activeLow ? "AP22652W6-7" : "AP22653W6-7"} supplierPartNumbers={{ jlcpcb: [activeLow ? "C2158038" : "C2158037"] }}
pinLabels={ap2265xPins} footprint={<JlcFootprint part={activeLow ? "ap22652" : "ap22653"} />} cadModel={CAD[activeLow ? "ap22652" : "ap22653"]} schWidth={1.6} schHeight={0.8}
schPinArrangement={{ leftSide: { direction: "top-to-bottom", pins: ["IN", "EN", "GND"] }, rightSide: { direction: "top-to-bottom", pins: ["OUT", "FAULT_N", "ILIM"] } }}
pinAttributes={{ IN: { requiresPower: true }, GND: { requiresGround: true } }} />
)
}
/** 2N7002 N-channel MOSFET, SOT-23 (1 G, 2 S, 3 D). JLC Basic C8545. */
export const nmosPins = { pin1: ["G"], pin2: ["S"], pin3: ["D"] } as const
export const Nmos = (props: ChipProps<typeof nmosPins>) => (
<chip {...props} manufacturerPartNumber="2N7002" supplierPartNumbers={{ jlcpcb: ["C8545"] }} pinLabels={nmosPins}
footprint={<JlcFootprint part="sot23" />} cadModel={CAD.sot23} schWidth={0.8} schHeight={0.6}
schPinArrangement={{ leftSide: { direction: "top-to-bottom", pins: ["G"] }, rightSide: { direction: "top-to-bottom", pins: ["D", "S"] } }} />
)