
Schroeder's MP3 Player Piano
thingiverse
Schroeder from Peanuts MP3 Player Piano with 12 LED keys: The piano (and Schroeder) were remixed from https://www.thingiverse.com/reddadsteve/designs at 150% scale. All remixed files are at the larger scale to accomodate the electronics. Twelve warm white (3 mm) LEDs pseudo-randomly illuminate the white keys to a song when it is playing: VideoPrint Instructions:Resolution: 0.2 mmInfill: 100% for all parts except piano top and bottom (10%)Supports and brim: see the individual parts below.Printing the piano parts:Red: Fire Engine Red (eSUN PLA+)Piano topPiano bottom: 10% density supports (grid) at 80° that were blocked at the leg holes.USB charging port cover (there is a "B" for bottom orientation)White: Cool White (eSUN PLA+)White keysLED holderBlack: Black (eSUN PLA+)Black keysSilver: eSilk Silver (eSUN PLA)Candle holder (and MP3 player knob)Wax Candle: A brim was used: Sandstone (Paramount 3D PLA)Flame: Filament change at layer 128 to Fluorescent Yellow (Ziro PLA) Electronics:LilyPad MP3SparkFun FTDI Basic Breakout - 5VRotary Encoder - Illuminated (RGB)Lithium Ion Battery - 850mAh(2) Thin Speaker - 4 Ohm, 2.5W, 28mmMicro SD card with MP3 songs on it. (eight character filenames {e.g. track001})Pro Micro - 3.3V/8MHzAnalog MEMS Microphone Breakout(12) 3 mm Warm White LEDs(24) Straight HeadersMini Breadboard(1) 47 Ohm resistor (1/4 W), 22 Gauge hookup wire, andHeatshrinkHookup guide: The overall wiring diagram is shown below. I printed out the holder for wiring (a truncated piano) at 0.4 mm for ballpark measuring of each wire as well as a holder for any soldering oopsies. To guarantee each wire would reach the Mini Breadboard, I initially made them about an inch longer than needed and trimmed them back for the final installation. MP3 Player: The board has two types of holes: (i) classic header pin holes and (ii) larger holes for counductive thread. I didn't realize it had the former for the speakers so I just used the bigger holes and lots of solder. If I were to do it again, I would have used header pins (possibly angled ones) for the speaker connections given the challenges I had soldering the very small gauge stranded speaker wires to the large holes, especially the left speaker that is partially underneath the MP3 player. For that speaker, I ended up soldering solid 22 gauge hookup wires.Solder the rotary encoder to the center of the boardSolder wires to ground and 3.3V.Solder red (+) and black (-) speaker wires to left and righ speaker pinsAttach the 5V FTDI header to the MP3 player for charging and progamming via the mini-USB port. I did not solder the header to the MP3 board; however, when you remove the USB cable it sometimes becomes disconnected from the MP3 board, which you can push back in to reconnect. Hook up the LiPo battery that can be charged with via the mini-USB port.Beta test the speaker connections (see the Arduino Programming section) and the 3.3V output with a volt meter.Micro Arduino Board: The ProMicro Arduino Board from Sparkfun is one breadboard row wider than shown in my diagram. For ease of wiring, the board should be positioned such that there are 2 rows on the voltage side (VCC) and three on the other side where 10 of 12 LEDs and the 4 ground wires will be attached; there should be 3 columns open in front of the micro-USB jack and 2 columns on the end near the MEMS mic and the end of the piano:Place two rows of 12 Straight Header Pins in the Mini Breadboard.Place the ProMicro board on top of the pins such that the micro-USB jack faces the MP3 player (Note: the Mini Bread board can only be oriented in one direction in the piano because of the asymmetry of the notches. Use the wiring holder to ensure the directionality is correct).Solder the header pins to the board.Solder three wires to the MEMS microphone board. I don't know if it makes a difference for sensing, but I soldered the wires such that the microphone would face the backside of the speakerPer Figure 1, hook up the MP3 player and MEMS mic GND and 3.3V (VCC) to the GND and VCC on the ProMicro board using the breadboard; Audio (yellow wire) goes to A0. (Note: In my picture, I soldered a white wire to the MEMS VCC.) On the other side of the breadboard, put a 47Ω resistor from one of the GND pins to the 1st column near the micro-USB jack. I put the resistor in Row 1 even though it is shown in Row 3 in the diagram. This way it is unlikely that one of the anode wires will touch the resistor I am not the best solderer, so at this point, I checked to make sure that all of the pins I needed for the project had connectivity using a volt meter or an LED. I next used the Arduino Serial plotter and monitor to see whether the microphone was detecting the music and the value the microphone recorded with no music playing, which for my set up was ~ 510. See the Arduino Programming Section on how to do this. Do this first before wrestling with the LED lights.LED lights: This is the most challenging part of the wiring -- it's like herding a dozen cats. The first thing I did was solder a wire to each LED's anode (the longer leg).I did cut off the anode leg near the "bump" to reduce the amount of heatshrink used. After all 12 anodes were wired, I placed them in the piano keys using the white LED holder to hold them in place (Note: I intially bent all of the cathodes 90 degrees towards bottom of the black keys so that any soldering/melting mistakes are hidden).Twist three adjcent LED cathodes together and solder a ground wire to each triplet that can reach breadboard column "1" shown in Figure 1. I only used HeatShrink (not even shrunk) to cover the exposed ground wires that went over any of the other electronics (see the final wiring figure) I did not worry about the anode legs of the LEDs since they were protected by heatshrink. I probably should have glued the LED holder to the piano keys at this point to close the gap, which you can see in the next picture.Carefully thread the 12 LEDs throught the piano key "window" and around the Rotary Encoder (aka knob); I routed Schroeder's six right hand keys on one side; the six left hand keys on the other side. This helps with ensuring that Schroeder plays notes on his left hand; chords on his right hand. Not shown in the picture, but I ended up routing all of the ground wires to the left of the knob. See next image for final wiring.Once the keyboard can be "snapped" into position (it has some wiggle room), route the wires to their positions on the breadboard. Because the Arduino code randomly picks the notes and chords, the only requirement is that Schroeder's six right hand keys go to pins 0 - 5; the six left keys to 6 - 10 & 15. Thus, I trimmed and stripped the wires to the futherest point on the bread board just in case the wire couldn't reach. I used light colored wire and a sharpie to help get the most accurate distances. In addition, I would hold the wire with a needle-nosed plier and then use a wire stripper to expose ~ 1 cm of wire. In addition, I used alternate rows to prevent any shorting at the breadboard from any exposed wires. Arduino Programming: In order to program both boards you will need to download the free Arduino IDE. I downloaded the libraries and Player.ino file from Sparkfun.LilyPad MP3 Player programming: After installing the libaries needed to compile the player.ino file, you can upload the file to the LilyPad MP3 player using it's mini-USB port. I found two programming bugs that I "fixed" PlayerBK.ino. The first bug was that the program was not using the SdFat library so I commented it out. The second bug was that the function GetNextTrack was skipping tracks for some reason that I could not figure out; thus, I switched the function to GetPrevTrack, which was seeing all of the tracks. Lastly, I lowered the start up volume because it was too high for my liking. All of my changes are demarcated with (BK) ProMicro Board programming: Beat_Finder should be uploaded to the ProMicro Board using it's micro-USB jack. To determine whether the microphone is detecting the music, play a song on the LilyPad MP3 player and monitor the MEMS microphone using the Arduino IDE serial plotter. Turn off the music to determine the background value of the microphone. The current threshold value in Beat_Finder is 525 because the quiet value was around 510. This can be lowered or raised to increase or decrease the frequency at which the keys light up. Final touches: Once both the MP3 player and ProMicro board are programmed and working properly, the Mini Breadboard and Schroeder's keyboard can be permanently mounted in place with glue/adhesive tape. I did not mount the MP3 player board (purple) becasuse it is pinned down by the Mini Breadboard, FTDI board, and the wires. There are several LEDs on the boards where the light leaks through the 3D printed piano. This light can be eliminated by lining the piano walls and cover with black electrical tape (This is easier to do before you wire the entire piano). There is a cover for the mini-USB port with the Hammond logo on it since Schroeder's "piano" sounds like a Hammond Organ.The Candle Holder serves as a knob to control the MP3 player and covers the gap between the knob and the hole in the piano lid. You may have to use an x-acto knife to widen the bottom of the knob so it fits snugly on the rotary knob on the MP3 Player. It is best not to push the Candle Holder snug to the lid because you need to push down on the knob to switch from track and volume adjustments. The Candle fits very loosely into the holder (intentionally) so it can be easily removed to see if the light up knob is in the track (red) or volume (green) mode. Lastly, it takes some skill to remove and re-insert the micro SD card to change/update the songs; there is enough room, you just have to work on your technique if you are all thumbs like myself.
With this file you will be able to print Schroeder's MP3 Player Piano 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 Schroeder's MP3 Player Piano.