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-eight

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/AO3400A/AO3400A.tsx

import objPath from "./AO3400A.obj";
import stepPath from "./AO3400A.step";
import type { TransistorProps } from "@tscircuit/props";

const pinLabels = {
	pin1: ["G", "gate"],
	pin2: ["S", "source"],
	pin3: ["D", "drain"],
} as const;

const pinAttributes = {
	pin1: { isInput: true },
	pin2: { isPassive: true },
	pin3: { isPassive: true },
} satisfies NonNullable<TransistorProps["pinAttributes"]>;

export const AO3400A = (props: Omit<TransistorProps, "type">) => {
	return (
		<transistor
			type="mosfet"
			pinLabels={pinLabels}
			pinAttributes={pinAttributes}
			symbol={
				<symbol>
					<schematicpath
						points={[
							{ x: 0, y: 0 },
							{ x: 0.12, y: -0.04 },
							{ x: 0.12, y: 0.04 },
							{ x: 0, y: 0 },
						]}
						strokeColor="#880000"
						isFilled
						fillColor="#FEFEFE"
					/>
					<schematicpath
						points={[
							{ x: 0.4, y: 0.04 },
							{ x: 0.34, y: -0.06 },
							{ x: 0.46, y: -0.06 },
							{ x: 0.4, y: 0.04 },
						]}
						strokeColor="#880000"
						isFilled
						fillColor="#FEFEFE"
					/>
					<schematicpath
						points={[
							{ x: 0, y: 0.14 },
							{ x: 0.2, y: 0.14 },
							{ x: 0.2, y: 0.2 },
							{ x: 0.4, y: 0.2 },
							{ x: 0.4, y: 0.04 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: 0, y: 0 },
							{ x: 0.2, y: 0 },
							{ x: 0.2, y: -0.2 },
							{ x: 0.4, y: -0.2 },
							{ x: 0.4, y: -0.06 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: 0.2, y: -0.14 },
							{ x: 0, y: -0.14 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: -0.04, y: 0.18 },
							{ x: -0.04, y: -0.18 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: 0, y: 0.18 },
							{ x: 0, y: 0.1 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: 0, y: -0.04 },
							{ x: 0, y: 0.04 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: 0, y: -0.18 },
							{ x: 0, y: -0.1 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: -0.2, y: 0 },
							{ x: -0.04, y: 0 },
						]}
						strokeColor="#880000"
					/>
					<schematicpath
						points={[
							{ x: 0.48, y: 0.04 },
							{ x: 0.44, y: 0.04 },
							{ x: 0.36, y: 0.04 },
							{ x: 0.32, y: 0.04 },
						]}
						strokeColor="#880000"
					/>
					<port
						name="pin3"
						pinNumber={3}
						aliases={["D", "drain"]}
						direction="up"
						schX={0.2}
						schY={0.4}
						schStemLength={0.2}
					/>
					<port
						name="pin1"
						pinNumber={1}
						aliases={["G", "gate"]}
						direction="left"
						schX={-0.4}
						schY={0}
						schStemLength={0.2}
					/>
					<port
						name="pin2"
						pinNumber={2}
						aliases={["S", "source"]}
						direction="down"
						schX={0.2}
						schY={-0.4}
						schStemLength={0.2}
					/>
					<schematictext
						schX={0.03}
						schY={0.62}
						text="{NAME}"
						fontSize={0.2}
						anchor="bottom_center"
					/>
				</symbol>
			}
			supplierPartNumbers={{
				jlcpcb: ["C20917"],
			}}
			manufacturerPartNumber="AO3400A"
			footprint="sot23w_p1mm_pw0.65mm_pin1location(rightside,bottom)"
			cadModel={{
				objUrl: objPath,
				stepUrl: stepPath,
				pcbRotationOffset: 180,
				modelOriginPosition: {
					x: 0.000012700000070253736,
					y: -0.000012699999956566899,
					z: 0.050795,
				},
			}}
			{...props}
		/>
	);
};