Bringing the IBM PC XT into the 21st Century

User avatar
Ratfink

09 Aug 2012, 23:35

andrewjoy wrote:Hope that this one make it feel more like a model M"ushy"
If you want a mushy keyboard, just get a new one from Logitech.

Findecanor

09 Aug 2012, 23:43

I'm not sold on the 1.25 wide cursor keys.

andrewjoy

10 Aug 2012, 00:57

Ratfink wrote:
andrewjoy wrote:Hope that this one make it feel more like a model M"ushy"
If you want a mushy keyboard, just get a new one from Logitech.

sorry missed a wont out of there

the model m is mushy compared to a model f :)

User avatar
dorkvader

10 Aug 2012, 03:25

I wasn't sold on the arrowkeys either, but I just thought about it by putting my fingers out a little on a normal one, and it wasn't bad at all. The only trouble would be getting enough keys for it. I think we sholud ask unicomp about bulk pricing on the "XTant" set.

WCass, have you considered just building your own capacitance sensor? There are some guides online, but I'm not convinced it'll be easy. (we might need a timer/oscillator for each row and column! Either that or have a bridge circuit on every row-column.)

Where are the analog electrical guys when you need them?

It'd look ugly, but I think it'd work. It should be able to tell from resting capacitance, then with one switch on the lone down, then two, etc.

Also, do you cane an LCR meter or a way to reliably measure the real world values? Knowing how much the capacitance raises is essential, but knowing how much nearby switches affect it may be even more so.

User avatar
wcass

10 Aug 2012, 05:19

dorkvader wrote:I wasn't sold on the arrowkeys either, but I just thought about it by putting my fingers out a little on a normal one, and it wasn't bad at all. The only trouble would be getting enough keys for it. I think we sholud ask unicomp about bulk pricing on the "XTant" set.
I sent Zach at Unicomp an email yesterday evening requesting a full set for this. I inquired if the 789UIOJKLM keys for the SSK were available. I will let you know when i hear back.
WCass, have you considered just building your own capacitance sensor? There are some guides online, but I'm not convinced it'll be easy. (we might need a timer/oscillator for each row and column! Either that or have a bridge circuit on every row-column.)

Where are the analog electrical guys when you need them?
I don't have the electronic skills to design/build/program a controller. If anyone wants to take on this task, i would be very happy to help.
Also, do you cane an LCR meter or a way to reliably measure the real world values? Knowing how much the capacitance raises is essential, but knowing how much nearby switches affect it may be even more so.
I have a dedicated C meter. i posted some numbers in an earlier post - if I remember correctly, a hammer down = 2pF. i gave the values for a single switch and specific switches in the matrix. i would be happy to take more measurements if anyone needs them.

User avatar
wcass

11 Aug 2012, 18:44

I thought i did pretty good buying a beat up XT for $12.50 last week, but one in fairly good condition sold this morning for $9.50 (+$12 for shipping) on eBay.

The qualities of a switch -the pressure, tactility, post actuation, and release - some of these might be quantifiable, but one's preference is purely subjective. If you have never tried before, it is difficult to articulate what a switch feels like, so i will try to use metaphor. To me, buckling springs feel more analog/organic compared to the Cherry's digital/inorganic feel. A model F is a full hand clap, a model M is a finger snap, and a Cherry blue is a clicky pen. This board is distinctly buckling spring. The feel of the F type hammers/springs is not exactly the same as the stock XT, but pretty close. The M type hammers/springs feel like a cross between the XT and an M. Perhaps some of the feel is due to the barrel.

Because of the difficulty with the capacitive controller, i will be switching this project to conductive switches with diodes.

User avatar
AKIMbO

11 Aug 2012, 20:27

wcass wrote:I thought i did pretty good buying a beat up XT for $12.50 last week, but one in fairly good condition sold this morning for $9.50 (+$12 for shipping) on eBay.

The qualities of a switch -the pressure, tactility, post actuation, and release - some of these might be quantifiable, but one's preference is purely subjective. If you have never tried before, it is difficult to articulate what a switch feels like, so i will try to use metaphor. To me, buckling springs feel more analog/organic compared to the Cherry's digital/inorganic feel. A model F is a full hand clap, a model M is a finger snap, and a Cherry blue is a clicky pen. This board is distinctly buckling spring. The feel of the F type hammers/springs is not exactly the same as the stock XT, but pretty close. The M type hammers/springs feel like a cross between the XT and an M. Perhaps some of the feel is due to the barrel.

Because of the difficulty with the capacitive controller, i will be switching this project to conductive switches with diodes.
So that means that future purchasers of the Xtant kit will have to purchase a normal model M and harvest barrels, springs, and hammers from it? Xtant will still use a custom PCB. I assume a custom membrane will also have to be made as well?

User avatar
wcass

11 Aug 2012, 23:18

AKIMbO wrote:So that means that future purchasers of the Xtant kit will have to purchase a normal model M and harvest barrels, springs, and hammers from it? Xtant will still use a custom PCB. I assume a custom membrane will also have to be made as well?
I'll talk to Unicomp about a bulk purchase of M hammer/springs. i would also like to publish here a blank order form - something pre-approved by Unicomp - so that there is no ambiguity as to what size/shape and markings you want on your keys. Or maybe i'll order the keys for you as well.

but the kit will definitely include a new PCB, membrane, separator sheets, top plate, nuts, bolts, two barrels, and a paper template (where to drill holes in the back plate).

Do we have anyone out there that has the resources to surface mount 1.6mm components on a 16.5" x 6" board? This would be for the pre-production prototype. As i said in an earlier post, the diodes i plan on using are this:
http://www.diodes.com/datasheets/ds31437.pdf
one sub-miniature component = 5 diodes, so about 20 of these per board.

User avatar
dorkvader

19 Aug 2012, 19:49

http://geekhack.org/index.php?topic=21459.0

So it looks like someone has already reverse-engineered the Model F controller. Now that we have a good description of how it works, it should be possible to make our own version of it.

Of course, I'm in favour of PM-ing DFJ and asking him if he could please re-up the pictures. He clearly has more expertise in such matters than I do (I still haven't had even one Electronics class: E theory will be boring as hell when I take it). I know enough to see what's going on, but I don't think I have enough experience yet to build a prototype based on his description.

So any EE's around that can help out given this new information?

Here's the full text of his post from GH.
Spoiler:
I've been messing on and off with the F controller for a while, but this spring I managed to crack a couple of the more irritating problems with the help of some folks here and on the irc.
First version was just a breadboard thang, but I'm currently using a somewhat nicer soldered deal for extended testing, in text and gaming (and yes, typing on it now, of course).

Here are some shots of the prototypes:

<SNIP>

This was done using a pair of analog switch arrays to regulate the sense lines in between probes.
With Soarer's encouragement I was able to get a cheaper and slightly safer to solder version working with 16 more diodes instead of the switches.
This is what I am currently using:
<SNIP>

The normal IBM controller scans the whole keyboard in about 16ms, while this version (and also the analog switch version) are able to reliably scan in about 5ms.
Whether this, or the fact that the board is fully nkro, will actually matter to anyone's ability to game on it - this would be an open question. :)
Personally, I like nkro. Right now I'm just using 'normal' USB so only get 6kro+metas however I have my own version of nkro over USB, similar to Soarer's and Hasu's that I've been using for the last year. This will get mixed in shortly as an option.
This implementation is using a teensy++ based microcontroller board since it needs at least 18 digital io and 8 analog inputs. A regular teensy might be used with the addition of a digital multiplexer, but I don't have any handy to try. This is an option for the future, since the smaller io microcontroller chips could be used bare on a simple board without needing to resort to much nasty SMT soldering.

So - here is a start to the mod-thread, I'm going to try to add more details on how it works (in particular how to scan an F matrix for others working on such code) including a schematic and some more explanatory photos of the thing stripped down.

here is a rough parts list:
1 teensy++ 2.0
18 1n48 fast diodes
8 1M ohm 1/8W resistors
1 0.1 uF catalytic cap (polarized is fine).
1 1 nF ceramic capacitor.
1 47 nF ceramic capacitor. (these ceramic caps are not as critical in the diode implementation).
a short length of IDE 40-line ribbon with 2 female connectors
a short length of 20-line ribbon with 2 female connectors
60+ pins.
22-30 gauge solid wire for the interconnects on the perf-board.
22-24 (ideally 22) gauge stranded wire to replace IBM's delicate ribbon with.
Perf-board - I used a 3x5" and some misc bits, but I'm somewhat confident it will fit on the 2x3" for the main part. How you attach your ribbons is up to you...

Rough Theory:
The F keyboards are capacitive, when the buckling spring switch is pressed, it splats down a big flat black hammer, rather than the membrane striking hammer of the M. This black plastic hammer is actually conductive resin, so it acts as a plate of a capactior, and when it is actuated and flush against the board a controller can detect a change in capacitance.
In actuality, when you look at the things on the PCB, you'll notice that there are two plates on top, where the hammer drops, and only one on the bottom. This odd arrangement seems to ameliorate the expected effect of having many other capacitors on the same sense line disrupt the ability to distinguish which ones were up or down during a strobe - in a rough analogy to the 'which three or four keys are down?' problem with contact switch based boards when they block or ghost.

(detailed pics here)

The 8 sense lines on the AT, XT (as we call it here) and 122 F keyboards run lengthwise along the board, as the rows of the matrix. Up to 16 columns (for the 122a) are strobed with 5V, one at a time (while the others are grounded) and the sense lines read to see which, if any, or all of the keys on that column were pressed. This is what IBM does, this is what I do.

[shot of whole matrix goes here]

The Sense:
Here's where it gets fun. We have strobed a column (driven it from gnd to 5V), and are curious if some switch on that column is down, so we inspect that sense line (row) via reading from one of the ADC lines on our microcontroller.
We keep a small voltage on the sense line, so that we aren't too close to ground that electronics will get weird, but as far away from 5V as we can get away with, so that the strobe feels relatively stronger as a difference from our current voltage. I use about 500mV, the voltage drop of my diodes, while IBM uses about 800mV, which comes from somewhere inside their sense chip - not certain of more than that. Now when the strobe hits, the sense line will rise by one amount when the key is up and another greater amount when the key is down. Certain keys end up different due to their location and other quasi-mystical effects, but a difference of from 23mV to 50 mV between the normal peak and the peak when pressed is what I tend to see. If I set a threshold at, say 20mV above normal and then whenever the peak is more than that I might have a keystroke, I ought to be able to detect presses. This much is true - but there are many artifacts. :)

Noise:
The device is sensitive to random noise - hence it is heavily shielded, above and below. This means that occasional devices nearby turning on, random static, and other EMR noise sources will intermittently cause an errant reading. IBM dealt with this by sensing twice, in their patent - however in their actual code (thanks John Elliott) one can see that upon detecting a change they compare an entire fresh set of 8 samples to a second fresh set of 8 samples before they accept a state-change. that is, they throw away a first set of 8 samples, only using it as a signal to check for changes but not trusting it at all otherwise, then make 16 more measurements. This catches the vast majority of spurious keystrokes caused by errant noise. I was having noise problems for a bit, so I still have my code doing 3 more tests (also of 8 keys, i.e. all the sense lines) even though that problem has since been sorted out. It is a small fraction of a ms in additional time, that is only incurred on each keystroke, rather than every scan, so I won't unroll it until I'm certain I can get by with only two verifications. I scan three times as fast as IBM, so I am a little more vulnerable to noise.

Evil Keys:
Some keys are more equal than other... or less equal, perhaps. I'm not dead sure why, but certain keys upon press generate a long-high pulse, sometimes over 100mV, for about 1ms on the sense line. Most keys do not do this. After Opening and repacking a board's hammers - not only will different keys will have the attribute, but also a different number of them. The problem is intermittent, a key doesn't always misbehave. My theories include dust, improper seating of the hammer, vibration induced static accumulation, and a prion disease.
The keypresses ride that wave, so at first I tried to surf it... oh the madness.

Stabilization of the sense line:
The 500mV that the sense lines live at when not being poked and probed - it comes from a diode and 10k resistor voltage divider. The diode gives us a constant voltage drop, and as I used the same type of diodes from the same reel, it is pretty consistant from diode to diode. If I just connected the sense line to that junction, however, it would wipe out the tiny signal from the keypress because 10k at 5V lets a fair bit of current through. A bigger resistor helps up to a point, but we need to keep the diode working, so there is a minimum amount of current needed. A big resistor between the sense line and the voltage divider does the trick, though - lets us see the keypresses, but still recover to the offset voltage of 500mV after a bit. Making the resistor smaller allows quicker recovery, but also acts more on our signal to bring it back towards 500mV - i.e. at 1M ohms, the signal looks pretty square, easy to read, but at 10k ohms, it is a steep sawtooth shape, not even reaching the original maximum. Unfortunately the big resistor also allows the evil keypresses above to rise higher and last longer.
Using 300k resistors, instead of 1M, and adding code to detect and wait out the evil press spikes, I was able to get a working keyboard at 20ms for a full scan, which was sweet, but not as good as the 16ms scans that IBM managed... fine for a replacement of a dead controller, though...











Coming soon: more pics, including some crappy USB scope captures, binaries and source, though haven't decided yet on a license for the source likely gpl 2 or 3, assuming they don't fight with the libs I use.

User avatar
AKIMbO

02 Sep 2012, 15:30

Wcass, can we get an update...this thread has been a little silent lately. Did you get to look at DFJ's post? Are you still set on switching over to buckling spring over membrane?

User avatar
wcass

04 Sep 2012, 18:15

I did read DFJ's post. DFJ, hasu, and haata politely declined my invitation due to prior commitments back in February. Conductive controllers are much better understood and will require fewer components.

What I am planning now is a thin double sided PCB with rows on the top and columns on the bottom (with diodes and vias to pads on the top). A top membrane will just have conductive dots - one under each key. When a hammer strikes, the conductive dot conects a row-column pad pair. This way the membrane does not need to be connected to the controller, and the controller can be almost anywhere on the PCB.

What I am testing now is sound reduction and lighting. I will post more info when I can.

User avatar
Icarium

04 Sep 2012, 22:47

Nonono! I want the damn XTant!

User avatar
fossala
Elite +1

16 Dec 2012, 15:53

I noticed the post by you on GH with the modded XT. Any more info on it?

User avatar
wcass

16 Dec 2012, 16:59

the capacitive switch tech was too difficult to figure out, so it is on hold until someone volunteers to work out those bugs.

i am working on an F/M hybrid system - F barrels, M hammers, custom top membrane and a PCB bottom. the PCB has diodes (one for each switch for NKRO) and a conductive controller (fully programmable of course).

if it works, it may open up a revival of the buckling spring switch. i can see this tech used to make a BS micro, symmetric, and ergonomic projects.
Last edited by wcass on 16 Dec 2012, 17:04, edited 1 time in total.

User avatar
fossala
Elite +1

16 Dec 2012, 17:02

Does it feel like an F or and M? This is very intresting, we need more buckling spring keyboards.

User avatar
wcass

16 Dec 2012, 17:12

fossala wrote:Does it feel like an F or and M? This is very interesting, we need more buckling spring keyboards.
it is still too early to tell. when i get it working, i will likely offer it to members of GH and DT for review. Akimbo and KillerBee live close to me and there is another cluster of the keyboard community in central Florida. i am not averse to shipping it either.

User avatar
fossala
Elite +1

16 Dec 2012, 17:24

Well if you ever want to ship one over seas for testing I can compare it agaist these.

SSK grey label
Portable XT Model F
AT Model F
Industrial m13
122 key PS2
122 key 5pin terminal
M2 ANSI
5291 Terminal
Chinese 1341793 alps
Model M blue label
Unicomp on the ball

And I guess more by the time the project goes further.

Findecanor

16 Dec 2012, 20:25

wcass wrote:i am working on an F/M hybrid system - F barrels, M hammers, custom top membrane and a PCB bottom. the PCB has diodes (one for each switch for NKRO) and a conductive controller (fully programmable of course).
That sounds really interesting. I have had similar ideas when looking into refurbishing a (crappy) Model M2. The membrane would only need to be one printed sheet, all columns, and then only rows (or vice versa) on the PCB with surface-mounted diodes on the bottom side.

User avatar
wcass

11 Sep 2014, 04:22

OK, a few updates ...
I now have a custom capacitive matrix PCB, barrel frame, foam pad, and a xwhatsit controller is in the mail. I had to remove the PCB retention rivets from the back plate; they would have been under new keys. These are replaced with two bolts - one to the left of A, and one to the right of right brace. The one on the right side might need to be moved again. There is only .20" between the barrels at this spot, but a #4 nut is .25" wide. For now, I'll just file 1/20" off of the nut. The controller mounts with rows on the right/columns on the left, or in other words, component side down.

If you assign rows from 1 to 8 and columns from A to L, the matrix works out to this:
Matrix Layout.jpg
Matrix Layout.jpg (66.8 KiB) Viewed 8631 times
Some matrix positions are used as calibration pads (4A, 1F) or have no pads at all (3C, 3E, 7F, 2G, 1H, 8H, 4I, 7K). Also, remember that some key caps cover other switches often using them as stabilizers.
  • ISO Enter key uses 4B, but covers 6B
    ANSI Enter key also uses 4B, but covers 5C
    ANSI right shift uses 3K, but covers 2J
    Standard (2x) Backspace uses 8B, but covers 7C
    Standard (2.75x) right shift uses 3B, but covers 2C
    Long space bar uses 1G, but covers 1E
You would be free to assign keys any way you like, but a default key assignments might look like this:
default matrix map.jpg
default matrix map.jpg (138.36 KiB) Viewed 8631 times

User avatar
macmakkara

11 Sep 2014, 14:45

nice now just need to wait till you get your controller for testrun :)

User avatar
wcass

27 Sep 2014, 03:54

OK, this is officially now a done thing. It works.

I will be refining some steps and am waiting for a few more parts, but i plan to offer "kits" in the Marketplace before too long.

I have mine working with xwhatsit's IBM Capsense USB controller - you can see the controller in a post from me about 20 hours ago in his topic. The DPH capsense controller should also work, but has not yet been confirmed. Both controllers are intended as replacement controllers for IBM boards, so the wire and mount holes on both are where IBM put them. My matrix board is designed to fit directly over the holes on the controller. Just feed wire through both boards and solder on both sides.

One of the final things for me to decide is how to hold the space bar stabilizer against the barrel frame. I'm thinking of using a stamping tool to bend a small tab cut into the barrel frame. This would be much more durable than the solution I used for an IBM AT keyboard space bar conversion; glued on tabs. However, I don't have access to tool design/simulation software. So maybe i'll have them welded or brazed on.
controller0.JPG
controller0.JPG (186.68 KiB) Viewed 8579 times
XTant1.JPG
XTant1.JPG (229.57 KiB) Viewed 8579 times

User avatar
Nuum

27 Sep 2014, 08:32

Awesome! Can't wait to see this in a GB. Although I don't like the 1.25 arrow keys and nav cluster.

andrewjoy

27 Sep 2014, 11:28

that is frigin sweet

User avatar
Muirium
µ

27 Sep 2014, 15:56

Something tells me several XTs are about to get a real upgrade!

How many of those caps are custom ones from Unicomp? I actually quite like roomy 1.25u arrow keys, but I agree the navigation sixpack looks odd with them. Well, on first glance. Is there anything in the way of going 1u for the whole custom block for the production run? I guess the reason you went for wide is because of the top shell's lack of a vertical divider?

Mind, I've no idea how you made the barrel frame for this thing. Clearly magic involved in the process…

User avatar
wcass

27 Sep 2014, 18:02

Unicomp printed the full set for me as a Custom Printed Set. I set it up in advance by opening a support ticket.

The barrel frame is laser cut steel plate (just like those for Cherry switches). I had it put through a metal forming machine called a roller to put the curve in it. The barrels are from the donor XT.

The Backspace on original XT was only 1.75 wide, so with a 2 wide backspace the area for the arrows and nav block is just 3.75 wide. I could have re-used the old backspace, and requested Unicomp do a 1.25 pipe/backslash, 2x Enter, 1.5 right shift (plus 1x Fn key), and 1.25 right Ctrl. That would have left room for a full 4x5 numpad, but it would have required a lot of extra barrels.

I tried to keep the number of barrels needed to less than the number on the original XT; as it is, i went over by two or three. All caps on the original only use one barrel; the new backspace, enter, and both shifts use two, plus I have more keys on the bottom row.

User avatar
Muirium
µ

27 Sep 2014, 18:13

Yeah, a cramped numpad is nowhere near as desirable as a TKL's nav block. And you're spot on to stay within the donor XT's component budget. But that HHKB style Shift option? Grab it!

The original XT's Print Screen key was my introduction to the HHKB layout. Coincidental genius. I'd love to keep that feature, even with a full navigation block nearby.

User avatar
macmakkara

27 Sep 2014, 19:13

OK when we van order 60% xtant!

quantalume

27 Sep 2014, 20:09

One option that might work well with this setup would be a drop-in pointing device that takes the place of the nav cluster. That would bring the number of barrels needed down to less than what the XT started with, plus it would make 60% fans happy without a PCB and case redesign.

User avatar
Halvar

27 Sep 2014, 20:16

A modern Model F layout! The whole "build your own keyboard" hype is finally beginning to make sense! :D

andrewjoy

27 Sep 2014, 20:34

quantalume wrote: One option that might work well with this setup would be a drop-in pointing device that takes the place of the nav cluster. That would bring the number of barrels needed down to less than what the XT started with, plus it would make 60% fans happy without a PCB and case redesign.
that's an amazing idea

shame it would not fit a magic track pad

mind you you could possibly fit an ltrack X in there that would be amazing !

Post Reply

Return to “Workshop”