imrishabh18/test-npm

A compact electronic circuit consisting of a power input with diode protection, a decoupling capacitor, a pushbutton switch, a resistor, and a red LED indicator on a 40mm by 25mm PCB.

Version
0.0.1
License
unset
Stars
0

index.tsx

PCBPCB preview for index.tsx
SchematicSchematic preview for index.tsx
export default () => (
  <board width="40mm" height="25mm">

    <pinheader
      name="J1"
      pinCount={2}
      footprint="pinrow2"
      pcbX={-16}
      pcbY={0}
      connections={{
        pin1: "net.VCC_RAW",
        pin2: "net.GND",
      }}
    />

    <diode
      name="D1"
      footprint="0402"
      pcbX={-9}
      pcbY={0}
      connections={{
        pos: "net.VCC_RAW",
        neg: "net.VCC",
      }}
    />

    <capacitor
      name="C1"
      capacitance="100nF"
      footprint="0402"
      pcbX={-3}
      pcbY={-6}
      connections={{
        pos: "net.VCC",
        neg: "net.GND",
      }}
    />
    <pushbutton
      name="SW1"
      footprint="pushbutton_smd_4pin"
      pcbX={-3}
      pcbY={6}
      connections={{
        pin1: "net.VCC",
        pin2: "net.SWITCHED",
      }}
    />
    <resistor
      name="R1"
      resistance="150"
      footprint="0402"
      pcbX={5}
      pcbY={0}
      connections={{
        pos: "net.SWITCHED",
      }}
    />

    <led
      name="LED1"
      color="red"
      footprint="0402"
      pcbX={13}
      pcbY={0}
      connections={{
        neg: "net.GND",
      }}
    />
    <trace from=".R1 > .neg" to=".LED1 > .pos" />

  </board>
)