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/ChargerSection.tsx
import { pcbPlacement } from "../board/PcbPlacement"
import { B2B_PH_SM4_TBT_LF__SN_ } from "../imports/B2B_PH_SM4_TBT_LF__SN_"
import { TP4056_42_ESOP8 } from "../imports/TP4056_42_ESOP8"
const fp0603 = "0603"
const section = "Battery Charging & Measurement"
export const ChargerSection = () => (
<>
<schematicsection name={section} />
<TP4056_42_ESOP8 name="IC1" schSectionName={section} {...pcbPlacement("IC1")} />
<resistor name="Rprog1" resistance="3.3k" footprint={fp0603} schSectionName={section} {...pcbPlacement("Rprog1")} />
<resistor name="R3" resistance="1.3k" footprint={fp0603} schSectionName={section} {...pcbPlacement("R3")} />
<resistor name="R4" resistance="1.3k" footprint={fp0603} schSectionName={section} {...pcbPlacement("R4")} />
<diode
name="LED2"
footprint={fp0603}
symbolName="led_right"
displayName="CHG (red)"
pinLabels={{ pin1: ["cathode", "neg"], pin2: ["anode", "pos"] }}
schSectionName={section}
{...pcbPlacement("LED2")}
/>
<diode
name="LED3"
footprint={fp0603}
symbolName="led_right"
displayName="CHG (green)"
pinLabels={{ pin1: ["cathode", "neg"], pin2: ["anode", "pos"] }}
schSectionName={section}
{...pcbPlacement("LED3")}
/>
<capacitor name="C5" capacitance="10uF" footprint={fp0603} schSectionName={section} {...pcbPlacement("C5")} />
<B2B_PH_SM4_TBT_LF__SN_ name="J3" schSectionName={section} symbol={undefined} schWidth="1.2mm" schHeight="0.8mm" {...pcbPlacement("J3")} />
<resistor name="U4" resistance="100k" footprint={fp0603} schSectionName={section} {...pcbPlacement("U4")} />
<resistor name="U5" resistance="100k" footprint={fp0603} schSectionName={section} {...pcbPlacement("U5")} />
<trace from=".IC1 > .VCC" to="net.VBUS" /><trace from=".IC1 > .CE" to="net.VBUS" />
<trace from=".IC1 > .BAT" to="net.BATT" /><trace from=".IC1 > .GND" to="net.GND" />
<trace from=".IC1 > .EP" to="net.GND" /><trace from=".IC1 > .TEMP" to="net.GND" />
<trace from=".IC1 > .PROG" to=".Rprog1 > .pin1" /><trace from=".Rprog1 > .pin2" to="net.GND" />
<trace from="net.VBUS" to=".LED2 > .pin2" /><trace from=".LED2 > .pin1" to=".R3 > .pin2" /><trace from=".R3 > .pin1" to=".IC1 > .CHRG" />
<trace from="net.VBUS" to=".LED3 > .pin2" /><trace from=".LED3 > .pin1" to=".R4 > .pin1" /><trace from=".R4 > .pin2" to=".IC1 > .STDBY" />
<trace from=".C5 > .pin1" to="net.BATT" /><trace from=".C5 > .pin2" to="net.GND" />
<trace from=".J3 > .pin1" to="net.BATT" /><trace from=".J3 > .pin2" to="net.GND" />
<trace from=".U4 > .pin1" to="net.BATT" /><trace from=".U4 > .pin2" to="net.ADC_BAT" />
<trace from=".U5 > .pin1" to="net.ADC_BAT" /><trace from=".U5 > .pin2" to="net.GND" />
</>
)
export default () => (
<board routingDisabled schAutoLayoutEnabled schTraceAutoLabelEnabled schMaxTraceDistance="8mm">
<ChargerSection />
</board>
)