Controlled remotely and using MIDI files.

What is it?

I had the opportunity to develop this project as the Research Work (Treball de Recerca) in my school, when I was 16-17. So, as I had a death line, I had to work more often on it.

The idea of making a Stepper Motor Music machine came to my head when I saw a YouTube video where 4 motors were playing You've got a friend in me. And I thought it would be cool to be able to try the SMM by myself.

We call it Stepper Motor Music because the sounds are made by the vibrations of a motor (if it spins faster, the note pitch is higher; and if it spins slower, the pitch is lower). More precisely, a stepper motor vibrates with much more intensity than the rest of the motors. That's why it's a good candidate for making music.

To make the two motors spin, I needed two stepper motor controllers (or drivers), so they could work with 12V even if the other electric components worked with 5V. Those motors would be controlled by an Arduino, that would behave as a MIDI device when plugged in via USB to a Raspberry Pi 3B. Then, through the Raspberry, some songs could be selected wirelessly.

All of these components would be inside a wooden box, so the sound of the motors is a little bit more amplified. Some buttons and status LEDs will be added on top of the box too, and a power jack output would be prepared at the back of the box. I also used a 12V to 5V transformer in order to get 5V to aliment the Arduino and the Raspberry Pi with only one 12V plug (that will also be used for the motors).

The button on top of the box was designed to block the motors, so they don't heat up when no music is playing. A LED shows if the motors are blocked or not.

All these ideas were successfully designed and built inside the box, except for one: being able to play wirelessly. I was having problems with some midi drivers, and at that time I didn't have the courage to modify advanced driver settings.

So, to solve this problem, instead of going to a website, the user would VNC connect into the raspberry PI, where inside there, an application would be always opened, and it would work like a small GUI. A simple (and not very elegant) solution, but it worked pretty well.

Electronics inside the box.

Actual situation

The project was presented at the school, with all the documentation used and a little demo (I just played two songs). I had a mark of 10/10, which means that learning things and having good results is very compatible!

The model is now in my room, and sometimes I play one or two songs to remember what I did.

As with most of my projects, you can go check the source code and some other important files in the github repository. And if you want to check the pdf files of the paper and the presentation, you can go at, where you can find a small demonstration with the song Africa, by Toto (all the documents in there are in French).

Future improvements

All the things that couldn't be done due to the death line (more wireless stability, a GUI, a playlist option...) could be done some day. But, I don't think I am going to touch this project anymore.

In this project I used...PythonCommunication protocolsArduino-style programmingCircuit and physical designAcousticsMVP finished byNovember 2019

More Projects