rushabhcodes/usb-c-e-paper-display

USB-C powered RP2354B controller board with protected power regulation, EPD display interface and charge-pump rails, crystal timing, user/boot switches, status LEDs, and SWD test points.

Version
1.4.1
License
unset
Stars
0

Use with the tscircuit CLI

tsci is the tscircuit CLI. Install it with npm install -g tscircuit.

tsci clone rushabhcodes/usb-c-e-paper-display  # download the package files into ./usb-c-e-paper-display
tsci add rushabhcodes/usb-c-e-paper-display    # add it to your project as @tsci/rushabhcodes.usb-c-e-paper-display

In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.

product/reference-label.tsx

// Reference placements in local footprint coordinates, reviewed on the top silk.
const offsets: Record<string, readonly [number, number]> = {
  "C1": [
    2.6331,
    1.0906
  ],
  "C10": [
    2.9517,
    -1.9723
  ],
  "C11": [
    2.15,
    0.0
  ],
  "C12": [
    4.6,
    0.0
  ],
  "C13": [
    2.1087,
    0.4194
  ],
  "C14": [
    3.0,
    0.0
  ],
  "C15": [
    0.3512,
    -1.7654
  ],
  "C16": [
    5.65,
    -0.0
  ],
  "C17": [
    0.3512,
    1.7654
  ],
  "C18": [
    2.15,
    0.0
  ],
  "C19": [
    3.2427,
    2.1667
  ],
  "C2": [
    2.5,
    0.0
  ],
  "C20": [
    2.7952,
    0.556
  ],
  "C21": [
    2.2627,
    2.2627
  ],
  "C22": [
    3.2798,
    1.3585
  ],
  "C23": [
    -1.5802,
    -7.9444
  ],
  "C24": [
    6.5713,
    1.3071
  ],
  "C25": [
    3.9265,
    -1.6264
  ],
  "C26": [
    5.2798,
    3.5279
  ],
  "C27": [
    -0.0,
    2.15
  ],
  "C28": [
    0.9567,
    2.3097
  ],
  "C29": [
    0.9567,
    -2.3097
  ],
  "C3": [
    2.452,
    0.4877
  ],
  "C30": [
    0.4877,
    -2.452
  ],
  "C31": [
    0.0,
    -2.15
  ],
  "C32": [
    4.5732,
    1.8943
  ],
  "C33": [
    0.0,
    -2.15
  ],
  "C34": [
    -2.7577,
    -2.7577
  ],
  "C35": [
    -1.0906,
    2.6331
  ],
  "C36": [
    0.0,
    -2.0
  ],
  "C37": [
    3.2,
    0.0
  ],
  "C38": [
    3.4818,
    0.6926
  ],
  "C4": [
    3.2,
    0.0
  ],
  "C5": [
    0.3512,
    1.7654
  ],
  "C6": [
    -1.7778,
    -2.6607
  ],
  "C7": [
    2.1087,
    0.4194
  ],
  "C8": [
    2.5102,
    2.5102
  ],
  "C9": [
    0.4877,
    -2.452
  ],
  "D1": [
    -3.6031,
    1.4925
  ],
  "D2": [
    -3.9265,
    1.6264
  ],
  "D3": [
    2.2627,
    -2.2627
  ],
  "F1": [
    0.0,
    2.15
  ],
  "J1": [
    -6.228,
    0.8138
  ],
  "J2": [
    1.6264,
    -3.9265
  ],
  "L1": [
    -2.9445,
    4.4068
  ],
  "L2": [
    -0.0,
    2.5
  ],
  "Q1": [
    0.0,
    -2.85
  ],
  "R1": [
    2.452,
    -0.4877
  ],
  "R10": [
    -5.2326,
    5.2326
  ],
  "R11": [
    4.5116,
    -0.8974
  ],
  "R12": [
    -5.65,
    -0.0
  ],
  "R13": [
    9.3175,
    1.8534
  ],
  "R14": [
    4.95,
    -0.0
  ],
  "R15": [
    2.6331,
    1.0906
  ],
  "R16": [
    2.6607,
    1.7778
  ],
  "R17": [
    -3.6031,
    -1.4925
  ],
  "R2": [
    0.4194,
    -2.1087
  ],
  "R3": [
    -0.3512,
    1.7654
  ],
  "R4": [
    -2.85,
    0.0
  ],
  "R5": [
    -1.1945,
    1.7877
  ],
  "R6": [
    -0.0,
    1.8
  ],
  "R7": [
    3.3334,
    4.9888
  ],
  "R8": [
    0.0,
    1.8
  ],
  "R9": [
    -1.7678,
    1.7678
  ],
  "SW1": [
    0.0,
    -2.5
  ],
  "SW2": [
    2.5102,
    -2.5102
  ],
  "TP1": [
    -0.4194,
    2.1087
  ],
  "TP2": [
    0.0,
    2.15
  ],
  "TP3": [
    0.4194,
    2.1087
  ],
  "TP4": [
    0.0,
    2.15
  ],
  "TP5": [
    2.7952,
    0.556
  ],
  "TP6": [
    1.3889,
    2.0787
  ],
  "U1": [
    -6.7349,
    -4.5001
  ],
  "U2": [
    2.5,
    0.0
  ],
  "U3": [
    2.85,
    0.0
  ],
  "U4": [
    -0.6243,
    3.1385
  ],
  "U5": [
    1.9723,
    2.9517
  ],
  "U6": [
    -0.0,
    2.85
  ],
  "Y1": [
    -3.0052,
    -3.0052
  ]
}

export function ReferenceLabel({name}: {name?: string}) {
  const [pcbX, pcbY] = offsets[name ?? ""] ?? [0, 2]
  return <silkscreentext text="{NAME}" layer="top" pcbX={pcbX} pcbY={pcbY}
    pcbRotation={360} anchorAlignment="center" fontSize={1.7} />
}