Freshmen Engineering Design Day – Music Maker

  • Project Timeline: September 2019 – February 2019

This is my freshman engineering design day (FEDD) project. I worked on this project my freshman year of college at NCSU. The project finished early into my second semester. There were multiple projects to pick from. But, I was assigned to my first choice of Music Maker. We had to make a device that could play back a song. The machine had to make sound using only mechanical means. Meaning that you couldn’t use a Bluetooth speaker connected to your phone.

I worked with three other freshmen on this project. I did a majority of the design work, 3D printing, painting, wiring, and programming. We ended up with a xylophone-like device that had 12 bottles with different amounts of water. We called it Bottle Factory 😊. This made 12 different notes we could produce by tapping steel washers against the side of the bottles with servo motors. I was inspired by this Adafruit Bluetooth robot xylophone project when we were designing our music maker:

https://learn.adafruit.com/wireless-ble-midi-robot-xylophone/overview

Here is a look at the preliminary CAD model I designed before we started building anything. Click the box below to download the Autodesk Inventor CAD files for my final design.

Here is a demo video of the final project before I calibrated the water levels. They are all out of tune and don’t correspond to the notes in the input MIDI file. I later tuned the water levels using a piano tuner app.

Completely out of tune rendition of Dance of the Sugarplum Fairies.
Another picture of Bottle Factory at FEDD.

Here is a write-up about how it worked. I used an Arduino Mega with a USB host shield and an LCD touchscreen shield with SD card slot. I built a custom breakout that let me easily connect the servo motor wires to the double GPIO row on the Arduino Mega. There is an Arduino library that can read USB data from a USB MIDI keyboard. That’s how I let people come up and play the instrument themselves with the keyboard.

Here is the code download, you can also get it from my GitHub here: https://github.com/corndog2000/servo_music_maker
I included a 7zip archive of the required libraries.

I assigned each bottle to a note A, A#, B, C, C#, D, D#, E, F, F#, G, and G#. So, when someone pressed a key on the keyboard, it played the corresponding bottle. It didn’t matter which C on the keyboard you played. They all triggered the one C bottle. I was able to play MIDI files over the SD card that is on the LCD shield. I first had to edit the MIDI files by making them right hand only. Most of the time, this hand plays the melody. That makes it, so I don’t ever play a baseline and a melody simultaneously. It made it super easy to play new music. I could go on Musescore and download the MIDI file for a song, pop it into a midi editor to remove all tracks except for the melody, then throw it onto the SD card. The Arduino Mega would start playing the file named song.midi as soon as you pressed play song on the screen.

If you wanted to play the keyboard after a MIDI file had finished playing, then you would have to reset the Arduino to pick the keyboard option.

Here are some pictures of the Arduino hardware:

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.