gokul/wireless-calculator

A USB‑C rechargeable battery-powered controller board with MCP73871 Li‑ion charging, TPS63070 buck‑boost and LDO power regulation, ATmega328P and ESP32‑S3 control, LCD/keypad user interface, status LEDs, and UART/programming connectors.

Version
0.0.1
License
ISC
Stars
0

imports/MCP73871_2CCI_ML/MCP73871_2CCI_ML.tsx

import objPath from "./MCP73871_2CCI_ML.obj";
import stepPath from "./MCP73871_2CCI_ML.step";
import type { ChipProps } from "@tscircuit/props";

const pinLabels = {
  pin1: ["OUT1"],
  pin2: ["VPCC"],
  pin3: ["SEL"],
  pin4: ["PROG2"],
  pin5: ["THERM"],
  pin6: ["N_PG"],
  pin7: ["STAT2"],
  pin8: ["STAT1", "N_LBO"],
  pin9: ["N_TE"],
  pin10: ["VSS1"],
  pin11: ["VSS2"],
  pin12: ["PROG3"],
  pin13: ["PROG1"],
  pin14: ["VBAT1"],
  pin15: ["VBAT2"],
  pin16: ["VBAT_SENSE"],
  pin17: ["CE"],
  pin18: ["IN1"],
  pin19: ["IN2"],
  pin20: ["OUT2"],
  pin21: ["EP"],
} as const;

const pinAttributes = {
  pin18: { requiresPower: true },
  pin19: { requiresPower: true },
  pin1: { providesPower: true },
  pin20: { providesPower: true },
  pin10: { requiresGround: true },
  pin11: { requiresGround: true },
} as const;

export const MCP73871_2CCI_ML = (props: ChipProps<typeof pinLabels>) => {
  return (
    <chip
      pinLabels={pinLabels}
      pinAttributes={pinAttributes}
      supplierPartNumbers={{
        jlcpcb: ["C5121473"],
      }}
      manufacturerPartNumber="MCP73871-2CCI/ML"
      footprint={
        <footprint>
          <smtpad
            portHints={["pin1"]}
            pcbX="-0.999998mm"
            pcbY="-1.999996mm"
            width="0.2800096mm"
            height="0.7999984mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin2"]}
            pcbX="-0.499872mm"
            pcbY="-1.999996mm"
            width="0.2800096mm"
            height="0.7999984mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin3"]}
            pcbX="-0mm"
            pcbY="-1.999996mm"
            width="0.2800096mm"
            height="0.7999984mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin4"]}
            pcbX="0.500126mm"
            pcbY="-1.999996mm"
            width="0.2800096mm"
            height="0.7999984mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin5"]}
            pcbX="0.999998mm"
            pcbY="-1.999996mm"
            width="0.2800096mm"
            height="0.7999984mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin6"]}
            pcbX="1.999996mm"
            pcbY="-0.999998mm"
            width="0.7999984mm"
            height="0.2800096mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin7"]}
            pcbX="1.999996mm"
            pcbY="-0.499872mm"
            width="0.7999984mm"
            height="0.2800096mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin8"]}
            pcbX="1.999996mm"
            pcbY="0mm"
            width="0.7999984mm"
            height="0.2800096mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin9"]}
            pcbX="1.999996mm"
            pcbY="0.500126mm"
            width="0.7999984mm"
            height="0.2800096mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin10"]}
            pcbX="1.999996mm"
            pcbY="0.999998mm"
            width="0.7999984mm"
            height="0.2800096mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin11"]}
            pcbX="0.999998mm"
            pcbY="1.999996mm"
            width="0.2800096mm"
            height="0.7999984mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin12"]}
            pcbX="0.500126mm"
            pcbY="1.999996mm"
            width="0.2800096mm"
            height="0.7999984mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin13"]}
            pcbX="-0mm"
            pcbY="1.999996mm"
            width="0.2800096mm"
            height="0.7999984mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin14"]}
            pcbX="-0.499872mm"
            pcbY="1.999996mm"
            width="0.2800096mm"
            height="0.7999984mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin15"]}
            pcbX="-0.999998mm"
            pcbY="1.999996mm"
            width="0.2800096mm"
            height="0.7999984mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin16"]}
            pcbX="-1.999996mm"
            pcbY="0.999998mm"
            width="0.7999984mm"
            height="0.2800096mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin17"]}
            pcbX="-1.999996mm"
            pcbY="0.500126mm"
            width="0.7999984mm"
            height="0.2800096mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin18"]}
            pcbX="-1.999996mm"
            pcbY="0mm"
            width="0.7999984mm"
            height="0.2800096mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin19"]}
            pcbX="-1.999996mm"
            pcbY="-0.499872mm"
            width="0.7999984mm"
            height="0.2800096mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin20"]}
            pcbX="-1.999996mm"
            pcbY="-0.999998mm"
            width="0.7999984mm"
            height="0.2800096mm"
            shape="rect"
          />
          <smtpad
            portHints={["pin21"]}
            pcbX="-0mm"
            pcbY="0mm"
            width="2.6999946mm"
            height="2.6999946mm"
            shape="rect"
          />
          <silkscreenpath
            route={[
              { x: 2.1500083999999333, y: 1.52499059999991 },
              { x: 2.1500083999999333, y: 2.1500083999999333 },
              { x: 1.52499059999991, y: 2.1500083999999333 },
            ]}
          />
          <silkscreenpath
            route={[
              { x: -1.5249906000000237, y: 2.1500083999999333 },
              { x: -2.150008400000047, y: 2.1500083999999333 },
              { x: -2.150008400000047, y: 1.52499059999991 },
            ]}
          />
          <silkscreenpath
            route={[
              { x: -1.5249906000000237, y: -2.150008400000047 },
              { x: -2.150008400000047, y: -2.150008400000047 },
              { x: -2.150008400000047, y: -1.5249906000000237 },
            ]}
          />
          <silkscreenpath
            route={[
              { x: 1.52499059999991, y: -2.150008400000047 },
              { x: 2.1500083999999333, y: -2.150008400000047 },
              { x: 2.1500083999999333, y: -1.5249906000000237 },
            ]}
          />
          <silkscreenpath
            route={[
              { x: -1.9507200000000466, y: -2.524759999999901 },
              { x: -2.099461055997722, y: -2.6754020297038323 },
              { x: -1.9494500000000698, y: -2.824779424014764 },
              { x: -1.7994389440024179, y: -2.675402029703946 },
              { x: -1.9481799999999794, y: -2.524759999999901 },
            ]}
          />
          <silkscreentext
            text="{NAME}"
            pcbX="0.003302mm"
            pcbY="3.393442mm"
            anchorAlignment="center"
            fontSize="1mm"
          />
          <courtyardoutline
            outline={[
              { x: -2.649995199999921, y: 2.649995200000035 },
              { x: 2.649995200000035, y: 2.649995200000035 },
              { x: 2.649995200000035, y: -2.649995200000035 },
              { x: -2.649995199999921, y: -2.649995200000035 },
              { x: -2.649995199999921, y: 2.649995200000035 },
            ]}
          />
        </footprint>
      }
      cadModel={{
        objUrl: objPath,
        stepUrl: stepPath,
        pcbRotationOffset: 90,
        modelOriginPosition: { x: 0, y: 0, z: -0.02 },
      }}
      {...props}
    />
  );
};