olivetti typewriter keyboard

al.c

10 Jul 2021, 20:28

i recently saved a great keyboard from certain doom. it's from an old olivetti typewriter (te 530) and it's pretty much a close relative to this one that "the voice" reviewed here: https://www.youtube.com/watch?v=IUSCkm9dm1k
it has (presumably) the same 40-pin connector, and i'd really like to convert this to usb. but how? it's not exactly a ps/2-signal..
i've converted a few old keyboards with soarer's converter and also with tmk/qmk. but never like this, i have no idea where to start.
should i just start measuring out the pins against each other and look for keypresses? or might it be possible to dig up the schematics from somewhere?
i've made some pictures. maybe someone can give me some advice..
Attachments
kb1.jpg
kb1.jpg (2.34 MiB) Viewed 5252 times
kb0.jpg
kb0.jpg (2.89 MiB) Viewed 5252 times

User avatar
purdobol

10 Jul 2021, 21:04

You have to figure out the matrix. 40 pin connector suggests it's bare bones keyboard without any ICs (but check anyway).

viewtopic.php?t=7

al.c

12 Jul 2021, 11:27

thanks for your reply.

soo i sat down and traced all the pins with a multimeter.
i'm not sure if it's 100% correct, but i've attached my findings below (it's from an olivetti te 530 typewriter keyboard in case anyone ever searches for this..).

i find it extremely confusing to say the least! some pins are attached to both rows and columns (40 for example, it's on the 2's upper leg and on the S's lower leg..), there's way more pins than my teensy can handle, and the rows/columns seem to be all over the place!

i'm thinking about just leaving out the upper row, then it should be enough pins on the teensy. or is this a completely lost cause?
Attachments
kb-pcb.png
kb-pcb.png (3.57 MiB) Viewed 5132 times
kb-overlay.png
kb-overlay.png (3.7 MiB) Viewed 5132 times
kb-matrix.png
kb-matrix.png (2.89 MiB) Viewed 5140 times

User avatar
purdobol

12 Jul 2021, 11:58

Put a picture with corresponding pin numbers in the circle please.
Image
Will try to simplify it for you :)

P.S. Check again if spacebar and U key are correct. They have the same values.
al.c wrote:
12 Jul 2021, 11:27
i find it extremely confusing to say the least! some pins are attached to both rows and columns (40 for example, it's on the 2's upper leg and on the S's lower leg..), there's way more pins than my teensy can handle, and the rows/columns seem to be all over the place!

i'm thinking about just leaving out the upper row, then it should be enough pins on the teensy. or is this a completely lost cause?
Think of rows and columns as "abstract" representation of a grid. The actual physical location on the PCB (upper or lower leg) does not matter at all. In fact you can arrange rows and columns however you like. Each key has to have distinct value. All the firmware does is scans this grid very very fast and basically checks for shorts (closed circuit).

Leaving the upper row for now is a good idea. You have some leds there and some buttons have 4 pins. Double action switches? Or leds inside?

With slight modifications to the PCB it's probably possible to reduce the number of pins needed on the teensy. But don't worry about it now. Try to arrange it all into spreadsheet or a table for readability.

al.c

12 Jul 2021, 18:53

hey, thanks for helping me out!
you're right, the u's lower leg should be pin 31 instead of 30! there are probably some more errors, i thought i'd iron them out as i go.

i simply numbered the pins from left to right, first row 1,2,..10, second row 11,12,..20 and so on until 40 on the lower right.

> The actual physical location on the PCB (upper or lower leg) does not matter at all.
oh, interesting, i didn't know that. i thought all the lower legs are either rows or columns.. there are some diodes in the mix though, and there are also some oddities going on (like these two keys on the left that are the only ones connected to pin 5)..

and the upper row are some leds, the keys with the rectangular pads have locking switches with integrated leds (or rather, not even leds but tiny light bulbs.. no idea how and if i can power them, but it ). the switches are really nice overall. i've attached another picture, the two in front are the locking switches and the two in the back are the normal ones.

again, thanks for your help. i don't want you to do my homework or anything like that, but i really appreciate the feedback :)
Attachments
sw.jpg
sw.jpg (2.56 MiB) Viewed 5072 times

User avatar
purdobol

12 Jul 2021, 22:37

al.c wrote:
12 Jul 2021, 18:53
hey, thanks for helping me out!
you're right, the u's lower leg should be pin 31 instead of 30! there are probably some more errors, i thought i'd iron them out as i go.
No problem. Always glad to help.
I've tried to make sense of the matrix with pins you provided. Row by row and I'm stuck on T. So yeah errors.
I know it's a bit tedious going through every switch with multimeter. But you really have to be precise at this stage, because figuring out the errors "down the line" is actually harder and more time consuming than one might think.

So my recommendation is this.
1. Trace every switch to that circle again. Numbering is fine but make sure you get it right. If there's diode in the way. Trace the switch leg to one end of that diode, and then from the other side of the diode to the circle.
2. Skip the top row for now entirely. And trace only actual switches. Not every pad that's on the PCB.
3. Write it down as you go in the table like this:
Image
If the pin number repeats make sure to write it down on the same row in the table as previous ones. You're gonna see a pattern emerging. With two distinct groups of repeating pin numbers. That's the column/row division in the matrix.

User avatar
purdobol

13 Jul 2021, 06:27

Ok I think I know what's going on here.
Why trace from pin 5 continues after "...." and "ctrl" key? It goes all the way under "R" and "4".
Does the "R" switch bridges pin 5 and pin 33 permanently? If that's the case they're the same.
Same configuration of pads is under "M" and that circle by the enter key. Speaking of enter key. 2 switches under there? Looks like it.

So put all switches in. Assemble the board. And check what's bridged on that connector with multimeter.
Also pictures of both sides of that PCB would be useful. Entire PCB from edge to edge. Don't crop the picture.

Have some time to kill today so will try to trace that board visually.

al.c

14 Jul 2021, 15:02

hey, sorry for the late response, i wasn't expecting this level of collaboration ':) the "documentation" was also not meant for someone else to decipher, apologies :O

anyways, here's the pcb again, not much going on on the back, aside from a bunch of diodes.

u and z keys are pin 31, not 30.. otherwise my badly drawn numbers seem to be mostly correct. i'm currently in the process of remeasuring and completing the table as per your suggestion. i'll upload it as soon as i'm done!

and that weird pin5-trace, it seems to end between keys without any contact to the switches, but there's a screw going right through the trace, that should connect it to the mounting plate. i'll check that as soon as the board is reassembled.
Attachments
kb3.jpg
kb3.jpg (3.98 MiB) Viewed 4926 times
kb2.jpg
kb2.jpg (3.09 MiB) Viewed 4926 times

al.c

14 Jul 2021, 16:30

oof. all done :)
matrix is attached below, in case somebody wants to do this as well. the keyboard is definitely worth the effort and these typewriters seem to be quite easy to source.
Attachments
olivetti-matrix.png
olivetti-matrix.png (31.91 KiB) Viewed 4913 times

User avatar
purdobol

14 Jul 2021, 17:25

Good job. But it's not finished yet :P
Now you need to rearrange the info above into table like this:

Code: Select all

        1       2       3       4       5       6       7       8       9       10      11      12      13      14      15      16
r1      n9      --      NUMLK   SCRLK   PRTSC   F12     F10     F9      F2      F3      ESC     F1      F6      F7      F4      F5
r2      n/      n8      --      PAUSE   PGUP    BSP     F11     a0      a2      a3      <       a1      a7      F8      a4      a6
r3      n*      n7      --      --      PGDN    '       ´       O       --      --      §       --      a8      a9      a5      T
r4      n-      n6      --      --      END     HOME    Å       a+      --      --      --      --      --      --      G       Y
r5      n3      n5      RIGHT   --      DEL     INS     ~       P       W       E       TAB     Q       I       K       R       --
r6      nENTER  n4      --      --      UP      RETURN  Ä       Ö       --      D       --      --      --      L       --      U
r7      --      n+      --      LEFT    --      .       a-      ,       --      --      A       S       H       J       F       B
r8      --      --      n,      DOWN    n2      n1      n0      M       X       C       --      Z       --      N       V       SPACE

        *1      *2      *3      *4      *5      *6      *7      *8
r9      LALT    LGUI    LSHIFT  LCTRL   CPLK    RSHIFT  RCTRL   RWIN
This is example from AEK II (Swedish/ISO) matrix thread.
As you can see in the example you have 16 columns (marked 1-16) and 9 rows (marked r1-r9).
Replace columns/row with pin number associated to the key. For example:
Space has values 30 and 35 in your table. So lets decide pin 30 will be row. Then pin 35 has to be column.
KB rel key has values 30 and 38. Pin 30 is already row so pin 38 has to be column.

That's why I insisted that the repeating numbers should be in the same row in previous table. That way it's just a matter of renaming pin1 -> columns, pin2 -> rows. Bam done.

Partially rearranged:
Image

al.c

15 Jul 2021, 17:30

alrighty, here's the ordered matrix :)

i think i'll omit the red columns (upper row) and try to integrate col 5 into col 34 (if that's not already the case anyway), then i'll have exactly the 18 pins that the pro micro has without desoldering the leds.

one more (probably stupid) question though: do i need to connect the controller's power and gnd pins to the keyboard as well..?
Attachments
oliv-ordered.png
oliv-ordered.png (48.34 KiB) Viewed 4821 times

User avatar
purdobol

15 Jul 2021, 17:49

al.c wrote:
15 Jul 2021, 17:30
one more (probably stupid) question though: do i need to connect the controller's power and gnd pins to the keyboard as well..?
Power no. Connecting ground to lets say metal case is good practice but not mandatory. It'll work fine without it.

al.c

15 Jul 2021, 18:18

perfect, thank you so much :)
i'll let you know if/when i get this beautiful thing working!

al.c

24 Jul 2021, 10:50

hey, i'm writing this on the converted keyboard :) i'm missing a few keys, some aren't quite where they are supposed to be, but that's 100% due to bad wiring/mapping. it really works! time for cleanup and polishing. i'll attach all the relevant files in case someone ever needs them. they are still very chaotic, apologies for that :oops: i used the handwired/oem_iso_fullsize as a base and the pins got renumbered as well. next time i'll choose the pin numbers according to the connector, that makes way more sense and helps with the mapping to the teensy pins. anyways. have a nice day, cheers and thanks for the help :D
Attachments
pins.jpg
pins.jpg (616.18 KiB) Viewed 4637 times
oem_iso_fullsize.zip
(9.92 KiB) Downloaded 117 times

Post Reply

Return to “Workshop”