This website is being archived. A new website will be launching very soon. See for information about Sean Clark's artwork.

Music Box

This is a simple music box circuit based around an Arduino Nano. As you rotate the switch the tune is played. You should be able to get the bits for around £10. Links to the components on Amazon are shown, but you may find them cheaper elsewhere if you shop around. I've included the Super Mario theme in the code and think it would be quite fun to house the project in a question mark cube from the game made from a cardboard box.


1 x Passive Speaker/Buzzer [Like These]
1 x Rotary Encoder [Like These]
1 x Arduino Nano [Like These]
6 x Female-to-female Jumper Cables [Included with These]
1 x USB Micro Cable [Like These] - Only needed if you find the one with the Arduino Nano too short


1. Connect the pins on the speaker to D8 and GND on the Arduino. It doesn't matter which way around.
2. Connect GND on the Rotary Switch to the other GND on the Arduino.
3. Connect + on the Rotary Switch to 5V on the Arduino.
4. Connect CLK on the Rotary Switch to D6 on the Arduino
5. Connect DT on the Rotary Switch to D7 on the Arduino
6. If you are not going to be dismantling this circuit to make other things then pop a bit of hot glue on the connections to secure them in place.


1. Download and install the following software on your Arduino.
2. When you have had enough of Mario look for other melodies on Google!


Making a Box

It would be fairly easy to house the project in a box like this and draw your own design, or use Mario box template like those found here and print on card? Perhaps make a handle to glue on the switch out of a lolly stick? I will make one up at some point, if you beat me to it please send over a picture to