Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tscircuit Quick Configure — Sensor & Display Boards

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.

Configuration catalog

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.

Sensor implementation

  • src/sensor-data.ts is the typed catalog for capabilities, exact manufacturer and supplier part numbers, I²C addresses, and manufacturer references.
  • src/SensorBoard.tsx contains 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, and imports/MLX90640ESF_BAA_000_TU contain exact EasyEDA-derived footprints and locally downloaded component models. The BME280 is strapped for I²C and address 0x76; the MPU-6050 uses address 0x68 and exposes its interrupt; the wide-angle MLX90640 BAA variant uses its fixed 0x33 address.

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.

Display implementation

  • src/screen-data.ts is the hard-coded panel catalog, including complete FPC pin labels, exact connector MPN, contact side, footprint, and model URL.
  • src/ScreenBoard.tsx contains 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.ts holds datasheet-derived panel, active-area, flex, and connector dimensions.
  • scripts/generate-screen-models.ts combines the matching connector and a flexscreen_... 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.

Build and verify

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 build

npm 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/.

References

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.

About

Configure and inspect tscircuit photodiode boards across USB-C, USB Micro-B, JST-SH, CH552T, and TI MSP430 variants

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages