Devesh36/usb-c-aqi-meter

A PETG-enclosed air-quality monitor assembly combining an AQI circuit board, Sensirion SPS30 particulate sensor, OLED display with bezel and glass, power slider, branding, and internal wiring harness.

Version
1.2.0
License
unset
Stars
0

Use with the tscircuit CLI

tsci is the tscircuit CLI. Install it with npm install -g tscircuit.

tsci clone Devesh36/usb-c-aqi-meter  # download the package files into ./usb-c-aqi-meter
tsci add Devesh36/usb-c-aqi-meter    # add it to your project as @tsci/Devesh36.usb-c-aqi-meter

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.

exploded.circuit.tsx

PCBPCB preview for exploded.circuit.tsx
SchematicSchematic preview for exploded.circuit.tsx
import { renderToJscadPlan } from "jscad-fiber/headless";
import { assembly, jscad } from "tscircuit";
import AqiBoard from "./index.circuit";
import {
	Base,
	Lid,
	SensorEnvelope,
	DisplayEnvelope,
	DisplayGlass,
	ScreenReadout,
	Bezel,
	Branding,
} from "./mechanics";
export default () => (
	<assembly.device name="BREATHE_EXPLODED">
		<AqiBoard />
		<assembly.printedpart
			name="CASE"
			material="petg"
			color="#e1e5e8"
			jscad={<Base />}
		/>
		<assembly.printedpart
			name="LID"
			material="petg"
			color="#f1f4f7"
			jscad={
				<jscad.translate offset={[0, 0, 40]}>
					<Lid />
				</jscad.translate>
			}
		/>
		<assembly.printedpart
			name="BEZEL"
			material="petg"
			color="#101c29"
			jscad={
				<jscad.translate offset={[0, 0, 40]}>
					<Bezel />
				</jscad.translate>
			}
		/>
		<assembly.printedpart
			name="BRANDING"
			material="petg"
			color="#1678df"
			jscad={
				<jscad.translate offset={[0, 0, 40]}>
					<Branding />
				</jscad.translate>
			}
		/>

		<assembly.part
			name="SPS30"
			cadModel={{
				jscad: renderToJscadPlan(
					<jscad.translate offset={[0, 0, 12]}>
						<SensorEnvelope />
					</jscad.translate>,
				),
			}}
		/>
		<assembly.part
			name="OLED"
			cadModel={{
				jscad: renderToJscadPlan(
					<jscad.translate offset={[0, 0, 27]}>
						<DisplayEnvelope />
						<DisplayGlass />
						<ScreenReadout />
					</jscad.translate>,
				),
			}}
		/>
	</assembly.device>
);