Archive for the ‘DIY’ Category

Power Glove Updates, Maker Faire Bay Area

Sunday, May 24th, 2009

Over the past few weeks I’ve been working on some improvements and extensions to my Power Glove 20th Anniversary Edition. On the tech side of things, I replaced the ugly 9V battery I was using with a low-profile, rechargeable Lithium-Polymer battery. I’ve updated the steps in the Instructable with new pictures and instructions.

I also re-wrote my Java-Unity bridge using a UDP socket. This is a lot more elegant than the text file approach I had been using before. Now the Java program acts as a server, reading in serial data from Bluetooth and broadcasting each line as a UDP packet. The Unity input manager then reads the UDP packets and parses the actual sensor values. This should reduce disk writes, and is more reliable, so I don’t have to reset the Java bridge as often. I’ve updated the code bundle with the new Java and Unity source code.

See me at Maker Faire!

The other big news is that I’m going to be exhibiting at Maker Faire Bay Area! Maker Faire is one of my favorite gatherings — a fantastic nexus of creative people making wonderful things. If you’re in the Bay Area, you can come try the Power Glove out for yourself this weekend, May 30-31, at the San Mateo County Expo Center!

As a bonus for Maker Faire attendees, I’ve finished adding Power Glove support to our most popular Blurst game, Off-Road Velociraptor Safari! I recorded a demo video to show it off:

Make the Future You Imagined: The Power Glove — 20th Anniversary Edition

Friday, April 3rd, 2009

I always loved the Nintendo Power Glove. Not because it was a fun or useful peripheral — it wasn’t. In fact it wasn’t bad, as Lucas asserted, it was absolutely terrible. Only two games were ever made to work with it — Super Glove Ball and Bad Street Brawler. You could use it with other NES games of course, but it was just an obfuscated controller. Plus, it was horribly imprecise, and since it required a sensor bar to find its orientation, you had to hold your hand at shoulder level all the time. No, I loved the Power Glove for what it represented — a precursor to virtual reality, a way for humans to directly manipulate computers, like an artifact from some sort of alternate future Earth.

I realized one day that we’re actually living in that future. It doesn’t look the same as we imagined it, but the necessary elements are all there. It’s been 20 years now since Mattel released the Power Glove, in 1989. Especially in the last few years, the availability of sophisticated sensing equipment to hardware hackers has grown by leaps and bounds. Technology like programmable microcontrollers, accelerometers, and Bluetooth are readily available — and cheap. In short, the time is ripe to re-make the Power Glove — and make it right.

Over the past month, I’ve done just that. I stripped the guts out of an original Power Glove, replaced the ultrasonic sensors with an accelerometer, the proprietary microcontroller with an open-source Arduino, and the wired connection with Bluetooth. I wrote an input manager to get the data into Unity, and hooked it up to the boxing game Adam and I are making for iPhone, Touch KO. What’s more, I’ve documented the whole process so that you can make you own!

I have a video, photos, and an instructable of the build process, and have the schematic, Arduino, and Unity code available for download. You can read the data in any way you like, but since many software packages don’t have direct access to serial ports (Unity included), I’ve also written a small Java program that takes the input and dumps it directly to a text file.

Side note: Since my last post I tried and now totally dig twitter. Follow me.

Cable Wrangling — Making Your Own Ribbon Cables

Friday, February 20th, 2009

I’m working on a larger-scope project right now that involves collecting a lot of sensor data with an Arduino to transmit over Bluetooth. For past projects, I’ve relied mostly on individually cut wires, but even if you use heat-shrink tubing or the like to bundle them up, they’re still a pain to keep in order. Consumer electronics often use ribbon cables for this sort of thing when they can’t just run traces on a board. I realized that I could make custom cables using the ribbon cables from old floppy and CD drives. With a steady hand and a utility knife, cut off the number of cables you need, cut them to length, and split and strip the ends. Voila — custom-sized ribbon cables, and a great way to recycle old computer parts!

3.5 inch floppy drive ribbon cableVoila - custom ribbon cable!

More Citations and a Camera Mount Field Test

Saturday, March 15th, 2008

Here are a couple updates regarding previous projects. I’ve been spending free time lately reading, but I should have some new stuff soonish.

[citation needed] stickers have been slowly showing up in new places. I’ve still got a number left, so if you want a few, just send me an email or a message via Flickr. A few from around Tempe and San Francisco are in the Flickr tag pool:

Inclusive community [citation needed]I'm willing to bet I've had something similar

I especially dig this one from Flickr user cutlerite:

Boise State ROTC

Reason Magazine also recently published a short article about the project, in their March issue. Don’t be afraid — they’re much nicer Libertarians than some of the Randroids I’ve met!

I also finally had a chance to really test my bicycle camera mount — the lead-up to the Game Developers Conference had left me with little time for biking anywhere other than work. I went riding with Matthew and took a few shots as well as this video:

On a side note I don’t recommend trail riding with this particular mount — the constant jostling broke the conduit hanger I was using to mount the tripod head. Luckily it’s the cheapest piece at only 50 cents, but the weight of the assembly demands something a bit sturdier than cheap plastic if you’re going to be navigating bumpy terrain!

Drunkpong: An excuse to make a USB Breathalyzer

Tuesday, February 19th, 2008

You’re throwing a party for the Game Developers Conference and you think it would be cool to have a custom game. What’s the natural response? How about Pong that adapts its difficulty based on how drunk you are!

Among my numerous interests is custom hardware for games and interactive art. When my friend and coworker Matthew Wegner suggested the idea of making a breathalyzer peripheral for a party game at GDC, how could I respond with anything but, “Hahahaha, Hells YES! I am ON that!”

I started by researching the various consumer breathalyzers. In the end I decided to hack the Alcoscan AL2500. It provides readings within a reasonable error tolerance and costs about $30 on Amazon — much cheaper than fuel cell meters. Upon opening it up, I found that it’s set up pretty simply. It’s driven by an ATMEGA48V-10AU microcontroller, with the semiconductor sensor connected to an analog input, and digital outputs that drive a simple seven-segment style LCD.

Alcoscan AL2500 BreathalyzerBoard, back. Simple AVR microcontroller with sensor as an analog input and LCD as digital outputs

As I saw it, there were basically two options for obtaining the data from the breathalyzer and sending it to the computer. On the one hand, you could read the analog value from the breath sensor, or on the other hand, you could reconstruct the LCD digits from the digital outputs. Since the analog circuit driving the sensor was a little complicated and beyond my expertise (and I’d procrastinated enough that learning more before GDC was out of the question), I decided to reconstruct digits. I first followed traces on the PCB to find which pins on the microcontroller were driving the LCD. I then systematically grounded each pin while turning the unit on to determine which pins drove which LCD segments.

Mapping out which pins control which LCD segmentsPin cross reference for AVR microcontroller and LCD

I then soldered wires to the relevant LCD outputs on the board (the connectors were nice and big compared to the microcontroller pins). I spent a bit of time determining which outputs from the LCD I wanted to read. As it turns out, you only need five segments from a seven-segment digit to determine the numerical value of the digit — the bottom and bottom right segments are superfluous (see Matt Mets’s recent post, who solved the problem independently). I ran a total of eleven wires — two digits for the BAC level and one wire for the “Wait” indicator — into digital inputs on an Arduino Diecimila. The Arduino code ended up pretty simple — it reconstructs two digits and the status of the “Wait” indicator and transmits these serially via USB.

You only need to observe five segments of a seven-segment display to know which number is displayedSoldering more wires - first digit done

I then read the serial data in using the Java RXTX library and spit it into a text file, which I then read in from Unity. The game then makes the paddle size larger the drunker you are!

Waiting for the player to use the breathalyzerPlaying with Player 1 significantly drunk

The hardware is of course begging to be used in other ways — how about a program that locks you out of Ecto and your forum accounts when you’re right trashed? No more embarrassing comments that you can’t take back! I may go back and make a more sophisticated game in the future — Pong was about the right scope for the single day of development time I had left after handling the hardware and serial transmission!

I’ll have the game up for play at the 9Bit indie games party Tuesday night — if you’re at GDC just find folks from Flashbang, Gastronaut, or ThatGameCompany to get an invite and drink tickets! I’ll post an Instructable and some more information about the software when time permits. Extra special thanks to Becky Stern and Matt Mets for their advising on the hardware interface!

A Quick Release Bicycle Camera Mount

Sunday, January 27th, 2008

Since buying my bike, I find myself cycling pretty often and I usually bring my camera along to take pictures. Usually taking photos involves stopping and fumbling around in my backpack for the camera — not an ideal situation. Naturally, the first thing I started thinking about after buying the bike was, “How can I mod this to make it uniquely mine?” While looking through Instructables for ideas, I found instructions for a bicycle camera mount. It dug it, and it had the benefit of being cheap, but was a little feature-anemic. Specifically, it couldn’t tilt at all, so would result in unlevel pictures on my bike, and it wasn’t easy to remove the camera — you had to unscrew it from a bolt for unmounted shots. I immediately thought of tripods with quick release plates and decided on a simple remake using a tripod head. I made and attached it this weekend, with pretty excellent results! Now I can make photos while biking and easily transition to hand-held shots when I see something cool on the roadside!

I published an Instructable for anyone interested in making one, and have a photoset up on Flickr.

PartsDrilling the bracket to attach the mounting bolt
Finished bracket with cotter pin screw insertedFinished mount assembly, front
A sample photo taken along a canal - it's pretty level!

Sun Jars

Sunday, December 16th, 2007

I saw an Instructable for these neat LED-lighted jars some time ago – I thought it would be cool to make a couple to leave in my room. It’s a very simple hack – you gut a solar garden lamp, replace the LED if desired, and then place the parts into the lid of a large-mouth jar. Then simply do something to diffuse the light emitted – I used a glass frosting paint but you could just as easily add in a sheet of tracing paper or the like. I ended up making four – they turned out very nice, and I gave two away at the Phoenix DIY Meeting. Full Flickr photoset.

Really, there weren't many construction photos to take, but here's the garden lamp guts being epoxied to the jar lidsThe energy of the sun, collected in jars!

LED Bike Helmet

Wednesday, November 28th, 2007

After getting my new bike, it was clearly project time. But what to do first? There are plenty of interesting things to do with a bike, but what cinched it was my light being stolen. I decided to mod my helmet by adding LEDs, so that I’m more visible to cars and other cyclists at night, and as a backup against light failure or misappropriation. (also, mental masturbation – LEDs make anything cooler) I followed Becky’s Instructable for the most part, with a few modifications of my own. The basic idea is to use conductive paint to draw traces for the circuit, then attach the LEDs, battery, and switch with conductive epoxy, and finally use regular epoxy and a clearcoat to weatherproof everything. The switch used is a magnetic reed switch, activated by a magnet tethered to the helmet’s strap anchors. Full photoset on my Flickr account.

Testing the circuitMasking for conductive paint
Final configuration on my head - BackThe original design had a magnet with a hole in the center - I epoxied a small loop of wire to the magnet I had
Final configuration on my head - FrontA final touch

Replacing ls in OS X

Saturday, November 10th, 2007

Ever since I replaced my laptop with a MacBook in January of this year I’ve been impressed with Apple’s OS X – in fact I’ve moved over to using it entirely, having replaced my desktop with a Mac Pro in July. It has a very snazzy interface and overall good user experience, and underneath all that prettiness it’s running on BSD so I can hack away via terminal all I like. However, coming from a Linux background, I’ve found the color options for the default BSD ls command lacking. With the GNU ls, you have a very large degree of control over how things look by using the .dir_colors file in your home directory. With that in mind, I decided to replace the default ls using this simple method.

First, install XCode Tools, found on the original OS X disc. Alternatively, you can download it from Apple, though it’s about 1GB. There are a number of useful developer tools included, but what you really want is gcc, the GNU C Compiler. (If you do much programming, you’ve probably already installed this) The idea here is we’re simply going to compile the GNU ls and dircolors for our Mac. If you’ve used Linux much, you’ll recognize the steps exactly.

Next, download the newest version of coreutils from the GNU FTP. Pop open a terminal and make a temporary directory, then decompress the archive – for instance tar -xvjf coreutils-6.9.tar.bz2

Enter the directory created from decompressing coreutils. Now we’ll compile for our system. Simply run ./configure and then make when it’s done. If either configure or make gives you any guff, you probably just need a new version of XCode Tools/gcc.

Presuming that all went well, we’ve now got a new ls binary ready to go. To backup your old one (and its man pages) and replace it with the new, simply run:
sudo mv /bin/ls /bin/ls.bak
sudo cp src/ls /bin/ls
sudo cp src/dircolors /bin/dircolors
sudo mv /usr/share/man/man1/ls.1 /usr/share/man/man1/ls.1.bak
sudo cp man/ls.1 /usr/share/man/man1/ls.1
sudo cp man/dircolors.1 /usr/share/man/man1/dircolors.1

Don’t forget to trash the coreutils directory once you’re done with it.

Now all you need to do is run ls --color=auto to get colored output. I suggest adding the line alias ls='ls -hF --color=auto' to your .bash_profile file. This makes ls color-code output, as well as giving helpful symbols to indicate executable/directory/etc status and displaying file sizes in a human-readable format.

To get the full benefit of the color system, you’ll also want to create a .dir_colors file in your home directory, and have dircolors run when you start a shell. Add a line to your .bash_profile such as eval `dircolors`. You may download my .dir_colors and modify it if you like. With all that done, you can get pretty results like this:

ls with colors!

TV-B-Gone

Thursday, November 8th, 2007

After playing with one of these little fellows last weekend I resolved that I had to have one of my own – I can’t stand TVs in restaurants in particular, or ones that do nothing but play ads in stores. So I ordered up my own kit and assembled it per Limor’s instructions. A selection of the photos:

In developmentA lovely infrared glow
Completed TV-B-Gone

It had been about a year and a half since I’d had a chance to solder anything, which I realize now was far too long! Luckily, soldering seems to stick like bike riding – my joints were as clean and pretty as ever! Now just to test it out!