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
- Floor hits are ignored. It reads the piste and both ground lines, so a touch on a grounded metal strip does not light up.
- Blade contact is visible. The two weapon lines are driven alternately instead of from one fixed supply, which is what makes sabre whip-over detection possible.
- Lockout starts at the right moment: when the touch registers, not when contact begins.
- It never freezes. The lamps and buzzer are handled without pausing the scan, so it keeps watching while showing a touch.
- The rules are plain, testable code. The scoring logic has no hardware dependency and its tests run on any PC.
Timing it follows (FIE material rules)
| Weapon | Lockout | Minimum contact | Notes |
|---|---|---|---|
| Foil | 300 ms | 14 ms | Off-target lamp for touches on non-valid target |
| Épée | 45 ms | 2 ms | Both can score (double) inside the lockout |
| Sabre | 170 ms | about 1 ms | Whip-over rejected after 4 to 15 ms of blade contact |
What you need
- A WeAct STM32F401 "Black Pill" board (buy a spare), and optionally an ST-Link programmer
- 7 panel jacks (6 fencer lines plus the piste), seven matched 1 k resistors, 220 ohm resistors for the lamps
- Green, red and white lamps plus mode and fault indicators, an active buzzer with a small transistor driver
- Protection diodes on the fencing lines, two push buttons, perfboard, wire and a USB power supply
- Optional: logic-level MOSFETs and 5 V LED strip for bright, gym-visible lamps (Doc 12)
- Optional test rig: an Arduino Nano hit simulator (fires exact-millisecond touches) and a USB logic analyzer
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 parts | PDF · 9 KB |
| Doc 11: firmware, tests and bring-up | PDF · 123 KB |
| Doc 12: optional gym-visible lamp upgrade | PDF · 123 KB |
| Doc 13: picture-style wiring diagrams | PDF · 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 official FIE Material Rules, which these timings come from, are published on fie.org.