A friend gave a me an electric typewriter and modding it was inevitable.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
Yesterday evening I did my first steps in emulating the keyboard input with a Arduino. I could have used any other microcontroller with a sufficient number of GPIOs, but the Arduino I had laying around and trying out stuff is very easy.
We also had green light on in the hackerspace...
Basically, what the test code does, is reading the 8 scan lanes in as a byte. The scan is just a pulling down one lane after the other. When the scan is at a certain lane, the controller pulls down one of the 8 lanes going back into the machine.
Read more »Due to the lack of any connector on the machine except for the power cord, we have to open it up and see what can be used.
In my case there are four screws found at the bottom side of the machine. There are also plastic clamp which hol the front edge of the top cover in place, which had to be pried open with a screwdriver. In order to remove the top cover also the knob had to be removed.
Then we can remove the keyboard. It is held in place by two screws at its sides. There also is a "ground" wire connected to the metal plate which has to be unscrewed.
Under that we find the circuit board, containing all the active electronic components.
The right part of the board is all the power electronics, the left part is the input–process–output section. In there we can find various chips:
Marking | Chip | What? | Link |
V87C54A JOP8N U723 | intel 87C54 | 8-Bit microcontroller | alldatasheet |
72CXTFK E4 SN74HCT573N | 74573 | Octal D-type transparent latch; 3-state | |
K1D65003AP 744 | K1D65003AP | 7 Circuit Darlington Transistor Array | datasheetbank |
The 87C54 is the boss and therefore the one we want to talk to. According to the datasheet, it has an UART port, but the pins are used - in this case - as GPIOs. So the only remaining way simulate keystrokes on a keyboard.
Luckily, the two flex cable connectors above the controller, where the keyboard cable are put into, are marked with "KEY SCAN" and "KEY IN". A keyboard is basically a big matrix of switches. The controller applies voltage to one row of the matrix at a time and looks at which column it's coming out. This process is called multiplexing.
Using an oscilloscope, i could see that the "scan" pins are normally high and sequentially pulled low. Therefore the "in" pins are pulled up by resistors and, when a key is pressed, pulled down in the according cycle.
To make the pins more accessible, i soldered ribbon cable to it. We also need a ground connection. Luckily, one of the "in" pins is not used, therefore I have soldered a ground wire to it, so that ground is part of the ribbon cable. To the end of the ribbon cable I soldered socket headers.
If we want this to be emulated by a microcontroller, we need to feed it the "scan" as an input and have it output to "in". Also we need to know which combination "presses" what key. This can be done going through all permutations of possible connections with a jumper wire. In the end you get a matrix like this:
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7
----+----+----+----+----+----+----+----+----
0 | |BCSP| | | |ENTR|BCWD|DOWN
----+----+----+----+----+----+----+----+----
1 |BACK| ´ | + |IDNT| |SHFT| - |SPCE
----+----+----+----+----+----+----+----+----
2 | ß | 0 | p | ü | ä | ö | . | ,
----+----+----+----+----+----+----+----+----
3 | 9 | 8 | i | o | l | k | m | n
----+----+----+----+----+----+----+----+----
4 | 7 | 6 | z | u | j | h | b | v
----+----+----+----+----+----+----+----+----
5 | 5 | 4 | r | t | g | f | c |CODE
----+----+----+----+----+----+----+----+----
6 | 3 | 2 | w | e | d | s | x |add Tab
----+----+----+----+----+----+----+----+----
7 | 1 | TL |TAB | q |CAPS| a | y |SHFT
----+----+----+----+----+----+----+----+----
8 |
----+----+----+----+----+----+----+----+----
9 | CAPS LED
----+----+----+----+----+----+----+----+----
10 | ON LED
----+----+----+----+----+----+----+----+----
11 | MOD (GND)
Create an account to leave a comment. Already have an account? Log In.
In this project: https://hackaday.io/project/186640-turning-an-80s-typewriter-into-a-computer the author connected analog multiplexers to both rows and columns, with their in/out pins connected. He just picks a row and column using the mux addresses, and the connection is made the same way as a closing switch.
PS: if you are interested you can check out our shop here https://mvthsengineering.com/
Any idea how shift and caps lock work? The pull-up resistors worked. Thanks. We should have seen that as it was driven by an 74LS145 BCD. We can now control every key with the exception of ones that require the shift or caps lock to work. The pins that control both caps lock and shift are isolated in that they don't control any other key. Holding constant high has not worked. Just thought you might have some ideas. Thanks again!
My students picked up an electronic typewriter at Goodwill. It conveniently has two rows of 12 pin headers for its keyboard. We have even decoded all of the keys and can type any key (or command) by shorting the correct pin from one row with the correct pin from another. Now we want to control the typewriter, but using a scope we can detect no pulses any pin on either row. We are not sure how it is scanning. Any suggestions?
Try scoping the traces while connecting them with a resistor (10k or 1k or so) to GND or the supply voltage. There are probably diodes in the key matrix multiplexing circuit which means that each line can either only sink or source current, and hence stays at the same constant level.
Become a member to follow this project and never miss any updates
Also, just noticed that you are reading all the "key scan" pins. We are just reading the lead "key scan" pin and using timing to signal the correct "key in" pin. Your approach certainly offers easier control. Maybe we will give it a shot.