afazero/tscircuit-starter
Two boards are defined: a 5V red LED indicator with a 220Ω resistor and 100nF decoupling capacitor, plus a 5V RC low-pass filter using a 187Ω resistor and 10µF capacitor for transient SPICE simulation.
- 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 afazero/tscircuit-starter # download the package files into ./tscircuit-starter
tsci add afazero/tscircuit-starter # add it to your project as @tsci/afazero.tscircuit-starterIn 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.tsx
PCB
Schematic
// Board 1: LED indikator 5V — PCB nyata, siap export Gerber.
// Jalankan `npx tsci dev`, buka tab PCB / Schematic / 3D.
export default () => (
<board width="24mm" height="16mm">
{/* Konektor catu daya 2 pin */}
<pinheader
name="J1"
footprint="pinrow2"
pinCount={2}
pinLabels={{ pin1: "5V", pin2: "GND" }}
pcbX={-8.8}
pcbY={0}
/>
{/* Resistor pembatas arus: (5V - 2V) / 220ohm ~= 13mA */}
<resistor name="R1" resistance="220" footprint="0603" pcbX={-3} pcbY={0} />
{/* LED indikator */}
<led name="D1" footprint="0603" color="red" pcbX={3} pcbY={0} />
{/* Kapasitor dekopling opsional */}
<capacitor name="C1" capacitance="100nF" footprint="0603" pcbX={0} pcbY={4.5} />
<trace name="5V_TO_R1" from=".J1 > .pin1" to=".R1 > .pin1" />
<trace name="R1_TO_LED" from=".R1 > .pin2" to=".D1 > .pos" />
<trace name="LED_TO_GND" from=".D1 > .neg" to=".J1 > .pin2" />
<trace name="CAP_5V" from=".C1 > .pin1" to=".J1 > .pin1" />
<trace name="CAP_GND" from=".C1 > .pin2" to=".J1 > .pin2" />
</board>
)