Monday 14 October 2013

Digital board game - assembly finished

Another afternoon at BuildBrighton this weekend, and the assembly of the digital board section prototype is finally complete. To complete the project, we first took a printed and laminated top layer and cut to size.
Then we stuck some copper tape onto folded-up bits of masking tape and cut them into little circles using a hole punch (sticking the copper onto masking tape just made it easier to get the backing off each individual circle).


The little copper circles were placed in the dead-centre of the reverse of each playing square on the board.


Because the double-sided pcb was actually made in two sections, with panel pins acting as vias, the separator layer needed to be a bit thicker than in previous prototypes. In fact, with the panel pin heads being up to 1mm from the surface of the pcb, the separator layer was made from strips of 1mm plasticard from LSA Models (on Sackville Road in Hove)


With all the hardware in place, the top layer was placed over the PCB and stuck firmly to the separator layer. A quick test for continuity proved that the copper circles were (thankfully) in the correct places, on the underside of this top layer!


The last thing to so was to burn the firmware onto the PIC and solder it to the underside of the PCB:



The firmware uses multi-plexing to continually poll the input port and report back which squares (if any) are pressed. Only when a square changes state (an empty square receives a playing piece, or a previously occupied square goes empty) is a change in state registered, and a serial data stream sent back to the host controller via UART.

After a couple of false starts (and a bit of hacking to the pcb layout to allow the firmware to be updated while the PIC is in place on the circuit board) we managed to get what looks like useable data from our board game section.

(deflection in the video is deliberately exaggerated so you can see what is happening: press a square, get some serial data, release a square, get more serial data)

As well as providing instant feedback whenever a square was pressed/released, we are also able to query the state of the entire board section using serial commands:



At the bottom of the list of data, in the monitor screenshot above, you can see a square being pressed (the message FF 44 45 FE C4 FD tells us that board number 0x4445 had the square at 0xC4 pressed) then the command 0xC9 (this is a special command to say "what state are you in?") being sent to the board section with id 0x44 0x45. The response message writes out the state of every square on the board. In among all the zeros (empty squares) is a single entry: 0x40 - this is a binary value: 01000000 which corresponds to the second square in the third column being pressed down. There's only a single non-zero bit in the data, which is correct - we pressed only one square at a time on the board during testing.

So all in all, a successful test!
The PCB is a bit rough-n-ready and the top layer floats far too high above the push-button style contacts on the underlying board (we really have to press our squares down hard) but that's only because of the limitations of making a homebrew double-sided PCB. A professionally manufactured board would be completely flat, allowing us to use a much thinner separator membrane - like paper, acetate or card - and make the entire board more responsive to a playing piece being placed on each square.

The point of this test was to prove whether or not the pcb design was good, not how the board played with pieces on it - and having proved that it is, we can get some manufactured and now concentrate on the assembly process of the rest of the board!

No comments:

Post a Comment