Interfacing With A PS/2 Mouse

[David] sent in his implementation of reading a PS/2 mouse with a PIC microcontroller and some LED displays. Of course, this follows hot on the heels of using a PIC with a PS/2 keyboard so now might be the time to start digging out your old peripherals out of your junk pile.

[David] began his project trying to figure out how to connect a mouse to his breadboard. After hacking the plastic off a PS/2 mouse extension cord, he wired everything up according to the pinout. Programming the PIC to understand PS/2 commands was a little strange. [David] is used to having his microcontrollers provide the clock signal. The PS/2 protocol is a bit strange as the peripheral sets the clock. Since PS/2 is a bidirectional protocol, the mouse also accepts commands. The host – [David]’s PIC – must send the mouse a command to start sending movement data.

Because USB keyboards and mice are backwards compatible with PS/2 ports, [David] tried out a few USB mice with a USB to PS/2 adapter. Every attempt at using a USB mouse failed. Strangely, when a Bluetooth mouse was tried (via Bluetooth to USB to PS/2), everything worked perfectly. Check out [David]’s PIC mouse demo after the break.

Continue reading “Interfacing With A PS/2 Mouse”

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.