Bootstrapping Motion Input With Cheap Components

Motion control is a Holy Grail of input technology. Who doesn’t want an interface that they can control with simple and natural movements? But making this feel intuitive to the user, and making it work robustly are huge hills to climb. Leap Motion has done an excellent job creating just such a sensor, but what about bootstrapping your own? It’s a fun hack, and it will give you much greater appreciation for the currently available hardware.

Let’s get one thing straight: This device isn’t going to perform like a Leap controller. Sure the idea is the same. Wave your hands and control your PC. However, the Leap is a pretty sophisticated device and we are going to use a SONAR (or is it really SODAR?) device that costs a couple of bucks. On the plus side, it is very customizable, requires absolutely no software on the computer side, and is a good example of using SONAR and sending keyboard commands from an Arduino Leonardo to a PC. Along the way, I had to deal with the low quality of the sensor data and figure out how to extend the Arduino to send keys it doesn’t know about by default.

The Plan

The plan is to take an inexpensive SONAR module (the HC-SR04) and an Arduino Leonardo and use it to perform some simple tasks by mimicking keyboard input from the user. The Leonardo is a key element because it is one of the Arduinos that can impersonate a USB keyboard (or mouse) easily. The Due, Zero, and Micro can also do the trick using the Arduino library.

I wanted to determine how many gestures I could really determine from the HC-SR04 and then do different things depending on the gesture. My first attempt was just to have the Arduino detect a few fingers or a hand over the sensor and adjust the volume based on moving your hand up or down. What I didn’t know is that the default Arduino library doesn’t send multimedia keys! More on that later.

Continue reading “Bootstrapping Motion Input With Cheap Components”

Foam And Antistatic Bag Bring Vintage Compaq Keyboard Back To Life

After winning an online auction for an 1980s vintage Compaq Portable PC, [leadacid44] discovered why it only cost him $5USD – the keyboard was shot. Not willing to accept having forked out $45USD to ship a brick, he tore into the ancient machine and came up with a found-material solution to the wonky keyboard.

[leadacid44]’s very detailed writeup of the fix for his Compaq includes a thorough examination of the guts of the machine. He got it to boot to MS-DOS 5.0 off of a 20MB ISA hard drive card and began probing the keyboard problem. It turns out the Compaq keyboard has much in common with a modern touchscreen, in that it’s a capacitive keyboard. Unfortunately the foam disks used as springs under each key cap had degraded over the last 30 years, so [leadacid44] began a quest to replace them. After much experimentation and a few false starts, he created a sandwich of transparency film, closed-cell polyethylene foam, and a Mylar antistatic bag. Many discs were punched out with a leather punch and tediously placed in the body of each key switch, and the quick brown fox was soon jumping flawlessly over the lazy dog.

We’ve seen some fixes to these lovable luggables before, like this dumpster queen that became a Hackaday Retro submission. At least [leadacid44]s machine didn’t release the Magic Blue Smoke like that one did.

Quick Keyboard Hack To Control Heavy Loads

When you want to control an external device (like a lamp) from your computer, you might reach for a USB enabled micro. Looking for an inexpensive and quick option to control two lamps [Pete] wanted to control a couple 12 volt halogen lamps, he reached for his keyboard and used a little bit of python.

Desktop PC keyboards have 3 LED’s indicating lock functions, hardly anyone uses the scroll lock, and on a laptop with no keypad, numlock is no big loss as well. Adding wires to the little PCB out of a USB keyboard the numlock and scroll lock LED’s 5 volt output was redirected to a switching circuit.

That switching circuit takes the output of either LED, inverts it with a PNP transistor, then connects to the gate of a FQP30N06L, “logic level” mosfet transistor to handle the heavy lifting. Once the wiring is in place a fairly simple Python script can take over turning on and off the two chosen lock keys, giving  control of up to 32 amps with the touch of a button.

Use Your Mouse Pointer To Send Data

[Ido Gendel] was thinking about new and interesting ways to send data between devices, when he realized that the answer was right in his hand. Literally: he decided to try sending data using the mouse pointer. What he came up with was an interesting hack that uses small movements of the mouse pointer to send data at up to 1200bps, or about 150 bytes per second.

The way he did this was very, very clever. He used an Arduino Leonardo that is set to emulate a mouse, working alongside his existing mouse. This setup means that he can use his existing mouse: the system just sees the Arduino as a second mouse, and the pointer just looks a little jerky when you zoom in. That is because the Arduino is just sending tiny movements, each of which is a code that represents a nybble (4 binary bits) of data. By using both a combination of three left-right or up-down movements, he was able to create 16 movements, each of which can encode 4 bits of data. Each of these encoding movements also returns the mouse to its origin point, so the mouse doesn’t mysteriously scroll off the screen when data is being sent.

Continue reading “Use Your Mouse Pointer To Send Data”

Turning A Typewriter Into A Mechanical Keyboard

Is your keyboard too quiet? Is your Cherry MX Blue board not driving your coworkers crazy enough? If the machine gun fire of a buckling spring keyboard isn’t enough for you, there’s only one solution: [Russell]’s typewriter turned into a mechanical keyboard.

Converting typewriters into keyboards has been done for a very long time; teletypes, the first computer keyboards, were basically typewriters, and the 1970s saw a number of IBM Selectrics converted into a keyboard with serial output. Even in recent years, typewriters have been converted into keyboards with the help of some switches and an ATMega. [Russell]’s mechanical keyboard improves on all of these builds by making the electronic interface dead simple, and a project that can be done by anyone.

Instead of installing switches underneath every key or futzing about with the weird mechanics of a Selectric typewriter, [Russell] is only installing a touch-sensitive position sensor into the frame of the typewriter. When a key is pressed, it strikes a crossbar in the frame of the typewriter. With a single ADC chip and a Raspberry Pi, [Russell] can determine which key was pressed and use that information to output a character to a terminal.

It’s a very simple solution for an electrical interface to a mechanical device, and the project seems to work well enough. [Russell] is using his new keyboard with Vim, even, something you can check out in the video below.

Continue reading “Turning A Typewriter Into A Mechanical Keyboard”

Microsoft Display Cover

E-Ink Display Moves On-Screen Controls Off-Screen

Tablet computers have come a long way, long way. It finally seems like they’ve found their niche in the market, and now maybe they can catch up to more traditional computers. The Microsoft Applied Sciences division came up with a cool prototype design for a new tablet, one with a secondary e-ink input display.

The tablet interface makes use of e-ink strip above the keyboard. While it might not seem like much, this frees up a bunch of screen real estate, allowing you to have various icons and shortcuts off screen. It makes a ton of sense for digital artists as they can draw on the screen, but also have their toolkit open right below them — almost like real painting/drawing.

One of the other great uses for something like this is a signature pad — with everything going digital, when is the last time you had to print, sign, and scan a document back to someone? They even developed a dedicated email app you can use solely on the e-ink screen, allowing you to maximize the use of your main screen for something like a video chat.

The demo is pretty cool, and we often wonder why there aren’t more phones with e-ink displays integrated into them — is this just the beginning?

Continue reading “E-Ink Display Moves On-Screen Controls Off-Screen”

Shinewave Gamecube Controller Reacts To Smash Brothers

[Garrett Greenwood] plays Smash Brothers, and apparently quite seriously. So seriously that he needed to modify his controller with five Neopixels so that it flashed different color animations according to the combo he’s playing on the controller; tailored to match the colors of the moves of his favorite character, naturally.

All of this happens with an ATtiny85 as the brains, which we find quite ambitious. Indeed, [Garrett] started out thinking he could simply read each of the inputs from the controller directly into the microcontroller at the heart of the whole thing, but then counted up how many wires that would be, and looked at how many pins he had free (six), and thought up a better solution.

[Garrett]’s routine instead reads the single line that the Gamecube controller uses to send back to the console. The protocol is well understood, using long-short and short-long signals to encode bits. The only trick is that each bit is sent in four microseconds, so the decoding routine has to be fairly speedy. To make it work he had to do quite a bit of work. More about that, and the demo video, after the break.

Continue reading “Shinewave Gamecube Controller Reacts To Smash Brothers”