Loading

Arduino Player Piano

by ClassyGoat, published

Arduino Player Piano by ClassyGoat Dec 5, 2015
0 Share
Download All Files

Thing Apps Enabled

Order This Printed View All Apps

Contents

Tags

License

Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag

Thing Statistics

3793Views 868Downloads Found in Music

Summary

A Player Piano built using an Arduino Mega 2560 that can play 7 different songs!

Song list: Auld Lang Syne, Harry Potter Theme, Final Countdown, Song of Storms, Song of Healing, Star Wars Theme, Lost Woods

Watch the video demonstration: (Same as the 2nd preview image)
https://www.youtube.com/watch?v=GJRJ3bxSmyQ

Instructions

This project is not for beginners! You'll need to be fairly familiar with your 3D Printer, how to use an Arduino and Soldering.

Required Components
Arduino Mega 2560 (You can't use an Uno because you need at least 25 I/O pins)
ProtoShield for Arduino Mega 2560 (Optional but HIGHLY recommended) ( Example )
12 LEDs (I used 6 different colors)
12 Resistors with correct resistance for your LEDs
12 Tall Tactile Switches ( Example )
1 Momentary (normally open) push button switch with 12mm diameter hole ( Example )
13 10k Resistors (For your switches)
2 Speakers - 8ohm - low wattage - 30mm diameter ( Example )
1 Power jack with 12mm diameter ( Example )
AC/DC adapter to fit that power jack with suitable voltage for Arduino (7-12V DC)
1 Power plug to fit into Arduino ( Example )
Lots of very tiny wire of various colors

Glue: I used a combination of hot glue (To hold together large parts and LEDs) and super glue (for piano legs and keys)

Soldering Iron + Solder

STEP 0: Download files
Download all the STL files
Download Piano_sketch.zip - extract it to your computer and open up Piano.ino (this is the sketch file for the piano's programming)
Read through the sketch file and see if you can make sense of it. Understanding how this project is programmed should help you in building it.

And then of course, load the sketch onto your Arduino.

STEP 1: Print the pieces

NOTE: I printed the piano body in white and the keys in black so that the LEDs would shine through the brightest. If you print the piano in a darker color, or paint it, the LEDs may not be very bright.

Print Key.STL 12 times.
Print Button_holder_support.STL 7 times.
Print Leg.STL twice.
All other pieces print once.

Print all pieces with NO SUPPORTS
EXCEPT for Middle.STL - use full supports for that piece.

I think i used 0.3 mm layer height for most pieces for the sake of shorter print times. But 0.2 mm would work fine too.

STEP 2: Assembly
Start with the LED_holder piece. Glue in all your LEDs. Make sure to leave most of the leads exposed.

Once all your LEDs are in, glue LED_holder into Middle.

Take the tactile buttons and glue them to the Button_holder piece. I used just a very small drop of super glue on the bottom middle of the tactile switch. You might have to bend the legs of switches slightly to get them to fit right.

This is how the Button_holder piece fits into the Middle piece. It's not glued in, but instead you slide in the Button_holder_support pieces and that holds it all together quite nicely. But DON'T put it together like this YET!!! You'll want to wire up the buttons first.

You can go ahead and glue the Bottom, Middle, and Top pieces together. That's so easy, I'm not even going to put a picture.

Now you pretty much need to start wiring things up. I'm not going to go into detail on how to do this, but if you're familiar with Arduinos, you should be able to figure it out.

The buttons are wired up using this method: Simple Arduino Button

When wiring the tactile switches, if you choose to wire them all together (and to the 5v output from the Arduino) like I did, keep in mind that you'll need enough room to slide the button_holder_support pieces in so make sure you use longer lengths of wire(see the picture below)

After you have the switches wired, you can go ahead and put the Button_holder piece into the Middle piece and slide in all the button_holder_support pieces.

For the LEDs, you have a wire going from each Arduino pin to the positive lead on the LED, then a resistor from the negative lead, and then to the ground.

For the speakers, it's just a wire going from the Arduino pin to the positive terminal on the speaker and then a wire from the negative terminal on the speaker to the ground.

IMPORTANT: These are the Arduino pins I used:
Speaker 1: Pin 10
Speaker 2: Pin 11
Piano key buttons: [from left (low) to right (high)] 22,24,26,28,30,32,34,36,38,40,42,44
LEDs: [from left (low) to right (high)] 23,25,27,29,31,33,35,37,39,41,43,45
Top button that starts a song: Pin 50

I made the mistake of wiring up all the buttons and LEDs in reverse order (so on the piano, the high keys are on the left and low keys are on the right.) So be mindful of that when you're wiring everything up.

If you look carefully at this picture, it should help you figure out the wiring.

Once everything is wired up, you can now test it! Hopefully everything works. I ran into a ton of problems when I wired up mine. Most of which were due to poor solder joints. So I had to go back and fix those a few times.

Next, glue on the Legs. I used super glue for this.
And then glue on all the piano keys (or leave them small and round if you want) I used super glue for this too, using just a very little amount.

I attached the back piece with just some masking tape so it would be easy to remove (if I needed to fix something, add more songs, or use the Arduino for a different project. )

I also put tiny felt furniture pads on the bottom of it so it would be more stable. (OPTIONAL)

And you're done! Now post pictures to the Thingiverse.

More from Music

view more

All Apps

Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

App Info Launch App

Kiri:Moto is an integrated cloud-based slicer and tool-path generator for 3D Printing, CAM / CNC and Laser cutting. *** 3D printing mode provides model slicing and GCode output using built-in...

App Info Launch App
KiriMoto Thing App

With 3D Slash, you can edit 3d models like a stonecutter. A unique interface: as fun as a building game! The perfect tool for non-designers and children to create in 3D.

App Info Launch App

Print through a distributed network of 3D printing enthusiasts from across the US, at a fraction of the cost of the competitors. We want to change the world for the better through technology, an...

App Info Launch App

Treatstock is an online platform that offers decentralized manufacturing services such as 3D printing and CNC machining for clients all over the world. We offer free and instant access to comparati...

App Info Launch App

3D print your favourite design with NinjaPrototype, a professional 3D manufacture with consistent quality and speed.

App Info Launch App

I downloaded the file on my 2560.. the only problem is:

When i start the piano there is alway a continuous tone when no buttons have been pressed

Just a question,

Did you notice the pitch on a keyboard RISES from left to right?
In your case the pitch of the keys is completely inverted, or is the video mirrored? ;)

Anyway, the design is quite nice, and the pitch flaw should be easily correced.

I was careless when I was wiring it up and I didn't check to make sure the pitch was going the right direction. I didn't realize it was wrong until it was completed, and by then I didn't feel like going back and fixing it so I just left it as is :-P

I was searching for something like this. But I think you could do much better in electronics side. You could use matrix layout to reduce the number of pins. 12 = 3x4 matrix that needs 7 pins for keys and 7 pins for LEDs. Only 3x2 resistors are needed for matrix layout. Using pinMode(..., INPUT_PULLUP) you could remove the resistors from buttons or alternatively, you could use different resistor values for each key to reduce 3x4 to 3x1, saving up another 3 pins.You could use extra resistors and pins to build an R2R ladder for 4 bit audio. But that would need an amplifier to work properly and will make the overall program complicated. Finally, I would recommend using Arduino Nano as you could desolder the pin heads and replace them with your wires.

Yeah! You're totally right. If you were to go ahead and make a remix of this, that would be super awesome of you. You'd be a Maker Hero.

Any reason this trying to download this has just sent my antivirus crazy ? lol never had that off a thingiverse file before

I just tried downloading and had no issues.
The only thing I can think of is that there are a bunch of Arduino code files of various formats: H, CPP, INO, PDE
Although none of those contain anything malicious, possibly your anti-virus is concerned with those.

Top