Page 1 of 1

Enabling an IBM 122-key terminal keyboard non-invasively?

Posted: 06 Apr 2014, 00:31
by Hypersphere
I have an IBM 122-key terminal keyboard that I have used to harvest some keycaps. However, the keyboard appears to be in good shape, and I would like to try using it as a computer keyboard. I am aware of somewhat invasive procedures using Soarer's Converter and a Teensy. However, at present, I am looking for as non-invasive and simple a procedure as possible. Part of my rationale is that I would like to have a method that uses external adapters and converters so that such keyboards could be tested without making any internal changes. Then, perhaps later, I might be interested in a deeper revival and reprogramming of the board(s).

The first 122-key terminal keyboard that I have is an IBM F1 Model M, Part Number 1390702, with a big right-angled 240-degree DIN 5 connector.

Is it possible to get this working with a modern computer by using some combination of commercially available adapters and converters? If so, I would appreciate advice on the specific products to acquire. If not, I would be glad to get advice on how to proceed with procedures involving some rewiring and perhaps soldering. Thanks!

Posted: 06 Apr 2014, 02:08
by scottc
You're in luck - you can make a Soarer converter that goes straight from the IBM terminal output DIN 5, so no destructive changes to the innards of the M. You just need a "female" DIN 5, which are apparently pretty cheap on eBay: €6 shipped on my local site, probably even cheaper in the USA.

You can also just do a straight controller swap, taking one from another Model M, but that will leave you with some dead keys. I did that with a 103-key terminal M and it worked fine, apart from the extra numpad key which does nothing.

Posted: 06 Apr 2014, 02:32
by Muirium
Funny, my Soarer's Converter sounds a lot like what you're looking for. It lives in this little multi-mode box I made:

Image

The (vintage 1960s) knob selects between a 5 pin DIN (AT/XT), 5 pin Mini-DIN (PS/2), and a terminal (RJ45) socket. I have boards which need each one of them, including my own 122 key terminal M. Just select, plug, and go.

Googling up the 1390702 finds this recently sold specimen from the evocatively named town of Hurricane, Utah:

http://www.ebay.com/itm/IBM-Model-M-139 ... 1119273122
$_57.JPG
$_57.JPG (254.72 KiB) Viewed 311649 times
So far so good. If it's yours (or just like it) then this is the troublesome part:
$_57-4.JPG
$_57-4.JPG (183.28 KiB) Viewed 311649 times
5 pin DIN? Well, yes and no. This is the kind on every XT and AT keyboard I've ever seen, and the port I built into my converter:

Image

But the 1390702's plug is this variant:

Image

Not the same. The pins are further apart than on XT/AT, covering more than 180º. The Wikipedia agrees that it's a DIN plug, but that's because there are many kinds.

So, what's it matter? Well, it's not intended to plug into an XT or AT socket. It could speak a different protocol. But there is at least a chance that this keyboard is XT or AT, in which case Soarer's converter would still talk to it if appropriately wired. Hooking it up would be a bit of a risk though: to a $16 Teensy more than the keyboard. This might just be the 122 key terminal that got away.

Scott's right about sockets being cheap (I've gotten them locally for £1.69) and the soldering required to make your own converter is just four wires. The controller swap might be the better idea in this case. Got a picture? I was wrong only yesterday by suggesting such a thing for a Model F before learning that not all of them are swappable.

Here's my 122 key, by the way. In yellow sunlight (it's actually nice and neutral coloured like my other Ms) and in its original ISO layout:

Image

It's one of the later versions. Note the shorter upper deck that only extends as far as the backspace key.

Actually, scratch that. I see the one I presume to be yours has a 1991 date on its label. Mine's from 1990. Oh IBM, did you ever not mess around?

Posted: 06 Apr 2014, 15:52
by Hypersphere
scottc wrote:You're in luck - you can make a Soarer converter that goes straight from the IBM terminal output DIN 5, so no destructive changes to the innards of the M. You just need a "female" DIN 5, which are apparently pretty cheap on eBay: €6 shipped on my local site, probably even cheaper in the USA.

You can also just do a straight controller swap, taking one from another Model M, but that will leave you with some dead keys. I did that with a 103-key terminal M and it worked fine, apart from the extra numpad key which does nothing.
Thanks, Scottc! Could you please refer me to a detailed guide showing exactly how to make the Soarer converter? Then I just need to find a 240-degree DIN 5 receptacle and revive the soldering skills that I acquired many years ago.

Posted: 06 Apr 2014, 15:58
by scottc
No problem. Soarer has top-notch docs included with his converter here:
http://deskthority.net/workshop-f7/xt-a ... 20to%20ps2

Muirium is right about the connector, though. The 240-degree one might be more difficult to find. Best of luck!

Posted: 06 Apr 2014, 17:03
by Hypersphere
Muirium, thanks for the detailed reply! Yes, your detective work is good. The board I just acquired is the one from Hurricane, Utah. Virgin Valley Recycling to be exact!

I like your retro switch box. Could you send me a circuit diagram? Hand-drawn and scanned would be fine.

Yes, my DIN 5 is the 240-degree variety rather than the 180-degree as found in XT/AT connectors, which reportedly has the pin assignments shown below ("shield" is misspelled; the diagram is from a Japanese site):
IBMtermDin5.jpg
IBMtermDin5.jpg (9.88 KiB) Viewed 311590 times
As compared to the pin assignments on a standard AT DIN 5 connector (with thanks to http://imgur.com/a/sHkz4):
ATconnect.png
ATconnect.png (34.09 KiB) Viewed 311590 times
Therefore, it appears that an adapter could be built easily, being mindful of the correct pin assignments. Does this mean that by using only an adapter and connecting to a computer with an AT to PS/2 converter that the keyboard would function? Does the addition of a Soarer Converter provide (1) the ability to convert the signal from AT or PS/2 to USB and (2) the ability to reprogram the keyboard?

A switch box like yours, perhaps with an additional 240-degree DIN 5 connector, would give me the ability to test keyboards, and I might want to install converters in them for possible resale. However, for my own use, I think I would want to stick with the IBM SSK, which has the best layout for the needs of my "day job". Someday, it would be fun to undertake a major conversion in order to have capacitive BS switches (as in a Model F) and an ANSI/HHKB layout.

Posted: 06 Apr 2014, 17:17
by scottc
rjrich wrote:Therefore, it appears that an adapter could be built easily, being mindful of the correct pin assignments. Does this mean that by using only an adapter and connecting to a computer with an AT to PS/2 converter that the keyboard would function? Does the addition of a Soarer Converter provide (1) the ability to convert the signal from AT or PS/2 to USB and (2) the ability to reprogram the keyboard?
I assume the keyboard speaks the IBM terminal protocol, so you'll definitely need Soarer's converter for that. Soarer's will do both of what you asked - it outputs directly to USB.

Posted: 06 Apr 2014, 17:26
by Muirium
Good to see you found the pinout. So long as you get VCC (also called +5V) and GND around the right way, you should be safe not to burn anything out. The other connections aren't as troublesome.

Now, about protocols: many different things share the general pattern of 4 connections and 5 volts. Soarer's converter uses this fact to speak so many "languages". IBM keyboards came in XT, AT and terminal varieties using incompatible protocols. Plug an XT only keyboard (like my IBM PC/XT Model F) into a DIN>PS/2 adapter and it doesn't work. The voltages are right but the protocols are wrong. (Those 5 pin DIN to Mini DIN adapters only work for AT, which is electrically identical to PS/2; as IBM simply shrunk the connector.) Soarer's Converter, however, speaks them all. You just have to hook the 4 lines up right for each of them, and the Teensy does all the rest. Including USB: as that is even how you put the firmware onto it in the first place.

So to answer your question: the reason to build an external Soarer box like I did is both for compatability as well as all the programmable super powers it packs. As long as your 122 key talks XT, AT or IBM's terminal protocol, Soarer's Converter will understand it and work fine.

In fact you can even ask it which one is active and it will tell you. I use this feature to automatically select between different remaps for different keyboards. I'm a huge fan of Soarer's work for good reason, you know!

Posted: 06 Apr 2014, 17:31
by Hypersphere
Which Teensy should be used for such a project? All versions appear to be roughly the same price and physical size, although Teensy++2.0 is longer than the others. Are the newer versions backward compatible?

Posted: 06 Apr 2014, 17:35
by Muirium
Good question. Standard Teensy 2 is the one you want. Teensy 2++ has extra pins which aren't necessary for this job. While Teensy 3 is a different architecture entirely.

Posted: 06 Apr 2014, 17:49
by Hypersphere
Thanks! Teensy 2 it is!

Posted: 06 Apr 2014, 18:41
by quantalume
rjrich wrote:Yes, my DIN 5 is the 240-degree variety rather than the 180-degree as found in XT/AT connectors, which reportedly has the pin assignments shown below ("shield" is misspelled; the diagram is from a Japanese site):
IBMtermDin5.jpg
IBMtermDin5.jpg (9.88 KiB) Viewed 311549 times
When I saw that diagram, I thought there must be a mistake. What electrical engineer in his right mind would use black for positive voltage? So I took my similar IBM terminal keyboard apart and traced the connections to the ICs on the controller board. Sure enough, black is positive. :roll: You should be safe hooking it up that way.

Posted: 06 Apr 2014, 19:21
by Hypersphere
quantalume wrote:
rjrich wrote:Yes, my DIN 5 is the 240-degree variety rather than the 180-degree as found in XT/AT connectors, which reportedly has the pin assignments shown below ("shield" is misspelled; the diagram is from a Japanese site):
IBMtermDin5.jpg
When I saw that diagram, I thought there must be a mistake. What electrical engineer in his right mind would use black for positive voltage? So I took my similar IBM terminal keyboard apart and traced the connections to the ICs on the controller board. Sure enough, black is positive. :roll: You should be safe hooking it up that way.
Thanks for corroborating this! It would be bad to reverse, e.g., ground and +5V.

Posted: 13 May 2014, 14:19
by Muirium
Did you get anywhere with this, RJ? Vsev's 122 key Ms are the same connector:

http://deskthority.net/photos-videos-f8 ... ml#p162575

I've got XT, AT, PS/2 and RJ45 boards running on my converter, but none of this "wide angle DIN" variety. (A name I just made up.)

Posted: 13 May 2014, 16:09
by Compgeke
quantalume wrote:When I saw that diagram, I thought there must be a mistake. What electrical engineer in his right mind would use black for positive voltage? So I took my similar IBM terminal keyboard apart and traced the connections to the ICs on the controller board. Sure enough, black is positive. :roll: You should be safe hooking it up that way.
I ran into that the other night on a late 80s stereo receiver. For some reason the LCD uses a couple small lights for the backlight and one's burnt out, but they apparently used black for +7.5V and red for ground. Found that out when trying to find the voltage and the black hit the case and threw the power supply into protection mode. I love when people follow standards.

Posted: 13 May 2014, 19:32
by quantalume
Muirium wrote:Did you get anywhere with this, RJ? Vsev's 122 key Ms are the same connector:

http://deskthority.net/photos-videos-f8 ... ml#p162575

I've got XT, AT, PS/2 and RJ45 boards running on my converter, but none of this "wide angle DIN" variety. (A name I just made up.)
I've taken about half a dozen M-122 and F-122 terminal keyboards apart in the last month, and they all used the same color code, regardless of the connector at either end of the cable. Black = +5, white = ground, yellow = clock, red = data.

Posted: 13 May 2014, 21:30
by Muirium
It's an evil standard, but at least they are being consistent. I'll pass it on! Thanks.

Posted: 15 May 2014, 07:55
by 1391401
I just built an external converter using a female 5 pin DIN 240 degree connector a couple of days ago for my terminal Model F. A cinch to build and works a treat. I purchased the connector here. Wire it to the solder pads on the Teensy via Soarer's diagram, load Soarer's firmware, and you're in business.

Posted: 16 May 2014, 01:45
by Hypersphere
1391401 wrote:I just built an external converter using a female 5 pin DIN 240 degree connector a couple of days ago for my terminal Model F. A cinch to build and works a treat. I purchased the connector here. Wire it to the solder pads on the Teensy via Soarer's diagram, load Soarer's firmware, and you're in business.
Thanks! I've been looking for just such a connector!

Posted: 16 May 2014, 03:07
by 1391401
No problem. If you need any help with the build, let me know.

Posted: 12 Oct 2015, 19:08
by vladof81
Just want to follow up on this thread, did you finally get it to work?

Posted: 13 Oct 2015, 02:27
by fohat
The easy way is to get one of these.

http://www.ebay.com/itm/NEW-Soarers-Con ... 3f3f4cbdd4

I have a couple of 240 degree sockets that I could sell, either cable-end or face-mount.

Send me a PM, especially if you are in the US.

Posted: 13 Oct 2015, 08:04
by 1391401
fohat wrote: The easy way is to get one of these.

http://www.ebay.com/itm/NEW-Soarers-Con ... 3f3f4cbdd4
If there's any downside to that adapter it's that it doesn't have a reset switch, though it's probably irrelevant considering there likely won't be any future firmware updates.

Posted: 13 Oct 2015, 10:10
by Chyros
Those converters work great. It's very high-quality and really compact.

Posted: 13 Oct 2015, 17:46
by vladof81
Amazing, this lightens me up!

Also want to ask are there steps/tutorial if I DIY? A cheaper solution?

Posted: 13 Oct 2015, 17:50
by andrewjoy
A cheap solution would be a pro micro.

http://deskthority.net/workshop-f7/how- ... t8448.html

I need another as i snapped the connector off mine :( and i am using it with a none standard keyboard so no pre made :P

I would get the Soarers converter off ebay. You get what you pay for and they are awsome!

Posted: 13 Oct 2015, 18:22
by vladof81
This is awesome, thanks very much.

Re: Enabling an IBM 122-key terminal keyboard non-invasively?

Posted: 23 Oct 2020, 21:49
by DaveP
This post is a long time after this thread but maybe someone is reading.
I have and IBM 122 type f with a 240 degree din-5 on the end of a fixed cable.
I want to use this on an XT (5160) which has a standard din-5.
I am not looking for ps\2 or usb as I am more than happy with my current usb keyboard.
This is simply to be able to run a 122 on my xt.
Is this as simple as a plug swap making the correct connections?

Re: Enabling an IBM 122-key terminal keyboard non-invasively?

Posted: 27 Oct 2020, 00:06
by hellothere
You're going to have to still have some kind of converter, as your keyboard speaks AT and the computer understands XT. That's why there are bunches of vintage keyboards that have XT/AT switches on them.

I don't know, off the top of my head, if the Soarer's Converter does that.

Re: Enabling an IBM 122-key terminal keyboard non-invasively?

Posted: 27 Oct 2020, 22:09
by Rauha
I don't think that there are any converters that would do that out of the box, but you could do it with two converters. First make Soarers's converter for the F122. That would give you USB out of F122. Then use USB to XT converter for connecting to the 5160. Not really elegant solution, but it should work.

First hit with googling for USB to XT converter: https://www.ebay.com/itm/USB-and-PC-AT- ... 3516239687

And there are couple of project pages for making one yourself, like https://github.com/jedimatt42/teensyUSBtoXT and http://www.ti99-geek.nl/Projects/kbgeneve/kbgeneve.html