Skip to content

Enable TMS blanking on NA500 BNC input by default - #26

Merged
cboulay merged 1 commit into
masterfrom
cboulay/na500-bnc-input-blanking
Nov 15, 2026
Merged

cboulay merged 1 commit into
masterfrom
cboulay/na500-bnc-input-blanking

Conversation

@cboulay

@cboulay cboulay commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

The NA500 BNC input was configured in mode 1 (events only), so incoming pulses did not enable FPGA EEG blanking. Configure a fixed 1000 µs blanking width before selecting mode 2 during stream setup, including when joining an already-running amplifier and after reinitialization. Setup fails if either command is rejected.

The mock continues reporting BNC events in mode 2. This also adds repeatable hardware capture/analysis utilities, an example DHCP-only configuration for a dedicated amplifier link, and a hardware report with the comparison plot and quantitative results. Large raw recordings remain local and are ignored by Git.

Validation

  • macOS build passed for the GUI, CLI, and mock (cmake --build build -j 6).
  • Mock integration checks passed for cold-start and already-running command order, rejection of either setup command, no BNC blanking commands on NA400, and 5/5 BNC loopback events with no per-pulse setup.
  • Python compilation, capture utility help, DHCP configuration syntax, and git diff --check passed.
  • Real NA500 serial 0001, firmware 0.4.9 / FPGA 0.6.1.f0: recorded all 256 EEG channels at 4000 Hz native, BNC OUT connected to BNC IN, open EEG inputs. Each recording used mode sequence 1 → 2 → 2 → 1, with a fixed 1000 µs output pulse setting:
Blanking width Mode 1 input events Mode 2 input events
1000 µs 40/40 40/40
1600 µs 20/20 20/20

All comparison blocks had contiguous counters and 250 µs timestamp increments; none of the analyzed event windows showed EEG saturation. Mode 2 produced a repeatable EEG switching transient whose later portion moved later with increased blanking width, while mode 1 stayed near background noise. This supports a width-dependent hardware response and preserved events. A driven-input test is still needed to verify suppression of a known signal or TMS artifact; this open-input experiment does not establish suppression or exact analog gate timing.

The full method, plot, measurement summary, and reproduction commands are in the hardware report.

@cboulay
cboulay merged commit 2849b0e into master Nov 15, 2026
6 checks passed
@cboulay
cboulay deleted the cboulay/na500-bnc-input-blanking branch November 15, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant