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

import { pcbPlacement } from "../board/PcbPlacement"
import { MIC5219_3_3YM5_TR } from "../imports/MIC5219_3_3YM5_TR"
import { SS34 } from "../imports/SS34"

const fp0603 = "0603"
const section = "Power Input & 3V3 Regulator"

export const PowerSection = () => (
  <>
    <schematicsection name={section} />
    <connector name="J1" standard="usb_c" schSectionName={section} {...pcbPlacement("J1")} />
    <SS34 name="D1" schSectionName={section} {...pcbPlacement("D1")} />
    <mosfet
      name="U2"
      channelType="p"
      mosfetMode="enhancement"
      manufacturerPartNumber="AO3401A"
      footprint={
        <footprint>
          <smtpad portHints={["pin1"]} pcbX="-0.9375mm" pcbY="0.95mm" width="1.475mm" height="0.6mm" shape="rect" />
          <smtpad portHints={["pin2"]} pcbX="-0.9375mm" pcbY="-0.95mm" width="1.475mm" height="0.6mm" shape="rect" />
          <smtpad portHints={["pin3"]} pcbX="0.9375mm" pcbY="0mm" width="1.475mm" height="0.6mm" shape="rect" />
        </footprint>
      }
      supplierPartNumbers={{ jlcpcb: ["C15127"] }}
      schSectionName={section}
      {...pcbPlacement("U2")}
    />
    <resistor name="U1" resistance="100k" footprint={fp0603} schSectionName={section} {...pcbPlacement("U1")} />
    <MIC5219_3_3YM5_TR name="U3" schSectionName={section} {...pcbPlacement("U3")} />
    <capacitor name="C1" capacitance="10uF" footprint={fp0603} schSectionName={section} {...pcbPlacement("C1")} />
    <capacitor name="C2" capacitance="470pF" footprint={fp0603} schSectionName={section} {...pcbPlacement("C2")} />
    <capacitor name="C3" capacitance="2.2uF" polarized footprint="0805" schSectionName={section} {...pcbPlacement("C3")} />
    <capacitor name="C4" capacitance="10uF" footprint={fp0603} schSectionName={section} {...pcbPlacement("C4")} />
    <led name="LED1" color="red" footprint={fp0603} schSectionName={section} {...pcbPlacement("LED1")} />
    <resistor name="R1" resistance="470" footprint={fp0603} schSectionName={section} {...pcbPlacement("R1")} />
    <trace from=".J1 > .VBUS1" to="net.V5" /><trace from=".J1 > .VBUS2" to="net.V5" />
    <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 > .DP1" to="net.DP" /><trace from=".J1 > .DP2" to="net.DP" />
    <trace
      from=".J1 > .DM1"
      to=".U6 > .D_NEG"
      pcbRouteHints={[
        { x: 0.423, y: 15.3 },
        { x: 0.423, y: 14.7 },
      ]}
    /><trace from=".J1 > .DM2" to="net.DM" />
    <trace from=".D1 > .cathode" to="net.VBUS" /><trace from=".D1 > .anode" to="net.V5" />
    <trace from=".U2 > .pin2" to="net.VBUS" /><trace from=".U2 > .pin1" to="net.BATT" /><trace from=".U2 > .pin3" to="net.V5" />
    <trace from="net.V5" to=".U1 > .pin1" /><trace from=".U1 > .pin2" to="net.GND" />
    <trace from=".U3 > .IN" to="net.VBUS" /><trace from=".U3 > .EN" to="net.LDO_EN" />
    <trace from=".U3 > .GND" to="net.GND" /><trace from=".U3 > .OUT" to="net.V3V3" />
    <trace from=".U3 > .BYP" to=".C2 > .pin1" />
    <trace from=".C1 > .pin1" to="net.VBUS" /><trace from=".C1 > .pin2" to="net.GND" />
    <trace from=".C2 > .pin2" to="net.GND" />
    <trace from=".C3 > .pin1" to="net.V3V3" /><trace from=".C3 > .pin2" to="net.GND" />
    <trace from=".C4 > .pin1" to="net.V3V3" /><trace from=".C4 > .pin2" to="net.GND" />
    <trace from="net.V3V3" to=".R1 > .pin1" /><trace from=".R1 > .pin2" to=".LED1 > .anode" />
    <trace from=".LED1 > .cathode" to="net.GND" />
  </>
)

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