Software-based Scoring Box for Fencing

Objective: Build a simple piece of hardware that will enable detection of all the circuits made in the sport of fencing for all three weapons: foil, epee, and sabre. The hardware should be easy enough to build by an amateur electronics hobbyist. It should be primarily based on widely available components, and require somewhat less skill to construct than a GPLScoringBox (otherwise, why not just build a dedicated box?). It should be inexpensive to build. All necessary logic of interpretation of the signals as regards to the fencing is to be done in software.

A software scoring box has a few advantages (and several disadvantages) over a dedicated scoring box. It is configurable, meaning proposed timing changes can be tested and distributed very easily. The interface is also quite configurable, and a box can be customized to suit individual preferences (for instance, layout, features, default sounds/settings). The screen allows for greater output (actual sequencing to review debounce times and lockouts, among other things) and provides a multimodal input (for voice control and other wireless devices). The computer allows for easy integration with other services, like digital score sheets, and automatic relaying of results back to a bout committee. There are many interesting new possibilities.

There are also some limitations. Standard operating systems to do not operate in "real time" and as a result you can never fully guarantee that things will be timed perfectly. Configurability and the wireless interaction capabilties offer many avenues for cheating. As a result, I do not expect such systems will be adopted by the FIE or USFA for a long time, if ever.

The intent is for the system to supplement club in-house scoring and to allow individuals to own their own scoring boxes. A bungee-type reel system is also quite inexpensive to build, and one should be able to construct the entire scoring apparatus needed for about $125. Since many people own laptops or have access to old computers, and the scoring system is not at all computationally intensive, I consider the cost of the computers separately from the box construction.

While this system has been built by me, a project of the same lines was started around the same time by member reawl (website: The thread at on which these systems have been discussed is:


The software is written in java and is driven by keyboard controls. The hardware basically replicates a keyboard, and the software interprets these keys depressed and released as events. Only three files are currently necessary. FencingBox.jar, JXInput.jar, and buzzer.wav, both of which must be in the same directory. If you don't like the buzzer, just find a buzzer wav file you do like, name it buzzer.wav and put it in that directory. Bug Fixes are here, and I've added version numbers to the software for tracking. To run, just double click on FencingBox.jar. I don't know how far backward compatible this is, so just be sure the latest java runtime is installed. There are a few controls operated via the menu bar. Other keypresses do various other things. In time, these will be completely configurable, but I've got bigger fish to fry right now. The other controls currently available are:
Connect left A-B lines - C (this will be touch left for epee (not to bellguard)
Connect right A-B lines - Z (this will be touch left for foil)
Other keys are X, V, W and S. You can play with them to see what they do.
Change weapon - insert
Touch left - 1
remove touch left - 2
tough right - 3
remove touch right - 4
toggle timer - 5
reset timer - 6
start timer - 8
stop timer - 9
set timer to 1 minute - home
set timer to 3 minutes - end
sound on - 0
sound off - delete

The fact that this is fundamentally keyboard controlled means there are a variety of ways for you to interface with the application. I like to use a nifty piece of software developed for the gaming world called Shoot. It requires a voice processing engine to work, but the website links free versions of this. I created a profile for it, but you can make your own. Note: Shoot requires microsoft's .NET to run. If you use .NET 2.0, you'll need to replace the shoot.exe.config file with this one. I use a bluetooth headset (Jabra jawbone) as the mic when I direct bouts. The voice control works OK - not great. It works better when you have fewer commands, so if you're just awarding touches it works great. If you want to do time, it's a little dicier. The safest thing to use is probably a presenter mouse or something, but I haven't played with this much. Again, bigger fish to fry.


Let it be said now that this is UNDER DEVELOPMENT! Right now, I can detect a lot of things, but not:
1) Foil bellguard to lame
2) Foil hit to bell guard/"ground"
3) Foil won't register a touch if blades are in _continuous_ contact when hit arrives to lame. It will detect off target though.

The system is based around a keyboard encoder, a device that simulates keypresses when differenct circuits are made. I use the Keywiz Eco, a PS/2 device. I'm going to experiment with the USB stuff soon, but USB is a little slower. Anyway, the idea is that I wire up different keys from the eco to the posts. The wiring diagram, as you can see is quite simple, which is good for construction, but you can see that I'll be missing some connections. The ground are wired seperately to transistors, each of which go to the B lines of their sides. This allows me to detect which ground is activated, which simplifies some of the decisions. With a few more transistors and diodes, I can probably detect everything I need to. I'm working on that. I use very cheap NPN high-speed switching transistors from radio shack, about $1.50 for a box of 15. I wire a switch to ground so I can turn it off (not send keystrokes). I used a larger project box than necessary, but I don't have to cram everything in that way. Finally, I use size 10 coupling nuts for the sockets, and mount them with a small screw to to the top of the project box. Then I can use ring connectors to wire everything up. On the keywiz eco, I use the ribbon cable model, but I think it's probably worth it to get the Max because it has screw terminals for everything, and that will save a lot of time. Ribbon cable is a little annoying to work with, but to each his own. You really should wire in a fuse inline with the ground, just to be safe. You can see that I use a lot of quick disconnects... no need for this, but it's handy for me during development.

Size 10/24 coupling nuts from the hardware store as the sockets. They work and they are cheap!
I wired a switch to interrupt the ground. Now I can turn it off.
Keywiz. This is the power behind the system.
Terminals attached to the bottom of the lid. I used the forked ones because I'm out of the ring terminals.
The lid. Where all the action is.