Devesh36/bench-eight
Eight-channel 0–10 V measurement and control console: dual ADS1115 ADCs, buffered inputs, Pico controller, microSD, RTC, RS-485, four protected low-voltage outputs and a separate OLED/encoder panel in a tscircuit assembly.
- Version
- 0.1.3
- License
- unset
- Stars
- 0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone Devesh36/bench-eight # download the package files into ./bench-eight
tsci add Devesh36/bench-eight # add it to your project as @tsci/Devesh36.bench-eightIn 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.
channel.tsx
import { Clamp, Terminal } from "./parts";
// 0..10 V, common ground. 100k/33k attenuator, 100nF filter; buffered downstream.
// Do not connect signals when the console is unpowered (rail-clamp backfeed).
export function InputChannel({
n,
x,
sx,
sy,
}: { n: number; x: number; sx: number; sy: number }) {
const name = `CH${n}`;
const sheet = n <= 4 ? "INPUTS_A" : "INPUTS_B";
const sch = { schSheetName: sheet, schSectionName: sheet };
return (
<>
<Terminal
name={`J_IN${n}`}
pcbX={x}
pcbY={50}
pcbRotation={0}
schX={sx}
schY={sy}
schPortArrangement={{
rightSide: { pins: ["pin1", "pin2"], direction: "top-to-bottom" },
}}
{...sch}
connections={{ pin1: `net.IN${n}`, pin2: "net.GND" }}
/>
<resistor
name={`R_TOP${n}`}
resistance="100k"
footprint="0805"
manufacturerPartNumber="RC0805FR-07100KL"
pcbX={x - 3}
pcbY={40}
schX={sx + 3}
schY={sy + 0.1}
{...sch}
connections={{ pin1: `net.IN${n}`, pin2: `net.FILT${n}` }}
/>
<resistor
name={`R_BOT${n}`}
resistance="33k"
footprint="0805"
manufacturerPartNumber="RC0805FR-0733KL"
pcbX={x + 3}
pcbY={40}
schX={sx + 6}
schY={sy - 2}
schRotation={-90}
{...sch}
connections={{ pin1: `net.FILT${n}`, pin2: "net.GND" }}
/>
<capacitor
name={`C_IN${n}`}
capacitance="100nF"
footprint="0603"
manufacturerPartNumber="GRM188R71C104KA01D"
pcbX={x + 3}
pcbY={35}
schX={sx + 9}
schY={sy - 2}
schRotation={-90}
{...sch}
connections={{ pin1: `net.FILT${n}`, pin2: "net.GND" }}
/>
<Clamp
pinAttributes={{
pin1: { isPassive: true, requiresGround: true },
pin2: { isPassive: true, requiresPower: true },
pin3: { isPassive: true },
}}
name={`D_CLAMP${n}`}
pcbX={x - 3}
pcbY={35}
schX={sx + 12}
schY={sy}
{...sch}
connections={{
pin1: "net.GND",
pin2: "net.V3V3",
pin3: `net.FILT${n}`,
}}
/>
<silkscreentext
text={`${name} + GND`}
pcbX={x}
pcbY={57}
fontSize={0.9}
/>
</>
);
}