hrithik18k/smart-switch-touch

A 45×40 mm four-key capacitive touch panel using a TTP224C controller, touch electrodes, four red LEDs with 220 Ω resistors, filtering/tuning capacitors, and host/indicator wire-land connectors.

Version
1.1.0
License
unset
Stars
0

Use with the tscircuit CLI

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

tsci clone hrithik18k/smart-switch-touch  # download the package files into ./smart-switch-touch
tsci add hrithik18k/smart-switch-touch    # add it to your project as @tsci/hrithik18k.smart-switch-touch

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.

imports/TTP224C_BSBN.tsx

import type { ChipProps } from "@tscircuit/props"

const pinLabels = {
  pin1: ["TP0"],
  pin2: ["TP1"],
  pin3: ["TP2"],
  pin4: ["TP3"],
  pin5: ["AHLB"],
  pin6: ["VDD"],
  pin7: ["TOG"],
  pin8: ["LPMB"],
  pin9: ["MOT0"],
  pin10: ["VSS"],
  pin11: ["OD"],
  pin12: ["SM"],
  pin13: ["TPQ3"],
  pin14: ["TPQ2"],
  pin15: ["TPQ1"],
  pin16: ["TPQ0"]
} as const

type TTP224Props = Omit<ChipProps<typeof pinLabels>, "pinAttributes"> & Pick<ChipProps, "pinAttributes">

export const TTP224C_BSBN = (props: TTP224Props) => {
  return (
    <chip
      pinLabels={pinLabels}
      supplierPartNumbers={{
  "jlcpcb": [
    "C2890350"
  ]
}}
      manufacturerPartNumber="TTP224C_BSBN"
      footprint={<footprint>
        <smtpad portHints={["pin9"]} pcbX="2.2225mm" pcbY="2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<smtpad portHints={["pin10"]} pcbX="1.5875mm" pcbY="2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<smtpad portHints={["pin11"]} pcbX="0.9525mm" pcbY="2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<smtpad portHints={["pin12"]} pcbX="0.3175mm" pcbY="2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<smtpad portHints={["pin13"]} pcbX="-0.3175mm" pcbY="2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<smtpad portHints={["pin14"]} pcbX="-0.9525mm" pcbY="2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<smtpad portHints={["pin15"]} pcbX="-1.5875mm" pcbY="2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<smtpad portHints={["pin16"]} pcbX="-2.2225mm" pcbY="2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<smtpad portHints={["pin8"]} pcbX="2.2225mm" pcbY="-2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<smtpad portHints={["pin7"]} pcbX="1.5875mm" pcbY="-2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<smtpad portHints={["pin6"]} pcbX="0.9525mm" pcbY="-2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<smtpad portHints={["pin5"]} pcbX="0.3175mm" pcbY="-2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<smtpad portHints={["pin4"]} pcbX="-0.3175mm" pcbY="-2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<smtpad portHints={["pin3"]} pcbX="-0.9525mm" pcbY="-2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<smtpad portHints={["pin2"]} pcbX="-1.5875mm" pcbY="-2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<smtpad portHints={["pin1"]} pcbX="-2.2225mm" pcbY="-2.654808mm" width="0.3556mm" height="1.8148046mm" radius="0.1778mm" shape="pill" />
<silkscreenpath route={[{"x":-2.5286970000000792,"y":-1.5188945999999532},{"x":-2.5286970000000792,"y":1.518894600000067},{"x":2.5286969999999656,"y":1.518894600000067},{"x":2.5286969999999656,"y":-1.5188945999999532},{"x":-2.5286970000000792,"y":-1.5188945999999532}]} />
<silkscreenpath route={[{"x":-2.7025600000000622,"y":-2.6548080000001164},{"x":-2.7076750105126166,"y":-2.6936603621365975},{"x":-2.722671462536482,"y":-2.729865000000018},{"x":-2.7465273726490977,"y":-2.7609546273509977},{"x":-2.7776170000000775,"y":-2.784810537463727},{"x":-2.813821637863498,"y":-2.799806989487479},{"x":-2.8526740000002064,"y":-2.804922000000033},{"x":-2.891526362136574,"y":-2.799806989487479},{"x":-2.927731000000108,"y":-2.784810537463727},{"x":-2.9588206273512014,"y":-2.7609546273509977},{"x":-2.982676537463817,"y":-2.729865000000018},{"x":-2.997672989487569,"y":-2.6936603621365975},{"x":-3.0027880000000096,"y":-2.6548080000001164},{"x":-2.997672989487569,"y":-2.615955637863408},{"x":-2.982676537463817,"y":-2.5797509999999875},{"x":-2.9588206273512014,"y":-2.5486613726490077},{"x":-2.927731000000108,"y":-2.524805462536392},{"x":-2.891526362136574,"y":-2.5098090105125266},{"x":-2.8526740000002064,"y":-2.504693999999972},{"x":-2.813821637863498,"y":-2.5098090105125266},{"x":-2.7776170000000775,"y":-2.524805462536392},{"x":-2.7465273726490977,"y":-2.5486613726490077},{"x":-2.722671462536482,"y":-2.5797509999999875},{"x":-2.7076750105126166,"y":-2.615955637863408},{"x":-2.7025600000000622,"y":-2.6548080000001164}]} />
<silkscreenpath route={[{"x":-1.8945860000001176,"y":-1.0967719999999872},{"x":-1.899701010512672,"y":-1.135624362136582},{"x":-1.9146974625364237,"y":-1.1718290000001161},{"x":-1.9385533726490394,"y":-1.2029186273509822},{"x":-1.9696430000001328,"y":-1.2267745374635979},{"x":-2.0058476378635532,"y":-1.241770989487577},{"x":-2.0447000000000344,"y":-1.2468860000000177},{"x":-2.083552362136743,"y":-1.241770989487577},{"x":-2.1197570000001633,"y":-1.2267745374635979},{"x":-2.150846627351143,"y":-1.2029186273509822},{"x":-2.1747025374637587,"y":-1.1718290000001161},{"x":-2.189698989487624,"y":-1.135624362136582},{"x":-2.1948140000001786,"y":-1.0967719999999872},{"x":-2.189698989487624,"y":-1.057919637863506},{"x":-2.1747025374637587,"y":-1.021714999999972},{"x":-2.150846627351143,"y":-0.9906253726489922},{"x":-2.1197570000001633,"y":-0.9667694625363765},{"x":-2.083552362136743,"y":-0.9517730105125111},{"x":-2.0447000000000344,"y":-0.9466580000000704},{"x":-2.0058476378635532,"y":-0.9517730105125111},{"x":-1.9696430000001328,"y":-0.9667694625363765},{"x":-1.9385533726490394,"y":-0.9906253726489922},{"x":-1.9146974625364237,"y":-1.021714999999972},{"x":-1.899701010512672,"y":-1.057919637863506},{"x":-1.8945860000001176,"y":-1.0967719999999872}]} />
<silkscreentext text="{NAME}" pcbX="-0.2286mm" pcbY="4.3782mm" anchorAlignment="center" fontSize="1mm" />
<courtyardoutline outline={[{"x":-3.2472000000001344,"y":3.6282000000001062},{"x":2.7899999999999636,"y":3.6282000000001062},{"x":2.7899999999999636,"y":-3.80600000000004},{"x":-3.2472000000001344,"y":-3.80600000000004},{"x":-3.2472000000001344,"y":3.6282000000001062}]} />
      </footprint>}
      cadModel={{
        objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2890350.obj?uuid=7930a2c82b96440c94ac54eca19670c7",
        stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2890350.step?uuid=7930a2c82b96440c94ac54eca19670c7",
        pcbRotationOffset: 90,
        modelOriginPosition: { x: -0.000012700000070253736, y: -0.000012700000070253736, z: 0.075575 },
      }}
      {...props}
    />
  )
}