Programmable Music Box

Programmable Music Box

thingiverse

This is a programmable music box based around an Adafruit Feather M0 microcontroller with a Music Maker FeatherWing. When the lid of the box is opened, the microcontroller is enabled, and starts playing an MP3 file while driving a continuously rotating servo motor to rotate a figurine. All printed parts can be printed without support material. Silk PLA or PETG seems to work well. In addition to the 3D-printed, the music box requires the following: - Adafruit Feather M0 Express (add female headers, pointing upward) - Adafruit Music Maker FeatherWing w/ Amp (add male headers pointed downward) - Micro SD card - FS90R Micro Servo - KW4-3Z-3 microswitch - 503035 500mAh lithium ion polymer battery - Adafruit 3W 4 Ohm speaker (product 4445 or 3351) - cut the connector off the 3351 - assorted wires and header pins The servo runs off the Feather, with the following connections: - brown wire to GND - red wire to 3.3V - orange wire to pin 1 (aka A11, aka TX) The microswitch is connected to either the Feather or the FeatherWing (whichever's more convenient) as follows: - NO tab to Enable - C tab to GND I used header pins to connect the servo and the microswitch, but you can solder directly if you're feeling brave. The speaker connects to either left or right speaker terminals on the FeatherWing. The battery connects to the JST connector on the side of the Feather. Programming the Feather requires a bit of Arduino knowledge. You'll need the Arduino IDE as well as drivers and libraries to support the hardware. There are lots of tutorials online to walk you through this, though. I've included the source code (the .ino file) that allows the Feather to control the servo and MP3 player. The FeatherWing should come with an SD card. You'll need to load an MP3 file called tune.mp3 with the music of your choice onto the card. I created my audio file by locating a midi file with the song I wanted, turning off all tracks except the main tune (using Anvil Studio), setting the instrument of the remaining track to ‘music box’) and recording the resulting tune (audio loopback using Audacity). As far as assembly goes, everything should just fit together. No mounting hardware is required. If you want the assembly to be a bit more robust / permanent, you can glue it together. The battery is attached to the bottom using double-sided tape. I've included a bit of debug code to help diagnose problems. The feather's on-board NeoPixel will light up with the following colors if there's a problem: - red = can't connect to the Music Maker FeatherWing - yellow = can't connect to the SD card - blue = can't find tune.mp3 I'd recommend getting all the electronics working first, before printing, just in case things go horribly wrong. When assembled, the USB port is exposed to allow for recharging or reprogramming. It can be recharged with the lid open or closed, but must have the lid open for reprogramming. Here's what it looks and sounds like when it's all put together: (https://www.youtube.com/watch?v=OOPiuQ2jNog) NOTE: I didn't include the “You Spin Me Round” mp3 or the Pete Burns figurine. I'm not sure how those would work within the Creative Commons license. Remixes are allowed and encouraged. I'd love to see something from someone with a bit more miniature modeling & painting skills than I have.

Download Model from thingiverse

With this file you will be able to print Programmable Music Box with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Programmable Music Box.