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

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

const pinLabels = {
	pin1: ["ADDR"],
	pin2: ["ALERT", "RDY"],
	pin3: ["GND"],
	pin4: ["AIN0"],
	pin5: ["AIN1"],
	pin6: ["AIN2"],
	pin7: ["AIN3"],
	pin8: ["VDD"],
	pin9: ["SDA"],
	pin10: ["SCL"],
} as const;

const pinAttributes = {
	pin3: { requiresGround: true },
	pin8: {
		requiresPower: true,
		shouldHaveDecouplingCapacitor: true,
		recommendedDecouplingCapacitorCapacitance: "100nF",
	},
	pin1: { isInput: true },
	pin2: { isOutput: true, needsExternalPullup: true, canUseOpenDrain: true },
	pin4: { isInput: true },
	pin5: { isInput: true },
	pin10: {
		isInput: true,
		capabilities: ["i2c_scl"],
		needsExternalPullup: true,
	},
	pin9: {
		isBidirectional: true,
		capabilities: ["i2c_sda"],
		needsExternalPullup: true,
		canUseOpenDrain: true,
	},
	pin7: { isInput: true },
	pin6: { isInput: true },
} satisfies NonNullable<ChipProps["pinAttributes"]>;

export const ADS1115IDGSR = (props: ChipProps<typeof pinLabels>) => {
	return (
		<chip
			pinLabels={pinLabels}
			pinAttributes={pinAttributes}
			supplierPartNumbers={{
				jlcpcb: ["C37593"],
			}}
			manufacturerPartNumber="ADS1115IDGSR"
			footprint="dfn10_pillpads_p0.5mm_w5.84mm_pw0.28mm_pl1.62mm_pin1location(leftside,bottom)"
			cadModel={{
				objUrl: objPath,
				stepUrl: stepPath,
				pcbRotationOffset: 0,
				modelOriginPosition: { x: 0, y: 0, z: 0 },
			}}
			{...props}
		/>
	);
};