krishnax12/tps2553-usb-power-switch
USB‑C 5V input board with CC pull-downs feeding a TPS2553 current-limited power switch, filtered 5V output connector, external enable control, and red overcurrent/fault LED indicator.
- Version
- 1.0.0
- License
- unset
- Stars
- 0
lib/usb-power-switch-board.tsx
import { TYPE_C_31_M_12 } from "../imports/TYPE_C_31_M_12"
import { TPS2553DBVR } from "../imports/TPS2553DBVR"
export function UsbPowerSwitchBoard() {
return (
<board
width={30}
height={30}
layers={2}
schAutoLayoutEnabled
schMaxTraceDistance={8}
autorouter="auto_local"
minTraceWidth={0.15}
minTraceToPadEdgeClearance={0.2}
minViaEdgeToPadEdgeClearance={0.25}
minTraceToHoleEdgeClearance={0.25}
nominalTraceWidth={0.25}
pcbStyle={{
silkscreenFontSize: 0.7,
viaHoleDiameter: 0.3,
viaPadDiameter: 0.6,
}}
>
<net name="V5_IN" isPowerNet nominalTraceWidth={0.4} />
<net name="V5_OUT" isPowerNet nominalTraceWidth={0.4} />
<net name="GND" isGroundNet nominalTraceWidth={0.4} />
<net name="CC1" />
<net name="CC2" />
<net name="ENABLE" />
<net name="N_FAULT" />
<net name="ILIM" />
<net name="FAULT_LED" />
<schematicsheet name="USB_INPUT" displayName="01 - USB-C 5 V input">
<schematicsection name="USB_INPUT" displayName="01 - USB-C 5 V input" />
<group
name="USB_INPUT"
schAutoLayoutEnabled
schMarginX={1}
schMarginY={1}
>
<TYPE_C_31_M_12
name="J1"
schSectionName="USB_INPUT"
pcbX={0}
pcbY={11}
pcbRotation={180}
schWidth={1.8}
schHeight={2.8}
schPinArrangement={{
rightSide: [15, 16, 6, 12, 8, 9, 10, 7, 11, 5],
bottomSide: [13, 14, 2, 1, 4, 3],
}}
pinAttributes={{
DP1: { doNotConnect: true },
DP2: { doNotConnect: true },
DN1: { doNotConnect: true },
DN2: { doNotConnect: true },
SBU1: { doNotConnect: true },
SBU2: { doNotConnect: true },
}}
connections={{
VBUS1: "net.V5_IN",
VBUS2: "net.V5_IN",
GND1: "net.GND",
GND2: "net.GND",
EH1: "net.GND",
EH2: "net.GND",
EH3: "net.GND",
EH4: "net.GND",
CC1: "net.CC1",
CC2: "net.CC2",
}}
/>
<resistor
name="R1"
pcbRotation={180}
schSectionName="USB_INPUT"
resistance="5.1k"
footprint="0603"
pcbX={-2}
pcbY={5.8}
connections={{ pin1: "net.CC1", pin2: "net.GND" }}
/>
<resistor
name="R2"
schSectionName="USB_INPUT"
resistance="5.1k"
footprint="0603"
pcbX={2}
pcbY={5.8}
connections={{ pin1: "net.CC2", pin2: "net.GND" }}
/>
</group>
</schematicsheet>
<schematicsheet
name="POWER_SWITCH"
displayName="02 - TPS2553 current limiter and output"
>
<schematicsection
name="POWER_SWITCH"
displayName="02 - TPS2553 current limiter and output"
/>
<group
name="POWER_SWITCH"
schAutoLayoutEnabled
schMarginX={1}
schMarginY={1}
>
<TPS2553DBVR
name="U1"
schSectionName="POWER_SWITCH"
pcbX={0}
pcbY={0}
pcbRotation={90}
schWidth={1.8}
schHeight={1.5}
connections={{
IN: "net.V5_IN",
OUT: "net.V5_OUT",
GND: "net.GND",
EN: "net.ENABLE",
N_FAULT: "net.N_FAULT",
ILIM: "net.ILIM",
}}
/>
<capacitor
name="C1"
pcbSx={{ "& silkscreentext": { pcbX: 1.8, pcbY: 0 } }}
schMarginX={1}
schSectionName="POWER_SWITCH"
capacitance="100nF"
footprint="0603"
pcbX={3}
pcbY={1.3}
pcbRotation={90}
connections={{ pin1: "net.V5_IN", pin2: "net.GND" }}
/>
<capacitor
name="C2"
pcbSx={{ "& silkscreentext": { pcbX: 2.2, pcbY: 0 } }}
schSectionName="POWER_SWITCH"
capacitance="1uF"
footprint="0805"
pcbX={5.5}
pcbY={1.3}
pcbRotation={90}
connections={{ pin1: "net.V5_IN", pin2: "net.GND" }}
/>
<resistor
name="R3"
schMarginY={0.7}
schSectionName="POWER_SWITCH"
resistance="49.9k"
footprint="0603"
pcbX={3}
pcbY={-3}
connections={{ pin1: "net.ILIM", pin2: "net.GND" }}
/>
<capacitor
name="C3"
schSectionName="POWER_SWITCH"
capacitance="10uF"
footprint="0805"
pcbX={0}
pcbY={-5.5}
connections={{ pin1: "net.V5_OUT", pin2: "net.GND" }}
/>
<capacitor
name="C4"
schSectionName="POWER_SWITCH"
capacitance="100nF"
footprint="0603"
pcbX={4}
pcbY={-5.5}
connections={{ pin1: "net.V5_OUT", pin2: "net.GND" }}
/>
<connector
name="J2"
schSectionName="POWER_SWITCH"
manufacturerPartNumber="B2B-XH-A"
footprint="jst2_p2.5mm_xh"
pinLabels={{ pin1: "VOUT", pin2: "GND" }}
schPinArrangement={{ leftSide: ["VOUT", "GND"] }}
pcbX={0}
pcbY={-11}
connections={{ VOUT: "net.V5_OUT", GND: "net.GND" }}
/>
</group>
</schematicsheet>
<schematicsheet
name="CONTROL_STATUS"
displayName="03 - Enable and fault status"
>
<schematicsection
name="CONTROL_STATUS"
displayName="03 - Enable and fault status"
/>
<group
name="CONTROL_STATUS"
schAutoLayoutEnabled
schMarginX={1}
schMarginY={1}
>
<resistor
name="R4"
schSectionName="CONTROL_STATUS"
resistance="100k"
footprint="0603"
pcbX={-5}
pcbY={1}
connections={{ pin1: "net.V5_IN", pin2: "net.ENABLE" }}
/>
<resistor
name="R5"
schSectionName="CONTROL_STATUS"
resistance="10k"
footprint="0603"
pcbX={-4}
pcbY={-3}
connections={{ pin1: "net.V5_IN", pin2: "net.N_FAULT" }}
/>
<resistor
name="R6"
pcbRotation={180}
schRotation={0}
schSectionName="CONTROL_STATUS"
resistance="2.2k"
footprint="0603"
pcbX={-6}
pcbY={-7}
connections={{ pin1: "net.V5_IN", pin2: "net.FAULT_LED" }}
/>
<led
name="D1"
schRotation={0}
schSectionName="CONTROL_STATUS"
manufacturerPartNumber="LTST-C190KRKT"
color="red"
footprint="0603"
pcbX={-9}
pcbY={-7}
connections={{ anode: "net.FAULT_LED", cathode: "net.N_FAULT" }}
/>
<connector
name="J3"
schSectionName="CONTROL_STATUS"
manufacturerPartNumber="M20-9990345"
footprint="pinrow3_p2.54mm"
pinLabels={{ pin1: "EN", pin2: "N_FAULT", pin3: "GND" }}
schPinArrangement={{ leftSide: ["EN", "N_FAULT", "GND"] }}
pcbX={-10}
pcbY={-1}
pcbRotation={90}
connections={{
EN: "net.ENABLE",
N_FAULT: "net.N_FAULT",
GND: "net.GND",
}}
/>
</group>
</schematicsheet>
<silkscreentext text="USB-C 5V INPUT" pcbX={0} pcbY={14} fontSize={0.8} />
<silkscreentext
text="TPS2553 / 0.52A"
pcbX={7}
pcbY={-11}
fontSize={0.65}
/>
<silkscreentext text="5V OUT" pcbX={0} pcbY={-13.5} fontSize={0.7} />
<silkscreentext text="FAULT" pcbX={-9} pcbY={-9} fontSize={0.6} />
<silkscreentext
text="EN !FLT GND"
pcbX={-12.7}
pcbY={-1}
pcbRotation={90}
fontSize={0.6}
/>
</board>
)
}