seveibar/usbc-pd-charger

This code defines and assembles a hardware schematic of an 18W USB-C PD wall charger with mains input, protection, high-voltage isolation, a DC buck converter with switching regulator, filtering, and USB-C output with ESD protection.

Version
1.0.2
License
unset
Stars
0

imports/A_282838_2.tsx

import type { ConnectorProps } from "@tscircuit/props"

const pinLabels = {
  pin1: ["LINE", "L"],
  pin2: ["NEUTRAL", "N"],
} as const

/**
 * TE Connectivity 282838-2 (JLCPCB C5168775), a direct wire-to-board
 * 2-position screw terminal rated 600 Vac / 13.5 A.
 *
 * `tsci import` currently emits terminal blocks as generic chips. Preserve its
 * exact 10 mm / 1.4 mm copper geometry and JLCPCB CAD model, then add the body,
 * courtyard, insertion direction, and connector semantics it omitted.
 */
export const WireTerminal = (props: ConnectorProps) => {
  return (
    <connector
      pinCount={2}
      pinLabels={pinLabels}
      supplierPartNumbers={{
        jlcpcb: ["C5168775"],
      }}
      manufacturerPartNumber="282838-2"
      footprint={
        <footprint insertionDirection="from_bottom">
          <platedhole
            portHints={["pin1"]}
            pcbX="-5mm"
            holeDiameter="1.4mm"
            outerDiameter="2mm"
            shape="circle"
          />
          <platedhole
            portHints={["pin2"]}
            pcbX="5mm"
            holeDiameter="1.4mm"
            outerDiameter="2mm"
            shape="circle"
          />
          <silkscreenrect pcbX={0} pcbY={0} width="15.6mm" height="8.2mm" />
          <silkscreentext text="{NAME}" pcbX={0} pcbY="5.2mm" fontSize="1mm" />
          <courtyardoutline
            outline={[
              { x: -8.1, y: -4.4 },
              { x: 8.1, y: -4.4 },
              { x: 8.1, y: 4.4 },
              { x: -8.1, y: 4.4 },
              { x: -8.1, y: -4.4 },
            ]}
          />
        </footprint>
      }
      cadModel={{
        objUrl:
          "https://modelcdn.tscircuit.com/easyeda_models/assets/C5168775.obj?uuid=9a6b3086fd7f411fa88414530c0a6a94",
        stepUrl:
          "https://modelcdn.tscircuit.com/easyeda_models/assets/C5168775.step?uuid=9a6b3086fd7f411fa88414530c0a6a94",
        pcbRotationOffset: 0,
        modelOriginPosition: {
          x: 0.3049993999999332,
          y: 0,
          z: -0.000006999999999646178,
        },
      }}
      {...props}
    />
  )
}