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

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

const fp0603 = "0603"
const section = "IMU & Expansion"

export const ImuExpansionSection = () => (
  <>
    <schematicsection name={section} />
    <MPU_6050 name="U9" schSectionName={section} {...pcbPlacement("U9")} />
    <capacitor name="C12" capacitance="100nF" footprint={fp0603} schSectionName={section} {...pcbPlacement("C12")} />
    <capacitor name="C13" capacitance="100nF" footprint={fp0603} schSectionName={section} {...pcbPlacement("C13")} />
    <capacitor name="C14" capacitance="10uF" footprint={fp0603} schSectionName={section} {...pcbPlacement("C14")} />
    <resistor name="R12" resistance="10k" footprint={fp0603} schSectionName={section} {...pcbPlacement("R12")} />
    <resistor name="R13" resistance="4.7k" footprint={fp0603} schSectionName={section} {...pcbPlacement("R13")} />
    <resistor name="R14" resistance="10k" footprint={fp0603} schSectionName={section} {...pcbPlacement("R14")} />
    <connector name="J8" footprint="pinrow6_p2.54" obstructsWithinBounds={false} pinLabels={{ pin1: ["GND"], pin2: ["V3V3"], pin3: ["RXD2"], pin4: ["TXD2"], pin5: ["SDA"], pin6: ["SCL"] }} schSectionName={section} {...pcbPlacement("J8")} />
    <connector name="J9" footprint="pinrow6_p2.54" obstructsWithinBounds={false} pinLabels={{ pin1: ["GND"], pin2: ["BATT"], pin3: ["SRV1"], pin4: ["SRV2"], pin5: ["SRV3"], pin6: ["SRV4"] }} schSectionName={section} {...pcbPlacement("J9")} />
    <trace from=".U9 > .VDD" to="net.V3V3" /><trace from=".U9 > .VLOGIC" to="net.V3V3" />
    <trace from=".U9 > .GND" to="net.GND" /><trace from=".U9 > .CLKIN" to="net.GND" /><trace from=".U9 > .FSYNC" to="net.GND" />
    <trace from=".U9 > .SDA" to="net.SDA" /><trace from=".U9 > .SCL" to="net.SCL" /><trace from=".U9 > .INT" to="net.SRV_2" />
    <trace from=".U9 > .REGOUT" to=".C12 > .pin1" /><trace from=".C12 > .pin2" to="net.GND" />
    <trace from=".U9 > .CPOUT" to=".C13 > .pin1" /><trace from=".C13 > .pin2" to="net.GND" />
    <trace from=".C14 > .pin1" to="net.V3V3" /><trace from=".C14 > .pin2" to="net.GND" />
    <trace from=".R12 > .pin1" to="net.SDA" /><trace from=".R12 > .pin2" to="net.V3V3" />
    <trace from=".R13 > .pin1" to="net.GND" /><trace from=".R13 > .pin2" to=".U9 > .AD0" />
    <trace from=".R14 > .pin1" to="net.SCL" /><trace from=".R14 > .pin2" to="net.V3V3" />
    <trace from=".J8 > .pin1" to="net.GND" /><trace from=".J8 > .pin2" to="net.V3V3" />
    <trace from=".J8 > .pin3" to="net.RXD2" /><trace from=".J8 > .pin4" to="net.TXD2" /><trace from=".J8 > .pin5" to="net.SDA" /><trace from=".J8 > .pin6" to="net.SCL" />
    <trace from=".J9 > .pin1" to="net.GND" /><trace from=".J9 > .pin2" to="net.BATT" />
    <trace from=".J9 > .pin3" to="net.SRV_1" /><trace from=".J9 > .pin4" to="net.SRV_2" /><trace from=".J9 > .pin5" to="net.SRV_3" /><trace from=".J9 > .pin6" to="net.SRV_4" />
  </>
)

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