Electronics > Projects, Designs, and Technical Stuff
Need help reading a vintage calculator keyboard with modern hardware
(1/2) > >>
rea5245:
Hi,

I'm trying to read an old keyboard from the Wang 300 series calculators. These calculators from the '60s used nixie tubes, diode-transistor logic, and power supplies of -11V, 0V, and +11V. -11V was logic True, 0V was logic False, and +11V was just used as a pull up for the PNP transistor bases.

I want to read this keyboard from a PIC32 using 3.3V and GND. I'm getting some good results, but I'm also seeing behavior I don't understand.

I've attached the keyboard's schematic. My understand of DTL logic is weak and my understanding of what happens when I try to substitute voltages is even weaker.

My approach is to set the keyboard's "-11V" line to GND and leave the "0V" and "+11V" unconnected. I set KBE (Keyboard Enable) to GND. KBC is also unconnected. I'm hoping that by not driving the transistors, I'm just leaving that part of the circuit disabled and keeping things simpler. I need to read the key press from KB1, KB2, KB4, KB8, KB16, and KBI. I thought the way to do that was to connect those to the PIC32's inputs with the internal weak pull ups (WPU). When a button is pressed, it would connect the cathode of certain diodes to the keyboard's -11V line (which I have set to GND) through a 33K resistor. That would pull selected pins down to GND.

That was the plan anyway. What happens is that the inputs all remain high even when I press keys.

(The diodes are FD1684. I can't find a data sheet for them, so the forward voltage is unknown.)

So I tried turning off all the WPUs except one, on the KBI line. That works a little better. When no key is pressed, I read 0x3f. When the Change Sign key (which has diodes on all the inputs) is pressed, I read 0x00 (the schematic says the key code is 63, or 0x3f, so I'm reading the complement of that). When I press the 0 key, I get 0x0f (which is also good: the schematic says the 0 key is code 48, or 0x30. When I read 0x0f, I'm getting the complement of that.) I was happy until I pressed the 1 key (code 49, 0x31) and I read a value of 0x00. In fact, most keys read as 0x00. The 5 key (code 53) reads as 0x3f but maybe it's just broken. The Enter key (code 33, 0x21) sometimes reads as 0x1e (which is good - the complement of 0x21) but I've also seen 0x00, 0x20, and 0x02.

I don't understand why having a WPU on all the lines does not work. I don't understand why having a WPU on only one of the lines ever works. And given that it sometimes works, I don't understand why it always works for some keys, never works for others, and intermittently works for some. Can anyone explain it?

As a last resort, I could generate +/-11V for the keyboard, but then I'd need level shifters for the PIC32. I'd love it if I could just drive this keyboard with 3.3V. Is it going to be possible?

Thank you,
   Bob



duak:
I would tie the PIC ground directly to the net tying all the bottom ends of the micro switches together, ie., the collector of the righmost 2N404.  This should remove the effects of the 33K resistor and other possible sneak paths.

The Weak Pull Up (WPU) still may not source enough current to assert a logical 1 on the inputs.  Also, I see the term "micro switch".  It's possible these switches were made by Honeywell and, if memory serves, the switch contacts were a couple of gold plated wire springs arranged at right angles.  These were very good, but after a few years crud may build up and they become intermittant.  You might want to try something like 10K pull up resistors to ensure there's enough current to give a solid high level.  If the diodes are silicon, the logical 0 voltage into the PIC will be OK but won't have much noise margin.


rea5245:
Tying to PIC to the net connecting the switches is not an option. It doesn't come out to the edge connector.
duak:
So any modification of the keyboard is out?  If so, then the switch common has to be held close to 0V.  I think this can be done by using +-0 as the ground to the PIC and applying -11 V to the -11V net.  The 33K resistor will pull the switch common to -11 V but the rightmost 2N404 will be turned on pulling the switch common up towards ground.  The 2N404 is germanium with a low saturation voltage so the switch common will be a few hundred mV negative.  This is OK because the diode matrix will introduce a positive voltage offset of a few hundred mV thus compensating for it.  The +11V net can be connected to +-0V.

If you want to get the other switches working too, then this will have to be reconsidered.  Are you trying to re-use the calculator with more modern internals?

Experimentation may show that the whole shootin' match could be operated from +/-5 V.  Unfortunately, a negative voltage is required unless the assembly can be modified.
rea5245:
Do you have any theories to explain the behavior I'm seeing? When I have only one WPU enabled, all the KBx nets read as one, so not only is the single WPU strong enough to read as 1, it's somehow getting through all the diodes and causing all the the KBx nets to read as one. And when a key is pressed, it brings the KBx nets down to 0, but it doesn't always bring the right nets down. I don't get it.

I'd strongly prefer not to modify the keyboard. And I want to be able to read the other switches.

The Wang 300 calculator had a separate keyboard and computing unit ("Electronic Package"). The EPs are rare, expensive, and usually in need of repair. The keyboards are cheaper and a little more common (one EP could support multiple keyboards). My idea is to make a modern board that brings a keyboard to life and emulates the original EP's behavior. I could make them available to the dozen or so people on the planet who would care enough to want one. So I want something that's as easy to install as possible. That means not modifying the keyboard.


Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod