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.

assembly.circuit.tsx

PCBPCB preview for assembly.circuit.tsx
SchematicSchematic preview for assembly.circuit.tsx
import { renderToJscadPlan } from "jscad-fiber/headless";
import { assembly } from "tscircuit";
import AqiBoard from "./index.circuit";
import {
	Base,
	Lid,
	SensorEnvelope,
	DisplayEnvelope,
	DisplayGlass,
	ScreenReadout,
	Bezel,
	Branding,
	PowerSlider,
	PowerLegend,
	Harness,
} from "./mechanics";
export default () => (
	<assembly.device name="BREATHE">
		<AqiBoard />
		<assembly.printedpart
			name="CASE"
			displayName="Vented PETG base"
			material="petg"
			color="#e1e5e8"
			jscad={<Base />}
		/>
		<assembly.printedpart
			name="LID"
			displayName="White vented lid"
			material="petg"
			color="#f1f4f7"
			jscad={<Lid />}
		/>
		<assembly.part
			name="SPS30"
			cadModel={{ jscad: renderToJscadPlan(<SensorEnvelope />) }}
			purchaseUrls={["https://sensirion.com/sps30"]}
		/>
		<assembly.part
			name="OLED"
			cadModel={{ jscad: renderToJscadPlan(<DisplayEnvelope />) }}
			purchaseUrls={["https://www.waveshare.com/2.42inch-oled-module.htm"]}
		/>
		<assembly.part
			name="OLED_GLASS"
			displayName="OLED cover glass"
			cadModel={{ jscad: renderToJscadPlan(<DisplayGlass />) }}
		/>
		<assembly.part
			name="STARTUP_SCREEN"
			displayName="AQI display startup illustration"
			cadModel={{ jscad: renderToJscadPlan(<ScreenReadout />) }}
		/>
		<assembly.printedpart
			name="BEZEL"
			material="petg"
			color="#101c29"
			jscad={<Bezel />}
		/>
		<assembly.printedpart
			name="BRANDING"
			material="petg"
			color="#1678df"
			jscad={<Branding />}
		/>

		<assembly.printedpart
			name="POWER_SLIDER"
			displayName="ON/OFF switch actuator extension"
			material="petg"
			color="#153953"
			jscad={<PowerSlider />}
		/>
		<assembly.printedpart
			name="POWER_LABEL"
			displayName="ON/OFF label"
			material="petg"
			color="#1678df"
			jscad={<PowerLegend />}
		/>

		<assembly.part
			name="LOOMS"
			displayName="Illustrative sensor and OLED cable looms"
			cadModel={{ jscad: renderToJscadPlan(<Harness />) }}
		/>
	</assembly.device>
);