DIY Player Piano Pounds Out the MIDI Hits
Forget player pianos, this DIY piano robot built by Paul Junkin is even better.
Those old-timey player pianos that you may have seen in old-timey-themed restaurants are really neat. But they’re also ridiculously complex marvels of electromechanical engineering. Most makers don’t have the expertise, budget, tools, or budget to build such things. But learning to actually play the piano with one’s own fingers is, of course, also too difficult to be realistic. So, Paul Junkin took the only sensible option and built a robot that he could place on top of the ol’ ivories to recreate the player piano experience.
Junkin’s biggest design constraint related to the piano itself. That had been in his family’s home all of his life and he wasn’t keen on making any permanent modifications to it. Junkin doesn’t say so explicitly, but we have to assume that his mother would be cross if he were to go drilling holes into that antique wood.
With that speculated motherly scolding to avoid, Junkin designed his robot to sit above the piano’s keys without permanently attaching to it in any way. The body of the robot is a frame made of some 2020 aluminum extrusion (every maker’s favorite material), brackets, and 3D-printed bits. The frame is like a bridge spanning the whole row of keys and it supports a bunch of 12V solenoids. There is a solenoid for each key and when a solenoid receives power, it extends and pushes down on the key below.
Junkin then needed a way to tell each solenoid when to extend and the amount of force/speed to use. In pianist terms, that is the “velocity” and MIDI software can make use of it as a parameter. Junkin runs the MIDI software on his laptop, which controls the solenoids through a chain of hardware.
The first link in that chain is an inexpensive USB-to-MIDI adapter. The second link is a MIDI-to-serial adapter. The third link is an Arduino Uno. The fourth links (stretching the metaphor) are PWM modules. The fifth links are MOSFETs that actually direct power to the solenoids.
The use of PWM modules was necessary for two reasons: to act kind of like IO expanders and to allow for velocity control. Without the use of a digital-to-analog converter (DAC), a microcontroller, like the one on an Arduino Uno, can only output a digital signal — power on or off. Pulse-width modulation (PWM) rapidly switches power, so that the effective average output voltage can be somewhere between 0V and the full voltage. With PWM control, Junkin could send less power to a solenoid to lower its velocity.
The result is fantastic. Frankly, it is better than those old-timey player pianos, because Junkin can load up any MIDI file that he wants to hear.