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/UsbUartSection.tsx

import { pcbPlacement } from "../board/PcbPlacement"
import { CP2102N_A02_GQFN28R } from "../imports/CP2102N_A02_GQFN28R"
import { DDC114TU_7_F } from "../imports/DDC114TU_7_F"

const fp0603 = "0603"
const section = "USB to UART"

export const UsbUartSection = () => (
  <>
    <schematicsection name={section} />
    <CP2102N_A02_GQFN28R name="U6" schSectionName={section} {...pcbPlacement("U6")} />
    <capacitor name="C6" capacitance="100nF" footprint={fp0603} schSectionName={section} {...pcbPlacement("C6")} />
    <capacitor name="C7" capacitance="10uF" footprint={fp0603} schSectionName={section} {...pcbPlacement("C7")} />
    <capacitor name="C8" capacitance="1uF" footprint={fp0603} schSectionName={section} {...pcbPlacement("C8")} />
    <resistor name="R5" resistance="47.5k" footprint={fp0603} schSectionName={section} {...pcbPlacement("R5")} />
    <resistor name="R6" resistance="22.1k" footprint={fp0603} schSectionName={section} {...pcbPlacement("R6")} />
    <resistor name="R7" resistance="10k" footprint={fp0603} schSectionName={section} {...pcbPlacement("R7")} />
    <resistor name="R8" resistance="1k" footprint={fp0603} schSectionName={section} {...pcbPlacement("R8")} />
    <resistor name="R9" resistance="1k" footprint={fp0603} schSectionName={section} {...pcbPlacement("R9")} />
    <DDC114TU_7_F name="U7" schSectionName={section} {...pcbPlacement("U7")} />
    <trace from=".U6 > .D_POS" to="net.DP" /><trace from=".U6 > .D_NEG" to="net.DM" />
    <trace from=".U6 > .VREGIN" to="net.VBUS" /><trace from=".U6 > .GND" to="net.GND" /><trace
      from=".U6 > .EP"
      to="net.GND"
    />
    <trace from=".U6 > .TXD" to=".R8 > .pin2" /><trace from=".R8 > .pin1" to="net.RX" />
    <trace from=".U6 > .RXD" to=".R9 > .pin2" /><trace from=".R9 > .pin1" to="net.TX" />
    <trace from=".U6 > .RTS" to="net.RTS" /><trace from=".U6 > .DTR" to="net.DTR" />
    <trace from=".C6 > .pin1" to="net.VBUS" /><trace from=".C6 > .pin2" to="net.GND" />
    <trace from=".C7 > .pin1" to="net.VBUS" /><trace from=".C7 > .pin2" to="net.GND" />
    <trace from=".U6 > .VDD" to=".C8 > .pin2" /><trace from=".C8 > .pin1" to="net.GND" />
    <trace from=".R6 > .pin2" to="net.VBUS" /><trace from=".R5 > .pin1" to=".R6 > .pin1" />
    <trace from=".R5 > .pin2" to="net.GND" /><trace from=".R5 > .pin1" to=".U6 > .VBUS" />
    <trace from=".R7 > .pin1" to=".U6 > .VDD" /><trace from=".R7 > .pin2" to=".U6 > .RSTb" />
    <trace from=".U7 > .E1" to="net.RTS" /><trace from=".U7 > .B1" to="net.DTR" />
    <trace from=".U7 > .C2" to="net.IO0" /><trace from=".U7 > .C1" to="net.EN" />
    <trace from=".U7 > .E2" to="net.DTR" /><trace from=".U7 > .B2" to="net.RTS" />
  </>
)

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