aj0070/servo-controller

16-channel PCA9685 I²C PWM servo controller board with adjustable address jumpers, protected external servo power input, MOSFET switching, bulk decoupling, and 16 three-pin servo headers.

Version
1.0.0
License
unset
Stars
0

Use with the tscircuit CLI

tsci is the tscircuit CLI. Install it with npm install -g tscircuit.

tsci clone aj0070/servo-controller  # download the package files into ./servo-controller
tsci add aj0070/servo-controller    # add it to your project as @tsci/aj0070.servo-controller

In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.

parts/power.tsx

import React from "react"

export const PCB = {
  termX: -22.5,
  termY: 8.0,
  fetX: -13.5,
  fetY: 8.5,
  gateRX: -13.0,
  gateRY: 3.0,
  bulkX: -24.5,
  bulkY: 0.0,
}

const TerminalFootprint = () => (
  <footprint insertionDirection="from_above">
    <platedhole portHints={["1"]} pcbX={-2.54} pcbY={0} outerDiameter={2.8} holeDiameter={1.3} shape="circle" />
    <platedhole portHints={["2"]} pcbX={2.54} pcbY={0} outerDiameter={2.8} holeDiameter={1.3} shape="circle" />
    <silkscreenrect pcbX={0} pcbY={0} width={10.4} height={7.4} strokeWidth={0.15} />
    <courtyardrect pcbX={0} pcbY={0} width={11.2} height={8.2} strokeWidth={0.05} />
  </footprint>
)

export const PowerInput = () => (
  <>
    <connector
      name="J17"
      schSheetName="Power"
      footprint={<TerminalFootprint />}
      pinLabels={{ pin1: "VIN", pin2: "GND" }}
      manufacturerPartNumber="MX126-5.0-02P"
      schPinArrangement={{
        topSide: { pins: ["VIN"], direction: "left-to-right" },
        bottomSide: { pins: ["GND"], direction: "left-to-right" },
      }}
      schX={-10}
      schY={6}
      pcbX={PCB.termX}
      pcbY={PCB.termY}
      connections={{ pin1: "net.VM_IN", pin2: "net.GND" }}
    />
    <mosfet
      name="Q1"
      schSheetName="Power"
      channelType="p"
      mosfetMode="enhancement"
      footprint="sot23"
      manufacturerPartNumber="AO3401A"
      pinLabels={{ pin1: "gate", pin2: "source", pin3: "drain" }}
      schX={-5}
      schY={6}
      pcbX={PCB.fetX}
      pcbY={PCB.fetY}
      connections={{
        gate: "net.GATE",
        source: "net.VM",
        drain: "net.VM_IN",
      }}
    />
    <resistor
      name="R27"
      schSheetName="Power"
      resistance="10k"
      footprint="0402"
      schX={-1.5}
      schY={6}
      schRotation={270}
      pcbX={PCB.gateRX}
      pcbY={PCB.gateRY}
      pcbRotation={270}
      connections={{ pin1: "net.GATE", pin2: "net.GND" }}
    />
    <capacitor
      name="C1"
      schSheetName="Power"
      capacitance="1000uF"
      footprint="electrolytic_d6.3mm_p2.5mm"
      schRotation={270}
      schX={2}
      schY={6}
      pcbX={PCB.bulkX}
      pcbY={PCB.bulkY}
      pcbRotation={180}
      connections={{ pin1: "net.VM", pin2: "net.GND" }}
    />
  </>
)