SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By jbookout
#95883
I'm considering making a one-off project that is a physical sudoku board as a wedding gift. My current idea is to have nine sets of the numbers 1 through 9 on wood/plastic squares with simple binary coded metal strips on the underside. Then the board they would be placed on would have aligned metal strips that would connect to the piece. This essentially would make each numbered piece act as a single pull quadruple throw switch. The number 1 would connect 1 of the 4 switches, 2 would connect 2, etc. (The board would have clear indication of expected orientation of numbered pieces.)

If I followed through on this approach (which I like because it allows for any sudoku puzzle to be played) I would have to manage 9*9*4=324 switches. The idea here being to have a button that when pressed tells a uC to read all those inputs and determine if the puzzle is solved (and would allow me to determine if a particular puzzle was solved).

The best option I can think of is to use daisy chained parallel in/serial out shift registers. Which means 41 chips if I use 8 bit shifters (i could do 16 bit shifters but they're more expensive) . That's doable and probably the best solution, even though it might be power hungry and a soldering nightmare, but I'm looking for suggestions and alternatives all the same.

I'm thinking the board would be kept to ~9x9 inches...The main purpose would be to have the puzzle act as the lid of a box the recipient would be required to solve one particular puzzle (or several) to unlock the box. And then the box could be reused with any sudoku puzzle...Sort of a variation on the reverse geo-cache puzzle box.

Note: Obviously the inputs don't have to be read super fast.
By riden
#95886
Very cool idea. I wouldn't mind receiving a box like that for a gift.

It seems to me that a simple matrix would work. That way you only need to switch 81 rows. That can be done with 11 8-bit registers or 6 16-bit registers and lots of diodes (81 x 4). Each block would connect to a row output of the shift registers supplying VCC via diodes on each of the four lines. The other side of the block switches would connect to 4 digital input pins of a controller. Note that all of the 81 switches connect to the same 4 pins of the controller. The diodes will isolate one block from another.

The controller cycles through all 81 rows and looks at the input pins to determine which number block is in place (with 0 meaning no block is inserted at that position).