↖️ Blog Archive

Self Playing Piano, Part Seven

Bradley Gannon

2026-01-25

TL;DR: I improved the design of the solenoid plunger. Previously, I had to load each one into the keyboard assembly from the bottom, but with the new design I can load them easily from above. Also, I changed the way that the steel part of the plunger attaches to the plastic extension in a way that adds a lot of strength and improves concentricity. This new design should be sufficient for the remainder of the project.

Seven plungers of the new design standing upside down on a table. Three of the plungers are missing their silicone feet.
A few specimens of my new design. I’m low on silicone feet, so some of the plungers don’t have them. Note that these parts are shown upside down. The wide part on the bottom ends up above the solenoids, and the silicone feet end up pointing downward and rest on the keys.

Old Design

Seventeen plungers of the old design standing together on a table. Most of the plungers have some ripped bits of paper stuck to them at the interface between the steel and plastic parts.
Several examples of my old design. I used rolled strips of paper to hold the steel and plastic parts together while the glue dried, which resulted in some paper being left behind. These plungers are shown in their normal orientation, with the steel on top and the fuzzy part on the bottom. The only way to install these plungers in their solenoids is from below, which is inconvenient.

A solenoid is a coil of insulated wire. When electric current flows through the coil, it induces a magnetic field around it in a particular shape. If a ferromagnetic material, such as steel, is placed near the energized coil, then the field will apply a force to the material. This is the principle of operation for a solenoid actuator. I spent a lot of time exploring and optimizing my solenoid design at the beginning of this project to try to maximize performance for the piano key application.

Once I’d settled on the idealized design for the plunger (the part that moves), I did my best to realize it in plastic and steel. This was a partial success in the sense that it worked and was close enough to my target that I could move forward, but there were some clear areas where I could improve it. The most annoying issue turned out to be that my design required that the plungers be loaded from the bottom of the solenoid (that is, the side closest to the keys). This is okay with just one or a few keys, but especially now that all keys ride on a shared wooden support structure, it’s not reasonable to try to awkwardly hold all plungers up until the whole assembly is in place over the keyboard. If I made no other improvements to the solenoid, top-loading was essential.

I also struggled to get a reliable mechanical connection between the steel and plastic parts. The steel part needs to be a certain length in order to not be too heavy while maximizing the force that it “collects” from the magnetic field. It also needs to be in a certain vertical position relative to the solenoid. To push the key underneath, there has to be a magnetically inert extension part between the steel and the key surface. This is easy to print, but connecting the two parts is a challenge. A big source of error was that I was cutting the steel rod with a portable bandsaw and no guides, which left an uneven surface. I was able to rig up a solution with glue and rolled paper strips, but this gave crooked and brittle results. Dropping a specimen on the floor was often enough to break it apart.

New Design

Top Loading and Little Hats

This was the easy part. The reason the plungers couldn’t load from the top is that they had wider parts on the bottom to match the diameter of some fuzzy feet I wanted to use. Reducing the diameter to instead match the rest of the shaft and replacing the fuzzy feet with silicone nubs was enough to solve the problem. This will increase the pressure on the key surface and may cause wear over time, but I’m willing to wait and see on that. This would probably only happen after a lot of good times using the machine, which is acceptable in my opinion.

I realized that I could basically invert the whole design by adding a wide part at the top, which would allow the plungers to hang down when the machine is removed. This would be a big advantage because I wouldn’t even have to remove the plungers if I didn’t want to. When the plunger is at the bottom of its stroke, a bit of steel sticks out the top, so it wasn’t too hard to add a cute little “hat” to each plunger. The hats extend a few millimeters down the steel shafts, which gives ample surface area for glue to hold on to and requires no extra modifications to the steel itself.

Flat Ends and Concentric Holes

A portable band saw with 3D printed supports stands somewhat unsteadily in an upright position on a table.
This arrangement leaves a small amount of steel powder on the table (not shown), which is fun to clean up with a magnet.

The portable bandsaw I’ve been using to cut the steel rods is a good tool for this job because it’s reasonably safe and fast, but running it freehand gives almost no possibility of making a perpendicular cut. I designed and printed a few support parts that prop up the bandsaw in a vertical position by reusing some of the screws on the frame. This is a bit janky but stable enough to do the job. There are “portaband conversion kits” available as commercial products, but they’re pretty costly, and this does what I need for now. I also printed an adjustable guide that mounts behind the metal guard on the bandsaw. It flexes a lot, but it gives me something to hold the rod against at roughly the right distance to get the right length. All this has resulted in somewhat flatter cuts, but the biggest benefit has been that the cutting process requires both less strength and less active effort to achieve precision. Cuts are now accurate to within about 1 mm.

Two short steel rods lie side-by-side on a table. The one of the left has a smooth end, and the one on the right has a rough end.
The rod on the right is what the bandsaw produces, and the rod on the left is the result of sanding on the drill press.

This alone would have probably been enough to call the ends “flat” for this purpose, but I knew that if I’d had a lathe then I could get a lot closer. I don’t own a lathe—yet—but I do own a cheap drill press. It just so happens that for a subset of lathe operations, a drill press can act as a reasonably acceptable substitute. The two operations I really need are facing (i.e., flattening the ends of the rod once I’ve cut it) and drilling a concentric hole in one end. I learned from the web that a drill press can do both of these, but the trick is to put the workpiece in the drill chuck and secure the tool on the table. For facing, this is mostly a matter of convenience. With the work rotating, I can use a sanding block or file to knock down the uneven surface left by the bandsaw and make it as flat as the drill press table. This takes maybe a minute per side and leaves a lovely nested ring pattern that points out the center of rotation clearly.

Five short steel rods with centered holes drilled in one end. A gloved hand holds the rods in a bundle viewed from above.
A few early examples. After a lot of effort and failure, I was proud to see these come out the way they did. I think the overall error is in the neighborhood of 25 thou, which is garbage for a real machinist but worthy of celebration in my case.
Drill press with empty chuck and a drill bit clamped in a vise. Chips have fallen everywhere, and other tools, gloves, and cables are visible in the background.
The drilling setup, with the tool fixed in the vise (which itself is somewhat free to move in the horizontal plane). The tool’s rotation isn’t fully constrained in the plane of the vise jaws (roughly left-to-right in this photo), but it’s good enough for me right now.

The centered hole on the end is more difficult, or at least more subtle. My earliest attempts had the drill bit in the normal position and the workpiece clamped to the table. I printed various guides and tried other tricks to at least center the bit, if not align it with the axis of the workpiece. All of these mostly failed and gave inconsistent results. When I was about to give up for the week, I looked for advice online and was reminded of the “vertical lathe” tricks, this time for drilling. In an ideal arrangement, where everything is aligned and square, there’s no practical difference between this setup and the more traditional one. However, in reality rotating the workpiece brings the axis of rotation much closer to its center, and it encourages the tool to find that center as well. Compare this to the reversed case, where the axis of rotation is the center of the drill bit, with no particular relation to the workpiece and no correcting force towards its center.


A big mess of spiral steel chips and smaller bits of detritus on a table. Various hand tools have been partially buried by the chips.
I knew I was doing something right when these nice spiral chips started flowing.

Mechanical design and implementation are still probably my weakest areas, but I like to think that I’ve made some progress here. I learned a lot and can see now that a decent portion of the expense of good machining tools must go towards making them more flat, square, rigid, repeatable, etc. I want to explore this more in the future (read: I’m going to buy a lathe eventually.) As for the piano project itself, this improvement was the last major task I wanted to complete before expanding to more keys. Next time I plan to bring together all the changes I’ve made to build another octave module.