mohan-bee/drone

This code defines the physical hardware layout and component placements for a drone's circuit board, including outlines, cutouts, and detailed PCB footprints for various electronic components like microcontrollers, sensors, connectors, and passive devices.

Version
1.0.11
License
unset
Stars
0

sections/ControllerSection.tsx

import { pcbPlacement } from "../board/PcbPlacement"
import { ESP32_WROOM_32_N4 } from "../imports/ESP32_WROOM_32_N4"

const fp0603 = "0603"
const section = "ESP32 Controller"

export const ControllerSection = () => (
  <>
    <schematicsection name={section} />
    <ESP32_WROOM_32_N4 name="U8" obstructsWithinBounds={false} schSectionName={section} {...pcbPlacement("U8")} />
    <capacitor name="C9" capacitance="10uF" footprint={fp0603} schSectionName={section} {...pcbPlacement("C9")} />
    <capacitor name="C10" capacitance="1uF" footprint={fp0603} schSectionName={section} {...pcbPlacement("C10")} />
    <capacitor name="C11" capacitance="100nF" footprint={fp0603} schSectionName={section} {...pcbPlacement("C11")} />
    <resistor name="R10" resistance="10k" footprint={fp0603} schSectionName={section} {...pcbPlacement("R10")} />
    <resistor name="R11" resistance="10k" footprint={fp0603} schSectionName={section} {...pcbPlacement("R11")} />
    <trace from=".U8 > .3V3" to="net.V3V3" />
    <trace from=".U8 > .GND1" to="net.GND" /><trace from=".U8 > .GND2" to="net.GND" />
    <trace from=".U8 > .GND3" to="net.GND" /><trace from=".U8 > .GND4" to="net.GND" />
    <trace from=".U8 > .EN" to="net.EN" /><trace from=".U8 > .TXD0" to="net.TX" /><trace from=".U8 > .RXD0" to="net.RX" />
    <trace from=".U8 > .IO0" to="net.IO0" /><trace from=".U8 > .IO35" to="net.ADC_BAT" /><trace from=".U8 > .IO34" to="net.EXI5" />
    <trace from=".U8 > .IO13" to="net.EXIO1" /><trace from=".U8 > .IO15" to="net.EXIO2" /><trace from=".U8 > .IO2" to="net.EXIO3" /><trace from=".U8 > .IO19" to="net.EXIO4" />
    <trace from=".U8 > .IO23" to="net.LED_1" /><trace from=".U8 > .IO5" to="net.LED_2" /><trace from=".U8 > .IO18" to="net.LED_3" />
    <trace from=".U8 > .IO4" to="net.MOT_1" /><trace from=".U8 > .IO33" to="net.MOT_2" /><trace from=".U8 > .IO32" to="net.MOT_3" /><trace from=".U8 > .IO25" to="net.MOT_4" />
    <trace from=".U8 > .IO16" to="net.RXD2" /><trace from=".U8 > .IO17" to="net.TXD2" />
    <trace from=".U8 > .IO12" to="net.SRV_1" /><trace from=".U8 > .IO14" to="net.SRV_2" /><trace from=".U8 > .IO27" to="net.SRV_3" /><trace from=".U8 > .IO26" to="net.SRV_4" />
    <trace from=".U8 > .IO21" to="net.SDA" /><trace from=".U8 > .IO22" to="net.SCL" />
    <trace from=".C9 > .pin1" to="net.V3V3" /><trace from=".C9 > .pin2" to="net.GND" />
    <trace from=".C10 > .pin1" to="net.V3V3" /><trace from=".C10 > .pin2" to="net.GND" />
    <trace from=".C11 > .pin1" to="net.EN" /><trace from=".C11 > .pin2" to="net.GND" />
    <trace from=".R10 > .pin2" to="net.V3V3" /><trace from=".R10 > .pin1" to="net.EN" />
    <trace from=".R11 > .pin2" to="net.V3V3" /><trace from=".R11 > .pin1" to="net.IO0" />
  </>
)

export default () => (
  <board routingDisabled schAutoLayoutEnabled schTraceAutoLabelEnabled schMaxTraceDistance="8mm">
    <ControllerSection />
  </board>
)