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.

index.circuit.tsx

PCBPCB preview for index.circuit.tsx
SchematicSchematic preview for index.circuit.tsx
import React from "react"
import { PowerInput } from "./parts/power"
import { PCA9685, LogicRail, AddressJumpers } from "./parts/control"
import { ServoOutputs } from "./parts/servo-outputs"

export default () => (
  <board
    width="65mm"
    height="25mm"
    layers={2}
    defaultTraceWidth={0.25}
    minTraceWidth={0.15}
  >
    <net name="VM_IN" isPowerNet nominalTraceWidth={0.8} />
    <net name="VM" isPowerNet nominalTraceWidth={0.8} />
    <net name="GND" isGroundNet nominalTraceWidth={0.8} />
    <net name="VDD" isPowerNet nominalTraceWidth={0.4} />
    <net name="GATE" nominalTraceWidth={0.25} />
    <net name="SDA" nominalTraceWidth={0.25} />
    <net name="SCL" nominalTraceWidth={0.25} />
    {[0, 1, 2, 3, 4, 5].map((i) => (
      <net key={`A${i}`} name={`A${i}`} nominalTraceWidth={0.2} />
    ))}
    {Array.from({ length: 16 }).map((_, i) => (
      <net key={`PWM${i}`} name={`PWM${i}`} nominalTraceWidth={0.2} />
    ))}
    {Array.from({ length: 16 }).map((_, i) => (
      <net key={`SRV${i}`} name={`SRV${i}`} nominalTraceWidth={0.3} />
    ))}

    <schematicsheet name="Power" displayName="Servo power input" sheetIndex={0} />
    <schematicsheet name="Control" displayName="PCA9685 and I2C" sheetIndex={1} />
    <schematicsheet name="Servo" displayName="Servo outputs" sheetIndex={2} />

    <PowerInput />
    <PCA9685 />
    <LogicRail />
    <AddressJumpers />
    <ServoOutputs />
  </board>
)