Bonnie Eisenman bio photo

Bonnie Eisenman

Software engineer, author, knitter, Esperantist. Member of NYC Resistor and author of Learning React Native.

🐦 Twitter 🤖 Github 🔶 RSS Feed

Turn any staircase into a piano!

For HackPrinceton in Fall ‘13, I really wanted to do something fun and creative for my hardware hack. So, I took the title of the hackathon literally and “hacked” a piece of Princeton by turning a staircase into a set of piano keys. Each stair is keyed to a different pitch. Watching people discover the stairs was a great experience, and I’m really pleased with how it turned out. The Piano Stairs won 2nd place in the hardware track.

Experiencing the Piano Stairs

Really, the best way to explain this is by watching the video. :)

So, here’s the setup. Flashlights on one side, photo-resistors on the other. A Raspberry Pi + Arduino Uno + speakers at the bottom. All the wires (there were a LOT of wires) were taped to the side of the stairwell, and were not usually noticed by people on their way downstairs (most people don’t look down, I guess).

But then! They stumble over the stairs, hear the notes, and are startled. Usually, then they start running up and down as much as they can. A few people played actual songs.

It was really fun to watch people interacting with the space. Especially the handful of children who were wandering around with their parents – they were huge fans.

Difficulties and TODOs

The biggest struggle was with getting a reliable, consistent “tripwire” for the notes. At first we didn’t have any external light source, and could only detect steps that were extremely close to the sensors. Then we tried laser pointers, but they were too narrow and thus oversensitive; they wobbled too much. Finally, Erica rushed to CVS and purchased some flashlights. Lo and behold, these worked really well.

There’s a lot of room for improvement. First of all, flashlights are really wasteful, don’t last very long, and are highly visible. (I still haven’t decided whether or not I want it to be obvious that these are piano stairs.) I would really like to move to IR sensors instead of visible-light sensors.

Secondly, the Arduino isn’t really necessary here; I could switch to reading in photoresistor values directly from the Raspberry Pi, which would make more sense.

Finally, in a crowded space, my speakers began to be overwhelmed! That was unfortunate, but perhaps unavoidable, and easy to rectify with more expensive/louder speakers.