A Maker by the name of Asahillis has designed a Photocell Piano powered by an Atmel-based (ATmega328) Arduino Uno. Originally posted to Instructables, the DIY 6-note musical command center was recently featured on the HackADay website.
“When the user runs their hand over the top of the keys (photoresistors) they turn on audio notes, which can be tuned with potentiometers,” Asahillis explained. “This project utilizes [an Atmel-based] Arduino to turn the notes on and off. The tutorial includes a parts list, schematics and the code required to operate this musical device.”
According to HackADay’s Kristina Panos, the hack uses two circuits: one to generate the tones and a second to mix them. Essentially, Asahillis adapted Forest Mims III’s schematics for the 555 Tone Maker and the 741 Audio Mixer to create the Photocell Piano.
“When the instrument is powered on, the code takes a 5-second reading of the ambient light, and sets a threshold based on its findings,” Panos explained. “Afterward, the first note will sound, indicating the piano is ready to be played. Each note has its own if-else statement that tells it to sound when its corresponding photoresistor reaches a value below the set threshold (when the player casts a shadow).”
Interested in learning more the Arduino-powered Photocell Piano? You can check out the original Instructables post here.