Tuesday, March 19, 2013

Back to a modular pcb-based board game

Having tried a non-pcb based board, and found it too fiddly, we're now re-visiting the idea of a pcb-based module for our board game. But we need to address some of the issues that made us think abandoning it was the right approach.

The first thing is that a 7-hex module is a great design, but only for a single module! When you try to put a few of those shapes together, you end up either with big gaps in the tessellating pattern or end up with lots of "spare" squares left over, because of the way the pieces fit together.

Basically, when you put multiple 7-hex segments together, the tessellating "direction" isn't regular:


The "direction" of tessellation is peculiar - neither upwards nor across, but in a not-quite-diagonal direction. This is the first thing we need to address. Ideally we want our modules to line up either horizontally or vertially. But how to achieve this? By simply adding another three squares...


If we want to make a roughly rectangular board game from these modules, we still get a few unused left over squares, but not nearly as many as we'd get if we made the same board layout from 7-hex segments. Plus, the "direction of tessellation" is running across the board. A much more satisfactory layout!





We haven't yet made up one of these boards to try out, but the basic principle is this:

Each board uses two shift registers. The first 5 bits on each register are used to control the leds on the module; the input serial line goes into one shift register and the output from this goes into the serial-in on the next shift register. The output from the second shift register goes back to the connector to allow data to be passed on to the (serial-in on the) next module in the board.

The buttons still use the resistor ladder approach. Since our other design, using a parallel to serial shift-register but with input buttons (instead of hall sensors) would still require pull up resistors on the inputs, we figured we'd keep the resistors and just lose the PISO shift registers. The downside to this approach is that each module must have it's own analogue input on the host micrcontroller. Luckily, we've some Microchip samples coming of PICs with a massive 32 analogue inputs on them. We might yet still need to use two of these together, in which case things may get a little more complex, but for now we're going to stick with this analogue/variable voltage approach for testing for input.

Now - why ten squares? Isn't it a bit wasteful?
Well it is, but here's why we're not worried:

Firstly, a 7-segment approach is wasteful. Only using 7 bits of a shift register rather than the full eight. In this arrangement we're still being wasteful, but now using 5 bits per shift register, instead of the full 8. We did consider expanding the board again, making it 15 squares but decided against it. Why?

A 15 square module would be physically very large. Etching such a large board could prove to be a problem. In fact, just getting the press-n-peel right on something so big could be a nightmare!
But also, we're sticking with 10 because it allows the same design to be used for actual square squares in future, not just hexes. A grid of 3x3 squares could be accommodated using the same techniques (only using 4 bits of one register and 5 bits of the other). Taking it a step further, a module of 4x4 squares could also be made, using all 8 bits of each shift register.

But a bit like avoiding a 15-square module for our hexes, going to a 4x4 grid of squares might cause problems on the analogue read, depending on the resolution of the host micro. A ladder of more than 10 resistors could have lots of cross-over, depending on the accuracy of the resistors in the ladder.

So we figured 10 is a nice compromise. It's not as efficient as using 15 hexes in a module, it does waste a few bits on the shift registers, but it does mean our input resistor ladder has only 10 different points to ground, making each band between inputs that little bit wider, and making it a bit more robust.

So about the only thing left to do is actually make one of these boards up and see if they actually work!

No comments:

Post a Comment