Mario Theme played on Stepper Motors with an Arduino

Now that I’ve figured out how to store song information in flash memory on the Arduino, I can actually play full songs. This is a little suite of Mario Brothers themes that I put together. Enjoy!

The sound you’re hearing is coming entirely from the motors. The song information is taken from a MIDI file that I composed. An Arduino provides the necessary commands to spin the motors at the required frequencies.

Note: See my earlier video at

Motor #2 buzzed a bit on the table this time. I’m going to find a better way to hold the motors still while still allowing them to vibrate.


Answers to common questions:

Q: Will you give me the computer code you used?

A: Apparently I will because everyone seems to think I’m for not wanting to. Ask for the code and I’ll be happy to email you a copy.

Q: Where are the other videos?

A: Sorry. I am quite busy with my PhD work and don’t have an enormous amount of free time. I promise to get around to these videos in the next few months (by the end of the Summer at the latest).

Q: What hardware did you use?

A: The stepper motors are bipolar NEMA 17 motors. The microcontroller is the Arduino Deumilanove. The power supply is 24 V, 4 amp. I am also using a 3-axis stepper motor driver board manufactured by Xylotex ( I actually don’t recommend the Xylotex board anymore. Instead, try the drivers available at

Duration : 0:2:39

25 thoughts on “Mario Theme played on Stepper Motors with an Arduino

  1. you shouldve …
    you shouldve dishuised the motors as castles and the yellow thingies as flags

  2. put some mirrors on …
    put some mirrors on the motors, then aim a laser to it, you would have a cool music disco and sound !!

  3. @cipriuss There is …
    @cipriuss There is no Gcode associated with this project. Please read the video description. This music is being made using an Arduino microcontroller. If the arduino code is what you’re after, then I will gladly send it along. But I don’t have any Gcode to send you.

  4. Do you have a gcode …
    Do you have a gcode to be used with a cnc controller please? I have a Gcode with the Mario theme, but its not sound that good.I also have Tetris song. If anyone wants them, email me

  5. Free inexhaustible …
    Free inexhaustible energy is real!But the coverup is very strong,Get the blueprints for a real Magnet motor free enegy machine at LT-MAGNET-MOTORdotCOM ,Be a part of the energy revolution!

  6. How many Pins does …
    How many Pins does one of your steppermotors have? just can see two wires yet. but that may not be possible i guess.

  7. I’m an electrical …
    I’m an electrical engineer but I’m also a musician, and I must say, very nice arrangements you put together!

  8. I can’t even …
    I can’t even imagine how long this might’ve taken lol. Then again, if you’re doing things like this for funsies, you’re probably very good at it. Kudos!

Leave a Reply