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.
assembly.circuit.tsx
PCB
Schematic
import { assembly, jscad } from "tscircuit";
import Main from "./index.circuit";
import panelModelUrl from "./assets/control-panel.glb";
import {
Base,
Lid,
Pillars,
PanelSpacers,
Bezel,
DisplayBoard,
DisplayGlass,
DisplayText,
Branding,
Knob,
DisplayClips,
Feet,
Screws,
Slider,
LedPipe,
Harness,
} from "./mechanics";
import { renderToJscadPlan } from "jscad-fiber/headless";
export default function BenchAssembly({
exploded = false,
}: { exploded?: boolean }) {
const lift = exploded ? 45 : 0;
const panelLift = exploded ? 25 : 0;
return (
<assembly.device name="BENCH_EIGHT">
<Main />
<assembly.printedpart
name="BASE"
material="petg"
color="#172e44"
jscad={<Base />}
/>
<assembly.part
name="PANEL_BOARD"
displayName="Routed control PCB, generated from ui.circuit.tsx"
cadModel={{
glbUrl: panelModelUrl,
rotationOffset: { x: 90, y: 180, z: 0 },
positionOffset: { x: 0, y: -6, z: 22 + panelLift },
}}
/>
<assembly.printedpart
name="PILLARS"
material="petg"
color="#172e44"
jscad={<Pillars />}
/>
<assembly.part
name="SPACERS"
displayName="Four M3 20.4mm insulating standoffs (custom length)"
cadModel={{ jscad: renderToJscadPlan(<PanelSpacers />) }}
/>
<assembly.printedpart
name="LID"
material="petg"
color="#eef2f5"
jscad={
<jscad.translate offset={[0, 0, lift]}>
<Lid />
</jscad.translate>
}
/>
<assembly.printedpart
name="BEZEL"
material="petg"
color="#101c29"
jscad={
<jscad.translate offset={[0, 0, lift]}>
<Bezel />
</jscad.translate>
}
/>
<assembly.part
name="DISPLAY"
displayName="Waveshare 2.42-inch OLED module dimensional envelope"
cadModel={{
jscad: renderToJscadPlan(
<jscad.translate offset={[0, 0, lift]}>
<jscad.colorize color="#164c4c">
<DisplayBoard />
</jscad.colorize>
</jscad.translate>,
),
}}
purchaseUrls={["https://www.waveshare.com/2.42inch-oled-module.htm"]}
/>
<assembly.part
name="GLASS"
displayName="OLED face envelope"
cadModel={{
jscad: renderToJscadPlan(
<jscad.translate offset={[0, 0, lift]}>
<jscad.colorize color="#091620">
<DisplayGlass />
</jscad.colorize>
</jscad.translate>,
),
}}
/>
<assembly.printedpart
name="SCREEN_PREVIEW"
displayName="Static NO DATA illustration; firmware not supplied"
material="petg"
color="#69d9fa"
jscad={
<jscad.translate offset={[0, 0, lift]}>
<DisplayText />
</jscad.translate>
}
/>
<assembly.printedpart
name="BRAND"
material="petg"
color="#1678df"
jscad={
<jscad.translate offset={[0, 0, lift]}>
<Branding />
</jscad.translate>
}
/>
<assembly.printedpart
name="KNOB"
material="petg"
color="#1678df"
jscad={
<jscad.translate offset={[0, 0, lift]}>
<Knob />
</jscad.translate>
}
/>
<assembly.printedpart
name="DISPLAY_CLIPS"
material="petg"
color="#172e44"
jscad={
<jscad.translate offset={[0, 0, lift]}>
<DisplayClips />
</jscad.translate>
}
/>
<assembly.printedpart
name="FEET"
material="petg"
color="#172e44"
jscad={<Feet />}
/>
<assembly.part
name="FASTENERS"
displayName="M3 lid screws, dimensional envelopes"
cadModel={{
jscad: renderToJscadPlan(
<jscad.translate offset={[0, 0, lift]}>
<jscad.colorize color="#465466">
<Screws />
</jscad.colorize>
</jscad.translate>,
),
}}
/>
<assembly.printedpart
name="POWER_SLIDER"
material="petg"
color="#1678df"
jscad={<Slider />}
/>
<assembly.printedpart
name="LIGHT_PIPE"
material="petg"
color="#54beff"
jscad={
<jscad.translate offset={[0, 0, lift]}>
<LedPipe />
</jscad.translate>
}
/>
<assembly.part
name="PANEL_LOOM"
displayName="12-conductor 1:1 panel harness, illustrative wire path"
cadModel={{
jscad: renderToJscadPlan(
<Harness lift={lift} panelLift={panelLift} />,
),
}}
/>
</assembly.device>
);
}