Automatic Slide Whistle

A Titanic success.

Automatic Slide Whistle

It was the summer of 2021. The birds were chirping, the sun was shining, and I was back in the Bay Area for an internship in SF. For the first time in a while, I was in the same location as my high school friends, and we decided to come together and do a fun project.

Inspired by this video, we decided to make an automatic slide whistle. Nathan was (and still is) super into quadruped robots, and had a dev kit for a new BLDC controller he was trying out. Since we only could find a couple of half-days where we could all get together and work on this project, we decided to base our slide whistle around the dev kit. The kit consisted of a pancake BLDC motor, a mounting plate, and the controller. The controller is mounted on the back of the motor, with a magnetic encoder IC reading a magnet that is glued to the back of the motor shaft.

We settled on a two link design, with a linear rail to constrain the end of the second link. We chose this design because it had a low rotation-to-displacement ratio, if we are able to minimize the inertia of the arms and carriage, we should be able to move the carriage very fast, allowing us to hit notes that are very far apart. This is made much easier by the fact that the motor is VERY LARGE.

To best utilize the time we had, we split the work up into a couple of components. James was responsible for designing and machining the arms, Nathan took care of reading MIDI files and moving the motor, and I did the rest of the mechanical design.

I designed around the linear rail, as it was rigid and had lots of places to mount things to. The main challenge here was motor placement. As the links approach the singular configuration where they are folded on top of each other, small errors in motor position cause large errors in slide displacement. This is a problem, as the frequency of a note grows exponentially with the note number (higher notes are farther apart) and frequency is linear with slide displacement. We would like the motor to be near the body of the slide whistle to make the entire contraption as easy to hold as possible, but having the motor right next to the bottom of the whistle means that positioning errors cause large note errors. We avoid this problem by shifting the motor up the whistle, so that the lowest notes are in the middle of the range of motion.

The slide whistle is held by clamps that are bolted to the rail, the battery and controller/motor are stuck to a piece that is bolted to the rail, and the handles are also bolted straight to the rail. Since we needed to be done quickly, all the parts were 3D printed, and heat-set inserts were used liberally to bolt everything together.

After printing and machining all the parts, we put it all together and it worked with minimal debugging. Very unexpected, but also very nice. Everything was controlled from a laptop with a USB-to-CAN adapter, using the Python library provided by the developer of the motor controller.