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”

Overhaul An Old Mechanical Keyboard

Deskthority forum user [lowpoly] recently posted a writeup on his complete overhaul of an Apple M0110  mechanical keyboard.  Any one familiar with the satisfying clack of a good mechanical key under their fingers can appreciate the effort put into this project.

[lowpoly] removed the keyboard’s PCB, rewired the key matrix adding diodes, built in a teensy USB board, broke apart the mechanical switches and fit replacement springs and finally applied a generous portion of retr0bright to all of the aging plastic. Since the teensy has no mounting holes [lowpoly] had to create a mounting assembly out of some spare plastic. A usb mini cable is even fitted into the original RJ-11 connector.  To compensate for the lack of PCB the key assembly was fitting with some rubber washers. To top off the whole thing some nice new rubber feet were taped to the underside of the M0110.

[lowpoly] reports that with the foam, new springs, and lack of PCB the keyboard is much quieter and easy to use.  The end result is a slick retro looking modern keyboard. If you’ll excuse us we have to go rooting through some old storage bins to find our own ancient keyboards.

We have seen our share of vintage keyboard hacks which can be useful, impressive and sometimes just odd. This build keeps it down to a nice simple, functional, useful retrofit. Nice work!

FrankenKindle: Building An Alternate Kindle Keyboard

If you’ve ever thought the Kindle keyboard was a bit cramped you’re not alone. [Glenn’s] been working on developing an external keyboard for the Kindle for quite some time. It may not make easier for everyone to use, but he’s motivated to improve usability for his sister who has Cerebral Palsy.

We see a lot of keyboard hacks that solder straight to the pads under the buttons, but for a compact device like the Kindle this would really mess things up. Instead of going that route, [Glenn] sourced a 20-pin Flexible Flat Cable and breakout board that match the internal Kindle connector. The prototype seen above uses a TS3A5017 serial multiplexer chip to simulate the keyboard button presses. That multiplexer is driven by a Teensy++ microcontroller board which is monitoring a larger set of buttons on the V.Reader seen above. Check out the video after the break for a brief demonstration, then look around at the rest of [Glenn’s] blog posts to view different steps of the development cycle.

Continue reading “FrankenKindle: Building An Alternate Kindle Keyboard”

Impressive Steampunk Keyboard

This amazing steam punk keyboard was sent in to the tip line, and while it’s not necessarily a ‘hack’ in the purest sense, the level of quality in the build is incredible.

Each key was crafted from brass tubing that was later filled with a wooden dowel and covered with the key cap label. While there’s no mention of how the key caps were made, we do especially like the abstract Windows Key label. After the PCB for the keyboard matrix was enclosed in a bit of plywood, the hand tooled leather was applied to the front. The name plaque that was hand engraved with a modified screwdriver is especially nice.

The build is based around the amazing Das Keyboard with Cherry Blue switches, one of the only keyboards currently being manufactured that comes close to the feel of the One True Keyboard. While it’s not a keyboard built from scratch, it’s still one of the best steampunk builds we’ve seen, most likely because not a single gear was glued to the project.

UPDATE: Playing Piano With Optical Sensors

[Sebastian Steppeler] has been hard at work on his optical sensors for an electric piano. When we looked in on the project back in October he was testing reflective sensors to increase responsiveness and MIDI data resolution for his electric keyboard. Since then he’s finalized the sensor circuits and produced enough boards to monitor all 88 keys on this full keyboard. You can see the string of PCBs just above the ivories, waiting to be installed. Not only are then in, but he also added sensors for the pedals.

Because the boards were installed by hand, there are some variances in the physical placement. This can have a rather dramatic effect on the readings from the reflective sensors so he has been working out a method of balancing the calibration. Part of this is already being taken care of by the C# interface that he wrote for a PC. Take a few minutes to check out all of his blog posts, then jump down after the break and hear how great it sounds.

Continue reading “UPDATE: Playing Piano With Optical Sensors”

Vintage Peripheral Hacks Roundup

A few days ago, we featured an Apple ][ USB keyboard mod, and several readers chimed in sharing their own retro conversions in the comments section. We had no idea that many of you had made similar modifications of your own, so here’s a quick roundup of what your fellow Hackaday readers have put together.


Optical Atari STM1 Mouse

atari_stm1_usb

[JJ] had a 25-year old Atari STM1 mouse sitting around and was wondering how to get it to work with his new computer. Instead of interfacing the old mouse with his computer via a custom circuit board, he gutted the STM1 and replaced the innards with those of a much newer optical mouse. He did a bit of trimming to get the new PCB to fit, aiming the optical sensor through the now-empty “ball hole”. According to [JJ] it works just as good as it looks.


ZX Spectrum USB keyboard conversion

sinclair_zx_spectrum_usb

[Lee] is a sucker for vintage hardware, and with the help of his friend [LanceR], resurrected an old Sinclair ZX Spectrum computer into a working USB keyboard. After replacing the deteriorated membrane, the pair mapped out the keyboard to figure out how the matrix was wired. With that done, they built a prototype USB interface board, which they later replaced with a proper PCB.


BBC Master Compact USB keyboard conversion

bbc_master_compact_usb

A friend of [MoJo’s] had a BBC Master Compact computer from back in the day and wanted to have the keyboard converted to USB in order to use it with certain emulators. [MoJo] gladly took on the project, stripping some of the old motherboard components out to make room for his new circuitry. He built a USB interface board around an ATMega162, and even got the old built-in speaker working properly. From the outside, the keyboard looks like it has never been touched – nice job!

Apple ][ Converted Into USB Keyboard

Sometimes it’s apparent that there is no practical use for something featured on Hack a Day, but we don’t know if [Andrew Filer]’s Apple ][ USB keyboard qualifies for this.

After reading through the very thorough documentation available in electronic and dead tree formats, [Andrew] decided that Apple ][ would make a great USB keyboard. Unlike modern keyboards, vintage computers like the TRS-80, Commodore 64, and the Apple ][ return the 7-bit ASCII value of the key instead of a scan code. The ASCII codes generated by the keyboard were sent through a Teensyduino running [Andrew]’s keyduino sketch.

Modern PS/2 keyboards use MAKE and BREAK scan codes sent from a microcontroller that reads the keyboard matrix. For example the MAKE code for the letter ‘A’ is 1C, while the BREAK code is F0 1C. There is a reason for this design, but for the DIYer, interfacing a keyboard becomes a challenge without a separate microcontroller. We’re thinking [Andrew]’s keyduino could be a great way to put a keyboard in a project, but we’re not about to tear up our Apples and C64s to get a keyboard.