Shower Time Machine
I tried to make a time machine using an AVR Tiny13 and a peanut butter jar. Okay, so maybe it’s not really a time machine, but it’s definitely a kind of trippy time-manipulator ala Doc Edgerton’s stroboscope experiments. Either way, it works and it’s pretty cool.
I’ve been teaching myself about electronics and microcontroller programming this year so I can use that stuff in some sculpture that I’m working on. As a simple beginning project I made this LED stroboscope with the intention of bringing it into the shower with me and adjusting the frequency of the strobing LEDs to match the flow of water droplets. If I got the frequencies to match, I supposed, I could make the droplets appear to stop in midair. Vary the frequency slightly and the droplets would start to flow backward or very slowly forwards. If you’ve been to the MIT Museum, you’ve seen something similar, but this one would be in the shower so it’d be so much cooler than being in a museum.
In the end, I found that the rate of water droplets isn’t really regular enough for it to work well. Using it with my ceiling fan or my overturned bicycle, however, was really freaking cool. In fact, it kind of scared me when the fan blades or bicycle chain looked like they were standing still – I really had to keep myself from touching them (and in turn, mangling my fingers.)
There are actually lots of other weird things that you can do with a simple strobe like this. It caused some pretty strange effects on the display of my digital camera when I was trying to take a picture of it in action. Another possible use for it came about when I realized that I could only play with this thing in the dark for 15 minutes before I wanted to puke. We had an angry family of squirrels under our deck and I thought about using that effect against them to make them leave. Luckily they left before I had to get future-weapon on their asses.
My original design was actually completely waterproof and consisted of two microswitches in the cap and a latex balloon being snapped onto the lid to keep everything dry. You’d be able to push the buttons to control the frequency (up and down). In the end, the shower thing wasn’t working out so well so instead I used the two cap holes for a toggle switch (on/off) and a microswitch (frequency). The microswitch keeps reducing the amount of time between flashes until it gets too fast, then it loops back to a slower strobe. The range of delays and the time that the strobe is actually ON are hardcoded in the software on the Tiny13.
The LEDs are some superbrights that I bought from Hong Kong on ebay – I thought I was getting a good deal, but their shipping charge scheme actually made it a not-so-good deal.
To smooth out the power from the 9V battery, I used a bit that I stole out of an Apple Airport. I don’t claim to know exactly how it works, but on an oscilloscope, it looks real nice-like so I used it. It’s not shown in the schematic, but that seems to be how these things usually look – they assume you’re smart enough to know that a voltage regulator and some method of smoothing out VCC are in there somewhere.
I’m still no expert, but I’ve gotten to the point where I can post the code here without being embarrassed. A month ago, I didn’t know anything about electronics, C or microcontrollers so be nice. Basically, it uses the 8-bit timer/counter of the ATTiny13 to turn the LEDs on and off at the appropriate times. The schedule for those ONs and OFFs are determined by the constants at the top of the program and by the microswitch that adjusts the OFF-time of the strobe. The code is better commented than most (mainly so I can remember what I did when I look back at it in a month) so it should be pretty self explanatory. This is a simple enough project that hopefully it’ll be of help to someone who’s just starting out with AVR microcontrollers. At the same time, I’m just starting out myself so let me know what I could have done differently.
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 License.
If this post is interesting to you, subscribe to this site.