- Project -

- Overview -

- The Switch -

- The Software -

- Future Enhancements -

- Email Me -




Chewie!!!



The Project

Of the many interesting projects I've worked on, "Chewie" is probably one of the most unique. Chewie is a normal computer tower with a fur(I think it's rabbit fur) coat. The computer has been modified so that it emits a number of sounds when you pet its outer fur coat.

The Chewie project was the product of the Tech293 and Tech294 classes during the winter and spring quarter of 2004. The "fuzzy computer" or "pimp computer" was built by a previous class as a project. I don't know exactly what they used to cover to computer case, but it appears to have been some sort of rabbit fur. In any case, it was quite soft and pettable.

Rudy(our instructor) decided we should pull the fuzzy computer out of storage and use it as our new router for the lab. While setting up the fuzzy computer, it was hard not to notice how irresitibly pettable the computer was. The next thing that came to my mind, naturally, was if it was possible to make the computer purr when pet.

Overview

The basic layout is pretty simple. At the top of the case there is a simple momentary switch that is connected to the microphone input on the sound card. The switch can be depressed by a metal plate approximately 2"x5" in size. This was placed under the fur at the top of the case for easy access.

After a bit of tinkering, I was able to reliably take samples from the microphone input on the sound card and detect a change when the switch was depressed. The next step was to automate this and do something interesting with the input. What developed was a perl daemon that runs at boot time, reads a configuration file, and plays a random .wav file - which can be customized via the config file - when someone pets the top of the case and depresses the switch. That's pretty much it.

This development was an immediate success. Suddenly, "Fuzzy Router" or "Pimp Computer" was no longer an adequate name to describe this machine, which had taken on an entirely new and interactive personality. In searching for new animal noises and .wav files to play, one of the students suggested a "Chewbacca" growl(ie. Star Wars) - hence the new name for this creature, "Chewie". Currently, Chewie makes purring, roaring, growling, and mooing sounds when pet.

The Switch

The speaker/microphone cable I used had four leads, two for "data" and two for the positive and ground wires. I simply connected the positive and ground wires to the switch and taped up the rest. The theory was that if the switch was depressed a circuit would be created that would be detected as input to the microphone. I didn't care what the input was, only that there was some sort of change that would indicate that a switch was pressed.

Eventually, the momentary switch proved to be a little too clunky, so I decided to look for a switch that was thinner and easier to depress. Ideally what I wanted was a 2"x5"(more or less) pressure mat type of switch with two leads. But this proved to be more evasive than I had previously thought. I found tons of momentary/tactile/membrane style switches, but nothing ready made or quite right for my purpose. I guess these types of things need to be custom made or something. Instead, I built my own pressure mat switch with a metal plate, a small copper spring, and an anti-static bag. This switch turned out to be much smoother and easier to depress.

The Software

Chewie is a Linux box. In particular he is running the Sentry Firewall CD which is based on Slackware Linux. The daemon that controls the switch is written in perl. There's really not much to the software, really. It uses the Audio::DSP module to constantly take input samples from the microphone. When an altered signal is detected, a threshold number is decremented. Once this number reaches zero the function returns success and a .wav file is then played. The sample rate and buffer size can be altered to make the switch more/less sensitive. Another threshold exists that causes the input function to time out and restart its sampling process. This ensures that the button is adequately depressed within a certain time frame. If it is not depressed for a long enough time the function restarts and the threshold variables are reset.

Here is the code.

Future Enhancements

The project so far has had a tremendous amount of positive feedback. Most of the students and faculty are amazed and amused with the concept of a purring/growling computer.

There are several problems, however, with the current implementation of Chewie -

Some possible enhancements include the following:

  • USB connection instead of input via the sound card. This would be much more versatile and user-friendly, but would require the development of a USB peripheral board to interface with the computer. There are few cheap ready-made solutions available, but of those there are a couple sub $30 boards that may work to interface USB with a simple switch. Otherwise, I'd have to build the interface board(PIC programming anyone?).

  • The usage of a Force Sensitive Resistor(FSR) type sensor switch may allow one to detect how hard a person is pressing on the case. For example, the computer could say "Ouch!" when it is hit, and purr when it is gently stroked :-)

  • OK OK! We'll use FAKE fur from now on... just don't hurt me! Interestingly, leopard or cow patterned variations are pretty common requests.






http://www.Sentry.net/
Copyright © 2004 Stephen A. Zarkos. All rights reserved.
Please send your questions or comments to the Webmaster.