Finally got around to opening up the dartboard.
It was pretty much what I expected based on the other projects I have seen... 2 clear plastic sheets with conductive patterns printed on them. An insulator sandwiched between them with holes allowing the plastic sheets to make contact when pressed together.
The dartboard wedges are really big plastic buttons that press these sheets together to make contact, registering a hit.
The sheets terminate in a pair of short ribbon cables crimped to a ribbon connector which is soldered to the dartboard's small pcb brain. The pcb has a small lcd display, 2 sets of rubber buttons and wires running to a small speaker, an ac power adapter jack, and a battery compartment.
What I didn't expect was the configuration and layout of the 2 contact sheets. I was hoping for something like a 10x10 matrix, but instead it is a 7x10 matrix. This means that the inner and outer single-score wedges are wired together and pretty much eliminates some of the games I wanted include. Oh well. Maybe I'll hack the sheets to split them into separate connections for v2.
The way these are wired... the board is split into 2 halves: from the 9 wedge clockwise around to 10 and then from 15 around to 14. The sheet with 7 wires has 3 connections on each half - 1 each for the single, double and triple segments. The 7th connection on this sheet is for the bulls-eye. The other sheet has 10 wires... each wire goes to 2 wedges, one on each half of the board, and with 2 wires also connecting to the bulls-eye - one to the single bull and the other to the double.
So when you hit a triple 20, you hit a wire connected to both the 20 and 16 wedges on one sheet and you hit a wire connected to the triple ring on the 9 through 10 half of the other sheet; or row 6, column 0; or boardMatrix[6][0]. Should be easy enough to hook this thing up to the duino, huh?
First thing i did was cut the wires to the batteries, ac jack and speaker and unscrew the pcb from case. Next, I grabbed a soldering iron and solder sucker and desoldered the 20-pin ribbon connector. This connector also happened to be glued to the pcb, so a combination of rubbing alcohol, screwdriver and needle-nose pliers finished the job.
I started out using just one 595 shift register and 2 duino data pins to send a signal to the board's 10 wired sheet, but for some reason i wasn't making any connections from the duino data pins. The multimeter showed 5v coming from the pins, going into the ribbon connector and even from the conductive sheet, yet when the connection was made from these data pins directly to the dartboard, hardly any voltage was coming out the other side. I don't know why. I am curious, but would rather get this working than figure that out... so I just daisy chained another 595 for the other 2 lines and this worked very well. Possibly unnecessary given the available duino data ports, but so it goes and so it goes and so it goes.
The final circuit has the duino activating "rows" one at a time in sequence on the 10 side, using the daisy chained 595 serial-to-parallel shift registers. Then the duino checks all 7 "columns" in sequence on the 7 side, through a single 589 parallel-to-serial shift register, looking for a hot wire. If it finds such a wire, then it stores the row and column that made the connection, and looks up the wedge value and multiplier segment for that row,column. This row, column is considered to be in a "pressed" state. The duino continues to loop through the rows and columns and once this hot row,column is no longer hot, it is considered "unpressed" and a message with some details is sent out the Serial.
When the dart hits the board, the button is pressed for a whole bunch of cycles and we only want to treat it as a single hit. That's why I just keep track of what was hit and only consider it to be really hit when the button is no longer pressed. Other projects I have seen just run a delay command when a button press is detected, but I like this unpressed approach better. I might try a 2d array to hold the state of all buttons, which could be another improvement, but I think this should work for now.
When I first wired it up, I had a few wires out of place and some of the wedge/multiplier mappings backwards, but these were easy to track down and fix and the whole thing was pretty simple to implement on both the hardware and software sides. I tested all buttons manually and everything is in working order.
I think this can be considered a milestone. Cool beans.
So the first version of the sketch is out on git.
Next hardware step is to move my circuit from the breadboards to a pcb about the same size as the board's original pcb, so I can just screw it into place. Then I'll want to find an extry long mini usb cable. I'm going to try to find a grommet to fit where the ac power jack sits in the dartboard case and have the usb go through there. I might eventually try to find another small LCD to use to display my own nonsense.... but that's probably not necessary.
Next software step is to conjure some python code to receive these Serial messages and do something useful. And order a raspberry pi. My dog has no nose. "How does he smell?" Awful.
I have some pics I took along the way which I may or may not add later. This is the worst blog ever, but I'm happy about the progress I made with the dartboard and Arduino interface, so whatevs, b's.
No comments:
Post a Comment