alvinkigs/Bonyo-final
A 90×70 mm two-layer carrier PCB for ESP32, SIM800C cellular, NEO-6M GPS, and TP4056 Li-ion charger modules, with protected power switching, modem level shifting, antenna, controls, indicators, connectors, and mounting hardware.
- Version
- 0.0.1
- License
- unset
- Stars
- 0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone alvinkigs/Bonyo-final # download the package files into ./Bonyo-final
tsci add alvinkigs/Bonyo-final # add it to your project as @tsci/alvinkigs.Bonyo-finalIn 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.
dist/index.cjs
'use strict';
var jsxRuntime = require('react/jsx-runtime');
// Preliminary module carrier: qualify the off-board adapters and all dimensions before fabrication.
var index = () => {
// SIM800C stagger offsets (2.54mm = 1 perfboard hole)
const SIM_LEFT_DX = -20.32; // 7 empty columns between rows (8 pitches)
const SIM_LEFT_DY = -2.54; // Right side (NET..GND) starts 1 row higher than left side
// TP4056 center X (matches OpenSCAD USB-C cutout at px(26.5))
const TP_X = 26.5;
const envelope = (vector, size) => undefined;
// Fabrication rules: conservative values every fab's STANDARD 2-layer service
// accepts (JLCPCB/PCBWay standard is 5-6 mil track/space, 0.3 mm via drill).
const REVISION = "REV A 2026-11";
return (jsxRuntime.jsxs("board", { width: "90mm", height: "70mm", layers: 2, thickness: "1.6mm", title: "Bonyo carrier", minTraceWidth: "0.15mm", minTraceToPadEdgeClearance: "0.15mm", minTraceToHoleEdgeClearance: "0.2mm", minPadEdgeToPadEdgeClearance: "0.15mm", minBoardEdgeClearance: "0.3mm", minViaHoleDiameter: "0.3mm", minViaPadDiameter: "0.6mm", minViaEdgeToPadEdgeClearance: "0.15mm", pcbStyle: { viaHoleDiameter: "0.3mm", viaPadDiameter: "0.6mm", silkscreenFontSize: "0.8mm" }, autorouter: { local: true, traceClearance: "0.15mm" }, children: [jsxRuntime.jsx("hole", { name: "H_PCB_TL", diameter: "3.2mm", pcbX: "-41mm", pcbY: "31mm" }), jsxRuntime.jsx("hole", { name: "H_PCB_TR", diameter: "3.2mm", pcbX: "41mm", pcbY: "31mm" }), jsxRuntime.jsx("hole", { name: "H_PCB_BL", diameter: "3.2mm", pcbX: "-41mm", pcbY: "-31mm" }), jsxRuntime.jsx("hole", { name: "H_PCB_BR", diameter: "3.2mm", pcbX: "41mm", pcbY: "-31mm" }), jsxRuntime.jsx("pinheader", { name: "J_ESP_TOP", cadModel: envelope(), schX: -1, schY: 11, pinCount: 19, pitch: "2.54mm", gender: "female", pcbX: "12.5mm", pcbY: "26.7mm", showSilkscreenPinLabels: true, pinLabels: [
"GND1", "G23", "G22", "TX0", "RX0", "G21", "GND2", "G19", "G18",
"G5", "G17", "G16", "G4", "G0", "G2", "G15", "D1", "D0", "CLK"
] }), jsxRuntime.jsx("pinheader", { name: "J_ESP_BOT", schX: 8, schY: 11, pinCount: 19, pitch: "2.54mm", gender: "female", pcbX: "12.5mm", pcbY: "1.3mm", showSilkscreenPinLabels: true, pinLabels: [
"3V3", "EN", "VP", "VN", "G34", "G35", "G32", "G33", "G25",
"G26", "G27", "G14", "G12", "GND", "G13", "D2", "D3", "CMD", "5V"
] }), jsxRuntime.jsx("pinheader", { name: "J_REG", pinCount: 3, pitch: "2.54mm", gender: "male", pcbRotation: "90deg", pcbX: "42mm", pcbY: "10mm", pinLabels: ["VIN", "GND", "V3V3"], showSilkscreenPinLabels: true, schX: -12, schY: 1 }), jsxRuntime.jsx("pinheader", { name: "J_LOAD_SWITCH", pinCount: 2, pitch: "2.54mm", gender: "male", pcbX: "37mm", pcbY: "-3.5mm", pinLabels: ["IN", "OUT"], showSilkscreenPinLabels: true, schX: -17, schY: 1 }), jsxRuntime.jsx("resistor", { name: "R_MRX_SER", resistance: "1k", footprint: "0603", pcbX: "-24mm", pcbY: "-18.6mm", schX: 3, schY: -8 }), jsxRuntime.jsx("resistor", { name: "R_MRX_PD", resistance: "5.6k", footprint: "0603", pcbX: "-24mm", pcbY: "-22.5mm", schX: 0, schY: -8 }), jsxRuntime.jsx("resistor", { name: "R_MTX_SER", resistance: "1k", footprint: "0603", pcbX: "-30mm", pcbY: "-20mm", schX: -3, schY: -8 }), jsxRuntime.jsx("pinheader", { name: "LED_TRACK", schX: -15, schY: 12, pinCount: 2, pitch: "2.54mm", gender: "female", pcbX: "-34mm", pcbY: "25mm", showSilkscreenPinLabels: true, pinLabels: ["ANODE", "CATHODE"] }), jsxRuntime.jsx("resistor", { name: "R_LED1", schX: -15, schY: 8, resistance: "220", footprint: "axial_p0.3in", pcbX: "-34mm", pcbY: "20mm" }), jsxRuntime.jsx("pinheader", { name: "LED_CAP", schX: -10, schY: 12, pinCount: 2, pitch: "2.54mm", gender: "female", pcbX: "-20mm", pcbY: "25mm", showSilkscreenPinLabels: true, pinLabels: ["ANODE", "CATHODE"] }), jsxRuntime.jsx("resistor", { name: "R_LED2", schX: -10, schY: 8, resistance: "220", footprint: "axial_p0.3in", pcbX: "-20mm", pcbY: "20mm" }), jsxRuntime.jsx("pinheader", { name: "SW1_TOP", schX: -23, schY: 13, pinCount: 3, pitch: "2.54mm", gender: "female", pcbX: "-34mm", pcbY: "12.75mm", showSilkscreenPinLabels: true, pinLabels: ["A1", "NC", "A2"] }), jsxRuntime.jsx("pinheader", { name: "SW1_BOT", schX: -23, schY: 10, pinCount: 3, pitch: "2.54mm", gender: "female", pcbX: "-34mm", pcbY: "6.25mm", showSilkscreenPinLabels: true, pinLabels: ["B1", "NC", "B2"] }), jsxRuntime.jsx("pinheader", { name: "SW2_TOP", schX: -23, schY: 6, pinCount: 3, pitch: "2.54mm", gender: "female", pcbX: "-20mm", pcbY: "12.75mm", showSilkscreenPinLabels: true, pinLabels: ["A1", "NC", "A2"] }), jsxRuntime.jsx("pinheader", { name: "SW2_BOT", schX: -23, schY: 3, pinCount: 3, pitch: "2.54mm", gender: "female", pcbX: "-20mm", pcbY: "6.25mm", showSilkscreenPinLabels: true, pinLabels: ["B1", "NC", "B2"] }), jsxRuntime.jsx("pinheader", { name: "J_SIM_RIGHT", cadModel: envelope(), schX: 18, schY: 1, pinCount: 6, pitch: "2.54mm", gender: "female", pcbX: "-18.5mm", pcbY: "-16mm", pcbRotation: "90deg", showSilkscreenPinLabels: true, pinLabels: ["GND", "TXD", "RXD", "BOOT", "VCC", "NET"] }), jsxRuntime.jsx("pinheader", { name: "J_SIM_LEFT", schX: 24, schY: 1, pinCount: 6, pitch: "2.54mm", gender: "female", pcbX: `${ -18.5 + SIM_LEFT_DX}mm`, pcbY: `${ -16 + SIM_LEFT_DY}mm`, pcbRotation: "90deg", showSilkscreenPinLabels: true, pinLabels: ["SPKN", "SPKP", "MICM", "MICP", "DTR", "RING"] }), jsxRuntime.jsx("pinheader", { name: "ANT_SIM", schX: 24, schY: -6, pinCount: 1, pitch: "2.54mm", gender: "female", holeDiameter: "1.2mm", pcbX: "-18.5mm", pcbY: "-5.5mm", showSilkscreenPinLabels: true, pinLabels: ["ANT"] }), jsxRuntime.jsx("transistor", { name: "Q_PWRKEY", type: "npn", footprint: "sot23", pcbX: "-24mm", pcbY: "-14.7mm", pinLabels: { pin1: "base", pin2: "emitter", pin3: "collector" }, schX: 12, schY: -8 }), jsxRuntime.jsx("resistor", { name: "R_PWRKEY_B", resistance: "4.7k", footprint: "0603", pcbX: "-29mm", pcbY: "-12mm", schX: 9, schY: -8 }), jsxRuntime.jsx("resistor", { name: "R_PWRKEY_BE", resistance: "47k", footprint: "0603", pcbX: "-28.5mm", pcbY: "-16.5mm", schX: 6, schY: -8 }), jsxRuntime.jsx("resistor", { name: "R_ANT_LINK", resistance: "0", footprint: "0603", pcbX: "-15mm", pcbY: "-7.5mm", schX: 24, schY: -9 }), jsxRuntime.jsx("capacitor", { name: "C_BULK", capacitance: "1000uF", maxVoltageRating: "6.3V", polarized: true, pcbX: "-21.5mm", pcbY: "0mm", pcbRotation: "-90deg", schX: -9, schY: -4, footprint: jsxRuntime.jsxs("footprint", { children: [jsxRuntime.jsx("platedhole", { shape: "circle", holeDiameter: 0.9, outerDiameter: 1.8, pcbX: -1.75, portHints: ["pin1"] }), jsxRuntime.jsx("platedhole", { shape: "circle", holeDiameter: 0.9, outerDiameter: 1.8, pcbX: 1.75, portHints: ["pin2"] }), jsxRuntime.jsx("silkscreencircle", { radius: 4, strokeWidth: 0.15 })] }), cadModel: { jscad: { type: "translate", vector: [0, 0, 10], shape: { type: "cylinder", radius: 4, height: 20 } } } }), jsxRuntime.jsx("capacitor", { name: "C_MODEM_HF", capacitance: "100nF", footprint: "0805", pcbX: "-13mm", pcbY: "-11mm", schX: -6, schY: -4 }), jsxRuntime.jsx("capacitor", { name: "C_MODEM_MID", capacitance: "10uF", footprint: "0805", pcbX: "-13mm", pcbY: "-14mm", schX: -3, schY: -4 }), jsxRuntime.jsx("capacitor", { name: "C_LOGIC", capacitance: "10uF", footprint: "1206", pcbX: "23mm", pcbY: "10mm", schX: -9, schY: 1 }), jsxRuntime.jsx("pinheader", { name: "J_GPS", cadModel: envelope(), schX: 18, schY: 10, pinCount: 4, pitch: "2.54mm", gender: "female", pcbX: "2.5mm", pcbY: "-7.5mm", showSilkscreenPinLabels: true, pinLabels: ["VCC", "RX", "TX", "GND"] }), jsxRuntime.jsx("hole", { name: "H_GPS_1", diameter: "2.2mm", pcbX: "-7.66mm", pcbY: "-5.03mm" }), jsxRuntime.jsx("hole", { name: "H_GPS_2", diameter: "2.2mm", pcbX: "12.66mm", pcbY: "-5.03mm" }), jsxRuntime.jsx("hole", { name: "H_GPS_3", diameter: "2.2mm", pcbX: "-7.66mm", pcbY: "-32.97mm" }), jsxRuntime.jsx("hole", { name: "H_GPS_4", diameter: "2.2mm", pcbX: "12.66mm", pcbY: "-32.97mm" }), jsxRuntime.jsx("pinheader", { name: "TP_OUT_P", cadModel: envelope(), schX: -17, schY: -4, pinCount: 1, pitch: "2.54mm", gender: "female", pcbX: `${TP_X - 6.5}mm`, pcbY: "-8.5mm", showSilkscreenPinLabels: true, pinLabels: ["OUT_P"] }), jsxRuntime.jsx("pinheader", { name: "TP_BAT_P", schX: -23, schY: -1, pinCount: 1, pitch: "2.54mm", gender: "female", pcbX: `${TP_X - 2.5}mm`, pcbY: "-8.5mm", showSilkscreenPinLabels: true, pinLabels: ["BAT_P"] }), jsxRuntime.jsx("pinheader", { name: "TP_BAT_N", schX: -23, schY: -8, pinCount: 1, pitch: "2.54mm", gender: "female", pcbX: `${TP_X + 2.5}mm`, pcbY: "-8.5mm", showSilkscreenPinLabels: true, pinLabels: ["BAT_N"] }), jsxRuntime.jsx("pinheader", { name: "TP_OUT_N", schX: -17, schY: -8, pinCount: 1, pitch: "2.54mm", gender: "female", pcbX: `${TP_X + 6.5}mm`, pcbY: "-8.5mm", showSilkscreenPinLabels: true, pinLabels: ["OUT_N"] }), jsxRuntime.jsx("pinheader", { name: "TP_IN_P", schX: -23, schY: -12, pinCount: 1, pitch: "2.54mm", gender: "female", pcbX: `${TP_X - 6.5}mm`, pcbY: "-33mm", showSilkscreenPinLabels: true, pinLabels: ["IN_P"] }), jsxRuntime.jsx("pinheader", { name: "TP_IN_N", schX: -17, schY: -12, pinCount: 1, pitch: "2.54mm", gender: "female", pcbX: `${TP_X + 6.5}mm`, pcbY: "-33mm", showSilkscreenPinLabels: true, pinLabels: ["IN_N"] }), jsxRuntime.jsx("resistor", { name: "R_NTC_TOP", resistance: "4.7k", footprint: "0603", pcbX: "38mm", pcbY: "-27.5mm", schX: -20, schY: -14 }), jsxRuntime.jsx("resistor", { name: "R_NTC_BOT", resistance: "47k", footprint: "0603", pcbX: "38mm", pcbY: "-24mm", schX: -17, schY: -14 }), jsxRuntime.jsx("pinheader", { name: "J_NTC", pinCount: 2, pitch: "2.54mm", gender: "male", pcbRotation: "90deg", pcbX: "42mm", pcbY: "-19mm", pinLabels: ["NTC_TEMP", "NTC_RET"], showSilkscreenPinLabels: true, schX: -14, schY: -14 }), jsxRuntime.jsx("pinheader", { name: "TP_TEMP", pinCount: 1, pitch: "2.54mm", gender: "male", pcbX: "38mm", pcbY: "-12.5mm", pinLabels: ["TEMP"], showSilkscreenPinLabels: true, schX: -11, schY: -14 }), jsxRuntime.jsx("hole", { name: "H_TP_TIE_L", diameter: "1.8mm", pcbX: `${TP_X - 9.8}mm`, pcbY: "-21mm" }), jsxRuntime.jsx("hole", { name: "H_TP_TIE_R", diameter: "1.8mm", pcbX: `${TP_X + 9.8}mm`, pcbY: "-21mm" }), jsxRuntime.jsx("pinheader", { name: "J_BAT", pinCount: 2, pitch: "2.50mm", gender: "male", pcbX: `${TP_X}mm`, pcbY: "-3.5mm", layer: "bottom", pcbRotation: "180deg", schX: -23, schY: -4, showSilkscreenPinLabels: true, pinLabels: ["BAT_PLUS", "BAT_MINUS"] }), [
["CELL_P", ["TP_BAT_P.pin1", "J_BAT.BAT_PLUS"], 1.6],
["CELL_N", ["TP_BAT_N.pin1", "J_BAT.BAT_MINUS"], 1.6],
["VBAT_PROTECTED", ["TP_OUT_P.pin1", "J_LOAD_SWITCH.IN"], 1.6],
["VBAT_SWITCHED", ["J_LOAD_SWITCH.OUT", "J_REG.VIN", "J_SIM_RIGHT.VCC", "C_MODEM_HF.pin1", "C_MODEM_MID.pin1"], 1.6],
["V3V3", ["J_REG.V3V3", "J_ESP_BOT.3V3", "J_GPS.VCC", "C_LOGIC.pin1"], 0.6],
["GND", ["J_REG.GND", "J_ESP_TOP.GND1", "J_ESP_TOP.GND2", "J_ESP_BOT.GND", "J_GPS.GND", "J_SIM_RIGHT.GND", "C_BULK.pin2", "C_MODEM_HF.pin2", "C_MODEM_MID.pin2", "C_LOGIC.pin2", "SW1_BOT.B1", "SW1_BOT.B2", "SW2_BOT.B1", "SW2_BOT.B2", "LED_TRACK.CATHODE", "LED_CAP.CATHODE", "Q_PWRKEY.emitter", "R_PWRKEY_BE.pin2", "R_MRX_PD.pin2"], 1.6],
["ESP_TX", ["J_ESP_TOP.G22", "R_MRX_SER.pin1"], 0.3],
["MODEM_RX", ["R_MRX_SER.pin2", "R_MRX_PD.pin1", "J_SIM_RIGHT.RXD"], 0.3],
["MODEM_TX", ["J_SIM_RIGHT.TXD", "R_MTX_SER.pin1"], 0.3],
["ESP_RX", ["R_MTX_SER.pin2", "J_ESP_TOP.G21"], 0.3],
["MODEM_PWRKEY_CTL", ["J_ESP_BOT.G32", "R_PWRKEY_B.pin1"], 0.3],
["MODEM_PWRKEY_BASE", ["R_PWRKEY_B.pin2", "Q_PWRKEY.base", "R_PWRKEY_BE.pin1"], 0.3],
["MODEM_BOOT", ["Q_PWRKEY.collector", "J_SIM_RIGHT.BOOT"], 0.3],
["MODEM_RF", ["J_SIM_RIGHT.NET", "R_ANT_LINK.pin1"], 0.8],
["ANT_FEED", ["R_ANT_LINK.pin2", "ANT_SIM.pin1"], 0.8],
["CHG_VIN", ["TP_IN_P.pin1", "R_NTC_TOP.pin1"], 0.3],
["CHG_TEMP", ["R_NTC_TOP.pin2", "R_NTC_BOT.pin1", "J_NTC.NTC_TEMP", "TP_TEMP.pin1"], 0.3],
["CHG_GND", ["TP_IN_N.pin1", "R_NTC_BOT.pin2", "J_NTC.NTC_RET"], 0.3],
["GPS_TX", ["J_GPS.TX", "J_ESP_TOP.G16"], 0.3],
["GPS_RX", ["J_GPS.RX", "J_ESP_TOP.G17"], 0.3],
["BTN_TRACK", ["SW1_TOP.A1", "SW1_TOP.A2", "J_ESP_TOP.G18"], 0.3],
["BTN_CAP", ["SW2_TOP.A1", "SW2_TOP.A2", "J_ESP_TOP.G19"], 0.3],
["LED_TRACK_DRIVE", ["J_ESP_BOT.G25", "R_LED1.pin1"], 0.3],
["LED_TRACK_A", ["R_LED1.pin2", "LED_TRACK.ANODE"], 0.3],
["LED_CAP_DRIVE", ["J_ESP_BOT.G26", "R_LED2.pin1"], 0.3],
["LED_CAP_A", ["R_LED2.pin2", "LED_CAP.ANODE"], 0.3],
].flatMap(([net, pins, width]) => pins.map(pin => {
const [component, label] = pin.split(".");
return jsxRuntime.jsx("trace", { name: `${net}_${component}_${label}`, from: `.${component} > .${label}`, to: `net.${net}`, thickness: `${width}mm` }, `${net}_${component}_${label}`);
})), jsxRuntime.jsx("trace", { name: "VBAT_BULK_TO_MODEM", from: ".C_BULK > .pin1", to: ".J_SIM_RIGHT > .VCC", thickness: "1.6mm", pcbPath: [".C_BULK > .pin1", { x: -1.75, y: -2.5 }, { x: 8.5, y: -2.5 }, { x: 11, y: 0.7 }, ".J_SIM_RIGHT > .VCC"] }), jsxRuntime.jsx("trace", { name: "GND_CHARGER_RETURN", from: ".TP_OUT_N > .pin1", to: ".J_ESP_BOT > .GND", thickness: "1.6mm", pcbPath: [".TP_OUT_N > .pin1", { x: -3, y: 3.5 }, { x: -3, y: 3.5, via: true, fromLayer: "top", toLayer: "bottom" },
{ x: -3, y: 8 }, { x: -9, y: 8 }, ".J_ESP_BOT > .GND"] }), jsxRuntime.jsx("copperpour", { connectsTo: "net.GND", layer: "bottom", padMargin: "0.35mm", boardEdgeMargin: "0.5mm" }), jsxRuntime.jsx("silkscreentext", { text: `BONYO CARRIER ${REVISION}`, pcbX: -22, pcbY: -33.6, fontSize: 0.9 }), jsxRuntime.jsx("silkscreentext", { text: "+", pcbX: -23.6, pcbY: 1.75, fontSize: 1.4 }), jsxRuntime.jsx("silkscreentext", { text: "VIN NC / EXT REG 3V3", pcbX: 12, pcbY: 5, fontSize: 0.8 })] }));
};
module.exports = index;