At our research group at the university, we used to play a round of darts every day during the lunch break. Initially, we used to use an cheap electronic dart board and entered the results manually into our "Dartabase" ("Dartenbank" in german). Obviously, this manual process is not very satisfying for a geek, so I created a Raspberry Pi driven electronic dart board (called, of course, "pidart").
I started out from a standard electronic soft dart board and disassembled it. Then, I connected the sensors in the board and the buttons to an Arduino Mega microcontroller. The Arduino sends the dart hits and button presses on the board to the Raspberry Pi, where the pidart software runs. The Pi shows the current score and other data on a screen connected via HDMI and provides a web interface to control the software. I will provide a bit more technical background below.
The main feature of pidart is, of course, to keep track of the scores of each player and to enter the final results into our Dartabase. Apart from that, over the time, I added more features:
In the video, you can see the components of pidart (the Arduino and the Dartboard, and the Pi sitting under a table), and some scenes from a typical gameplay. Not shown are the "advanced" features, like skipping players.
The hardware interface to the dart board is not very complicated. First of all, electronic dart boards usually contain a two layer plastic sheet that has conductive lines printed on it.
When a segment of the dart board is pressed (e.g., because a dart hit it), one line of the upper layer is connected momentarily to one line on the lower layer. The lines (for example, 4 for the upper layer and 7 for the lower layer) form a matrix, like a classic key matrix. The lines are connected to the GPIO pins of the Arduino Mega, which scans the matrix for presses. When it detects that a segment was pressed, it encodes the segment into one byte and sends this byte to the Raspberry Pi, which receives it over a virtual serial connection. Except for the dart board, all components needed can be bought online. In the next weeks, I will write follow-up posts with more details on the hardware.
The software is written in python using the circuits framework. This framework allows for loosely-coupled components that can be added and removed during run time. For example, there are components responsible for the sounds and background music. The sound theme can be switched by removing one component and adding another.
The web interface is based on the excellent AngularJS framework. It is updated dynamically and with very little overhead using websockets.
The source code is available upon request (its not really useful currently unless adapted to your own board).