MustafaMulla29/wireless-mouse-pcb

This code defines a 3.3V low dropout voltage regulator chip (AP2112K-3.3TRG1) with five pins (VIN, GND, Enable, NC, VOUT) and its associated PCB footprint and 3D models for hardware implementation.

Version
1.0.6
License
unset
Stars
0

sections/StatusAndDebugSection.tsx

import { WS2812B_V6 } from "../imports/WS2812B_V6"
import { NetTrace, POWER_TRACE, withSchematicSheet } from "./shared"

const debugTestpointFootprint = (
  <footprint>
    <smtpad
      portHints={["pin1"]}
      shape="circle"
      radius="0.75mm"
      layer="top"
    />
    <courtyardcircle radius="0.95mm" />
  </footprint>
)

export const StatusAndDebugSection = () => withSchematicSheet("controller", (
  <>
    {/* V6 accepts the MCU's 3.3 V data directly on switched LiPo power.
        LED operation is specified only while VSYS is at least 3.3 V. */}
    <resistor name="R_WLED_DATA" resistance="330" footprint="0402" pcbX={1} pcbY={27.6} pcbRotation={180} schX={3} schY={3} schSectionName="StatusDebug" />
    <WS2812B_V6
      name="U_WLED"
      noConnect={["DOUT"]}
      pcbX={-5}
      pcbY={25.5}
      schX={7}
      schY={3}
      schWidth={1.5}
      schHeight={0.6}
      schPinArrangement={{
        leftSide: { pins: ["VDD", "DIN"], direction: "top-to-bottom" },
        rightSide: { pins: ["DOUT", "VSS"], direction: "top-to-bottom" },
      }}
      schSectionName="StatusDebug"
    />
    <capacitor name="C_WLED" capacitance="100nF" footprint="0402" pcbX={-7.35} pcbY={29.7} pcbRotation={270} schX={11} schY={3} schOrientation="vertical" schSectionName="StatusDebug" />

    <NetTrace from="net.WLED" to=".R_WLED_DATA > .pin1" />
    <NetTrace name="LED_DIN" from=".R_WLED_DATA > .pin2" to=".U_WLED > .DIN" />
    <NetTrace from=".U_WLED > .VDD" to="net.VSYS" width={POWER_TRACE} />
    <NetTrace from=".U_WLED > .VSS" to="net.GND" width={POWER_TRACE} />
    <NetTrace from=".C_WLED > .pin1" to="net.VSYS" width={POWER_TRACE} />
    <NetTrace from=".C_WLED > .pin2" to="net.GND" width={POWER_TRACE} />

    <testpoint name="TP_SWDIO" footprint={debugTestpointFootprint} footprintVariant="pad" padShape="circle" padDiameter="1.5mm" pcbX={19} pcbY={25} schX={3.2} schY={-4} schSectionName="StatusDebug" />
    <testpoint name="TP_SWCLK" footprint={debugTestpointFootprint} footprintVariant="pad" padShape="circle" padDiameter="1.5mm" pcbX={19} pcbY={23} schX={7.8} schY={-4} schSectionName="StatusDebug" />
    <testpoint name="TP_3V3" footprint={debugTestpointFootprint} footprintVariant="pad" padShape="circle" padDiameter="1.5mm" pcbX={19} pcbY={21} schX={10} schY={-4} schSectionName="StatusDebug" />
    <testpoint name="TP_GND" footprint={debugTestpointFootprint} footprintVariant="pad" padShape="circle" padDiameter="1.5mm" pcbX={19} pcbY={19} schX={13} schY={-4} schSectionName="StatusDebug" />
    <testpoint name="TP_RESET" footprint={debugTestpointFootprint} footprintVariant="pad" padShape="circle" padDiameter="1.5mm" pcbX={20.9} pcbY={17} schX={16} schY={-4} schSectionName="StatusDebug" />

    <NetTrace name="SWDIO" from=".U_MCU > .SWDIO" to=".TP_SWDIO > .pin1" />
    <NetTrace name="SWCLK" from=".U_MCU > .SWDCLK" to=".TP_SWCLK > .pin1" />
    <NetTrace from="net.V3V3" to=".TP_3V3 > .pin1" />
    <NetTrace from="net.GND" to=".TP_GND > .pin1" />
    <NetTrace from="net.RESET_N" to=".TP_RESET > .pin1" />
  </>
), -2)