The machine started life as a CNC sandplotter built along the same pattern as one I built for the Calgary Science Centre. After getting bored of drawing I wanted the machine to do something else and building an impractical player piano fit the bill.
The CNC hardware is controlled Beaglebone Black running machinekit (LinuxCNC) connected to a protobotix PBX-BB breakout board. This is in-turn connected to four pololu style stepper drivers.
The motion for the machine is four stepper motors with a hand machined aluminum pulley on each. There are no linear guides or anything fancy, you just spin the motors to adjust the length of each of the four strings to position the aluminum head anywhere in the 3d work envelope. I wrote a custom kinematics module for linuxCNC that handles the coordinate math so the machine thinks its a 3 axis conventional mill.
The piano is a 30 key baby baby grand childs piano, acquired from a local thrift-store. Originally I tried simply dropping the head directly onto the piano but found myself limited by gravitational acceleration. The solution was to build strikers that the head could hit sideways to sound a note.
As for the actual playing of music, my workflow is as simple as the rest of the machine:
- Convince my lovely partner to write up the desired song in musescore
- Export the song to midi
- use an online tool to convert that midi to RTTL - the nokia ringtone format
- I then use a processing sketch to convert the RTTL file to gcode
The processing sketch replaces each ringtone note with the real world 3d coordinates of the corresponding piano key. It also adds the appropriate lead in, lead out, strike and delay functions so the rhythm is mostly preserved. The code doesn't as yet have any error checking, but really running with no sanity checks just adds to the spice of things.
The velocity you can get with the cable robot is impressive!