MustafaMulla29/stride-pedometer

This code defines schematic symbols and 3D footprints for various hardware components such as antennas, sensors, regulators, and connectors used in electronic circuit design.

Version
1.0.4
License
unset
Stars
0

Files

README.md

# Stride BLE pedometer — Rev A

Chip-level tscircuit PCB using **CC2340R5 + BQ25150 + BQ27427 + BMA400**, a bare OLED display, discrete RF matching, and a ceramic antenna. No breakout modules.

**Routing repair verified:** the main project passes `bunx tsci check shorts`, the separate routing checks, and all compiled error checks. The faulty final `simplify` phase was removed, and R5 moved right by 0.2 mm. Routing uses the default native tscircuit autorouter with two phases. No custom router or explicit `<via />` elements are used, and no clearance rules were relaxed. See `review/VALIDATION.md` and `review/routing-change.json`.

**Engineering prototype; not ready to order as a working pedometer.** The functional review found an undersized imported U6 footprint and unresolved analog-layout, assembly, and firmware work. Firmware and a battery-life measurement are not included. See `review/FUNCTIONAL-AUDIT.md` for the findings and required validation.

Assumptions: 40 Ɨ 35 mm board, four layers, 0.8 mm thickness, protected 100 mAh LiPo, 5 V charging contacts, and a 0.91-inch OLED used on demand. Battery life is estimated, not measured; the example budget targets about six weeks with brief screen use and infrequent BLE activity.

## Files

- `index.circuit.tsx` — complete logical circuit and PCB placement, with explicit RF links.
- `imports/` — JLCPCB/LCSC component footprints; `lib/footprints.tsx` contains the crystal lands, bare display flex tail, and copper contacts.
- `dist/index/pcb.png` and `schematic.svg` — generated PCB and schematic previews.
- `dist/index/circuit.json` — generated connectivity, geometry, and validation findings.
- `review/bom-all.csv` — all design items, including DNP and hand-installed items.
- `review/jlcpcb-bom.csv` and `placement-review.csv` — proposed PCBA population and placement for assembler review.
- `review/assembly.svg` — component location drawing.
- `review/FUNCTIONAL-AUDIT.md` — requirement match, concrete design issues, and what remains before ordering.
- `docs/design.md` — architecture, parts, supply details, RF constraints, assembly and bring-up.
- `docs/firmware-and-interfaces.md` — I²C/SPI cross-reference, GPIO allocation, charger settings, and proposed BLE behavior.
- `docs/power-budget.md` — assumptions, calculations, and sensitivity to display/radio use.

Fabrication/KiCad archives have not been regenerated as part of this routing fix. `bun run export:review` can generate engineering review exports from the checked circuit; it rejects circuits with error records. Earlier exports used different routing and are superseded.

DS1, the protected battery, battery thermistor, charging dock, and enclosure are not included in automated PCB assembly. Display flex folding and battery placement require a mechanical fit check. The antenna corner must remain clear of metal.

## Rebuild

Install Bun, then run these commands from this directory:

```sh
bun install
bun run typecheck
bun run netlist
bunx tsci check schematic-placement index.circuit.tsx
bun run placement
bun run build
bun run routing
bunx tsci check shorts
bun run review
bun run export:review
```

`bun run dev` opens the editable tscircuit project. Builds use tscircuit 0.0.2465's default local Pipeline 9 autorouter with two routing phases and no additional `simplify` phase. The CLI uses its ordinary generated cache; no custom routing algorithm or bundled route replay is used. Placement and connectivity edits are handled by the standard routing workflow; inspect the newly generated routes and checks after changes. The eight RF connections remain ordinary declarative `<trace pcbStraightLine />` elements. Native routing can reshape them; inspect actual copper layers and return paths, rather than treating that prop as proof of an RF-valid layout.

The build script also normalizes physical through-via drill metadata. Always export from the generated `dist/index/circuit.json` with `bun run export:review`, rather than directly exporting the TSX: the exporter otherwise mistakes some trace layer transitions for blind/buried drills. The export script checks the drill stack and replaces the generic assembly population with the reviewed 66 placements.

Inspect generated error records even if `tsci build` exits successfully. Do not upload review CSVs as a manufacturing release until the final Gerbers, DRC, footprints, stackup, and component orientations have been checked together.

Supply pins and unused pins are connected or explicitly marked in the source. Some generic imported symbols lack complete electrical pin attributes; the logical netlist check does not substitute for the datasheet review recorded in `docs/design.md`.