AnasSarkiz/pedometer

A four-layer Bluetooth pedometer PCB built around a bare TI CC2340R5 MCU, 48 MHz/32.768 kHz clocks, 2.4 GHz antenna matching network, battery charger/fuel gauge, accelerometer, regulator, USB‑C, OLED/SWD connectors, and supporting passives/protection.

Version
1.1.3
License
unset
Stars
0

Files

README.md

> Fork of [imrishabh18/pedometer@1.1.3](https://tscircuit.com/imrishabh18/pedometer), published by AnasSarkiz. This fork adds manually reviewed CC2340 pin capabilities and documented board GPIO/I²C roles using existing `pinAttributes`. The datasheet service did not supply the CC2340 metadata. Startup levels, interrupt triggers, and application firmware behavior remain unverified; the converter PRs are separate from this board package. See [fork validation](docs/fork-validation.md) for checks and limits.

For compatibility with the published core, this fork specifies physical pin numbers in the six chip schematic arrangements while retaining their display labels. C5, C13 and C18 are rotated 180° to resolve the placement analyzer’s crossed-pad orientation findings; these are non-polar capacitors with symmetric footprints. The existing `isViaInPadAllowed` board prop makes the upstream via-in-pad policy visible to DRC, in addition to the autorouter setting. The release checker creates its report directory on a fresh clone. Core 0.0.2095, Props 0.0.689 and Circuit JSON 0.0.517 are pinned consistently across dependencies. Inherited fabrication files and reports are from the upstream revision and are not newly validated manufacturing outputs. Strict Circuit JSON validation of PCB records also finds upstream export issues: numeric `display_offset_x/y` fields and null component ownership on board-level silkscreen and holes. The added source pin metadata and native TI conversion were checked separately; this fork does not claim those PCB exporter issues are fixed.

> Version 1.1.3 corrects the 12 passive footprints rejected by JLCPCB and four related passives. Use the new Gerbers, BOM and CPL together. See [footprint correction](docs/footprint-correction.md) and the supplied fabrication package.

# Stride — CC2340R5 Bluetooth pedometer

Rev B is a 40 × 38 mm, four-layer PCB using the **bare CC2340R52E0RGER**, **BQ25150YFPR**, **BQ27427YZFR**, BMA400 step counter, a separate ceramic antenna, USB-C power input and an external I²C OLED.

**BGA via-in-pad is allowed.** The tscircuit fanout solver plans the enclosed BGA terminals, and the capacity autorouter routes the board. There are no explicit `<via />` elements. RF, crystal and SWCLK nets use Pipeline 9 first; the remaining nets use Pipeline 7. Physical through-via clearance is checked on all copper layers.

Current checks and fabrication conditions are recorded in [fabrication review](docs/fabrication-review.md). Use the generated **CAM review package**, including its assembly instructions, for manufacturer review. Filled/capped vias, BGA mask registration, stencil and RF stackup require factory acceptance before ordering.

## Build and check

Dependencies are pinned: tscircuit 0.0.2745, capacity-autorouter 0.0.875, fanout-solver 0.0.57 and circuit-json-to-gerber 0.0.104 (unpatched).

```sh
bun install --frozen-lockfile
bun run dev
bun run build
bun run typecheck
bun run check:tsci
bun run check:shorts
bun run check
bun run check:programming
bun run export:manufacturing
bun run audit:manufacturing
bun run audit:footprints
bun run test:manufacturing
bun run test:radio
bun run test:usb
bun run audit:bga-vias
bun run review
bun run audit:passive-gerbers
```

The CLI build can exit zero with embedded DRC errors, so `check` independently reruns routing checks. `audit:bga-vias` reports permitted via-in-pad locations. The optional `check:no-via-in-pad` tests the former, stricter policy and is not a release requirement. `check:fabrication` additionally requires the hash-bound factory/process review to be cleared; it must not be bypassed to place an order.

Use `export:manufacturing` for Gerbers: it prepares the TI BGA/QFN stencil apertures, BGA mask openings and printable underside legend. Browser exports do not apply this preparation. Copper and generated drill locations are unchanged by manufacturing preparation.

## Programming and parts

J4 exposes 2.5 V VTREF, SWDIO, SWCLK, ground and reset. [Programming instructions](docs/programming.md) include the exact connector-to-MCU map and routed continuity check. USB-C is power/charging only. A compatible SWD probe and adapter cable are required.

All **62 PCB components** have exact MPNs and JLCPCB codes. Stock was not rechecked for this revision. See [PCB-only BOM](review/jlc-bom.csv). The battery, its NTC, display and external cables are separate procurement items. The nominal protected 100 mAh cell and weeks-of-runtime estimate remain unmeasured assumptions.

The portable C pedometer core and host tests are provided. TI SDK board drivers, GATT and NVS integration are still required for a complete flashable application. No hardware programming, radio-range or charging test has been performed on a physical board.

## Design files

- [PCB preview](review/pcb.svg) and [five schematic sheets](review/schematic.svg); the schematic uses five A4 sheets and fifteen sections.
- [Power and charging](review/schematic-1-power.svg), [logic](review/schematic-2-logic.svg), [display](review/schematic-3-display.svg), [USB-C](review/schematic-4-usb.svg), [bare MCU and RF](review/schematic-5-radio.svg).
- `index.circuit.tsx`, `schematic-layout.tsx`, `net-map.ts`, `pin-specs.ts`, `imports/`: editable design and pin mappings.
- `bga-fanout.ts`, `bga-autorouter.ts`, `through-via-drc.ts`, `via-clearance.ts`: automatic routing and geometry correction.
- [Assembly process](docs/assembly-requirements.md), [bare MCU/RF](docs/bare-cc2340r5.md), [interfaces](docs/interfaces.md), [power budget](docs/power-budget.md), [firmware integration](docs/firmware-and-bringup.md).

Historical module-revision renders and exporter comparisons in `review/` do not represent the current board. The previous published revision may differ from this local source.