krishnax12/watchy-eink-smartwatch

This code defines a hardware schematic and PCB layout for a smartwatch using components like ESP32 microcontroller, sensors, Bluetooth module, power regulation, and connectors, with detailed component footprints and PCB outlines.

Version
1.2.1
License
unset
Stars
2

imports/MicroUSB.tsx

import type { ChipProps } from "tscircuit";
import usbStep from "../assets/MicroUSB.step";

const pinLabels = {
  "pin6": ["pin6", "shield1"],
  "pin7": ["pin7", "shield2"],
  "pin8": ["pin8", "shield3"],
  "pin9": ["pin9", "shield4"],
  "pin1": [
    "pin1",
    "1"
  ],
  "pin2": [
    "pin2",
    "2"
  ],
  "pin3": [
    "pin3",
    "3"
  ],
  "pin4": [
    "pin4",
    "4"
  ],
  "pin5": [
    "pin5",
    "5"
  ],
  "pin10": ["pin10", "hole1"],
  "pin11": ["pin11", "hole2"],
  "pin12": ["pin12", "hole3"],
  "pin13": ["pin13", "hole4"]
} as const;

export const MicroUSB = (props: ChipProps<typeof pinLabels>) => {
  return (
    <chip
      pinLabels={pinLabels}
      footprint={
        <footprint>
          <smtpad portHints={["pin6", "shield1"]} pcbX="3.5mm" pcbY="1.3mm" width="1.55mm" height="1mm" shape="rect" />
          <smtpad portHints={["pin7", "shield2"]} pcbX="2.5mm" pcbY="-1.4mm" width="0.95mm" height="1.25mm" shape="rect" />
          <smtpad portHints={["pin8", "shield3"]} pcbX="-2.5mm" pcbY="-1.4mm" width="0.95mm" height="1.25mm" shape="rect" />
          <smtpad portHints={["pin9", "shield4"]} pcbX="-3.5mm" pcbY="1.3mm" width="1.55mm" height="1mm" shape="rect" />
          <smtpad portHints={["pin1", "1"]} pcbX="1.3mm" pcbY="-1.4mm" width="0.4mm" height="1.35mm" shape="rect" />
          <smtpad portHints={["pin2", "2"]} pcbX="0.65mm" pcbY="-1.4mm" width="0.4mm" height="1.35mm" shape="rect" />
          <smtpad portHints={["pin3", "3"]} pcbX="0mm" pcbY="-1.4mm" width="0.4mm" height="1.35mm" shape="rect" />
          <smtpad portHints={["pin4", "4"]} pcbX="-0.65mm" pcbY="-1.4mm" width="0.4mm" height="1.35mm" shape="rect" />
          <smtpad portHints={["pin5", "5"]} pcbX="-1.3mm" pcbY="-1.4mm" width="0.4mm" height="1.35mm" shape="rect" />
          <platedhole portHints={["pin10", "hole1"]} pcbX="3.5mm" pcbY="1.3mm" holeDiameter="1.15mm" outerDiameter="1.55mm" shape="circle" />
          <platedhole portHints={["pin11", "hole2"]} pcbX="2.5mm" pcbY="-1.4mm" holeDiameter="0.55mm" outerDiameter="0.95mm" shape="circle" />
          <platedhole portHints={["pin12", "hole3"]} pcbX="-2.5mm" pcbY="-1.4mm" holeDiameter="0.55mm" outerDiameter="0.95mm" shape="circle" />
          <platedhole portHints={["pin13", "hole4"]} pcbX="-3.5mm" pcbY="1.3mm" holeDiameter="1.15mm" outerDiameter="1.55mm" shape="circle" />
        </footprint>
      }
      cadModel={{ stepUrl: usbStep, positionOffset: { x: 0, y: 0.3, z: 0 } }}
      {...props}
    />
  );
};