Interfacing with a PS/2 Keyboard

Anyone reading this post has undoubtedly used a keyboard. How they work, however, is a bit more complicated than “one button, one input.”  [PyroElectro] has a great tutorial about building a PS/2 keyboard interface with a 7-segment LED display (video after the break). The tutorial also includes quite a bit of theory behind it.

The system displayed below uses a PIC controller to display the letter or number pressed. A schematic of the whole project is given here as well as a detailed bill of materials.

As for how the PS/2 keyboard works, each keystroke is encoded into a binary number or “scan code”. Most of these codes are 8-bit, but some special symbols use a longer code. Although the article doesn’t fully address it, a very similar method can be used to send data back to the keyboard for such purposes as tuning on a “capslock” or “numlock” key. Although turning on a light is fun, we could see this being used as an expedient method to control a relay for automation purposes.

Continue reading “Interfacing with a PS/2 Keyboard”

God’s own keyboard, now with Bluetooth

For decades a thunderous roar rose from the bowels of IBM keyboards like the animus of angry and forgotten gods. These keyboards have fallen silent of late, due only to incompatibility with newer hardware. Now, Model Ms have been given a reprieve from landfills or recycling centers because of the work of [wulax] of geekhack and his Model M Bluetooth controller board.

Continue reading “God’s own keyboard, now with Bluetooth”

Be lazy, and get somewhere at the same time

Cruise the beach in comfortable Jamaican style with this motorized hammock. [Stephen Shaffer] and his friends built it for the Red Bull Creation contest which has as its number one requirement, the need to include an Arduino. We’re basically looking at a hammock frame made out of square pipe that has been put on wheels. Watch the video after the break to see the prototyping, construction, and final product. Looks like originally the electric wheelchair base that’s used for propulsion was centered below the hammock. One sharp turn and the rider/operator gets dumped out on the concrete.

The final version includes a couple of wheels that serve as outriggers, keeping the vehicle upright. A PlayStation 2 controller is used for steering and directional control. It’s polled by the Arduino, which then uses servo motors to control the original wheelchair joystick. At least that’s what we were able to figure out by watching the video.

Continue reading “Be lazy, and get somewhere at the same time”

Keyboard Converter 2 Pack

[REVENGE] pointed out a couple cool little project posts from the geekhack fourms converting vintage keyboards to USB with a Teensy. They both have VUSB support, so any avr micro controller that meets VUSB’s requirements in theory could be used.

First up is a PS/2 to USB keyboard converter, and while yes this has been done many times before, this one sports some extra features not often seen, like mouse keys, system and multimedia keys, and keymap customization. Instructions are also provided for use with a non USB enabled avr controller (like a mega 168, or 328) through the VUSB library (though with not all features available).

Next is pretty much the same thing, but it converts Apple Desktop Bus to USB, which is not exactly rare, but its lack of a clock serial signal, somewhat variable timing, and the fact that you wont find a bucket of Apple keyboards for a buck at the thrift store makes any ADB converter worth mentioning.

VUSB instructions seem to be the same for either, source is available and there are some cool pictures and info listed, and besides what is more fun than being able to plug your Model M into your netbook, or your Apple Extended Keyboard into your mac mini.

Flaming guitar hero

[Chris Marion] knew he wanted to play with fire, or more accurately with fireball spewing valves, but he need a good project in which he could use them. Inspiration finally struck and he built this controller that matches fireballs to the fret buttons on a Guitar Hero controller. There’s quite a lot that goes into this but we think that he hit a home run. The basic components are a manifold with electronically actuated valves, another manifold for the pilot lights, and a modified Guitar Hero controller.

To interface the controller he used an Arduino along with [Bill Porter’s] PS2 library to read signals from the buttons. But the real labor intensive part of the build came with the manifold. There’s a hardware store’s worth of fittings and flexible copper pipe that go into that assembly. In the end this all came together in just one week.

[Thanks Bill]

Sluggy Wind Speed Sensor

Sometimes when we look at a hack, its to see how someone chose those parts for the project. In this case, it would have been hard to see it coming. [Janne Jansson] decided to combine a set of measuring cups, a hacked Linksys NSLU2 NAS, and a PS/2 Mouse together to make a self-contained Wind Speed Sensor for his roof. The measuring cups act as wind catchers, which in turns drives the rotation of one of the mouse ball sensors. This data is then logged and transmitted by the NSLU2. The NSLU2 is running a custom Linux based firmware, similar to how OpenWRT works for wireless routers.

To calibrate the device, he also made the best logical choice: to duct tape it to the hood of his car along with a much more expensive wind sensor and use that data to make his own device as accurate as possible. When placed atop his house with a 1500VA 220V UPS, the device managed 250 days of uptime before meeting its demise. Those 250 days also included 5 days of being frozen solid, yet still transmitting (somewhat meaningless) data. All of the relevant code and build instructions are available, for those of you with similar parts to spare.

Czech Discovery Ressurects PS/2 Keyboard

Like us, you probably have piles of old PS/2 keyboards occupying strategic positions in your house and causing all sorts of trouble with the neighbours. As luck would have it, there is a way to put those lazy peripherals to work!

Our friends in the Czech Republic have successfully interfaced a PS/2 keyboard to an STM32 Discovery board (translated), and not a moment too soon—just in time for you to integrate their work into your entries for those juicy contests we told you about (the European one and the North American one).

The project page contains an in-depth walkthrough of how the PS/2 connection talks to the keyboard hardware along with source code and links, more than enough information to get started with a PS/2 keyboard hack on your Discovery application. And why stop at keyboards? Give your old PS/2 mouse a new lease on life, or even hook up your custom game controller to spice up the experience.