Arduino Gets Old PC Booted And Back Into Action

How many people still have a PS/2 keyboard kicking around in 2020? Admittedly asking such a question of the Hackaday audience is probably cheating (there’s a decent chance one of you will type a comment on one just to prove a point), but even the most pedantic reader has to admit that it’s a long dead standard. So we’re hardly surprised to hear that [Turbaned Engineer] didn’t have one handy when he tried to boot a motherboard so old that he couldn’t access the BIOS with a USB keyboard.

But rather than waiting for an adapter to show up in the mail, he decided to rig up an Arduino Nano to mimic a PS/2 keyboard just long enough for him to navigate the system configuration. Since that basically meant he only needed the arrow keys and Enter, he was able to rig up a handful of momentary buttons to serve as input. We wouldn’t recommend typing out your memoirs with such a spartan board, but it’s certainly good enough to juggle around the order of boot devices.

The fun didn’t stop there, though. [Turbaned Engineer] also had to clean some corrosion and fix a blown resistor on a bank of RAM to drag this old soldier over the finish line. He didn’t have a case handy, so he made a free-form one using the polycarbonate packaging that ICs ship in. The final machine isn’t exactly a sleeper, but it’s good enough to play Super Mario Bros. 3 on the TV.

At the end of the day, the minimal input device [Turbaned Engineer] put together isn’t so far removed from other homebrew keyboards we’ve seen recently. It seems that QMK even has some basic support for the PS/2 interface. Not that it would come up very often, but a “retro” mode might be an interesting addition to your next custom keyboard build.

47 thoughts on “Arduino Gets Old PC Booted And Back Into Action

  1. With the delays in shipping these days, waiting for an adapter is an exercise in patience. Good thing the hacker here didn’t need to order an Arduino, switches, breadboard and a connector. How well is your hacker lab equipped? Of course, my lab has plenty of that and even several PS/2 Keyboards (yes, I’m typing on one now). In fact, my KVM switch is PS/2 and I use adapters to go the other way. But that’s not the point here. It’s clear that the Arduino is a fun controller and solves a lot of problems. Another possible hack would have been to use the serial port of the Arduino to accept characters from a terminal then convert to PS/2. The ultimate hack would be to use the USB port on the Arduino to fully convert a USB keyboard to PS/2. Why stop the fun at just a few switches?

  2. When I got a refurbished i7 in 2016, I chose to make sure it had ps/2, VGA, and serial ports. I use the first two, though it turned out I haven’t used the serial port (or the parallel port).

    It has no floppy disk connector, I decided I could live without that, though I still have the previous two comouters, and they have floppy drives.

  3. There are still die hard gamers thinking that PS/2 has lower latency. :P
    While PS/2 may have lower initial latency, but it takes longer to transmit a packet if the key stroke sequence is longer than 1 byte. i.e. some of the keys and key release. USB 2.0 full speed can have much lower polling intervals and much faster transmission vs the 10-20kbps speed.

    The hardware is there in the Super I/O chip even when the motherboard vendor no longer bother to have connectors for them. They monitors voltages, fan speed control, serial, parallel port, PS/2 and even include diag LED on some.

    1. Quite a few super I/O chips have ditched the parallel port in order to save on pin count. The serial port is likely to stay for a very long time because of how useful it is for low level debugging, albeit without most of the handshaking lines – might still have RTS/CTS if you’re lucky.

    2. i think its the usb stack that is the real slow down. old skool ps2 was interrupt driven so it was a lot faster.

      of course usb is lighting fast these days and the usb stack isnt really that much of a monster to such fast hardware as what we now use.

      someone probably already scienced this.

    3. Standard USB keyboards don’t support n-key roll-over. PS/2 sends make-break codes, while USB sends a fixed length data packet which holds the status of six arbitrary codes. The keyboard cannot send more/longer codes, so additional keys are ignored.

    4. One thing is the fact that PS/2 causes a hardware interrupt, whereas USB keyboards use software polling. It’s slower to transmit subsequent key presses, but due to the PS/2 protocol, the keyboard doesn’t have to wait to start transmitting – it simply starts transmitting as soon as it registers a key change.

      The default USB polling rate causes an average 4 ms and a maximum of 8 ms extra delay, plus the command delay, because the host computer has to tell the keyboard to start sending the data.

      1. That’s no longer the case with xHCI.
        “The xHCI reduces the need for periodic device polling by allowing a USB 3.0 or later device to notify the host controller when it has data available to read, and moves the management of polling USB 2.0 and 1.1 devices that use interrupt transactions from the CPU-driven USB driver to the USB host controller. EHCI, OHCI, and UHCI host controllers would automatically handle polling for the CPU if there are no changes that need to be made and if no device has any interrupts to send but they all rely on the CPU to set the schedule up for the controllers.[1][2][3] If any USB device using interrupt transactions does have data to send, then an xHCI host controller will send an interrupt to notify the CPU that there is a USB interrupt transaction that needs handling. Since the CPU no longer has to manage the polling of the USB bus, it can spend more time in low power states.”

    1. What a youngster that keyboard is.. My two most used KB are older than I am, and still giving a nicer typing experience than anything more modern I’ve tried.. Some of the newer mechanical keyswitch designs are damn good though..

      I did actually have to select a motherboard when replacing my failed one very carefully so I can just go on using the nice keyboards.

      1. I’ve kept an AT keyboard w/ PS2 adaptor handy for tackling problems on old machines. Only need it once or twice a year but it gets used even in 2020

        The kyb is question I’m not sure of its model. It’s an early 90s knockoff of a better mechanical model – and is mechanical itself. Came to me from an adult student who was boarding with my parents. He left them his whole PC when he moved out thinking they could use it, I ended up giving it to my employer for a site where an ancient ADM5 terminal had died – us techs wanted to preserve the clackity-clack experience.

        We lost that contract and the site was decommissioned at a later date. I’d heard that the PC got moved to a another facility with similar equipment – in another city. Didn’t really care but I would have taken that keyboard if I had the chance.

        About a decade went by and I was in that city installing a different type of equipment at a different site, and it involved decommisioning some old gear. And there was that old PC sitting there as a maintenance terminal, looking quite a bit worse for wear. Since the install included new maintenance PCs, I got to take my keyboard back.

        And if anyone is wondering, yes that ADM5 terminal was saved from the bin – it still resides in the company’s “history” cabinet in reception, next to the valve radios and gigantic hardrives etc.

    1. There are many motherboards that have USB, but still require a PS/2 keyboard to work with the BIOS. USB hardware was included on motherboards long before support was ever included in a BIOS, and it was long after that before all motherboards included BIOS USB support.

      1. I was talking about harddrive SATA ports on the mother board. they where +/- after the USB BIOS support. But I was not abble to found a proper timeline on the web to see the level of bad luck here… ;-D (more to see level of my wrongness)

  4. My desktop keyboard is branded “Leading Edge”, found it in the trash, works perfectly, it is an AT keyboard connected through a PS/2 adapter. It is cool to type on having all Alps switches.

  5. I wanted to “one up” the challenge, but I can’t seem to put my hands on an RJ11 to PS/2 converter at the moment. Why must they always change the standards? What was wrong with RJ11? Spare cables were ubiquitous!

    1. Who used rj11 for keyboards? Something in Eurooe?

      The HP150 used an odd keyboard connector, can’t remember what. The Mac Plus had something like the rj11. Maybe DEC terminals? But they’d not have”proper” keyboards.

        1. From your wording, it sounded like an “IBM compatible” with an odd connector.

          Except if a keyboard put out ascii, there really was no standard before the IBM PC. The connector is irrelevant, the codes aren’t compatible.

          I think I still have a surplus keyboard with no matrix, just the keyswitches mounted on a metal panel. I wired it up to use with my Radio Shack Color Computer. I do have a pre-AT keyboard, which doesn’t put out the right codes (though the same form as at keyboards). I might still have my Mac Plus keyboard.

          But having junk around isn’t the same thing as having old hardware that still works with current computers.

          1. Go back a little further, to when the floppies and the mains current feeding it were the only things compatible with anything, that is, if you knew how to reformat the floppies, anyway.
            Here’s a giveaway: Arthur C. Clark used one to coordinate between Sri Lanka and his Los Angeles liaison during production of “2010”.

  6. i haven’t purchased a keeb since the 90s. im using this old dell keyboard i found in the dumpster. i did find a mechanical corsair keeb in a dumpster, but i havent got around to cleaning it yet (im not even sure how, never cleaned a mechanical), so it resides on my shop computer.

  7. I have a Sandy Bridge era ASUS mainboard that was future-thinking and got rid of the PS/2 port completely… only there’s a bug in the UEFI that’s never been fixed where it doesn’t detect a keyboard if it’s missing the numeric keypad.

    So I have my 10keyless main keyboard, and some random $8 Logitech piece of crap plugged in and then any keyboard opens the UEFI just fine. 🤦‍♂️

  8. How did these USB to PS/2 adapters work? I sort of imagined that all USB-keyboards actually can start i a electrical PS/2 mode provided it’s connected through the adapter.

    1. If it’s a passive USB to PS/2 adapter it literally just re-routes the USB wires to a PS/2 connector. i.e. 5V, GND, D+, D- on the USB socket get connected to 5V, GND, CLK, DAT on the PS/2 plug.

      Then, when the microcontroller in the USB device starts up it detects whether it is plugged into a USB host or not. If it is, it starts up the USB interface on D+/D-, otherwise it uses the same pins as CLK/DAT for PS/2 communication.

      It is device-specific. Not all USB devices have this dual-mode capable firmware.

  9. I assume it was just humour in the article that one of us would be typing on a ps2 keyboard.. I think many of us would be – I still have prob 50/50 ps2/usb keyboards here..

    Ps2 just works on everything. you don’t need any bios or os support, and they work year after year after year…

    I’m surprised the person in this article just didn’t go get one off the shelf, or ring a friend for one… Or even just get an adapter out of the draw (I’d have at least 10 of them).

  10. As much as I enjoy a good hack, which this is — and as much as I applaud the dude’s inventiveness and persistence…

    This was absolutely a job for a run to a nearby Goodwill or thrift shop. A fiver (two at the most) and a few minutes on the bus (or Uber / Lyft / local service / etc) would’ve done this in in a total of maybe 30min to a full hour.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.