Site menu Vintage Pravetz 16 keyboard

Vintage Pravetz 16 keyboard

I started playing with computers in 1987, but they were "toyish" Sinclair clones. I met the first "serious" computer in the second semester of 1988: a PC/XT clone. Due to the Brazilian market reserve for computer and electronic products, XTs were the most popular PCs around here up to 1992.

The XT keyboard layout conquered a special place in my heart. I never liked the PS/2 or "Model M" 101-key layout that overthrowed it. I've always found it too big, with redundand keys as if it were a church pipe organ. Given how things rolled out after market reserve lift, the XT-386 transition happened at the same time of Windows 3 widespread adoption, and therefore the mouse adoption, which competed for desktop space with that new, enlarged keyboard. Looked nonsense to me.

Figure 1: XT layout of the Pravetz 16 keyboard

Even so, I have failed to stash an XT keyboard. I guess we were all excited by novel things like multimedia, nobody cared about keyboards. And hardware was not so cheap back then; I sold my first XT (to an ex-boss!) in order to raise money for the new 386, and the keyboard went along.

Recently, egged on by a keyboard enthusiast's subculture — ressurrecting vintage keyboards with Arduino-based adapters — I started to look for an XT keyboard. I didn't find many, and the few samples were pretty expensive. But "he who seeks, finds" and found something interesting in the distant Bulgaria: keyboards manufactured still under the Communist regime.

Yes, the Eastern Bloc made IBM PC clones before the fall of Berlin Wall, as well as clones of many Western 8-bit platforms. The PC/XT clone was named Pravetz 16. Pravetz was the name of the manufacturer, headquartered in the Pravetz city. (The name was not particularly creative, but it is unique enough for Westerns.) The layout would not be a problem: it is almost 100% true to ANSI standard, and implements the Cyrillic alphabet as separate layer, no conflicts with the "western" layer at all.

Figure 2: Pravetz 16 keyboard, back label

Figure 3: The Pravetz 16 computer keyboard

Bulgaria was sort of the "Sillicon Valley" of Eastern Bloc. Around 40% of the IT gross product of the bloc was generated within Bulgaria, and there was even some business with Western countries like W. Germany. Even though the hardware manufacturers were bankrupt in a matter of months after the Berlin Wall fell, Bulgaria is still today a "reservoir" of IT talent in Europe.

Brazil has a pretty similar story. In theory we lived under a right-wing dictatorship, but the market reserve had similar effects: lots of locally-developed clones of major platforms, and a somewhat delayed adoption of technology, like the artificially long life of XT platform I mentioned before. And a rather strong IT industry remained, mostly at the software side.

Well, enough of nostalgia. Let's talk about the keyboard proper. As seen in figures, the layout is familiar, just ignore the blue-painted Cyrillic characters. There are two extra keys: "C/L" and "C/L Lock" which probably work as Shift and Caps for the Cyrillic alphabet. These keys have apocryphal scan codes, I haven't found them in any documentation whatsoever. But they end up being useful to implement the newer "Windows" or "Command" keys that didn't exist before 1995.

It is not a mechanical keyboard; it uses elastomers (rubber cups) as springs. At least they are individual, and can be replaced by real springs. The Soviet-era military keyboards, like Teslas (improved clones of Honeywell hardware) are way better.

Figure 4: Upper-half key components

The keyboard is easy to disassemble, clean, fix and reassemble. All components of a key are individual, and contacts are made directly onto a real PCB, attached by screws. Not even the venerable IBM Model M is so robust, since it uses a membrane attached by melted-plastic rivets.

The PCB layout is fairly simple and one-faced, there are many discrete components, it is very easy to understand and fix. The keyboard is NKRO thanks to diodes, a nice touch not found in other keyboards from that era. The controller is a mysterious CM650 chip, but there is a 74LS145, amusingly made by Motorola.

I bought a package of two keyboards, one new and another used, that arrived in good condition. Naturally, the used unit needed cleaning, smelling 30 years of commie dust was an acid test for an ex-asthmatic like me. Electronics-wise, both worked immediately, the only problem was a couple of keys that didn't register, which was fixed by disassembling the PCB and cleaning the contacts. Such a procedure would be much more difficult in a membrane keyboard.

The only real problematic part, even in the NOS unit, was the DIN connector. The pins were black and dull. Interestingly enough, even the braided copper shield was green and crumbly, just like the "black wire disease" that happens when a cell leaks. I guess the combination of connector metal and copper caused some sort of eletrolytic corrosion. At least the core wires were perfect.

I bought those keyboards fully aware they were XT, therefore a bit more challenging to transcode to USB HID. To my surprise, they had an XT/AT jumper in PCB. In AT mode, they become compatible with every off-the-shelf PS/2-USB converter. (PS/2 and AT keyboards are the same, except by the plug size.)

Figure 5: PCB with microcrontroller and XT/AT jumper

The AT mode is easier to interface, since there are many ready-made libraries, while XT mode is poorly supported, and there are more implementation differences among XT keyboards (variable number of start bits, etc.). I made the first tests with a Mega328 microcontroller.

Figure 6: First keyboard test with Arduino Mega328

The Mega328 does not have USB support, so you can't easily emulate or develop a USB device using it. A chip like Mega32U4 (Teensy, Pro Micro) is needed to make a USB converter for a non-USB keyboard.

Another consideration is how the Arduino interfaces with the keyboard. If the internal controller is damaged, or if its protocol cannot be understood, one option is to use Arduino to run the key matrix directly. In this case, a good number of I/O lines is necessary (e.g. 20 lines for 100 keys), and this further limits the choice of Arduinos.

The Pravetz 16 controllers were alive and well, and just two I/O lines are needed to interface with functional AT or XT keyboards. The other decision is how to implement the converter. Doing it from scratch could be a lot of fun, but the TMK project offers ready-made AT and XT converters.

Figure 7: PS/2-USB adapter, powered by a Teensy Arduino

TMK's converter's default keymap is aimed to 103-key keyboards. A keyboard with XT or early AT layout needs some adaptation to be useful in modern computers. Also, I am a Mac user and Macs don't honor Num Lock, which would leave the XT keyboard without arrow keys. It is better to implement Num Lock in the converter itself. This is the keyboard map I am using at the moment.

Finally, since the Arduino becomes an inseparable component of the keyboard, I have put it in a small box.

Figure 8: PS/2-USB converter in its jewel box