
Pianos famously have a lot of keys. A standard full-size piano has 52 white keys and 36 black keys, for a total of 88. Therefore, people need to get clever when they build self-playing pianos. However, the brute force approach works, too. Paul Junkin’s brute force strategy was to add a solenoid for every one of those 88 keys on his piano-playing robot.
Junkin built this robot to play an old piano that had been in his family’s home since his childhood. For that reason, he didn’t want to do any permanent modifications to the piano itself and instead designed the robot to sit over the keys. It has a frame made of aluminum extrusion to support all of those solenoids.
They are 12V solenoids that can push with 25 newtons of force. An Arduino UNO Rev3 drives those solenoids through PWM modules and power MOSFETs. The PWM control lets the Arduino output something effectively approximating analog voltage in order to adjust the velocity of each key strike.
To tell the Arduino which keys to strike and with what velocity, Junkin used a USB-to-MIDI adapter going from his laptop to a MIDI-to-serial converter that connects to the Arduino. Software on the computer sends MIDI note commands through those adapters to the Arduino, which then actuates the solenoids accordingly.
This turned out well and the robot is able to play songs perfectly. And, best of all, it would be possible to put this robot on any other piano of a similar size.
The post This robotic piano has solenoids for all 88 keys appeared first on Arduino Blog.
Website: LINK