Decoding The PS/2 Keyboard Protocol Using Good Old Fashioned Hardware

1987 was a glorious year.  It brought us the PS/2 keyboard standard that’s still present on many a motherboard back panel to this day. (It also marked the North America/Europe release of The Legend of Zelda but that’s another article.) Up until this point, peripherals were using DIN-5 and DE-9 (often mistakenly called DB9 and common for mice at the time) connectors or — gasp — non-standard proprietary connectors. So what was this new hotness all about? [Ben Eater] walks us through the PS/2 hall of fame by reverse-engineering the protocol.

The PS/2 connector in all its glory

This is a clocked data protocol, so a waveform is generated on the data pin for each key pressed that can be compared to the clock pin to establish the timing of each pulse. Every key sends a unique set of encoded pulses and voila, the whims of the user can quickly and easily be decoded by the machine.

This is where [Ben’s] dive really shines, we know he’s a breadboarding ninja so he reaches for some DIP chips. A shift register is an easy way to build up a parallel PS/2 interface for breaking out each data packet. There are a few quirks along the way, like the need to invert the clock signal so the shift register triggers on the correct edge. He also uses the propagation delay of a couple inverter gates to fire the 595 shift register’s latch pin slightly late, avoiding a race condition. A second 595 stores the output for display by a set of LEDs.

Beyond simply decoding the signal, [Ben] goes into how the packets are formatted. You don’t just get the key code, but you get normal serial interface error detection; start/stop bits and a parity bit as well. He even drills down into extended keys that send more than one packet, and a key-up action packet that’s sent by this particular keyboard.

This is the perfect low-level demo of how the protocol functions. On the practicality side, it feels a bit strange to be breaking out the serial to parallel when it would be very easy to monitor the two signal lines and decode them with a microcontroller. You might want to switch it up a bit, stick with the clock and data pins, but connect them to a Raspberry Pi using just a few passive components.

Continue reading “Decoding The PS/2 Keyboard Protocol Using Good Old Fashioned Hardware”

Rex Wasn’t Really A PDA, It Was The First Great Digital Rolodex

Back in the 1990s I was fascinated with small computers. I used the HP200LX palmtop computer for almost ten years, which I wrote about back in December. Naturally, the Franklin Rex 3 PCMCIA-sized organizer caught my attention when it was released in 1997. Here was a Personal Digital Assistant (PDA) the size of a credit card that could fit not just in your pocket, but in your shirt pocket.

Viewed today, it was an interesting paradigm. The screen takes up almost the entire front face of the device with a few buttons for navigation. But isn’t it a deal-breaker that you can’t enter or edit contact info on the device itself? This was long before cellphones were pervasive, and if you had the option to connect to the internet a telephone or Ethernet cable was involved. The ability to have a large data set in your pocket viewable without slapping a brick-like laptop on a table was pretty huge.

I think the killer feature was the PCMCIA interface. I challenged myself to reverse engineer the API so that I could sync data outside of the

Continue reading “Rex Wasn’t Really A PDA, It Was The First Great Digital Rolodex”

3D Printer Air Compressor Is A Wankel

We wonder if mechanics are as annoyed when we say “engine” as we get when someone talks about a “computer” or a “radio.” Sure, you know what all three of those words mean, but there are many different kinds of radios, computers, and engines. In [3DprintedLife’s] case, he made a compressed air engine of the Wankel style.

The Wankel — a rotary engine — is most famous for its use in some Mazda cars. If you’ve done a lot of 3D printing, you know that creating an air-tight piston on a 3D printer is no mean feat. Of course, he didn’t do it right off the bat. It took what looks like a number of iterations to get it going, and he shares some of what he learned doing this project.

Continue reading “3D Printer Air Compressor Is A Wankel”

Ask Hackaday: What’s Your Favourite Build Tool? Can Make Ever Be Usurped?

What do you do whilst your code’s compiling? Pull up Hackaday? Check Elon Musk’s net worth? Research the price of a faster PC? Or do you wonder what’s taking so long, and decide to switch out your build system?

Clamber aboard for some musings on Makefiles, monopolies, and the magic of Ninja. I want to hear what you use to build your software. Should we still be using make in 2021? Jump into the fray in the comments.

Continue reading “Ask Hackaday: What’s Your Favourite Build Tool? Can Make Ever Be Usurped?”

Monitor SpaceX Rocket Launches With Software-Defined Radio

The amateur radio community has exploded with activity lately especially in the software-defined radio (SDR) area since it was found that a small inexpensive TV tuner could be wrangled to do what only expensive equipment was able to do before. One common build with these cards is monitoring air traffic, which send data about their flights out in packets over the radio and can easily be received and decoded now. It turns out another type of vehicle, SpaceX’s Falcon 9 spacecraft, reports data via radio as well and with some slightly upgraded hardware it’s possible to “listen in” to these flights in a similar way.

Reddit users [derekcz] and [Xerbot] used a HackRF module to listen in to the Falcon 9’s data transmissions during its latest launch. While the HackRF is a much more expensive piece of equipment compared to the RTL-SDR dongles used to listen in on aircraft, it is much more capable as well, with a range from 1 MHz to 6 GHz. Using this SDR peripheral as well as a 1.2 m repurposed satellite dish, the duo were able to intercept the radio transmissions from the in-flight rocket. From there, they were recorded with GNU Radio, converted into binary data, and then translated into text.

It seems as though the data feed included a number of different elements including time, location information, and other real-time data about the rocket’s flight. It’s a great build that demonstrates the wide appeal of software-defined radio, and if you want to get started it’s pretty easy to grab a much cheaper dongle and use it for all kinds of applications like this. Go check out [Tom Nardi]’s piece on the last seven years of RTL-SDR to get caught up to speed.

Thanks to [Adrian] for the tip!

Drone Boat Sails Seattle

Thanks to the availability of cheap, powerful autopilot modules, building small autonomous vehicles is now well within the reach of the average maker. [rctestflight] has long been an enthusiast working in this space, and has been attempting long range autonomous missions on the lakes of Washington for some time now. His latest attempt proved to be a great success. (Video, embedded below.)

The build follows on from earlier attempts to do a 13 km mission with an airboat, itself chosen to avoid problems in early testing with seaweed becoming wrapped around propellers. For this attempt, [Daniel] chose to build a custom boat hull out of fiberglass, and combine both underwater propellers and a fan as well. The aim was to provide plenty of thrust, while also aiming for redundancy. As a bonus, the fan swivels with the boat’s rudder, helping provide greater turn authority.

After much tuning of the ArduPilot control system, the aptly-named SS Banana Slug was ready for its long range mission. Despite some early concerns about low battery voltages due to the cold, the boat completed its long 13 km haul across the lake for a total mission length of over three hours. Later efficiency calculations suggests that the boat’s onboard batteries could potentially handle missions over 100 km before running out.

It goes to show that, even with an off-the-shelf autopilot and mapping solution, there’s still a huge amount of engineering that goes into any successful long-range mission, whether land, sea or air.

Continue reading “Drone Boat Sails Seattle”

Playing Youtube Videos At Incredibly Low Resolution On LEDs

Since the high-definition era, screens with many millions of pixels have become commonplace. Resolutions have soared into the stratosphere, and media has never looked clearer or crisper. However, [gatoninja236] decided to go the other way with this build – an LED matrix capable of playing Youtube videos.

The execution is simple. A Raspberry Pi 3, with the help of a Python script, downloads a Youtube video. It then runs this through OpenCV, which parses the video frames, downconverting them to suit a 64×64 pixel display. Then, it’s a simple matter of clocking out the data to the 64×64 RGB LED matrix attached to the Raspberry Pi’s IO pins, where the video is displayed in all its low-resolution glory.

Is it a particularly useful project? No. That doesn’t mean it’s not without value however; it teaches useful skills in both working with LED displays and video data scraped from the Internet. If you simply must have more pixels, though, this ping pong video wall might be more to your liking. Video after the break.

Continue reading “Playing Youtube Videos At Incredibly Low Resolution On LEDs”