DEC LK201 to USB

User avatar
Fuzzyman

15 Sep 2021, 19:51

I got my hands on a DEC LK201 (keyboard from a VT220 terminal). I went searching for a converter and found this:

http://pckbd.com/convert/pckbd/dec_lk20 ... ro_en.html

Unfortunately, there is no option to buy it and I haven’t gotten any replies to emails.

My first question is, is there any way to get in touch with the folks or other sources for these?

My second question is, if not, can I remap a Soarers RJ-45 terminal converter? Understanding that they keyboard cable is actually RJ-10, but I think it might physically fit even though there are fewer pins (i.e, will the Soarers still interpret signals coming from only 4 wires?) ?

Or do I just have a big, beige doorstop?

pandrew

15 Sep 2021, 23:09

Let me start with a disclaimer: I don't own an LK201, so I may be wrong about some things.
I do own an MC7004 russian model F clone keyboard, and some sources state that it has the same protocol as the LK201.

See this doc for a description of the LK201 protocol: http://www.netbsd.org/docs/Hardware/Mac ... troduction
Electrically speaking you can't use a soarer's to talk to it, however you could use an RS232-to-USB converter like this:

https://assets.aten.com/product/image/u ... ers.45.jpg

It needs an rs232 converter that is using real rs232 signal levels, not a TTL-level converter. (so you can't use those rs232 adapter cables that people use to talk to microcontrollers. You need an rs232 converter that has a DB9 port on it, usually only those include the signal level shifters). Or you could use the native RS232 on your system in case you have such a thing.

Other than an RS232 converter you will also need a 11.8V +-6% power supply.

This won't just work out-of-the box, cause the operating system can't auto-detect that there is a keyboard attached to your serial port. On linux there is already software to talk to the LK201 keyboard. See "inputattach -lk".

I have tried "inputattach -lk" with the MC7004 keyboard, with a converter like above, and a 12V power supply:
trying_with_rs232.jpg
trying_with_rs232.jpg (44.59 KiB) Viewed 2370 times
The result is not great, but it's also not a complete failure either: After I press a key, I do see the correct key being typed in linux, but the key is never released, so the os's repeat function comes in, and I just get a long string of the pressed key. This could have multiple reasons:
1) Maybe the MC7004 is only kindof compatible with LK201, and maybe it's missing some features. I think this is the most likely.
2) Maybe my MC7004 keyboard is damaged.
3) Maybe the inputattach code is buggy and needs some modification.

I think 1) is the most likely, so it will probably work fine with a real LK201.

I also started a little project to make a converter for LK201 and MC7004 keyboards, that would show up as a USB keyboard to the host, and that you wouldn't need to run software such as inputattach. It's basicly a pro micro + max232 level shifter IC + a boost converter:
converter.png
converter.png (182.31 KiB) Viewed 2370 times
It got as far as ordering some PCBs from JLCPCB, but my first prototype didn't work as I expected, mainly because of the current consumption of the keyboard. I ordered the pcbs before even receiving the MC7004 keyboard. Looks like the LK201 is specified to consume 350 mA, and the mc7004 was specified to 500mA, and my thinking was: no way can a keyboard consume so much current @ 12 Volts, it must be less than 100mA, so I can use a boost converter to drive it off of a single USB port, and I just ignored the spec, I didn't believe it. Lesson learned, when you don't follow the spec, you support the consequences. The MC7004 keyboard I actually measured to consume 340mA. So there's no chance for the first version of my project to work.

So I temporarily left it there, at some point I will pick it up again, and make a version of it that requires an external 12V power supply. Or maybe I'll just mod a few of the boards to remove the useless boost converter, and add a DC jack. I just find it annoying that there's no way to convert it without an external power supply.

User avatar
Mandarbmax

16 Sep 2021, 01:01

Pandrew, would a custom PCB for the LK201 work instead? It should be able to get away with a rearranged M->F PCB and related controlling, right?

MMcM

16 Sep 2021, 01:33

pandrew wrote:
15 Sep 2021, 23:09

1) Maybe the MC7004 is only kindof compatible with LK201, and maybe it's missing some features. I think this is the most likely.
Yes, that's it. A real LK201 has commands to enable key-up for different groups of keys, not just the shifts. The МС 7004 does not support those. More here.

pandrew

16 Sep 2021, 11:04

Mandarbmax wrote:
16 Sep 2021, 01:01
Pandrew, would a custom PCB for the LK201 work instead? It should be able to get away with a rearranged M->F PCB and related controlling, right?
I'm not sure what you mean by that. If my M->F you mean converting to Model F capacitive sensing, I don't think that can be done, since the LK201 is not actually a Model M. Doesn't have barrels, etc... Like any membrane keyboard, it's probably possible to replace the controller pcb with a custom designed one though.

The MC7004 should be convertable with an xwhatsit, by replacing the controller board. No need to replace the sense pcb on the MC7004 though, since it's already capacitive.
MMcM wrote:
16 Sep 2021, 01:33
pandrew wrote:
15 Sep 2021, 23:09

1) Maybe the MC7004 is only kindof compatible with LK201, and maybe it's missing some features. I think this is the most likely.
Yes, that's it. A real LK201 has commands to enable key-up for different groups of keys, not just the shifts. The МС 7004 does not support those. More here.
I thought that would be the case, thanks for confirming!
Cool converter project!

User avatar
Mandarbmax

17 Sep 2021, 03:14

Ya, I did mean MC7004, sorry. Ya, installing an xwhatsit seems like the way to go for then. I should do that on mine at some point.

User avatar
urbancamo

12 Oct 2021, 17:40

Oh, I just checked back into Deskthority after a millenium off here and noticed this post after having tried to find info about wiring up an LK250 which is kinda XT compatible.

Last time I tried the Linux LK201 kernel support it didn't work correctly with a proper LK201. It did used to work and allowed a passive adapter to be used.

I'd be keen on the native USB solution you've found but you are right the 12v power draw is a big ask. It was also one of the downsides of the passive adapter, having to plug something else in. Been there done that.

So I'd be interested in a PCB or two, if that is an option? Adding a power plug wouldn't be the end of the world.

Cheers, Mark.

Post Reply

Return to “Keyboards”