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.
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.
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.
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.
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.
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.
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.