The development of the percussion chess set continues apace. I am trying to get a basic set built as quickly as possible so I have some time to concentrate on the actual mappings before the deadline for a finished instrument hits.
Having worked out the MIDI output, I am now focusing on working out the grid that monitors the chess board. Since the PIC will only check the board one column at a time (to play each eighth-note) the task is simplified somewhat. The question is, how to avoid 64 inputs into the PIC chip? (Not impossible to do, but very inconvenient.)
My first instinct was to separate the board into eight banks of sensors, one for each column, with an 8-input multiplexer to pass values into the chip one at a time. But Shawn Van Every suggested a different tack. Wire the sensors in a grid, with each rows' output pins in serial to the chip. Then power just one column at a time, only activating one bank of sensors and safely ignoring the others.
It's a good idea because 1. it avoids the need for multiplexing and 2. limits the strain on the chip to 16 pins (8 output, 8 input). I'm not exactly sure if it will work in practice but certainly worth a shot. I think there may be some issues with sensors affecting other sensors but I'll cross that bridge when I come to it.
So, the $64,000 question remains: what sensors to use in each of the 64 squares?
First, I thought of
- Photocells, which would work by registering zero when covered by a piece.
However, that would mean that the board would have to be transparent or at the very least translucent. Also, photocells would register an analog output and the PIC only has a limited number of ADCs.
So, then I thought of
- some sort of small momentary switch, which would click on when a piece was placed on top of it. These are cheap (as low as $0.19) which is not insignificant when one has to order 64 of them.
The problem with these is that they have to somehow be integrated into the board and not be too distracting when a piece was placed on the board.
Enter John Bergren, who suggested I take a look at
- Hall Effect Switches, which work by detecting magnetic fields nearby. [more]
If they work as I think they should, they'll be perfect. They are cheap ($0.35 each when ordered in bulk) and they can sit invisibly under a wooden board and react to magnets embedded in each of the pieces. In fact, many chess sets already include magnetic pieces for travelling.
So, the next step is to order eight hall effect switches from All Electronics, along with a few magnets, and attach a column of them to the MIDI circuit I built before. Hopefully all will work well and we'll be in business.