Author Topic: Reverse engineering a Vector Graphic 4 Key Tronic kb  (Read 7907 times)

0 Members and 1 Guest are viewing this topic.

Offline dplass

  • Thread Starter
  • Posts: 8
Reverse engineering a Vector Graphic 4 Key Tronic kb
« on: Fri, 25 September 2020, 21:02:36 »
I fell in love with this keyboard from a Vector Graphic "Vector 4" and want to retrofit it, as intact as possible, to USB.



I can't find any schematics online but have mostly reverse engineered the board. What I haven't made progress on is the data protocol. I don't have a logic analyzer so I was trying to use an Arduino Uno as a cheap LA. The problem I ran into was power. The Uno is only passing through about 4.8V (not sure of the current) without the keyboard attached-- and *with* the keyboard, only about 3.4V, which I presume is insufficient to run the ICs.

So I guess I'm really asking two things:
1. how to provide more power without damaging the Uno
2. how to actually reverse engineer the protocol that the keyboard speaks?

Offline dplass

  • Thread Starter
  • Posts: 8
Re: Reverse engineering a Vector Graphic 4 Key Tronic kb
« Reply #1 on: Sat, 26 September 2020, 15:57:38 »
To answer part of my own question:
1. I used a USB wall wart to provide 5V to the keyboard, and kept powering the Arduino from the computer. I connected the grounds together.

Now, when I release the ground on pin 2 of the connector, the piezo beeps, which I believe means the board is reset. Progress, slow, but progress.

I still don't see any data on the data line (pin 6) when I mash the keys. Possibilities are:
1. All the foam has degraded/the foil can't make contact
2. The EX22-05- and/or 22-908 are dead. Evidently these commonly succumb to static electricity
3. TBD.

Offline dplass

  • Thread Starter
  • Posts: 8
Re: Reverse engineering a Vector Graphic 4 Key Tronic kb
« Reply #2 on: Sat, 26 September 2020, 16:39:22 »
"1. All the foam has degraded/the foil can't make contact "
^ was the problem. Every single foil was degraded (and the foam was worse) and not making contact.

I removed the key assembly from the circuit board itself, and tried typing on the bare pads. Success! There's definitely something being sent back on pin 6, when I type. And it's not random!

Next up, try to figure out how to detect start of message and end of message, and how many bits per message, and how fast to read them...other than that it's great.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Reverse engineering a Vector Graphic 4 Key Tronic kb
« Reply #3 on: Sun, 27 September 2020, 02:19:26 »
Glad to see you're getting somewhere, sadly support is all I can offer with this.  Didn't even know you could use an arduino as a logic analyser so thanks for mentioning that :thumb:
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Reverse engineering a Vector Graphic 4 Key Tronic kb
« Reply #4 on: Sun, 27 September 2020, 20:45:50 »
Hi,
 Did you see this?
    https://www.old-computers.com/museum/computer.asp?st=1&c=799
Quote
Terminal only had a parallel keyboard, and a B/W monitor. All video and keyboard interface was via S-100 card called Flashwriter, with all power signals passed via a DB-25 connector.

Or this?
    https://deramp.com/vector_graphic.html
Quote
The keyboard in the Vector 3 is a capacitive keyboard made by Keytronics These keyboards have a great feel, but unfortunately, the foam pad present in each key deteriorates over time and virtually all keyboards of this type and vintage do not work properly (if at all). A good source for replacement pads is a Sun "Type 4" keyboard. Even though the Sun keyboards are just ten or so years newer than the Vector keyboard, they use a different type of foam that doesn't break down so quickly. Search the internet for "Sun keyboard" followed by "320-1018". This is a French Canadian version of the keyboard and is the most readily available and least expensive version. In addition to replacing the foam pads, I gently sanded the key "capacitors" on the bare PCB with a very fine grit sandpaper (600) and then wiped the board clean. Based on past experience, this step reduces the likelihood that some of the key positions may still not work.  (photo courtesy of sol20.org)

With 4(?) wires to connect the keyboard I'd guess serial communications.
My first guess would be 1200 baud, but in those days the choices were anywhere between 110 and no more than 9600 baud.

The large chip above F7, F8, and F9 has got to be the microcontroller. (8048 was a common type back then, but I can't read the numbers). 40 pins.

The keyboard is almost certainly done as a matrix. Possibly extended with a shift register (below Z5 on the PCB.)

If you can give us the numbers printed on the chips that may help. Certainly it will tell you the required voltages needed. (Probably 5V)

To re-purpose it to modern (as opposed to restore for old) I would:
  • Pull the 40 pin chip out
  • Test for continuity between every 2 pins. If you find any ignore them in the next steps
  • Press a key. Inserting a coin between 2 keycaps can hold it down
  • Test for continuity between every 2 pins. When you find some write it down.
  • Repeat for all keys

A pattern will emerge. That's your matrix.

Program a ProMicro to match the matrix, wire it to a 40-pin header, and insert into the old microcontroller socket.
Power and communicate with the ProMicro.

Success. (Well, I could have missed a few steps.)
Today's quote: '...“but then the customer successfully broke that.”

Offline dplass

  • Thread Starter
  • Posts: 8
Re: Reverse engineering a Vector Graphic 4 Key Tronic kb
« Reply #5 on: Mon, 28 September 2020, 21:01:45 »
Hi,
 Did you see this?
    https://www.old-computers.com/museum/computer.asp?st=1&c=799
Quote
Terminal only had a parallel keyboard, and a B/W monitor. All video and keyboard interface was via S-100 card called Flashwriter, with all power signals passed via a DB-25 connector.

Or this?
    https://deramp.com/vector_graphic.html
Quote
The keyboard in the Vector 3 is a capacitive keyboard made by Keytronics These keyboards have a great feel, but unfortunately, the foam pad present in each key deteriorates over time and virtually all keyboards of this type and vintage do not work properly (if at all). A good source for replacement pads is a Sun "Type 4" keyboard. Even though the Sun keyboards are just ten or so years newer than the Vector keyboard, they use a different type of foam that doesn't break down so quickly. Search the internet for "Sun keyboard" followed by "320-1018". This is a French Canadian version of the keyboard and is the most readily available and least expensive version. In addition to replacing the foam pads, I gently sanded the key "capacitors" on the bare PCB with a very fine grit sandpaper (600) and then wiped the board clean. Based on past experience, this step reduces the likelihood that some of the key positions may still not work.  (photo courtesy of sol20.org)

With 4(?) wires to connect the keyboard I'd guess serial communications.
My first guess would be 1200 baud, but in those days the choices were anywhere between 110 and no more than 9600 baud.

The large chip above F7, F8, and F9 has got to be the microcontroller. (8048 was a common type back then, but I can't read the numbers). 40 pins.

The keyboard is almost certainly done as a matrix. Possibly extended with a shift register (below Z5 on the PCB.)

If you can give us the numbers printed on the chips that may help. Certainly it will tell you the required voltages needed. (Probably 5V)

To re-purpose it to modern (as opposed to restore for old) I would:
  • Pull the 40 pin chip out
  • Test for continuity between every 2 pins. If you find any ignore them in the next steps
  • Press a key. Inserting a coin between 2 keycaps can hold it down
  • Test for continuity between every 2 pins. When you find some write it down.
  • Repeat for all keys

A pattern will emerge. That's your matrix.

Program a ProMicro to match the matrix, wire it to a 40-pin header, and insert into the old microcontroller socket.
Power and communicate with the ProMicro.

Success. (Well, I could have missed a few steps.)


Hi,
 Did you see this?
    https://www.old-computers.com/museum/computer.asp?st=1&c=799
Quote
Terminal only had a parallel keyboard, and a B/W monitor. All video and keyboard interface was via S-100 card called Flashwriter, with all power signals passed via a DB-25 connector.

Or this?
    https://deramp.com/vector_graphic.html
Quote
The keyboard in the Vector 3 is a capacitive keyboard made by Keytronics These keyboards have a great feel, but unfortunately, the foam pad present in each key deteriorates over time and virtually all keyboards of this type and vintage do not work properly (if at all). A good source for replacement pads is a Sun "Type 4" keyboard. Even though the Sun keyboards are just ten or so years newer than the Vector keyboard, they use a different type of foam that doesn't break down so quickly. Search the internet for "Sun keyboard" followed by "320-1018". This is a French Canadian version of the keyboard and is the most readily available and least expensive version. In addition to replacing the foam pads, I gently sanded the key "capacitors" on the bare PCB with a very fine grit sandpaper (600) and then wiped the board clean. Based on past experience, this step reduces the likelihood that some of the key positions may still not work.  (photo courtesy of sol20.org)

With 4(?) wires to connect the keyboard I'd guess serial communications.
My first guess would be 1200 baud, but in those days the choices were anywhere between 110 and no more than 9600 baud.

The large chip above F7, F8, and F9 has got to be the microcontroller. (8048 was a common type back then, but I can't read the numbers). 40 pins.

The keyboard is almost certainly done as a matrix. Possibly extended with a shift register (below Z5 on the PCB.)

If you can give us the numbers printed on the chips that may help. Certainly it will tell you the required voltages needed. (Probably 5V)

To re-purpose it to modern (as opposed to restore for old) I would:
  • Pull the 40 pin chip out
  • Test for continuity between every 2 pins. If you find any ignore them in the next steps
  • Press a key. Inserting a coin between 2 keycaps can hold it down
  • Test for continuity between every 2 pins. When you find some write it down.
  • Repeat for all keys

A pattern will emerge. That's your matrix.

Program a ProMicro to match the matrix, wire it to a 40-pin header, and insert into the old microcontroller socket.
Power and communicate with the ProMicro.

Success. (Well, I could have missed a few steps.)

Thanks for your input! I've got a lot to go on now, and have made progress since my last post. It's likely 9600 baud, and is sending back LSB-first-ASCII on the one and only serial line. The F&F are all dead.

I'm documenting it a little more on my YT: https://www.youtube.com/playlist?list=PLYa0BHE_u5gvDV8tXLj0zJBWFPb6pN-zy

Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Reverse engineering a Vector Graphic 4 Key Tronic kb
« Reply #6 on: Mon, 05 October 2020, 21:41:45 »
Here's a link to XR 22-950-3Bs in stock. Still no datasheets.
https://www.digchip.com/datasheets/quote.php?action=search&pn=22-950-3B

Here's someone trying to restore a similar keyboard. He/She has more info on the XR22-950-3b scan driver, and XR 22-908-03 sense amp.
http://www.vcfed.org/forum/archive/index.php/t-22356.html

More pinout info here:
  https://groups.google.com/g/alt.sys.perq/c/QtjOXZbrEOk

And this is a huge text file:
      https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwiDy7z2y43sAhUErJ4KHdyRDuwQFjALegQIBBAB&url=ftp%3A%2F%2Fbitsavers.informatik.uni-stuttgart.de%2Fmailing_lists%2Fcctalk_mailing_list%2F1997-July.txt&usg=AOvVaw1zQ0wpH9JC9FYPoHokb-dY

 that says (search for 950):

-----> So, What are the Custom Chips ?
There are, in general 2 off 20 pin custom chips in a keytronics keyboard (some
later ones have a single 40 pin chip, but I know nothing about that).

22-908-3B
8-channel sense amplifier
More
1 : Row 0
2 : Row 1
3 : Row 2
4 : Row 3
5 : Reset/sync output
6 : Row 4
7 : Row 5
8 : Row 6
9 : Row 7
10 : Ground
11 : Out 7
12 : Out 6
13 : Out 5
14 : Out 4
15 : Out 3
16 : Out 2
17 : Out 1
18 : Out 0
19 : Reset in
20 : +5V

Outputs are believed to be open-collector

22-950-3B
keyboard column decoder/driver.
1 : Col 8
More
2 : Col 9
3 : Col 10
4 : Col 11
5 : Latch Clock
6 : Select 0 (LSB Input)
7 : Select 1
8 : Select 2
9 : Select 3
10 : Ground
11 : Sync Input
12 : Col 0
13 : Col 1
14 : Col 2
15 : Col 3
16 : Col 4
17 : Col 5
18 : Col 6
19 : Col 7
20 : +5V

Good luck.
Today's quote: '...“but then the customer successfully broke that.”

Offline dplass

  • Thread Starter
  • Posts: 8
Re: Reverse engineering a Vector Graphic 4 Key Tronic kb
« Reply #7 on: Mon, 05 October 2020, 21:51:26 »
Thanks. The replacement chips are > $20 on eBay and I'm too cheap to go that route. I've seen that other thread too and tracked down the pinout from a Lisa keyboard schematic (http://www.kbdbabel.org/schematic/kbdbabel_doc_lisa.pdf).

I've determined that the X22-950 has 5 dead output pins, and so many keys aren't working (including both shifts, control, space, enter and most of the numeric keypad).

My current plan is to use an Arduino to listen on the control/select pins (pins 6-9, ABCD) and send an appropriately timed and duration pulse on the output pin that would have been energized by the X22-950. I've done a rough prototype and it seems to work. See my video at
for more info.

Offline dplass

  • Thread Starter
  • Posts: 8
Re: Reverse engineering a Vector Graphic 4 Key Tronic kb
« Reply #8 on: Tue, 20 October 2020, 15:11:57 »
This plan has succeeded (see video, below) and I'm able to type all the previously dead keys on the bare board. I'm waiting on new F&F from Texelec so that's next.

One of the challenges I'm facing is how to deal with chords that are not supported by this keyboard, e.g., ctrl+shift+3. The board generates more or less pure ASCII and so there's no corresponding ASCII character for such a chord. I'm guessing I'll have to do something clever in the code to interpret certain sequences of keystrokes and return the interpreted keystroke/chord. (I'm already doing this somewhat, to map the Vector Graphic function keys and arrow keys to the proper keycodes.)


Offline dplass

  • Thread Starter
  • Posts: 8
Re: Reverse engineering a Vector Graphic 4 Key Tronic kb
« Reply #9 on: Thu, 06 October 2022, 07:54:55 »
This plan has succeeded (see video, below) and I'm able to type all the previously dead keys on the bare board. I'm waiting on new F&F from Texelec so that's next.

One of the challenges I'm facing is how to deal with chords that are not supported by this keyboard, e.g., ctrl+shift+3. The board generates more or less pure ASCII and so there's no corresponding ASCII character for such a chord. I'm guessing I'll have to do something clever in the code to interpret certain sequences of keystrokes and return the interpreted keystroke/chord. (I'm already doing this somewhat, to map the Vector Graphic function keys and arrow keys to the proper keycodes.)


How stable does it work after that?

It worked, but it was really awkward to enter chorded keystrokes. I used a prefix key (F13 https://github.com/dplassgit/arduino/blob/trunk/keyboardv1/keyboardv1.ino#L117) to indicate "use alt for the next keystroke".

Also, after adjusting the foils TWICE, I still didn't have 100% of the keys working. When I gave up I think the C key and one or two others were still not working. This keyboard really solidified my hate for F&F keyboards, that's for sure.

Offline ejona

  • Posts: 1
Re: Reverse engineering a Vector Graphic 4 Key Tronic kb
« Reply #10 on: Tue, 24 January 2023, 23:31:29 »
Surprised to see someone else messing with this keyboard; very few people have Vector 4 hardware. Seems we've followed parallel tracks and done similar things (like benefiting from Texelec) in the same time frame. Although I was also interested in replacing the keyboard with a modern one when using the Vector 4. Fiddling with the foam pads wouldn't have been quite so painful if there were fewer screws and if the disintegrated foam didn't produce such a dust...

Seems you've gotten to a good spot, including making yourself a schematic and all. Even though you've figured out most of this yourself already, you might still be interested in https://archive.org/details/7200-0001-vector-4-technical-information-sep-82

The keyboard communicates using normal 5V serial at 300 baud, 8 data bits, 2 stop bits, no parity (page 102/107; II 5-11/II 5-16). Page 123 (II 6-4) shows the codes sent to the computer for all key presses. Note that some of them are greater than 0x7F. Page 222 (VI A-19) has a schematic.

I wrote up some parts as I went at https://ejona.ersoft.org/archive/2021/09/25/vector-4-keyboard-adapter/ . Probably not too interesting given the point you're at.

Offline dplass

  • Thread Starter
  • Posts: 8
Re: Reverse engineering a Vector Graphic 4 Key Tronic kb
« Reply #11 on: Wed, 25 January 2023, 08:14:18 »
Surprised to see someone else messing with this keyboard; very few people have Vector 4 hardware. Seems we've followed parallel tracks and done similar things (like benefiting from Texelec) in the same time frame. Although I was also interested in replacing the keyboard with a modern one when using the Vector 4. Fiddling with the foam pads wouldn't have been quite so painful if there were fewer screws and if the disintegrated foam didn't produce such a dust...

Seems you've gotten to a good spot, including making yourself a schematic and all. Even though you've figured out most of this yourself already, you might still be interested in https://archive.org/details/7200-0001-vector-4-technical-information-sep-82

The keyboard communicates using normal 5V serial at 300 baud, 8 data bits, 2 stop bits, no parity (page 102/107; II 5-11/II 5-16). Page 123 (II 6-4) shows the codes sent to the computer for all key presses. Note that some of them are greater than 0x7F. Page 222 (VI A-19) has a schematic.

I wrote up some parts as I went at https://ejona.ersoft.org/archive/2021/09/25/vector-4-keyboard-adapter/ . Probably not too interesting given the point you're at.

Yeah I got it working 99% (the C key is annoying, and I also don't want to remove the 17 screws to re-seat the foil pad.)

Thanks for the links; though.

At this point the keyboard is a display piece rather than a DD. The F&F switches are pretty awful to type on (not to mention the flaky C key.)