Wiring Up the Keyboard

Okay, this is where the rubber hits the road, sort of.  With the encoder tested out working, now we begin the laborious process of rewiring this Mohawk Data Sciences (actually Microswitch) key-to-tape keyboard.  This is essentially the exact same keyboard Don Lancaster used in his prototype.  It’s not clear if he used the earliest version of his ASCII encoder with it, although to me that would make sense.  Interestingly, the encoder’s mounting points seem to match the keyboard’s depth.

Anyway, here’s the hot mess we are presented with, as it was cut from its machine:

Actually in this pic I’ve already started removing wires.  I need to remove all of them, because the encoding scheme used here was probably EBCDIC or baudot or who knows.. whatever Mohawk used.  We need ASCII.

Once fully desoldered, I figured I’d start working my way from the top of the keyboard down.  This is where care and attention must be paid, join the wrong wire, and you’ll get the wrong result.  Early on I decided on a scheme whereby, looking at the back, I would use the left post for each key to connect to the pin marked specifically for that key, and the right post would connect to the pin corresponding to the last three digits.  So for example, keys 0-7 would all be chained together on the left:

And so on for each group of keys corresponding to the appropriately marked pin on the encoder.  Then on the last key in that group, a wire would connect to the encoder’s pin.

Now where it all gets tricky is when we start connecting the pins corresponding to the last three bits.   To give an example, keys “, 2, B, R, :, J and Z all use 010.    So these are the keys that have to be connected together on their right post, and then that line would go to the pin marked 010 on the encoder.  Get it?  You really gotta keep your wits about you.  If I’d been smart, I would have first marked all the keys on their backsides so I didn’t have to constantly flip the keyboard over and check which key I was connecting to.  Further, as you connect more keys, the wiring gets progressively messier and more dense, which makes it harder to tell where you’re going.  An even smarter strategy might have been to use color coded wires to make seeing the links easier – but I was determined to use the keyboard’s original wires to keep as close to prototypical era as I could.

In the above pictures you can see this taking shape.  To make things a tad easier, I did resort to using a Dymo labeller to label the wires that end up connecting to the encoder.

Finally when this was all done, I connected each wire to the appropriate pin on the encoder.  I declined to use a connector for this, which would have allowed easy removal.  I just didn’t have one and didn’t want to wait.  I figured this would be stronger anyway.  Here’s the final result:

I can clean this up a bit for the install, but yeah.  What a spaghetti mess-o-wires!

I regret I don’t have a video to show the testing.  I don’t have a tripod for my camera.  Essentially on testing we had some fairly positive results, however as expected some keys turned out to be wrong.  What I had expected to happen had in fact happened: I had gotten some keys mixed up.  In some cases I goofed and put a wire that should have been on the left post to the right instead.  In others I simply mixed up which key belonged on the 3 digit binary line, which confused the encoder.  Naturally I didn’t catch this of course until I had desoldered and resoldered the keyboard connections to the encoder three times, convinced I had an undiagnosed encoder problem.  But eventually I figured them out, traced the wires and connected them to the right places, removed some solder bridges, and now it works perfectly!  Wow!  So chalk up a successful project there!  This gives me hope we’ll have good sailing during the actual TVT build.

Testing out the ASCII encoder

With Don Lancaster’s first, primitive ASCII encoder built, it was only natural that I wanted to test it out.  Wiring up the keyboard is going to be an eye-crossing affair, and before I start going down the rabbit hole of ‘Why isn’t it generating the proper character?’ with that attached, it’d pay to make sure the encoder is working correctly on its own.

Thanks to my online friend Chuck, it was suggested that I could power the thing, which expected a 10V power supply (or 12V if you changed a diode, and that is what will end up happening as the TVT power supplies 12V), with either a 9V battery or 9V supply.  9V would be just enough to give the thing some life.

Excitedly I soldered in leads for positive and ground, and then used one of those cheapo Radio Shack multi adapters, with no head on.  After figuring out which pin socket was positive and negative, I hooked up!

Now what we have to do is simulate keypresses.  I’ll try to explain this as best I can within the limits of my own understanding.    Take a look at this page from the ASCII encoder article here:

Looking at the table in the bottom left corner, as an example, the comma (,) – the ASCII code for comma is 010-1100.  You read from bit 7 down to bit 1 (most significant to least).  I don’t know why.  Don’t ask. 🙂

Anyway, for our purposes, to generate the desired comma keypress, we need to look at the parts placement guide in the upper right of that same page.  Now, this thing isn’t well marked, but essentially comma belongs to a group of symbol keys.  You’d have to understand how to read a schematic to figure that out in this case, but I had help.  The first pin we need to short for comma is the pin marked /,?.

Now the second bit is tricky and I’ll admit, I have no idea why it’s done this way.  But essentially if you look at the lower pins for the larger connector on that parts placement guide, you’ll see they are all three digit combinations of 1s and 0s.  Those correspond to the last three bits of the binary code.  In the comma’s case, that is 100.  So what that means is, to generate a  comma, our keyboard matrix must be set up in a way that one side of the comma key contacts the /,? pin of the encoder, and the other contacts the pin marked 100.  Since my keyboard isn’t ready yet, I’m just going to use a short piece of wire and.. er.. short those two pins.  Then I’m going to use a logic probe to detect how the bits are set with comma pressed:

 

Voila!

To orient yourself, I am moving my logic probe from pin 1 down through pin 7.  Since low on the logic probe is 0, and high is 1, that produces: 0011010  or reversed: 010-1100.  Exactly what we expected!

Now truthfully, the video above was taken after some major tweaking.  I made some serious rookie mistakes, including accidentally installing 2N5139 transistors where the 2N5129 should be.  They are not the same!  Luckily I didn’t blow anything up.  Once I got that booboo fixed, it was really just a matter of nailing down some accidental solder bridges.

The last hangup was a diode at D13.    This is a Class A example of some of the difficulties faced by hobbyists: errors!  Looking at the parts placement diagram from the article above, you’d think D13 belongs right between X-Z and H-0 on the far right side of the encoder.  WRONG.  It’s supposed to be right between D25 and D20.  You can even see the pad for it.  Ugggggh.  This kind of thing fills the inexperienced hobbyist with dread, because this is actually a very simple device.  The TVT is not.  I do have the advantage of having a full page of corrections included in the instructions I’m working from, so there’s that, but who knows what else was missed!  A good rule of thumb: when in doubt, check the schematic!  Unless that’s wrong too.  Or.. you can’t read a schematic..