Sophie's Music Box Page


Home                               Craigs Pages                               Heathers Pages


After writing an article for Nuts and Volts magazine (April 2012 issue) about Direct Digital Synthesis (DDS) I decided to build my friend Sophie a combination music box and light show device using these techniques. Check out the video below to see the music box in action.





The music box uses DDS to emulate the sound of an old time mechanical music box which used a revolving metal cylinder which plucked tuned metal tines to make the notes. An Arduino compatible microcontroller generates the sound and controls the LED  lights. The music box plays Fur Elise, Twinkle, Twinkle Little Star and Greensleeves.

The inspiration for this project came from here.

The Arduino sketch (source code) is for the SparkFun Pro Micro board and is available here.



This is the tiny SparkFun (sparkfun.com) Pro-Micro Arduino compatable microcontroller board which powers the music box. This is about the size of two postage stamps.

This is a section of the AdaFruit (Adafruit.com) LPD8806 RGB LED strip. I used 13 LEDs for Sophie's music box.

If you use more or less LEDs, the Arduino stetch will need to be modified.

This strip is nice in that it has its own PWM circuitry which lessens the load on the microcontroller

Here is the finished box after I drilled holes all over it and stained it with mahogany stain.

I thought the drilled holes kinda looked like snow flakes.

Here you are looking down on the lid of the music box. I placed a mirror in the back to reflect the light from the LED strip which will be glued in place between the mirror and the four wooden supports.

This picture shows all of the electronic in the music box. In the lid you see the LED strip and the tilt switch (gold cylinder on the left near where the wires from the lid go into the box) which was also glued in.

Inside the box you can see the small speaker glued to the front, the little power supply circuit which I built on a piece of pref board and the Pro Micro microcontroller board.
What you cannot see is there is a hole in the back of the music box for a USB cord which plugs into the Pro Micro to provide power.

I built a platform that protects the electronic from harm. I had to sculpt out a portion of it to accommodate the forward mounted speaker.

I could have mounted the speaker in the bottom facing downward but I was afraid the music would not have been loud enough. I now know the volume is sufficient for mounting the speaker in any orientation.

Here is the finished music box. I took a piece of thin lexan plastic and used my orbital sander to make it diffuse on both sides. I then glued it to the wooden supports in the lid.

I got some synthetic animal fur to line the inside of the music box to protect Sophie's valuables.

Music Box Schematic



The resistor and the capacitors on the schematic form a filter that prevents noise generated by the LED strip's PWM circuitry from feeding back into the microcontroller's power and becoming audible in the speaker. The music box is powered via a USB cable from any USB power source. The tilt switch is sold by SparkFun.

Home                               Craigs Pages                               Heathers Pages