╒───·───════════════════════════════════════════════════───·───╕
│·▒█░█▒·▓█████████████████▓ ·HARDWARE· ▓█████████████████▓·▒█░█▒ │
╘───────════════════════════════════════════════════════───·───╛
(c) -=ToadeR=-
Problems with the membrane keyboard
Sometimes Spectrum users find that the keyboard refuses to type certain characters. The membrane keyboard is connected via flexible ribbons with conductive traces deposited on them. Over time, if they are bent too sharply or too often, these traces lose conductivity and develop excessive resistance.
In most computers, the keyboard is connected as shown below. The A8..A15 address lines may be buffered (for example, using an AP5 chip):
A8────|<|─────────
A9────|<|─────────
A10────|<|───────── Addresses
A11────|<|───────── (rows)
A12────|<|───────── to R1..R5
A13────|<|───────── keyboard ┌─┬─┬─┬─┬───> +5v
A14────|<|───────── │ │ │ │ │
A15────|<|───────── █ █ █ █ █
VD1..VD8 │ │ │ │ │
───────────┴─┼─┼─┼─┼───KD0
Data ─────────────┴─┼─┼─┼───KD1 To the
(columns) ───────────────┴─┼─┼───KD2 computer
from ─────────────────┴─┼───KD3 circuitry
keyboard ───────────────────┴───KD4
The A8..A15 address lines pass through diodes VD1..VD8 to the keyboard’s eight rows. The keyboard has five output columns, KD0..KD4. After being pulled up to +5v through resistors R1..R5, these connect to the computer circuitry. The processor scans the keyboard rows by sending a negative pulse (logical “0”) over the address bus. When a key is pressed, one of the columns is pulled to “0”. Columns KD0..KD4 correspond to bits D0..D4 on the data bus.
For any of the D0..D4 bits to be reliably set to zero, the voltage on the corresponding column must be pulled below 0.8 volt. If the deposited traces have excessive resistance, a significant voltage drop occurs across them, and the negative pulse may not reach the threshold at which the chips respond, remaining above 0.8 V instead. In that case, bits D0..D4 will remain at logical “1”.
The keyboard may also fail to register a keypress if two keys on the same row are pressed at once—for example, “CS” and “c” (you won’t get “C”), or “SS” and “b” (you won’t get “*”). This happens because the corresponding line is then pulled up to the power supply not through one resistor, but through two resistors connected in parallel. The current doubles, and so does the voltage drop across the deposited trace.
If the address lines are not buffered—that is, if diodes VD1..VD8 are soldered directly to the address bus—this can cause computer malfunctions.
The simple circuit below will very likely solve all of these problems:
Hardware
DD1 VD1..VD8
┌─────┐
A8─────2─┤ >> ├─18────|>|──────
A9─────4─┤ ├─16────|>|──────
A10─────6─┤ ├─14────|>|────── Addresses
A11─────8─┤ ├─12────|>|────── (rows)
A12────11─┤ ├─9─────|>|────── to
A13────13─┤ ├─7─────|>|────── keyboard
A14────15─┤ ├─5─────|>|──────
A15────17─┤ ├─3─────|>|──────
┌──1─┤ │
├─19─┤ │
┴ └┬───┬┘
10 20
│ │
┴ └> +5v
DD2
┌───┐
──────────┬────────────1─┤ ├─2───KD0
Data ───────────┼─┬──────────3─┤ ├─3───KD1 To the
(columns) ────────────┼─┼─┬────────5─┤ ├─6───KD2 computer
from ────────────┼─┼─┼─┬──────9─┤ ├─8───KD3 circuit
keyboard ────────────┼─┼─┼─┼─┬───11─┤ ├─10──KD4
│ │ │ │ │ └───┘
█ █ █ █ █
│ │ │ │ │ R1..R5
├─┴─┴─┴─┘
┴
DD1 - 3 АП3
DD2 - 3 ЛН1
R1..R5 - 1.5 kOhm
VD1..VD8 - КД
Note that, compared with the standard circuit, the diodes here are connected the other way around, and the columns from the keyboard are pulled down through resistors to the computer’s ZERO bus.
The idea behind the circuit is that, when the keyboard ribbon cables’ deposited tracks are damaged, it is much easier to “raise” the voltage above the threshold level than to “lower” it. In my circuit, the scanning pulses are inverted, and the rows are scanned with positive pulses. Before the data from the columns reaches the computer circuit, it is inverted as well.
Don’t forget to connect pins 1 and 19 of the АП3 to ground (the computer’s zero wire: 0 V, not earth!).
Connect the keyboard’s metal base to ground to protect against interference. If interference continues after that (keys triggering by themselves), you can reduce the resistances to 1 kOhm. If some characters still won’t type, you can increase the resistances to 2 kOhm or more, but interference protection may get worse.
Solder the АП3 inputs to the addresses before the old diodes, directly to the address lines. If the old diodes that break the address lines remain between the lines and the АП3 inputs, nothing will work.
If you don’t know the pinout of the keyboard ribbon cables or keyboard connector, don’t desolder the entire old connection circuit at once. Instead, redraw the old connections or install the new circuit one line at a time: remove one old line, then solder the new one in its place. Otherwise, as happened to me once, you’ll have to use a multimeter to work out which row and column is which at the ends of the ribbon cables.
And one last note: before soldering this circuit, check the connector contacts, especially the ones the ends of the ribbon cables plug into, as well as the cable connecting the keyboard to the computer.
This is how two different membrane keyboards were modified, one of them in a very bad state.
КД diode marking: ┌──────────┐
(three black stripes) ───┤█ ▐ ▌ ├───
└──────────┘
──────|>|──────
If you have any questions, write to UBS BBS or call.
Share your thoughts about the article