krishnax12/watchy-eink-smartwatch
Unfinished prototype (not production-ready): 4 native DRC errors, 2 display-flex intersections, and missing antenna radiator copper remain
- Version
- 1.2.7
- License
- MIT
- Stars
- 1
imports/ESP32_S3FN8.tsx
import type { ChipProps } from "tscircuit";
// Exact JLCPCB/LCSC C2913196 ESP32-S3FN8 CAD (QFN-56, 7 x 7 mm).
import esp32Step from "../assets/JLC_C2913196_ESP32_S3FN8.step";
const pinLabels = {
pin36: ["SPICLK_N_GPIO48", "pin36", "36"],
pin37: ["SPICLK_P_GPIO47", "pin37", "37"],
pin1: ["LNA_IN_RF", "pin1", "1"],
pin10: ["GPIO5_ADC1_CH4", "pin10", "10"],
pin11: ["GPIO6_ADC1_CH5", "pin11", "11"],
pin12: ["GPIO7_ADC1_CH6", "pin12", "12"],
pin13: ["GPIO8_ADC1_CH7", "pin13", "13"],
pin14: ["GPIO9_ADC1_CH8", "pin14", "14"],
pin15: ["GPIO10_ADC1_CH9", "pin15", "15"],
pin16: ["GPIO11_ADC2_CH0", "pin16", "16"],
pin17: ["GPIO12_ADC2_CH1", "pin17", "17"],
pin18: ["GPIO13_ADC2_CH2", "pin18", "18"],
pin19: ["GPIO14_ADC2_CH3", "pin19", "19"],
pin2: ["VDD3P3_2", "pin2", "2"],
pin20: ["VDD3P3_RTC", "pin20", "20"],
pin21: ["GPIO15_ADC2_CH4_XTAL_32K_P", "pin21", "21"],
pin22: ["GPIO16_ADC2_CH5_XTAL_32K_N", "pin22", "22"],
pin23: ["GPIO17_ADC2_CH6_DAC_2", "pin23", "23"],
pin24: ["GPIO18_ADC2_CH7_DAC_1", "pin24", "24"],
pin25: ["GPIO19_USB_D_ADC2_CH8", "pin25", "25"],
pin26: ["GPIO20_USB_D_ADC2_CH9", "pin26", "26"],
pin27: ["GPIO21", "pin27", "27"],
pin28: ["SPI_CS1_GPIO26", "pin28", "28"],
pin29: ["VDD_SPI", "pin29", "29"],
pin3: ["VDD3P3_3", "pin3", "3"],
pin30: ["SPIHD_GPIO27", "pin30", "30"],
pin31: ["SPIWP_GPIO28", "pin31", "31"],
pin32: ["SPICS0_GPIO29", "pin32", "32"],
pin33: ["SPICLK_GPIO30", "pin33", "33"],
pin34: ["SPIQ_GPIO31", "pin34", "34"],
pin35: ["SPID_GPIO32", "pin35", "35"],
pin38: ["GPIO33", "pin38", "38"],
pin39: ["GPIO34", "pin39", "39"],
pin4: ["CHIP_PU_RESET", "pin4", "4"],
pin40: ["GPIO35", "pin40", "40"],
pin41: ["GPIO36", "pin41", "41"],
pin42: ["GPIO37", "pin42", "42"],
pin43: ["GPIO38", "pin43", "43"],
pin44: ["MTCK_JTAG_GPIO39", "pin44", "44"],
pin45: ["MTDO_JTAG_GPIO40", "pin45", "45"],
pin46: ["VDD3P3_CPU", "pin46", "46"],
pin47: ["MTDI_JTAG_GPIO41", "pin47", "47"],
pin48: ["MTMS_JTAG_GPIO42", "pin48", "48"],
pin49: ["U0TXD_PROG_GPIO43", "pin49", "49"],
pin5: ["GPIO0_BOOT", "pin5", "5"],
pin50: ["U0RXD_PROG_GPIO44", "pin50", "50"],
pin51: ["GPIO45", "pin51", "51"],
pin52: ["GPIO46", "pin52", "52"],
pin53: ["XTAL_N", "pin53", "53"],
pin54: ["XTAL_P", "pin54", "54"],
pin55: ["VDDA_55", "pin55", "55"],
pin56: ["VDDA_56", "pin56", "56"],
pin57: ["GND", "pin57", "57"],
pin6: ["GPIO1_ADC1_CH0", "pin6", "6"],
pin7: ["GPIO2_ADC1_CH1", "pin7", "7"],
pin8: ["GPIO3_ADC1_CH2", "pin8", "8"],
pin9: ["GPIO4_ADC1_CH3", "pin9", "9"],
} as const;
export const ESP32_S3FN8 = (props: ChipProps<typeof pinLabels>) => {
return (
<chip
manufacturerPartNumber="ESP32-S3FN8"
supplierPartNumbers={{ jlcpcb: ["C2913196"] }}
displayName="ESP32-S3FN8"
// ESP32-S3 supply pins, per Espressif's schematic checklist.
pinAttributes={{
pin2: { requiresPower: true, requiresVoltage: "3.3V" },
pin3: { requiresPower: true, requiresVoltage: "3.3V" },
pin20: { requiresPower: true, requiresVoltage: "3.3V" },
pin46: { requiresPower: true, requiresVoltage: "3.3V" },
pin55: { requiresPower: true, requiresVoltage: "3.3V" },
pin56: { requiresPower: true, requiresVoltage: "3.3V" },
pin57: { requiresGround: true },
}}
pinLabels={pinLabels}
footprint={
<footprint>
<smtpad
portHints={["pin1", "1"]}
pcbX="3.4375mm"
pcbY="-2.6mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin2", "2"]}
pcbX="3.4375mm"
pcbY="-2.2mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin3", "3"]}
pcbX="3.4375mm"
pcbY="-1.8mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin4", "4"]}
pcbX="3.4375mm"
pcbY="-1.4mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin5", "5"]}
pcbX="3.4375mm"
pcbY="-1mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin6", "6"]}
pcbX="3.4375mm"
pcbY="-0.6mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin7", "7"]}
pcbX="3.4375mm"
pcbY="-0.2mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin8", "8"]}
pcbX="3.4375mm"
pcbY="0.2mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin9", "9"]}
pcbX="3.4375mm"
pcbY="0.6mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin10", "10"]}
pcbX="3.4375mm"
pcbY="1mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin11", "11"]}
pcbX="3.4375mm"
pcbY="1.4mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin12", "12"]}
pcbX="3.4375mm"
pcbY="1.8mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin13", "13"]}
pcbX="3.4375mm"
pcbY="2.2mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin14", "14"]}
pcbX="3.4375mm"
pcbY="2.6mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin15", "15"]}
pcbX="2.6mm"
pcbY="3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin16", "16"]}
pcbX="2.2mm"
pcbY="3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin17", "17"]}
pcbX="1.8mm"
pcbY="3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin18", "18"]}
pcbX="1.4mm"
pcbY="3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin19", "19"]}
pcbX="1mm"
pcbY="3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin20", "20"]}
pcbX="0.6mm"
pcbY="3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin21", "21"]}
pcbX="0.2mm"
pcbY="3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin22", "22"]}
pcbX="-0.2mm"
pcbY="3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin23", "23"]}
pcbX="-0.6mm"
pcbY="3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin24", "24"]}
pcbX="-1mm"
pcbY="3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin25", "25"]}
pcbX="-1.4mm"
pcbY="3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin26", "26"]}
pcbX="-1.8mm"
pcbY="3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin27", "27"]}
pcbX="-2.2mm"
pcbY="3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin28", "28"]}
pcbX="-2.6mm"
pcbY="3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin29", "29"]}
pcbX="-3.4375mm"
pcbY="2.6mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin30", "30"]}
pcbX="-3.4375mm"
pcbY="2.2mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin31", "31"]}
pcbX="-3.4375mm"
pcbY="1.8mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin32", "32"]}
pcbX="-3.4375mm"
pcbY="1.4mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin33", "33"]}
pcbX="-3.4375mm"
pcbY="1mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin34", "34"]}
pcbX="-3.4375mm"
pcbY="0.6mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin35", "35"]}
pcbX="-3.4375mm"
pcbY="0.2mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin36", "36"]}
pcbX="-3.4375mm"
pcbY="-0.2mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin37", "37"]}
pcbX="-3.4375mm"
pcbY="-0.6mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin38", "38"]}
pcbX="-3.4375mm"
pcbY="-1mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin39", "39"]}
pcbX="-3.4375mm"
pcbY="-1.4mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin40", "40"]}
pcbX="-3.4375mm"
pcbY="-1.8mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin41", "41"]}
pcbX="-3.4375mm"
pcbY="-2.2mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin42", "42"]}
pcbX="-3.4375mm"
pcbY="-2.6mm"
width="0.875mm"
height="0.2mm"
shape="rect"
/>
<smtpad
portHints={["pin43", "43"]}
pcbX="-2.6mm"
pcbY="-3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin44", "44"]}
pcbX="-2.2mm"
pcbY="-3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin45", "45"]}
pcbX="-1.8mm"
pcbY="-3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin46", "46"]}
pcbX="-1.4mm"
pcbY="-3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin47", "47"]}
pcbX="-1mm"
pcbY="-3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin48", "48"]}
pcbX="-0.6mm"
pcbY="-3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin49", "49"]}
pcbX="-0.2mm"
pcbY="-3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin50", "50"]}
pcbX="0.2mm"
pcbY="-3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin51", "51"]}
pcbX="0.6mm"
pcbY="-3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin52", "52"]}
pcbX="1mm"
pcbY="-3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin53", "53"]}
pcbX="1.4mm"
pcbY="-3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin54", "54"]}
pcbX="1.8mm"
pcbY="-3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin55", "55"]}
pcbX="2.2mm"
pcbY="-3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin56", "56"]}
pcbX="2.6mm"
pcbY="-3.4375mm"
width="0.2mm"
height="0.875mm"
shape="rect"
/>
<smtpad
portHints={["pin57", "57"]}
pcbX="0mm"
pcbY="0mm"
width="4mm"
height="4mm"
shape="rect"
/>
</footprint>
}
cadModel={{
stepUrl: esp32Step,
// JLC footprint pin 1 is opposite this Watchy-local footprint's pin 1.
pcbRotationOffset: 180,
modelOriginPosition: { x: 0, y: 0, z: -0.86 },
}}
{...props}
/>
);
};