Hot-Swap Keyboard Issues?

User avatar
Hypersphere

11 Oct 2016, 15:31

I bought a Northgate Omnikey 101 white Alps keyboard from "Northgate Bob". It was accompanied by a list of instructions, including a dire warning about hot-plugging:

"Do not under any circumstances hot plug your ... keyboard. (Hot plug means do not change your keyboard with power on). Shut down, power off the computer before connecting the keyboard."

The instructions go on to say that hot plugging the keyboard can result in destroying the motherboard and video card.

Before seeing this warning, I had been hot-plugging my Northgate and other keyboards, both vintage and contemporary, without incident.

However, yesterday, I was testing two Omni 101 boards. I unplugged one and then plugged in the other. Suddenly, the second keyboard became unresponsive. I went back to the first one and it, too, was unresponsive. I rebooted with one of the keyboards connected and it still did not work. Finally, I followed Northgate Bob's directions and powered down the computer then powered up and rebooted while holding down the Esc key. This restored function to the keyboard.

Questions:

1. My setup shares a keyboard and mouse with 3 computers using a KM switch and USB hub. With PS/2 keyboards like the Northgate, I use either an active converter such as the "blue cube" or an Orihalcon/Soarer PS/2 to USB converter attached to the USB hub. Therefore, if hot plugging is an issue, I will not be able to use susceptible keyboards. If hot plugging is indeed an issue, is there a workaround?

2. Is hot plugging an issue if the keyboard is using a PS/2 to USB converter?

Thanks for your insights and solutions!

User avatar
XMIT
[ XMIT ]

11 Oct 2016, 16:02

Ancient electronics can have all sorts of electrical quirks.

Without looking at the data sheet or the controller electronics, my guess is that there is some large capacitor somewhere on the board that loses charge relatively slowly when unplugged. When plugged back in quickly, it can maybe cause an instruction to be missed or skipped on the microcontroller due to some sort of timing issue. This could result in the microcode hanging and needing to be reset. This would be even worse with any keyboard that has local state (e.g. battery backed RAM).

I'm willing to bet that if you let the keyboard sit for 20 minutes or so you wouldn't need to reset the board by holding down Esc.

With ADB boards on some older Macs, and possibly some PS/2 ports, a hot plug could blow a fuse somewhere.

For the same reason, even using an active converter could be an issue if it routes +5V directly to the keyboard. This is why I like boards that implement and use the "Reset" line that PS/2 specifies.

I'd write this off as a quirk of these boards, and not a general issue.

User avatar
Hypersphere

11 Oct 2016, 16:10

@XMIT: Thanks for your insights into this issue. I wish that this had been a quirk of a keyboard that I did not like so much!

What might be a workaround for this problem? Would it be possible to install a Teensy as an internal AT-PS/2-USB converter and to implement the reset line?

User avatar
Hypersphere

11 Oct 2016, 16:45

Here is the pinout for the Omni 101 from a post by Fohat:
Omni101_pinout.jpg
Omni101_pinout.jpg (267.05 KiB) Viewed 2718 times
This shows the assignments for 4 of the 6 pins (Clock, Data, Ground, VCC +5V), but what are the other 2 pins?

Arakula

11 Oct 2016, 21:18

From http://www.computer-engineering.org/ps2protocol/ :
The keyboard or mouse should not draw more than 275 mA from the host and care must be taken to avoid transient surges. Such surges can be caused by "hot-plugging" a keyboard/mouse (ie, connect/disconnect the device while the computer's power is on.) Older motherboards had a surface-mounted fuse protecting the keyboard and mouse ports. When this fuse blew, the motherboard was useless to the consumer, and non-fixable to the average technician. Most newer motherboards use auto-reset "Poly" fuses that go a long way to remedy this problem. However, this is not a standard and there's still plenty of older motherboards in use. Therefore, I recommend against hot-plugging a PS/2 mouse or keyboard.

User avatar
XMIT
[ XMIT ]

11 Oct 2016, 23:22

Sure, but the issue at hand is the keyboard, not the motherboard. These are valid concerns for a motherboard that go away when using a converter (since USB is electrically designed for hot plug).

I don't know if the Omnikey implements the reset line so having a converter that does use it may not help you.

Not really sure what else to suggest. Try a converter and see if that helps. When I tear into my Omnikey I'll pull all the switches and the plate, get some good photos of the PCB, and use that to think through what sorts of transient power issues there should be. The usual best practice with these older microcontrollers is to power them on with the RST (reset) pin held, then, when power is stable, to release the RST pin to enable them to begin execution of the microcode. Maybe there is a way to wire in a hardware reset switch?

In general, it should be possible to dump the ROM of 8048/8051 series microcontrollers for investigation, but this is not something I've had the time to do. It would be neat to see what, for example, the actual IBM Model M controller code looks like.

User avatar
Hypersphere

12 Oct 2016, 00:16

Thanks, XMIT! Today I was able to reach Orihalcon, and he is going to build some internal converters for me that should take care of the problem.

I am sending him an original mini-DIN6 to DIN5 (AT) cable from one of my Omni 101 boards to ensure that the pin assignments are correct.

As I understand it, the converters will have the reset line connected. This will also help standardize my workstation setups, as my keyboards are gradually being outfitted with panel-mount micro-USB connectors.

His prices are fairly reasonable, and having him make the converters will save me the time and effort making my own (plus I am sure he will do it correctly!). I will still need to install the internal converters and the panel-mount micro-USB connectors, but I will probably be able to use the existing opening that is now occupied by the mini-DIN6 connector. However, I would prefer to have the connector on the left side (as I face the keyboard from the front) -- I will be able to determine what will work best after I get back inside one of the Omni boards.

I am typing this on the Omni with the cleaned and lubed white Alps -- it feels smoother and has a cleaner tactility than my Leading Edge DC-3014 with blue Alps.

Post Reply

Return to “Workshop”