mohan-bee/light-controller
This code defines the hardware sections and symbols for a PCB involving USB power, voltage regulation, ESP12F module, RGB outputs, I2C sensors, and debug points, along with rendering labels for test points.
- Version
- 1.0.30
- License
- unset
- Stars
- 2
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone mohan-bee/light-controller # download the package files into ./light-controller
tsci add mohan-bee/light-controller # add it to your project as @tsci/mohan-bee.light-controllerIn 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.
index.circuit.tsx
PCB
Schematic
import { AO3400A } from "./imports/AO3400A"
import { ME6211C33M5G_N } from "./imports/ME6211C33M5G_N"
import { BSMD1206_200_12V } from "./imports/BSMD1206_200_12V"
import { DB128V_5_08_4P_GN_S } from "./imports/DB128V_5_08_4P_GN_S"
import { ESP_12F_ESP8266MOD_ } from "./imports/ESP_12F_ESP8266MOD_"
import { HX_3x4x2_5_PA_4N_push_button_switch } from "./imports/HX_3x4x2_5_PA_4N_push_button_switch"
import { S4_3528RGBTA_A } from "./imports/S4_3528RGBTA_A"
import { TYPE_C_31_M_12 } from "./imports/TYPE_C_31_M_12"
import { A_2_54_1_3P_ } from "./imports/A_2_54_1_3P_"
import {
DEBUG_SECTION,
ESP_SECTION,
hiddenPcbText,
POWER_SECTION,
RGB_SECTION,
SENSOR_SECTION,
USB_SECTION,
} from "./boardConfig"
import { TestPointLabel } from "./components/TestPointLabel"
const FIRE_OUTER_ROUTE = [
{ x: -13.5, y: -22.2 },
{ x: -13.959, y: -22.126 },
{ x: -14.356, y: -21.986 },
{ x: -14.688, y: -21.787 },
{ x: -14.95, y: -21.537 },
{ x: -15.137, y: -21.246 },
{ x: -15.244, y: -20.92 },
{ x: -15.266, y: -20.569 },
{ x: -15.2, y: -20.2 },
{ x: -15.103, y: -19.876 },
{ x: -14.97, y: -19.575 },
{ x: -14.812, y: -19.293 },
{ x: -14.638, y: -19.025 },
{ x: -14.459, y: -18.766 },
{ x: -14.286, y: -18.513 },
{ x: -14.129, y: -18.259 },
{ x: -14, y: -18 },
{ x: -13.99, y: -18.323 },
{ x: -13.959, y: -18.619 },
{ x: -13.905, y: -18.886 },
{ x: -13.825, y: -19.125 },
{ x: -13.717, y: -19.336 },
{ x: -13.578, y: -19.519 },
{ x: -13.407, y: -19.673 },
{ x: -13.2, y: -19.8 },
{ x: -12.984, y: -19.674 },
{ x: -12.788, y: -19.522 },
{ x: -12.609, y: -19.346 },
{ x: -12.45, y: -19.15 },
{ x: -12.309, y: -18.935 },
{ x: -12.188, y: -18.703 },
{ x: -12.084, y: -18.457 },
{ x: -12, y: -18.2 },
{ x: -11.757, y: -18.529 },
{ x: -11.553, y: -18.841 },
{ x: -11.392, y: -19.139 },
{ x: -11.275, y: -19.425 },
{ x: -11.205, y: -19.702 },
{ x: -11.184, y: -19.972 },
{ x: -11.215, y: -20.237 },
{ x: -11.3, y: -20.5 },
{ x: -11.37, y: -20.922 },
{ x: -11.503, y: -21.286 },
{ x: -11.697, y: -21.592 },
{ x: -11.95, y: -21.838 },
{ x: -12.259, y: -22.022 },
{ x: -12.622, y: -22.145 },
{ x: -13.036, y: -22.205 },
{ x: -13.5, y: -22.2 },
]
const FIRE_INNER_ROUTE = [
{ x: -13.45, y: -21.75 },
{ x: -13.7, y: -21.55 },
{ x: -13.82, y: -21.26 },
{ x: -13.78, y: -20.94 },
{ x: -13.55, y: -20.6 },
{ x: -13.38, y: -20.28 },
{ x: -13.17, y: -20.52 },
{ x: -12.92, y: -20.65 },
{ x: -12.68, y: -20.6 },
{ x: -12.5, y: -20.38 },
{ x: -12.39, y: -20.08 },
{ x: -12.25, y: -20.4 },
{ x: -12.2, y: -20.78 },
{ x: -12.28, y: -21.16 },
{ x: -12.51, y: -21.47 },
{ x: -12.88, y: -21.68 },
{ x: -13.45, y: -21.75 },
]
function BottomSilkscreenGraphic() {
const alignedFireRoute = (route: Array<{ x: number; y: number }>) =>
route.map(({ x, y }) => ({ x: x + 15, y: y + 4.1 }))
const tscircuitLogoSvg = `data:image/svg+xml,${encodeURIComponent(`
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 92 101">
<path d="M71 26.852L73.349 27.006L75.659 27.465L77.888 28.222L80 29.264L81.958 30.572L83.728 32.124L85.28 33.894L86.588 35.852L87.63 37.964L88.387 40.193L88.846 42.503L89 44.852L89 82.852L88.846 85.201L88.387 87.511L87.63 89.74L86.588 91.852L85.28 93.81L83.728 95.58L81.958 97.132L80 98.44L77.888 99.482L75.659 100.239L73.349 100.698L71 100.852L29 100.852L26.651 100.698L24.341 100.239L22.112 99.482L20 98.44L18.042 97.132L16.272 95.58L14.72 93.81L13.412 91.852L12.37 89.74L11.613 87.511L11.154 85.201L11 82.852L11 44.852L11.154 42.503L11.613 40.193L12.37 37.964L13.412 35.852L14.72 33.894L16.272 32.124L18.042 30.572L20 29.264L22.112 28.222L24.341 27.465L26.651 27.006L29 26.852Z" fill="#000"/>
<path d="M78.5 37.852C75.8057 37.852 74.1218 40.7687 75.4689 43.102C76.0941 44.1849 77.2496 44.852 78.5 44.852C81.1943 44.852 82.8782 41.9353 81.5311 39.602C80.9059 38.5191 79.7504 37.852 78.5 37.852Z" fill="white"/>
<path d="M61.5753 59.975V71.499C61.5753 72.3016 61.3889 72.8893 61.0163 73.262C60.6149 73.606 59.9556 73.778 59.0383 73.778H56.2433V78.852H60.0273C65.1013 78.852 67.6383 76.3866 67.6383 71.456V59.975H70.4763V55.03H67.6383V49.139H61.5753V55.03H56.2433V59.975H61.5753ZM42.7974 79.239C44.7467 79.239 46.4954 78.895 48.0434 78.207C49.5914 77.4903 50.824 76.53 51.7414 75.326C52.63 74.122 53.1174 72.789 53.2034 71.327H47.1404C47.0257 72.2443 46.5814 73.004 45.8074 73.606C45.0047 74.208 44.0157 74.509 42.8404 74.509C41.6937 74.509 40.805 74.2796 40.1744 73.821C39.515 73.3623 39.1854 72.7746 39.1854 72.058C39.1854 71.284 39.5867 70.7106 40.3894 70.338C41.1634 69.9366 42.4104 69.5066 44.1304 69.048C45.9077 68.618 47.3697 68.1736 48.5164 67.715C49.6344 67.2563 50.609 66.554 51.4404 65.608C52.243 64.662 52.6444 63.3863 52.6444 61.781C52.6444 60.4623 52.2717 59.2583 51.5264 58.169C50.7524 57.0796 49.663 56.2196 48.2584 55.589C46.825 54.9583 45.148 54.643 43.2274 54.643C40.3894 54.643 38.1247 55.3596 36.4334 56.793C34.742 58.1976 33.8104 60.104 33.6384 62.512H39.4004C39.4864 61.566 39.8877 60.8206 40.6044 60.276C41.2924 59.7026 42.224 59.416 43.3994 59.416C44.4887 59.416 45.3344 59.6166 45.9364 60.018C46.5097 60.4193 46.7964 60.9783 46.7964 61.695C46.7964 62.4976 46.395 63.114 45.5924 63.544C44.7897 63.9453 43.5427 64.361 41.8514 64.791C40.1314 65.221 38.7124 65.6653 37.5944 66.124C36.4764 66.5826 35.516 67.2993 34.7134 68.274C33.882 69.22 33.452 70.4813 33.4234 72.058C33.4234 73.434 33.8104 74.6666 34.5844 75.756C35.3297 76.8453 36.419 77.7053 37.8524 78.336C39.257 78.938 40.9054 79.239 42.7974 79.239Z" fill="white"/>
<path d="M21 22.352L16.5 24.352L9.5 5.852L16.5 0.852L21 22.352Z" fill="#000" stroke="#000"/>
<path d="M12.2143 25.4493L11.6876 27.5385L2.3779 22.1466L2.4552 18.1414L12.2143 25.4493Z" fill="#000" stroke="#000"/>
</svg>
`)}`
return (
<>
<silkscreengraphic
imageUrl={tscircuitLogoSvg}
pcbX={-8}
pcbY={6}
width="18mm"
height="19.8mm"
layer="bottom"
/>
<silkscreentext
text="tscircuit"
pcbX={-8}
pcbY={-9.5}
fontSize="4.5mm"
layer="bottom"
/>
<silkscreentext
text="vibed by mohan-bee"
pcbX={-12.5}
pcbY={-16.5}
fontSize="1.9mm"
layer="bottom"
/>
{/* Smooth custom flame icon; avoids unreliable emoji font rendering. */}
<silkscreenpath
route={alignedFireRoute(FIRE_OUTER_ROUTE)}
strokeWidth="0.32mm"
layer="bottom"
/>
<silkscreenpath
route={alignedFireRoute(FIRE_INNER_ROUTE)}
strokeWidth="0.25mm"
layer="bottom"
/>
</>
)
}
export default function LightControllerBoard() {
return (
<board
title="RGB Light Controller"
layers={2}
width="60mm"
height="44mm"
borderRadius="3mm"
minViaHoleDiameter="0.3mm"
minViaPadDiameter="0.45mm"
pcbPack={false}
schAutoLayoutEnabled
>
<schematicsection name={USB_SECTION} displayName="USB-C Power Input" />
<schematicsection name={POWER_SECTION} displayName="Power Supply" />
<schematicsection name={ESP_SECTION} displayName="ESP8266 Control" />
<schematicsection name={RGB_SECTION} displayName="RGB Outputs" />
<schematicsection
name={SENSOR_SECTION}
displayName="Sensors and UART"
/>
<schematicsection name={DEBUG_SECTION} displayName="Debug and Test" />
{/* M3 mounting holes, centered 4 mm from each board edge. */}
<hole name="H1" diameter="3.2mm" pcbX={-26} pcbY={18} />
<hole name="H2" diameter="3.2mm" pcbX={26} pcbY={18} />
<hole name="H3" diameter="3.2mm" pcbX={-26} pcbY={-18} />
<hole name="H4" diameter="3.2mm" pcbX={26} pcbY={-18} />
<silkscreentext
text="ESP8266 RGB CONTROLLER"
pcbX={0}
pcbY={-15}
fontSize="1.8mm"
layers={["top"]}
/>
<silkscreentext
text="USB-C"
pcbX={-22.5}
pcbY={6}
fontSize="1.5mm"
layers={["top"]}
/>
<silkscreentext
text="RGB OUTPUT"
pcbX={23}
pcbY={11.5}
fontSize="1.5mm"
layers={["top"]}
/>
<silkscreentext
text="RGB TEST"
pcbX={2}
pcbY={-3.5}
fontSize="1mm"
layers={["top"]}
/>
<silkscreentext text="GND" pcbX={3.39} pcbY={4.4} fontSize="1mm" layers={["top"]} />
<silkscreentext text="3V3" pcbX={5.93} pcbY={4.4} fontSize="1mm" layers={["top"]} />
<silkscreentext text="SDA" pcbX={8.47} pcbY={4.4} fontSize="1mm" layers={["top"]} />
<silkscreentext text="SCL" pcbX={11.01} pcbY={4.4} fontSize="1mm" layers={["top"]} />
<silkscreentext text="GND" pcbX={4.66} pcbY={-10.2} fontSize="1mm" layers={["top"]} />
<silkscreentext text="TX" pcbX={7.2} pcbY={-10.2} fontSize="1mm" layers={["top"]} />
<silkscreentext text="RX" pcbX={9.74} pcbY={-10.2} fontSize="1mm" layers={["top"]} />
<silkscreentext
text="RESET"
pcbX={-23}
pcbY={-9.5}
fontSize="1.5mm"
layers={["top"]}
/>
<silkscreentext
text="BOOT"
pcbX={-15}
pcbY={-9.5}
fontSize="1.5mm"
layers={["top"]}
/>
<silkscreentext
text="+5V"
pcbX={22}
pcbY={-7.6}
fontSize="1.4mm"
layers={["top"]}
/>
<silkscreentext
text="R"
pcbX={22}
pcbY={-2.5}
fontSize="1.4mm"
layers={["top"]}
/>
<silkscreentext
text="G"
pcbX={22}
pcbY={2.5}
fontSize="1.4mm"
layers={["top"]}
/>
<silkscreentext
text="B"
pcbX={22}
pcbY={7.6}
fontSize="1.4mm"
layers={["top"]}
/>
{([
["5V", -10],
["3V3", -6.5],
["GND", -3],
["TX", 0.5],
["RX", 4],
["IO0", 7.5],
["RST", 11],
] as const).map(([text, pcbX]) => (
<TestPointLabel
key={text}
text={text}
pcbX={pcbX}
/>
))}
<BottomSilkscreenGraphic />
{/* Both-layer copper/component keepout beneath the ESP-12F antenna. */}
<keepout
shape="rect"
pcbX={-8}
pcbY={17.5}
width="12.5mm"
height="5mm"
layers={["top", "bottom"]}
excludeRefs={[".U_MCU"]}
/>
<copperpour
name="GND_PLANE_BOTTOM"
layer="bottom"
connectsTo="net.GND"
/>
{/* Low-cost USB-C power input. Programming is through J_UART. */}
<TYPE_C_31_M_12
name="J1"
pcbX={-26}
pcbY={0}
pcbRotation={270}
shouldBeOnEdgeOfBoard
schMarginRight={1}
schSectionName={USB_SECTION}
/>
<resistor resistance="5.1k" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C23186"] }}
name="R_CC1"
pcbX={-21}
pcbY={-3.5}
pcbStyle={hiddenPcbText}
schMarginLeft={2}
schSectionName={USB_SECTION}
/>
<resistor resistance="5.1k" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C23186"] }}
name="R_CC2"
pcbX={-21}
pcbY={3.5}
pcbStyle={hiddenPcbText}
schSectionName={USB_SECTION}
/>
<trace from=".J1 > .VBUS1" to="net.VBUS_5V" />
<trace from=".J1 > .VBUS2" to="net.VBUS_5V" />
<trace from=".J1 > .GND1" to="net.GND" />
<trace from=".J1 > .GND2" to="net.GND" />
<trace from=".J1 > .SHELL1" to="net.GND" />
<trace from=".J1 > .SHELL2" to="net.GND" />
<trace from=".J1 > .SHELL3" to="net.GND" />
<trace from=".J1 > .SHELL4" to="net.GND" />
<trace from=".J1 > .CC1" to=".R_CC1 > .pin1" />
<trace from=".R_CC1 > .pin2" to="net.GND" />
<trace from=".J1 > .CC2" to=".R_CC2 > .pin1" />
<trace from=".R_CC2 > .pin2" to="net.GND" />
{/* Protected 5 V rail and 3.3 V regulator */}
<BSMD1206_200_12V
name="F1"
symbol={undefined}
pcbX={-19}
pcbY={0}
schSectionName={POWER_SECTION}
/>
<ME6211C33M5G_N
name="U_REG"
pcbX={-13}
pcbY={0}
schHeight={0.6}
schSectionName={POWER_SECTION}
/>
<capacitor capacitance="10uF" footprint="0805" supplierPartNumbers={{ jlcpcb: ["C5137471"] }}
name="C_REG_IN_BULK"
pcbX={-17}
pcbY={2.3}
schSectionName={POWER_SECTION}
/>
<capacitor capacitance="100nF" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C14663"] }}
name="C_REG_IN_HF"
pcbX={-17}
pcbY={-2.7}
pcbStyle={hiddenPcbText}
schSectionName={POWER_SECTION}
/>
<capacitor capacitance="10uF" footprint="0805" supplierPartNumbers={{ jlcpcb: ["C5137471"] }}
name="C_REG_OUT_BULK"
pcbX={-9}
pcbY={2.3}
schSectionName={POWER_SECTION}
/>
<capacitor capacitance="100nF" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C14663"] }}
name="C_REG_OUT_HF"
pcbX={-9}
pcbY={-2.7}
pcbStyle={hiddenPcbText}
schSectionName={POWER_SECTION}
/>
<trace from="net.VBUS_5V" to=".F1 > .pin1" />
<trace from=".F1 > .pin2" to="net.V5_SYS" />
<trace from=".U_REG > .VIN" to="net.V5_SYS" />
<trace from=".U_REG > .EN" to=".U_REG > .VIN" />
<trace from=".U_REG > .GND" to="net.GND" />
<trace from=".U_REG > .VOUT" to="net.V3_3" />
<trace from=".C_REG_IN_BULK > .pin1" to="net.V5_SYS" />
<trace from=".C_REG_IN_BULK > .pin2" to="net.GND" />
<trace from=".C_REG_IN_HF > .pin1" to="net.V5_SYS" />
<trace from=".C_REG_IN_HF > .pin2" to="net.GND" />
<trace from=".C_REG_OUT_BULK > .pin1" to="net.V3_3" />
<trace from=".C_REG_OUT_BULK > .pin2" to="net.GND" />
<trace from=".C_REG_OUT_HF > .pin1" to="net.V3_3" />
<trace from=".C_REG_OUT_HF > .pin2" to="net.GND" />
{/* ESP-12F power, boot straps, and manual programming controls */}
<ESP_12F_ESP8266MOD_
name="U_MCU"
pcbX={-8}
pcbY={12}
pcbRotation={270}
schSectionName={ESP_SECTION}
/>
<capacitor capacitance="10uF" footprint="0805" supplierPartNumbers={{ jlcpcb: ["C5137471"] }}
name="C_ESP_BULK"
pcbX={-4.5}
pcbY={1.5}
schSectionName={ESP_SECTION}
/>
<capacitor capacitance="100nF" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C14663"] }}
name="C_ESP_HF"
pcbX={-0.5}
pcbY={1.5}
pcbStyle={hiddenPcbText}
schSectionName={ESP_SECTION}
/>
<resistor resistance="10k" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C25804"] }}
name="R_EN_PU"
pcbX={-22}
pcbY={10}
schSectionName={ESP_SECTION}
/>
<resistor resistance="10k" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C25804"] }}
name="R_RST_PU"
pcbX={-22}
pcbY={7}
schSectionName={ESP_SECTION}
/>
<resistor resistance="10k" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C25804"] }}
name="R_GPIO0_PU"
pcbX={-18.8}
pcbY={7}
schSectionName={ESP_SECTION}
/>
<resistor resistance="10k" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C25804"] }}
name="R_GPIO2_PU"
pcbX={-7}
pcbY={-5}
schSectionName={ESP_SECTION}
/>
<resistor resistance="10k" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C25804"] }}
name="R_GPIO15_PD"
pcbX={-18}
pcbY={-5}
schSectionName={ESP_SECTION}
/>
<HX_3x4x2_5_PA_4N_push_button_switch
name="SW_RESET"
symbol={undefined}
pcbX={-23}
pcbY={-13}
schSectionName={ESP_SECTION}
/>
<HX_3x4x2_5_PA_4N_push_button_switch
name="SW_BOOT"
symbol={undefined}
pcbX={-15}
pcbY={-13}
schSectionName={ESP_SECTION}
/>
<trace from=".U_MCU > .VCC" to="net.V3_3" />
<trace from=".U_MCU > .GND" to="net.GND" />
<trace from=".C_ESP_BULK > .pin1" to="net.V3_3" />
<trace from=".C_ESP_BULK > .pin2" to="net.GND" />
<trace from=".C_ESP_HF > .pin1" to="net.V3_3" />
<trace from=".C_ESP_HF > .pin2" to="net.GND" />
<trace from=".U_MCU > .EN" to="net.ESP_EN" />
<trace from=".R_EN_PU > .pin1" to="net.V3_3" />
<trace from=".R_EN_PU > .pin2" to="net.ESP_EN" />
<trace from=".U_MCU > .RST" to="net.ESP_RST" />
<trace from=".R_RST_PU > .pin1" to="net.V3_3" />
<trace from=".R_RST_PU > .pin2" to="net.ESP_RST" />
<trace from=".SW_RESET > .pin1" to="net.ESP_RST" />
<trace from=".SW_RESET > .pin3" to="net.GND" />
<trace from=".U_MCU > .GPIO0" to="net.ESP_GPIO0" />
<trace from=".R_GPIO0_PU > .pin1" to="net.V3_3" />
<trace from=".R_GPIO0_PU > .pin2" to="net.ESP_GPIO0" />
<trace from=".SW_BOOT > .pin1" to="net.ESP_GPIO0" />
<trace from=".SW_BOOT > .pin3" to="net.GND" />
<trace from=".U_MCU > .GPIO2" to="net.ESP_GPIO2" />
<trace from=".R_GPIO2_PU > .pin1" to="net.V3_3" />
<trace from=".R_GPIO2_PU > .pin2" to="net.ESP_GPIO2" />
<trace from=".U_MCU > .GPIO15" to="net.ESP_GPIO15" />
<trace from=".R_GPIO15_PD > .pin1" to="net.ESP_GPIO15" />
<trace from=".R_GPIO15_PD > .pin2" to="net.GND" />
<trace from=".U_MCU > .RXD0" to="net.ESP_RX" />
<trace from=".U_MCU > .TXD0" to="net.ESP_TX" />
<trace from=".U_MCU > .GPIO12" to="net.RGB_RED_PWM" />
<trace from=".U_MCU > .GPIO13" to="net.RGB_GREEN_PWM" />
<trace from=".U_MCU > .GPIO14" to="net.RGB_BLUE_PWM" />
<trace from=".U_MCU > .GPIO4" to="net.I2C_SDA" />
<trace from=".U_MCU > .GPIO5" to="net.I2C_SCL" />
{/* Three parallel unpopulated 3.3 V I2C header footprints. */}
<pinheader
name="J_SENSOR_1"
gender="unpopulated"
doNotPlace
pinCount={4}
pcbOrientation="horizontal"
pcbX={7.2}
pcbY={2}
pcbStyle={hiddenPcbText}
schSectionName={SENSOR_SECTION}
/>
<pinheader
name="J_SENSOR_2"
gender="unpopulated"
doNotPlace
pinCount={4}
pcbOrientation="horizontal"
pcbX={7.2}
pcbY={-2.5}
pcbStyle={hiddenPcbText}
schSectionName={SENSOR_SECTION}
/>
<pinheader
name="J_SENSOR_3"
gender="unpopulated"
doNotPlace
pinCount={4}
pcbOrientation="horizontal"
pcbX={7.2}
pcbY={-7}
pcbStyle={hiddenPcbText}
schSectionName={SENSOR_SECTION}
/>
<A_2_54_1_3P_
name="J_UART"
doNotPlace
symbol={undefined}
schHeight={0.4}
pcbX={7.2}
pcbY={-12.5}
pcbRotation={180}
pcbStyle={hiddenPcbText}
schSectionName={SENSOR_SECTION}
/>
<resistor resistance="4.7k" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C23162"] }}
name="R_SDA_PU"
pcbX={13}
pcbY={8.5}
pcbStyle={hiddenPcbText}
schSectionName={SENSOR_SECTION}
/>
<resistor resistance="4.7k" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C23162"] }}
name="R_SCL_PU"
pcbX={13}
pcbY={-10.5}
pcbStyle={hiddenPcbText}
schSectionName={SENSOR_SECTION}
/>
<trace from=".J_SENSOR_1 > .pin1" to="net.GND" />
<trace from=".J_SENSOR_1 > .pin2" to="net.V3_3" />
<trace from=".J_SENSOR_1 > .pin3" to="net.I2C_SDA" />
<trace from=".J_SENSOR_1 > .pin4" to="net.I2C_SCL" />
<trace from=".J_SENSOR_2 > .pin1" to="net.GND" />
<trace from=".J_SENSOR_2 > .pin2" to="net.V3_3" />
<trace from=".J_SENSOR_2 > .pin3" to="net.I2C_SDA" />
<trace from=".J_SENSOR_2 > .pin4" to="net.I2C_SCL" />
<trace from=".J_SENSOR_3 > .pin1" to="net.GND" />
<trace from=".J_SENSOR_3 > .pin2" to="net.V3_3" />
<trace from=".J_SENSOR_3 > .pin3" to="net.I2C_SDA" />
<trace from=".J_SENSOR_3 > .pin4" to="net.I2C_SCL" />
<trace from=".J_UART > .pin1" to="net.ESP_RX" />
<trace from=".J_UART > .pin2" to="net.ESP_TX" />
<trace from=".J_UART > .pin3" to="net.GND" />
<trace from=".R_SDA_PU > .pin1" to="net.V3_3" />
<trace from=".R_SDA_PU > .pin2" to="net.I2C_SDA" />
<trace from=".R_SCL_PU > .pin1" to="net.V3_3" />
<trace from=".R_SCL_PU > .pin2" to="net.I2C_SCL" />
{/* Three low-side analog RGB strip channels */}
<resistor resistance="100" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C22775"] }}
name="R_RED_GATE"
pcbX={14.5}
pcbY={-5}
schSectionName={RGB_SECTION}
/>
<resistor resistance="100" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C22775"] }}
name="R_GREEN_GATE"
pcbX={14.5}
pcbY={0}
schSectionName={RGB_SECTION}
/>
<resistor resistance="100" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C22775"] }}
name="R_BLUE_GATE"
pcbX={14.5}
pcbY={5}
schSectionName={RGB_SECTION}
/>
<resistor resistance="100k" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C25803"] }}
name="R_RED_PD"
pcbX={14.5}
pcbY={-7.5}
schSectionName={RGB_SECTION}
/>
<resistor resistance="100k" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C25803"] }}
name="R_GREEN_PD"
pcbX={14.5}
pcbY={-2.5}
schSectionName={RGB_SECTION}
/>
<resistor resistance="100k" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C25803"] }}
name="R_BLUE_PD"
pcbX={14.5}
pcbY={2.5}
schSectionName={RGB_SECTION}
/>
<AO3400A
name="Q_RED"
symbol={undefined}
schHeight={0.4}
pcbX={18.5}
pcbY={-5}
pcbRotation={90}
schSectionName={RGB_SECTION}
/>
<AO3400A
name="Q_GREEN"
symbol={undefined}
schHeight={0.4}
pcbX={18.5}
pcbY={0}
pcbRotation={90}
schMarginLeft={2}
schSectionName={RGB_SECTION}
/>
<AO3400A
name="Q_BLUE"
symbol={undefined}
schHeight={0.4}
pcbX={18.5}
pcbY={5}
pcbRotation={90}
schSectionName={RGB_SECTION}
/>
<DB128V_5_08_4P_GN_S
name="J2"
doNotPlace
pcbX={26}
pcbY={0}
pcbRotation={90}
schMarginRight={2}
schSectionName={RGB_SECTION}
/>
<capacitor
name="C_RGB_BULK"
capacitance="10uF"
footprint="0805"
supplierPartNumbers={{ jlcpcb: ["C5137471"] }}
pcbX={17.5}
pcbY={15.5}
pcbStyle={hiddenPcbText}
schSectionName={RGB_SECTION}
/>
<capacitor capacitance="100nF" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C14663"] }}
name="C_RGB_HF"
pcbX={19}
pcbY={10}
pcbStyle={hiddenPcbText}
schSectionName={RGB_SECTION}
/>
{/* Onboard common-anode RGB LED for testing without an external strip. */}
<S4_3528RGBTA_A
name="LED_RGB_TEST"
symbol={undefined}
pcbX={-1}
pcbY={-7}
pcbStyle={hiddenPcbText}
schSectionName={RGB_SECTION}
/>
<resistor resistance="1k" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C21190"] }}
name="R_ONBOARD_RED"
pcbX={-5}
pcbY={-10.2}
pcbStyle={hiddenPcbText}
schSectionName={RGB_SECTION}
/>
<resistor resistance="1k" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C21190"] }}
name="R_ONBOARD_GREEN"
pcbX={-5}
pcbY={-7}
pcbStyle={hiddenPcbText}
schSectionName={RGB_SECTION}
/>
<resistor resistance="1k" footprint="0603" supplierPartNumbers={{ jlcpcb: ["C21190"] }}
name="R_ONBOARD_BLUE"
pcbX={-1}
pcbY={-10.2}
pcbStyle={hiddenPcbText}
schSectionName={RGB_SECTION}
/>
<trace from="net.RGB_RED_PWM" to=".R_RED_GATE > .pin1" />
<trace from=".R_RED_GATE > .pin2" to=".Q_RED > .G" />
<trace from=".Q_RED > .G" to=".R_RED_PD > .pin1" />
<trace from=".R_RED_PD > .pin2" to="net.GND" />
<trace from=".Q_RED > .S" to="net.GND" />
<trace from=".Q_RED > .D" to="net.LED_RED" />
<trace from="net.RGB_GREEN_PWM" to=".R_GREEN_GATE > .pin1" />
<trace from=".R_GREEN_GATE > .pin2" to=".Q_GREEN > .G" />
<trace from=".Q_GREEN > .G" to=".R_GREEN_PD > .pin1" />
<trace from=".R_GREEN_PD > .pin2" to="net.GND" />
<trace from=".Q_GREEN > .S" to="net.GND" />
<trace from=".Q_GREEN > .D" to="net.LED_GREEN" />
<trace from="net.RGB_BLUE_PWM" to=".R_BLUE_GATE > .pin1" />
<trace from=".R_BLUE_GATE > .pin2" to=".Q_BLUE > .G" />
<trace from=".Q_BLUE > .G" to=".R_BLUE_PD > .pin1" />
<trace from=".R_BLUE_PD > .pin2" to="net.GND" />
<trace from=".Q_BLUE > .S" to="net.GND" />
<trace from=".Q_BLUE > .D" to="net.LED_BLUE" />
<trace from=".J2 > .pin1" to="net.V5_SYS" />
<trace from=".J2 > .pin2" to="net.LED_RED" />
<trace from=".J2 > .pin3" to="net.LED_GREEN" />
<trace from=".J2 > .pin4" to="net.LED_BLUE" />
<trace from=".C_RGB_BULK > .pin1" to="net.V5_SYS" />
<trace from=".C_RGB_BULK > .pin2" to="net.GND" />
<trace from=".C_RGB_HF > .pin1" to="net.V5_SYS" />
<trace from=".C_RGB_HF > .pin2" to="net.GND" />
<trace from=".LED_RGB_TEST > .A" to="net.V5_SYS" />
<trace from=".LED_RGB_TEST > .R" to=".R_ONBOARD_RED > .pin1" />
<trace from=".R_ONBOARD_RED > .pin2" to="net.LED_RED" />
<trace from=".LED_RGB_TEST > .G" to=".R_ONBOARD_GREEN > .pin1" />
<trace from=".R_ONBOARD_GREEN > .pin2" to="net.LED_GREEN" />
<trace from=".LED_RGB_TEST > .B" to=".R_ONBOARD_BLUE > .pin1" />
<trace from=".R_ONBOARD_BLUE > .pin2" to="net.LED_BLUE" />
{/* Debug pads; automatic programming is intentionally omitted in V1 */}
<testpoint
name="TP_5V"
footprintVariant="pad"
padDiameter="2mm"
pcbX={-10}
pcbY={-19.5}
pcbStyle={hiddenPcbText}
pcbMarginX={1}
schSectionName={DEBUG_SECTION}
/>
<testpoint
name="TP_3V3"
footprintVariant="pad"
padDiameter="2mm"
pcbX={-6.5}
pcbY={-19.5}
pcbStyle={hiddenPcbText}
pcbMarginX={1}
schSectionName={DEBUG_SECTION}
/>
<testpoint
name="TP_GND"
footprintVariant="pad"
padDiameter="2mm"
pcbX={-3}
pcbY={-19.5}
pcbStyle={hiddenPcbText}
pcbMarginX={1}
schMarginTop={1}
schSectionName={DEBUG_SECTION}
/>
<testpoint
name="TP_TX"
footprintVariant="pad"
padDiameter="2mm"
pcbX={0.5}
pcbY={-19.5}
pcbStyle={hiddenPcbText}
pcbMarginX={1}
schSectionName={DEBUG_SECTION}
/>
<testpoint
name="TP_RX"
footprintVariant="pad"
padDiameter="2mm"
pcbX={4}
pcbY={-19.5}
pcbStyle={hiddenPcbText}
pcbMarginX={1}
schSectionName={DEBUG_SECTION}
/>
<testpoint
name="TP_GPIO0"
footprintVariant="pad"
padDiameter="2mm"
pcbX={7.5}
pcbY={-19.5}
pcbStyle={hiddenPcbText}
pcbMarginX={1}
schSectionName={DEBUG_SECTION}
/>
<testpoint
name="TP_RST"
footprintVariant="pad"
padDiameter="2mm"
pcbX={11}
pcbY={-19.5}
pcbStyle={hiddenPcbText}
pcbMarginX={1}
schSectionName={DEBUG_SECTION}
/>
<trace from=".TP_5V > .pin1" to="net.V5_SYS" />
<trace from=".TP_3V3 > .pin1" to="net.V3_3" />
<trace from=".TP_GND > .pin1" to="net.GND" />
<trace from=".TP_TX > .pin1" to="net.ESP_TX" />
<trace from=".TP_RX > .pin1" to="net.ESP_RX" />
<trace from=".TP_GPIO0 > .pin1" to="net.ESP_GPIO0" />
<trace from=".TP_RST > .pin1" to="net.ESP_RST" />
</board>
)
}