Hammer the keys on this incredibly robust musical instrument
Brian McEvoy wanted to make a toughened electronic keyboard for his cousin, who has Down’s syndrome: “He loves music therapy but he breaks pianos on a weekly basis.” Brian’s aunt asked him to help with therapy devices for his cousin and other such kids. “The idea was exciting because there is a whole different mindset when designing for someone who will not handle things with gentle hands. These projects have to absorb damage without hurting anyone.”
The full article can be found in The MagPi 57 and was written by Phil King.
The result is the Tough Pi-ano. It has no exposed metal, and the keyboard area is covered with thick plastic. For its keys it uses arcade buttons, which are inexpensive and easy to replace. Each of four octaves is powered by a Pi Zero, with a USB sound card outputting the audio to an external amplifier and speakers.
While Brian contemplated the Tough Pi-ano’s design for two years, it only took him a couple of weeks to build, putting his woodworking skills to good use. “Keeping everything simple was integral to making a solid structure.” Since the original design concept was for a perfect piano replica with easily replaceable octaves, he started crafting wooden piano keys. After experiencing too many problems, however, these were replaced with plastic arcade buttons. “In the end, arcade buttons were the best solution since they were easy to source and replace.”
Brian wrote a Python program using the Pygame library to read the arcade button presses and play WAV piano samples. While he considered adding a 3.5mm jack to each Pi Zero, he eventually opted to use cheap USB sound cards to output the audio. The biggest problem was electrical noise. “The first octave I built didn’t have any pull-up resistors on the keys so they were, of course, prone to floating. At that point, I had inadvertently built a touchless piano,” recalls Brian. 1K resistors were added to each input to solve the problem. “There is still some noise on the audio despite using a clean power supply and line filter. Maybe using $0.99 USB audio cards is to blame.”
While Brian admits it would have been possible to use a single Raspberry Pi and remote I/O to power the piano, the use of one Pi Zero per octave has some benefits: “If any part was to break, it would be possible to shuffle working hardware around for a three-octave Tough Pi-ano, at least until repairs could be made. So there is still an advantage to the redundancy.”
Brian’s Tough Pi-ano is now set to be used in his aunt and uncle’s new centre for local families with kids on the autism spectrum and those with Down’s syndrome. While he doesn’t plan to build another piano, he has some advice for would-be makers. “I would recommend building the speakers into the enclosure, but be sure to ventilate the amplifier. Also, buy one of the tools used to fasten arcade button washers, or you’ll regret it when you get to the 50th button and your knuckles are bloody.”