Wednesday, September 2, 2009

Gakken GMC-4 Paper Tape Reader

The best part of the Gakken Otona no Kagaku (Adult Science) kits is that you can get some amazing mileage out of them, depending on the kit. Not all of them are easily modifiable, and not all are worth modifying. But the ones that are, like the synth and the microcomputer, allow for many hours of activity way beyond the original intent of the kit. So you can spend the 2500 yen ($25) for the kit, and get a lot more than $25 worth of play time from it.



Case in point is the GMC-4 microcontroller. The biggest drawback is that it doesn't have permanent storage. It can take several minutes to enter a program through the keyboard, and after that, when you turn the power off, the program is lost and you have to re-enter it when you turn the kit back on again.


(GMC-4 from top, showing wires and connector on right side)

So, I took a bank of micro-switches with the little rollers on top, soldered them in two rows on a circuit board and wired them up to look like the GMC-4 keypad. Then I soldered wires to the GMC-4 keypad and brought them out to a 9-pin connector that I bolted to the side of the base.


(Bottom view. 9-pin connector on left, volume control and audio jack on right.)

The keypad is essentially a matrix of contacts with a sheet of conductive plastic glued above a separator sheet with holes cut out where the pad keys are located. When you push down on a "key" pad, it contacts a set of parallel lines on the circuit board and shorts them together. These lines are part of the keypad matrix. The matrix consists of 5 columns and 4 rows of contact line points. The row and column shorted together is then interpreted to be a specific key. That is, row 1 and column 1 could be the "o" key, and row 1 and column 5 is "reset".



By pulling the row and column wires out to the 9-pin connector, and then connecting that in turn to the 20 micro-switches that were wired to mimic the original rows and columns, I created an external keyboard. I then took a piece of corrugated cardboard (from a shipping box) and cut holes to match the roller positions of the switches. And I took another circuit board and used that as the top of the reader casing. Then it was just a matter of setting up the guide positions for the paper and cutting out the paper tape itself.


(Circuit board with micro-switches and cabling.)

The switches are about 0.5 cm x 1.5 cm. Because of the hole spacing on the circuit board, I had to mount the switches in 2 rows of 10, staggered so that the switches alternate between row 1 and 2 as you move across the paper. Because of the length of the roller and the spacing of the switches, I cut the paper as follows: 11 cm wide, for the full width of a sheet of construction paper. 0.5 cm margins. Each column is 0.5 cm wide, but the holes are a little wider than that to ensure that the hole will allow the desired roller through. The holes for the instructions are 1.5 cm long, and 1 cm spacing between instructions (to ensure that switches from row 1 and 2 don't both close when there are two instructions in sequence one right after the other). One instruction per row. I used construction paper because regular paper is too flimsy to push against the roller. If you make a mistake with the holes, you can just tape over them.


(Bottom of circuit board, showing wiring.)

When you put the punched paper sheet in place within the reader, the force from all 20 switches at one time causes the circuit boards to flex and some of the switches to incorrectly close, so I used zinc angle bars as stiffeners. I also added rubber feet to prevent the bolts from scratching the table.

It's difficult to cut the instruction holes out to the right width, so you have to keep debugging the tape (i.e. - cutting the holes wider) to get it just right. But, on the plus side, if you miss adding an instruction, you can just cut the paper and tape in more code as "an insert operation". On the down side, because every instruction needs to be followed by an "INCR", and the spacing is 1.5 cm per keystroke with 1 cm between keystrokes, a simple 20-instruction program will be (reset + 20 instructions + 20 INCRs + reset + 1 + run = 44 keystrokes * 2.5 cm ) 1.1 meters long, plus whatever length you use for the leader and trailer sections. On the other hand, you can now include the data to be put into memory, so you don't have to input that manually any more and you can have the "reset"+"1"+"run" sequence at the end to make the program execute automatically. Plus, you could have more than one program on the tape roll, and go from program to program fluidly if you wanted to. In this case, adding a little motorized roller to pull the tape through the reader smoothly would be a big plus.


(Cardboard sheet with holes placed over the switch rollers.)

While I was at it, I also added an "audio out" jack and a 15 K ohm volume control. The speaker was too loud to let me play with the kit late at night without disturbing the rest of the family.



Here's the youtube video of the reader in action.

No comments: