3D-Printed Musical Keyboard! (Designed With TinkerCad)
by everythingwii in Circuits > Audio
641 Views, 2 Favorites, 0 Comments
3D-Printed Musical Keyboard! (Designed With TinkerCad)
Welcome! I designed this simple Piano-Phone (what I like to call a mix between a xylophone and piano), called the 3DNOTE. It has been designed in full with Tinkercad. It is easy to build, and the hardest part is really the wiring.
The Story Behind This:
I designed this because I have a passion for electronics AND music, and I've always wanted to combine both to make an instrument! One day, looking through Instructables, I found a contest PERFECT for making an instrument! I had seen a vendor at a craft sale selling 3D-printed items, one being a special kind of xylophone. Surprisingly, I couldn't find any designs like this one online, so I redesigned it! So after countless failed prints and hours of work to make this project AWESOME, I present the piano-phone. Combining the number of keys on a toy xylophone, and the keys of a piano, It's a fun little toy. It can play songs like Happy Birthday, Indiana Jones, and the ABCs. With the holiday season coming round, this can be a fun thing to use with your kids, especially if they love music!
When Designing this, I had two things in mind:
1: Reproducibility. One of the most important things to me is making sure everyone succeeds. A such, I have linked the best hardware for this project, hoping that it makes it easier! I also used 3D models instead of images, an unusual thing on Instructables. However, I used to love those 3D-model pictures in LEGO models, and this reminds me of how much fun I used to have with them! I also find it reduces confusion, and I hope it does for you too. I also wanted this project to be able to be changed and upgraded! I find most Instructables on this contest are very unique, but can't be changed by other people! I have made this easily remixable so everyone can modify the 3D prints and hardware, so our community becomes stronger. Plus I've given people tons of remixing ideas at the bottom, to further grow the musical Instructables community!
2: Simplicity and Fun! I noticed all the Tinkercad models in this contest only appealed to a certain hardcore group of music nerds! Not only that, some were very complex, and while some consider that a good entry, I wanted this project to be able to be completed by anyone. The whole reason I designed this was to make something everyone of all ages would like! Most kids would have no idea what a synthesizer does but with the press of a key on the piano-phone, they would instantly recognize it. That's what DIY is all about, in my opinion! Showcasing a project everyone can enjoy, regardless of whether it has crazy designs and features. I hope you enjoy making it as much as I enjoyed designing it!
Features:
The keyboard has 8 Notes. Unfortunately, the limitations of the piezo buzzer will only allow for one note to be played at a time. (it's not polyphonic, for the music nerds) It's programmed to play middle c to c5 notes.
Plus, it's easily remixable if you understand 3D Modeling, so turn it into whatever you want!
DIFFICULTY
WIRING: Easy
CODING: Easy
3D PRINTING: Easy
ASSEMBLY: Basically non-existient
Perfect for beginners and experts alike!
Supplies
DISCLAIMER: These links are not affiliate links. I DO NOT earn any money from you clicking or buying on these links. I do not endorse or recommend these products, they just fit the measurements for this product, and have been suitably tested. Thank you! :)
To complete this project as I did, you'll need these components:
x1 ARDUINO NANO (aliexpress)
x1 USB CABLE FOR ARDUINO
x9 6MM PUSHBUTTONS (aliexpress)
x9 PUSHBUTTON NUTS AND WASHERS (if needed)
x1 9MM POTENTIOMETER (low resistance)
x1 PIZEO BUZZER 3V (aliexpress)
Lots of DUPONT WIRE
A COMPUTER
BREADBOARD (for prototyping, optional)
HOT GLUE GUN
SOLDERING IRON AND TIN SOLDER
USB POWER SOURCE (adapter, computer, etc.)
3D PRINTING:
x1 printer (+205x205mm bed size)
180g of filament
3d Print Files!
There are three different files. You can download them below.
I fully designed these with Tinkercad. All components are mine. Some early designs are above. It looks simple, but requires a good amount of measurement and calibration, and intentionally has this DIY look! :)
I didn't want to make a whole bunch of documentation on how I made this, as I want beginners to be able to understand this well. Some instructions require you to design it yourself, but that wouldn't be beginner-friendly either. I did not include as much of the design process, because it's a bit boring, and I want this to be a fun project!
The three files are the keys, back-box, and keyboard.
If you want a quality print, I suggest using under 100mm/s print speed and turning supports on.
Now, if you want, you can print the files to the colour of your liking. However, I just painted my board because I didn't have the right filament, and the paint even gave it a vintage piano texture on the keys.
Download all the files below and slice them in Cura as shown above. (I printed the keyboard separately from the back box)
Remove all supports from the pieces. They should be somewhat evident.
WIRING
Most steps have been modelled above. I decided to model the steps instead of taking pictures, as I grew up making Lego Builds, all with 3d modelled instructions. It also helped me pursue my passion in Tinkercad/3D Design, which I tried to show in this contest. I always preferred models over actual pictures, so I hope it works for you!
Step 1: Grab your pushbuttons and put all 8 of them into their respective holes on the keyboard. It doesn't matter where they go. Screw them in with nuts and washers, if you need them.
Step 2: Grab the piezo buzzer. Solder 2 DuPont wires to the piezo buzzer. Now, insert the buzzer into the hole marked as "speaker". Run the wires through that hole and out the bottom. Hot glue the buzzer if it doesn't stay in place. Depends on the size of the buzzer.
Step 3: Grab your potentiometer. Insert it in the volume hole. solder 2 wires to the GND and SIGNAL pins on the pot. See the diagram for where to solder. Attach your knob to the pot if you have one.
Step 4: Connect all the negatives on the pushbuttons. (see picture for more detail) insert the start of the ground wire into the GND pin on the Arduino NANO.
Step 5: Connect the potentiometer's SIGNAL wire to the pizeo buzzer's positive wire.
Step 6: Connect the GND pin of the potentiometer to the D10 pin on the Arduino.
Step 7: Connect the negative wire of the buzzer to the final negative/ground pin of the push buttons.
Step 8: This is where it gets tricky. Flip the box over, so the larger piece where it says 3dnote, is face down and faces north. Now, we will wire the positive wire on the push buttons from left to right, so the leftmost button is button 1, and the rightmost is button 8. If this is confusing, don't worry, as I have linked a helpful picture above.
Wire button 1 to D2
Wire button 2 to D3
Wire button 3 to D4
Wire button 4 to D5
Wire button 5 to D6
Wire button 6 to D7
Wire button 7 to D8
Wire button 8 to D9
Now, connect your Arduino to the computer.
All done, nice work!
UPLOAD CODE
I mostly built this code, with some StackExchange references and base code by PeaProg. It should be fully calibrated to play the proper notes. As well, this is my first venture into Arduino IDE! It did take a couple of tries to get it working, but I'm proud of the result. If anyone would like to experiment with it, go ahead, and let me know if there are any faults in the code! :)
Note: you need IDE to upload the code. If you don't have it already get it from here for free: https://www.arduino.cc/en/software
...and the download is below. Import into IDE by clicking "open" in the File tab, and then click the right arrow button marked "upload" to download to the Nano.
Test the code, making sure each key plays properly. Let me know if you have problems, I'm here to help! :)
Downloads
OPTIONAL: ATTATCH BACKBOX
Unplug the Computer from the Arduino. (DON'T UNPLUG THE CABLE FROM THE NANO.
Put the Arduino nano in the compartment indicated in the box, and run the computer cable through the hole in the box. Now, fit the rest of the wires in the remaining space. Now, slide the keyboard into the box. If you want, you can hot glue the box to the keyboard, but I won't for experimental purposes.
You are almost done the assembly, you just have to attatch the Keys!
ATTATCH KEYS
Last step! This is the easiest part of the tutorial too.
- Insert a key into the slot in the photo.
- Center it and let it rest on the pushbutton. If it doesn't fully fit or attatch, then hot-glue it to the button.
Note: Different pushbuttons have different button sizes and measurements. I tried to design around this as best I could, but I can't get around this. If you have the skills, I recommend you import the keys into Tinkercad and check the measurements. Sorry for the inconvenience! (the link provided should work with these keys)
DONE!
Good Job! You have completed the Piano-Phone. Now, you can do whatever you want with it.. Experiment with the code, put it on a shelf, and never use it again, whatever you want.
REMIX IT!
"fork the world" -github
Want to remix? Here are some interesting ideas...
Add black keys to make it a piano!
Change hardware or software to make it polyphonic!
Use a different speaker or use a speaker chip to make the sound more realistic!
Change the octave of the keyboard! (for HZ values: link)
Reprogram Arduino to make it a MIDI Controller,
If you enjoyed making this, make sure to give it a heart so others can build it, and together, we'll continue to upgrade this project. Also, consider voting for me, as I worked incredibly hard on this project, and I want to be able to fund my future instructable projects and grow our community! Congrats on making it this far, and have a good day :)