Friday, March 30, 2012
Prototyping the Bumblebee
This is another project in progress. I love the idea of paper computing or paper electronics. I'm planning a print (à la Italian-speaking polar bear) which interacts with the viewer by making sound when approached. So I want the print itself to act as a (capacitative) sensor and a speaker. I've been sourcing electrically conductive paints and inks and even tried to make my own with graphite and block printing medium. I settled on Bare Paint which seemed the most user-friendly (though it is only available in black, I suspect because it's full of graphite). It's slightly tempermental as a block printing medium, but only slightly - which is great news as they never claimed it could do this. They have examples using it as a screenprinting medium, but usually screenprinting ink is less viscous. This 'paint' is quite thick and viscous so I'm really pleasantly surprised at how it performs in a block print. (They also produce an electrically conductive body paint so you can be a circuit and have blinkie LEDs shining on your skin, or your body can be a MIDI interface, if you so desire.) They even have a tutorial for how to make a capacitative sensor, which I followed. I combined their Arduino code (basically the CapSense library with slight tweaks) with some advice from Lady Ada's tutorial on using switches with Arduinos and Leah Buechley's Simple Arduino Audio Samples tutorial and the tutorial for paper speakers from the Kit-of-No-Parts by Hannah Perner-Wilson. There's no point in re-inventing the wheel, people. You'll have to turn your volume up to hear the buzzing, but it's there*. I believe the weird noise at the beginning, is because the start of the sample is being triggered repeatedly; I should be able to write better code to avoid that and go straight to the buzzing bumblebee.
As you can see, it worked in my demo, but it isn't yet very robust. Sometimes if I restart the Arduino it gets caught in a loop, constantly re-triggering the start of the sound sample. I plan to work on the code, and maybe play with the resistance accross the two pins to sense and receive the varying capacitance, and maybe add a small capacitor for stability. The other issue at the moment is power. I seem to be going through 9V batteries at an untenable rate**, so I hope to be able to switch to rechargeable AA batteries (and lowering the voltage, because no one want to deal with 6 batteries). Alternatively, I might get a 9V adaptor to power both the Arduino and the FET which switches the speaker on. That might be the way to go for the final product. Eventually, I'd like this to work with some very small parts; just the chip from the Arduino***, the FET, some resistors, maybe a capacitor, minimal wires or conductive thread or copper tape, a magnet, and power. I also need to find out if there is any difficulty having the sensor printed on one side of the sheet and the speaker on the other; after all, two conductors with paper sandwiched in between is by definition a capacitor so I wonder if I need any shielding or anything.
Also, I trained it to play the Ode to Joy (badly, from a musical perspective) employing the Tone function which outputs square waves at the frequency of notes. Now, don't you want to see what you could make your art do?
Note: If you're just here for pretty pictures and such and cannot make heads or tails of my descriptions of software or hardware, feel free to ask. I hope the above is comprehensible. If it isn't, feel free to let me know.
*thanks again Synap for the sound sample
**why don't they mark Amp-hours on these things?
***I think I'll have to use an ATMega chip, because the ATTiny only has 2K of memory and I don't think I can write a program and store 3 seconds of sound data in that little space.