A local selector and pre-generated tscircuit board family for photodiode, environmental, motion, and thermal sensing plus raw BuyDisplay panels. Every configuration includes an interactive 3D model, routed PCB, schematic, and downloadable fabrication/EDA resources.
The original photodiode matrix remains intact:
- Host connectors: USB-C, USB Micro-B, and JST-SH 4-pin
- Controllers: CH552T, MSP430G2553, MSP430FR2433, MSP430FR2355, MSP430FR5994, and MSP430F5529
- Sensor: BPX65 photodiode with OPA320 transimpedance amplifier
- Photodiode configurations: 18
Three I²C sensor reference designs use USB-C and an MSP430F5529, exact imported component footprints and 3D models, address straps, local decoupling, and a shared debug header.
| Sensor | Measurements | Exact part / package | I²C address |
|---|---|---|---|
| BME280 | Relative humidity, temperature, barometric pressure | Bosch BME280 / LGA-8 2.5×2.5 mm (JLCPCB C92489) | 0x76 |
| MPU-6050 | 3-axis acceleration, 3-axis angular rate | TDK InvenSense MPU-6050 / QFN-24-EP 4×4 mm (JLCPCB C24112) | 0x68 |
| MLX90640 | 32×24-pixel far-infrared thermal image | Melexis MLX90640ESF-BAA-000-TU / TO-39-4 (JLCPCB C17380659) | 0x33 |
Four display reference designs add USB-C power/data and an MSP430F5529 with four-wire SPI on a two-layer board with a bottom-side ground pour. Each uses the panel manufacturer's exact recommended mating FPC connector.
| Panel | Controller / resolution | Exact connector | Selection rationale |
|---|---|---|---|
| ER-EPD0213-2B | UC8251, 122×250 black/white e-paper | ER-CON24HT-1, 24-pin 0.5 mm top contact | Budget reflective option with image retention at zero display power |
| ER-OLED0.96-1.3W | SSD1306, 128×64 OLED | ER-CON30HT-1, 30-pin 0.5 mm top contact | Ultra-budget monochrome option with established buyer reviews |
| ER-TFT020-3 | ST7789, 240×320 IPS | ER-CON14HB-1, 14-pin 0.5 mm bottom contact | Lowest-cost compact color/SPI option in the launch set |
| ER-TFT028A2-4 | ILI9341, 240×320 IPS | ER-CON50HT-1, 50-pin 0.5 mm top contact | Strongest popularity signal and an OEM mechanical model |
This yields 25 selectable configurations. The three digital sensors and four display choices intentionally use one implemented host/controller pairing rather than multiplying partially validated circuits across the full connector/MCU matrix.
src/sensor-data.tsis the typed catalog for capabilities, exact manufacturer and supplier part numbers, I²C addresses, and manufacturer references.src/SensorBoard.tsxcontains the shared USB-C/MSP430F5529 reference design, datasheet-selected I²C pull-ups, exposed debug/test points, and sensor-specific support circuits.imports/BME280,imports/MPU_6050, andimports/MLX90640ESF_BAA_000_TUcontain exact EasyEDA-derived footprints and locally downloaded component models. The BME280 is strapped for I²C and address0x76; the MPU-6050 uses address0x68and exposes its interrupt; the wide-angle MLX90640 BAA variant uses its fixed0x33address.
The e-paper panel already integrates its UC8251 timing controller and high-voltage display driver in chip-on-glass form. Its board still implements the manufacturer's external booster network, including the switching MOSFET, inductor, Schottky diodes, current-sense resistor, and high-voltage capacitors; it does not need a second display-controller IC.
E-paper firmware must put the UC8251 into deep sleep or otherwise disable its high-voltage rails after each refresh. The panel datasheet warns that leaving the charge pumps active can cause image sticking and permanently damage the display.
src/screen-data.tsis the hard-coded panel catalog, including complete FPC pin labels, exact connector MPN, contact side, footprint, and model URL.src/ScreenBoard.tsxcontains the shared USB-C/MSP430F5529 reference design and panel-specific power, interface-strap, charge-pump, and backlight circuits. Its explicit component placements are restricted to 0/90/180/270-degree rotations, with a regression test enforcing that rule.src/screen-model-specs.tsholds datasheet-derived panel, active-area, flex, and connector dimensions.scripts/generate-screen-models.tscombines the matching connector and aflexscreen_...jscad-electronics model into a GLB whose origin matches the connector footprint. The rendered screen therefore appears inserted into its board-mounted ZIF connector. The e-paper model uses a warm off-white active surface to distinguish its reflective appearance from the emissive displays.
The display bodies are dimensioned visualization models, not
manufacturer-authoritative mechanical CAD. connector.contactSide in
src/screen-data.ts is the contact-face authority; _mounttop in the
procedural footprint string describes the body/anchor side and does not mean
“top-contact.”
The procedural GLBs are generated ahead of tscircuit evaluation because the
current @tscircuit/core version does not resolve string-valued
cadModel="flexscreen_..." declarations. The board instead imports the generated
asset and passes cadModel={{ glbUrl }}. The 2.8-inch panel also has an
OEM Parasolid model,
which is a good future higher-fidelity replacement; the procedural approach is
used for all four today so the build stays reproducible and uniform.
Prerequisites are Node.js/npm, Bun (tested with 1.3.2), and
rsvg-convert from librsvg (tested with 2.61.2).
npm install --force
npm test
npm run typecheck
npm run buildnpm run models can be used to regenerate only the four source GLBs. The full
build writes circuit JSON, binary glTF (3d.glb), 3D posters, PCB SVGs,
schematic SVGs, Gerbers, schematic PDFs, KiCad projects, and Altium projects to
dist/, then assembles the deployable selector in public/.
- ER-OLED0.96-1 series datasheet
- ER-EPD0213-2 datasheet
- UC8251 controller datasheet
- ER-CON24HT-1 connector
- ER-TFT020-3 datasheet
- ER-TFT028A2-4 datasheet
- MSP430F5529 datasheet
- BME280 datasheet
- MPU-6000/MPU-6050 datasheet
- MLX90640 datasheet
This is a reference/design artifact. Verify sensor revision and orientation, connector orientation, display revision, backlight current, signal integrity, USB compliance, EMC, thermal behavior, e-paper booster layout and capacitor voltage ratings, and manufacturability before fabrication.