Skip to content

Repository files navigation

IR Spoke Sensor

Repository checks Documentation Hardware release

Configurable 940 nm through-beam spoke sensor for a Seeed Studio XIAO ESP32-S3. A discrete analog front end restores a 25-50 kHz optical carrier; ESP-IDF RMT detects its interruption and learns the wheel's spoke pattern.

This repository is the wheel-speed-sensor subsystem of BicycleOBU. The online Interactive BOM is generated directly from the authoritative KiCad PCB.

Hardware V0.1 receiver and breakaway emitter panel

Status

Hardware V0.1 (KiCad CAD revision R4) was ordered and is preserved as a GitHub release. main is now hardware V0.2-dev; physical validation is still open for V0.1.

Area Current evidence
Hardware KiCad 10 ERC: 0 errors, 3 known library-sync warnings; DRC: 0 violations, 0 unconnected pads
Connectivity 70 schematic endpoints, PCB pad nets and SPICE topology cross-checked
Simulation Python transient, 10,000-case sweep and ngspice cross-check pass
Firmware Portable core, RMT/CAN adapters and BLE CSC component implemented; ESP32-S3 target build passes, HIL pending
Manufacturing Versioned JLC Gerber/BOM/CPL package generated; assembly-preview approval pending
Physical performance Sunlight, alignment, contamination, vibration and power tests pending

Do not treat simulation as production validation. The remaining gates are listed in TODO.md.

Start here

Goal Guide
Understand the signal chain System overview
Open the design or run the simulator Getting started
Change configuration, firmware or captured CAD Development workflow
Order or review the PCB Manufacturing
Inspect or place components Interactive BOM
Bring up and correlate a prototype Bring-up and test
Trace a requirement to evidence Verification matrix
Find a technical reference Documentation index

Hardware V0.1 at a glance

Property V0.1 value
Optical path 940 nm VSMB1940X01 emitter to VEMD10940FX01 photodiode
Carrier 25-50 kHz runtime range; 38 kHz default; 50% duty
Receiver TLV9062 TIA/band-pass, TLV7011 Schmitt comparator
MCU interface GPIO1 RMT TX, GPIO2 RMT RX with carrier demodulation
Wheel design range 16-48 spokes; 60 km/h requirement, 80 km/h stress calculation
Receiver outline 17.8 x 21.4 mm XIAO outline
Emitter outline 21 x 15 mm, two M2.5 holes
Panel Two-layer PCB with one routed mouse-bite breakaway tab
Remote link 600 mm two-conductor JST-GH harness after snap-off
Optional interface Official XIAO MCP2515 CAN expansion; disabled by default
BLE interface Wheel-only Bluetooth Cycling Speed and Cadence Sensor (0x1816)

One-command entry points

.\Open-IR-Spoke-Sensor.cmd
.\Open-Interactive-BOM.cmd
py -3.14 simulation\local_server.py
powershell -ExecutionPolicy Bypass -File tests\run_all.ps1
powershell -ExecutionPolicy Bypass -File hardware\export_jlc.ps1 -Revision V0.2

The KiCad launcher also starts the InteractiveHtmlBom watcher at http://127.0.0.1:8766/; every complete PCB save regenerates and reloads the browser view. The simulator opens at http://127.0.0.1:8765/. Disposable simulation evidence is written under ignored build/.

Source of truth

Concern Authoritative source
Tunable system values config/system.json
Pins and electrical nets hardware/connectivity.json
Parts, fields and procurement hardware/component_catalog.json
Captured schematic and routing hardware/ir_spoke_link/layout_manifest.json
Requirements requirements/requirements.yaml
Project paths and revision project_manifest.json
Hardware/software versions docs/versioning.md
Changes between releases CHANGELOG.md

Generators restore the captured user layout and must not synthesize, remove or reroute tracks. See CONTRIBUTING.md before changing CAD or generated files.

License

No project license has been selected yet. Until one is added, the repository must not be presented as granting open-hardware, software or documentation reuse rights.

About

Configurable 940 nm IR spoke sensor with KiCad 10 hardware, linked Python/ngspice simulation, ESP-IDF RMT firmware, and JLCPCB exports.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages