Fencing FAQ
Home › Equipment › DIY armory › Scoring box

Build a three-weapon fencing scoring box

An open design for foil, épée and sabre built around an inexpensive STM32F401 "Black Pill" board, with FIE timing and the rules hobby boxes usually skip.

Prototype. The rules engine passes 25 automated tests covering FIE timing, floor hits and sabre whip-over, but the hardware has not been field-tested yet. For practice and learning only; not certified competition equipment.

What makes this design different

Timing it follows (FIE material rules)

WeaponLockoutMinimum contactNotes
Foil300 ms14 msOff-target lamp for touches on non-valid target
Épée45 ms2 msBoth can score (double) inside the lockout
Sabre170 msabout 1 msWhip-over rejected after 4 to 15 ms of blade contact

In sabre the weapon's two socket contacts are joined at the guard, so the box treats that connection as normal, not as a fault.

What you need

Every part in plain language is on the store shopping list.

Build documents

Complete build pack (all four docs in one PDF)PDF · 302 KB
Doc 10: schematic, pin map and partsPDF · 9 KB
Doc 11: firmware, tests and bring-upPDF · 123 KB
Doc 12: optional gym-visible lamp upgradePDF · 123 KB
Doc 13: picture-style wiring diagramsPDF · 193 KB
Store shopping list, one page per build (no links)PDF · 142 KB
Sourcing sheet with online buy links (checked Aug 2026)PDF · 206 KB

Source code

The rules engine is plain C++. To run its tests on a PC: g++ -std=c++17 -O2 -o test test_scoring_logic.cpp scoring_logic.cpp then run test.

Firmware sketch (STM32F401 Black Pill)INO · 8 KB
Rules engine header (FIE timings)H · 5 KB
Rules engine (plain C++, no Arduino needed)CPP · 6 KB
Automated tests (run on any PC)CPP · 13 KB
Optional hit simulator for timing checks (Arduino Nano)INO · 7 KB

The official FIE Material Rules, which these timings come from, are published on fie.org.

← DIY armory · Body cord tester build →