0hmX/tps6521401vafr-pmic

This code models and visualizes the pin configuration and electrical attributes of the TPS6521401 voltage supervisor IC in a specific WQFN-HR package.

Version
1.0.1
License
unset
Stars
0

index.circuit.tsx

PCBPCB preview for index.circuit.tsx
SchematicSchematic preview for index.circuit.tsx
import type { ChipProps } from "@tscircuit/props"
import { Fragment } from "react"

export const TPS6521401VAFR_PIN_LABELS = {
  pin1: ["MODE", "STBY", "MODE_STBY"],
  pin2: "FB_B2",
  pin3: "VLDO2",
  pin4: ["VSYS", "PVIN_LDO12", "VSYS_PVIN_LDO12"],
  pin5: "VLDO1",
  pin6: "AGND",
  pin7: "VDD1P8",
  pin8: "FB_B1",
  pin9: ["GPO", "nWAKEUP", "GPO_nWAKEUP"],
  pin10: "PGND",
  pin11: "LX_B1",
  pin12: "PVIN_B1",
  pin13: "SDA",
  pin14: "SCL",
  pin15: "nINT",
  pin16: ["GPIO", "VSEL", "GPIO_VSEL"],
  pin17: "nRSTOUT",
  pin18: "FB_B3",
  pin19: ["EN", "PB", "VSENSE", "EN_PB_VSENSE"],
  pin20: "PVIN_B3",
  pin21: "LX_B3",
  pin22: "PGND",
  pin23: "LX_B2",
  pin24: "PVIN_B2",
} as const

const leftPins = [2, 3, 4, 5, 6] as const
const bottomPins = [8, 9, 11, 12] as const
const rightPins = [14, 15, 16, 17, 18] as const
const topPins = [20, 21, 23, 24] as const

/**
 * TPS6521401 in TI's VAF0024A WQFN-HR package.
 *
 * VAF0024A is not a conventional QFN-24: pins 1, 7, 13, and 19 are L-shaped,
 * and PGND pins 10 and 22 extend into the center thermal land. Consequently a
 * generic qfn24 footprinter string must not be substituted for this footprint.
 */
export const TPS6521401VAFR = (
  props: ChipProps<typeof TPS6521401VAFR_PIN_LABELS>,
) => (
  <chip
    pinLabels={TPS6521401VAFR_PIN_LABELS}
    datasheetUrl="https://www.ti.com/lit/ds/symlink/tps65214.pdf"
    pinAttributes={{
      pin1: { mustBeConnected: true },
      pin2: { mustBeConnected: true },
      pin3: {
        providesPower: true,
        mustBeConnected: true,
        shouldHaveDecouplingCapacitor: true,
        recommendedDecouplingCapacitorCapacitance: "2.2uF",
      },
      pin4: {
        requiresPower: true,
        mustBeConnected: true,
        shouldHaveDecouplingCapacitor: true,
        recommendedDecouplingCapacitorCapacitance: "4.7uF",
      },
      pin5: {
        providesPower: true,
        mustBeConnected: true,
        shouldHaveDecouplingCapacitor: true,
        recommendedDecouplingCapacitorCapacitance: "2.2uF",
      },
      pin6: { requiresGround: true, mustBeConnected: true },
      // Internal 1.8 V reference output: capacitor only, no external load.
      pin7: {
        providesPower: true,
        mustBeConnected: true,
        shouldHaveDecouplingCapacitor: true,
        recommendedDecouplingCapacitorCapacitance: "2.2uF",
      },
      pin8: { mustBeConnected: true },
      pin9: {
        canUseOpenDrain: true,
        isUsingOpenDrain: true,
        needsExternalPullup: true,
      },
      pin10: { requiresGround: true, mustBeConnected: true },
      // LX pins provide switched power to inductors, not regulated rails.
      pin11: { providesPower: true },
      pin12: {
        requiresPower: true,
        mustBeConnected: true,
        shouldHaveDecouplingCapacitor: true,
        recommendedDecouplingCapacitorCapacitance: "4.7uF",
      },
      pin13: {
        capabilities: ["i2c_sda"],
        activeCapability: "i2c_sda",
        canUseOpenDrain: true,
        isUsingOpenDrain: true,
        needsExternalPullup: true,
        mustBeConnected: true,
      },
      pin14: {
        capabilities: ["i2c_scl"],
        activeCapability: "i2c_scl",
        needsExternalPullup: true,
        mustBeConnected: true,
      },
      pin15: {
        canUseOpenDrain: true,
        isUsingOpenDrain: true,
        needsExternalPullup: true,
      },
      pin16: {
        isGpio: true,
        canUseOpenDrain: true,
      },
      pin17: { canUsePushPull: true },
      pin18: { mustBeConnected: true },
      pin19: { mustBeConnected: true },
      pin20: {
        requiresPower: true,
        mustBeConnected: true,
        shouldHaveDecouplingCapacitor: true,
        recommendedDecouplingCapacitorCapacitance: "4.7uF",
      },
      pin21: { providesPower: true },
      pin22: { requiresGround: true, mustBeConnected: true },
      pin23: { providesPower: true },
      pin24: {
        requiresPower: true,
        mustBeConnected: true,
        shouldHaveDecouplingCapacitor: true,
        recommendedDecouplingCapacitorCapacitance: "4.7uF",
      },
    }}
    manufacturerPartNumber="TPS6521401VAFR"
    schPinArrangement={{
      leftSide: {
        pins: [1, 16, 19, 14, 13],
        direction: "top-to-bottom",
      },
      rightSide: {
        pins: [17, 15, 3, 5, 7, 9],
        direction: "top-to-bottom",
      },
      topSide: {
        pins: [4, 24, 20, 12],
        direction: "left-to-right",
      },
      bottomSide: {
        pins: [6, 10, 22, 2, 8, 18, 11, 21, 23],
        direction: "left-to-right",
      },
    }}
    footprint={
      <footprint>
        {leftPins.map((pin, index) => (
          <Fragment key={`pin${pin}`}>
            <smtpad
              portHints={[`pin${pin}`]}
              pcbX="-1.35mm"
              pcbY={`${1 - index * 0.5}mm`}
              width="0.6mm"
              height="0.25mm"
              shape="rect"
            />
          </Fragment>
        ))}
        {bottomPins.map((pin, index) => (
          <Fragment key={`pin${pin}`}>
            <smtpad
              portHints={[`pin${pin}`]}
              pcbX={`${-1 + index * 0.5 + (index > 1 ? 0.5 : 0)}mm`}
              pcbY="-1.35mm"
              width="0.25mm"
              height="0.6mm"
              shape="rect"
            />
          </Fragment>
        ))}
        {rightPins.map((pin, index) => (
          <Fragment key={`pin${pin}`}>
            <smtpad
              portHints={[`pin${pin}`]}
              pcbX="1.35mm"
              pcbY={`${-1 + index * 0.5}mm`}
              width="0.6mm"
              height="0.25mm"
              shape="rect"
            />
          </Fragment>
        ))}
        {topPins.map((pin, index) => (
          <Fragment key={`pin${pin}`}>
            <smtpad
              portHints={[`pin${pin}`]}
              pcbX={`${1 - index * 0.5 - (index > 1 ? 0.5 : 0)}mm`}
              pcbY="1.35mm"
              width="0.25mm"
              height="0.6mm"
              shape="rect"
            />
          </Fragment>
        ))}

        <smtpad
          portHints={["pin1"]}
          shape="polygon"
          points={[
            { x: -1.65, y: 1.65 },
            { x: -1.175, y: 1.65 },
            { x: -1.175, y: 1.425 },
            { x: -1.425, y: 1.425 },
            { x: -1.425, y: 1.175 },
            { x: -1.65, y: 1.175 },
          ]}
        />
        <smtpad
          portHints={["pin7"]}
          shape="polygon"
          points={[
            { x: -1.65, y: -1.65 },
            { x: -1.175, y: -1.65 },
            { x: -1.175, y: -1.425 },
            { x: -1.425, y: -1.425 },
            { x: -1.425, y: -1.175 },
            { x: -1.65, y: -1.175 },
          ]}
        />
        <smtpad
          portHints={["pin13"]}
          shape="polygon"
          points={[
            { x: 1.65, y: -1.65 },
            { x: 1.175, y: -1.65 },
            { x: 1.175, y: -1.425 },
            { x: 1.425, y: -1.425 },
            { x: 1.425, y: -1.175 },
            { x: 1.65, y: -1.175 },
          ]}
        />
        <smtpad
          portHints={["pin19"]}
          shape="polygon"
          points={[
            { x: 1.65, y: 1.65 },
            { x: 1.175, y: 1.65 },
            { x: 1.175, y: 1.425 },
            { x: 1.425, y: 1.425 },
            { x: 1.425, y: 1.175 },
            { x: 1.65, y: 1.175 },
          ]}
        />

        <smtpad
          portHints={["pin10"]}
          shape="polygon"
          points={[
            { x: -0.5, y: 0 },
            { x: 0.5, y: 0 },
            { x: 0.5, y: -0.3365 },
            { x: 0.1, y: -0.3365 },
            { x: 0.1, y: -1.65 },
            { x: -0.1, y: -1.65 },
            { x: -0.1, y: -0.3365 },
            { x: -0.5, y: -0.3365 },
          ]}
        />
        <smtpad
          portHints={["pin22"]}
          shape="polygon"
          points={[
            { x: -0.5, y: 0 },
            { x: 0.5, y: 0 },
            { x: 0.5, y: 0.3365 },
            { x: 0.1, y: 0.3365 },
            { x: 0.1, y: 1.65 },
            { x: -0.1, y: 1.65 },
            { x: -0.1, y: 0.3365 },
            { x: -0.5, y: 0.3365 },
          ]}
        />

        <silkscreenpath
          route={[
            { x: -1.85, y: 1.05 },
            { x: -1.85, y: 1.85 },
            { x: -1.05, y: 1.85 },
          ]}
        />
        <silkscreenpath
          route={[
            { x: 1.05, y: 1.85 },
            { x: 1.85, y: 1.85 },
            { x: 1.85, y: 1.05 },
          ]}
        />
        <silkscreenpath
          route={[
            { x: 1.85, y: -1.05 },
            { x: 1.85, y: -1.85 },
            { x: 1.05, y: -1.85 },
          ]}
        />
        <silkscreenpath
          route={[
            { x: -1.05, y: -1.85 },
            { x: -1.85, y: -1.85 },
            { x: -1.85, y: -1.05 },
          ]}
        />
        <silkscreencircle pcbX="-2.05mm" pcbY="1.65mm" radius="0.15mm" />
        <courtyardoutline
          outline={[
            { x: -2.25, y: 2.1 },
            { x: 2.25, y: 2.1 },
            { x: 2.25, y: -2.1 },
            { x: -2.25, y: -2.1 },
            { x: -2.25, y: 2.1 },
          ]}
        />
      </footprint>
    }
    {...props}
  />
)

export default () => (
  <board width="10mm" height="10mm">
    <TPS6521401VAFR name="U1" />
  </board>
)