Tough Pi-ano
By Russell Barnes. Posted
Hammer the keys on this incredibly robust musical instrument
Advertisement
Head to head: Raspberry Pi + Raspberry Pi Zero + Raspberry Pi Pico.
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.”
Russell runs Raspberry Pi Press, which includes The MagPi, Hello World, HackSpace magazine, and book projects. He’s a massive sci-fi bore.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
Teka-Sketch
This all-new e-ink-based Etch-a-Sketch can play Pong, and it also has an undo button
Read more →
Raspberry Pi vs Raspberry Pi Zero 2 vs Raspberry Pi Pico in Raspberry Pi Official Magazine 159
Without an operating system, any computer – including your Raspberry Pi – is just a dumb lump of sand. Put Raspberry Pi OS on it however, and you’ve got yourself a working system that can handle games, web browsers, emails, programming and everything else we bang on about here all day every day. The latest […]
Read more →
Win one of ten M.2 HAT+ Compact
The ability to connect NVME SSD drives to Raspberry Pi 5 is very cool, although it does slightly limit the cases you can use. With the M.2 HAT+ Compact, you can even fit an SSD-powered Raspberry Pi into the official case – and we have ten to give away below. Win one of ten M.2 […]
Read more →
Sign up to the newsletter
Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.