Piano2040 - Simple DIY Piano Keyboard
We calculate the final price from your selected file. You review and accept it before payment.
Saved on this device.
This is a simple RP2040 based digital piano keyboard I made, supporting USB MIDI and acting as a PC keyboard
- Rating
- 0 / 5
- Likes
- 4
- Downloads
- 29
- Makes
- 0
- Views
- 294
- Reviews
- 0
Updated at source:
Model information
- Source
- Printables
- Category
- Music
- License
- Creative Commons — Public Domain
This is a simple RP2040 based digital piano keyboard I made. It supports USB MIDI and acting as a PC keyboard with full polyphony (n-key rollover) and uses just common off-the-shelf parts!
While the design could be improved with a PCB or such, I a) have no experience with that and b) tried to keep costs minimal for myself, I'd estimate that the cost of this should only be about US$25! And there's a decent chance you can get everything you don't already have on hand in like a $10 AliExpress order.
The design is quite easily extensible to more or fewer octaves on the keyboard, the RP2040-Zero can accommodate 7 octaves on the easily accessible GPIOs (though it would no doubt start getting cramped with four extra wires inside) . Also note that the pictures do not 100% reflect the CAD files, I had to make some adjustments after printing and those were copied into the files. I was perhaps a bit too lenient with tolerances also, the keys have a little bit more wiggle than they should and are able to be pushed up by the foam more than I intended. I may tighten up the tolerances in a future revision, if you want to try yourself I recommend printing just a few keys and a sliced end of the keyboard to test fit with.
Do note that this will require several hours of hands on work and a lot of soldering (not particularly difficult or precise soldering, but I think 144 joints)
The firmware is available on my Piano2040 GitHub repository.
What to print
1 "base" (you will probably need to 'cut' it to at least two or three pieces, 120mm absolute minimum bed size)
1 "keyFull"
octaves * 2 "keyLeft"
octaves * 2 "keyRight
octaves * 3 "keyCenter"
octaves * 5 "keyBlack"
For a three octave keyboard, that's
6 "keyLeft"
6 "keyRight
9 "keyCenter"
15 "keyBlack"
For me this took six total beds of printing, three for the base, two for the white keys, and one for the black keys.
Parts
~600g filament (for three octaves)
RP2040-Zero
500mm of 3mm diameter rod
I used one and a bit 300mm stainless steel rods (you can get them on Amazon and such)
A wooden dowel probably works fine, I've even seen people use unextruded filament for hinges; you just might need to change the size of the holes before you print
~2m copper tape (15mm)
~1m foam tape (for the contact pads on the bottom of the keys, cover with copper tape)
37x diodes (or 36) (nothing special, just search "100 diodes" on AliExpress or Amazon and get a pack, should be $2~5)
~6m of wire
Some solder
LDPE foam (non-styrofoam packing foam, you've probably got some lying around)
Print Settings
Support: YES on the black keys, on build plate only. No other part should need support.
Brim: Yes. It's less wasted filament than a failed print and I found the keys sometimes liked to peel up without it for me.
Post-Printing
Assembling the pieces of the base
Unless your printer can print 500mm you'll probably have 'cut' the base up in your slicer. I recommend adding some pegs to help with alignment in the slicer, then once it's printed I just used a soldering iron on 220°C to 'weld' the pieces together. Not a perfect finish, but seems to be reasonably durable and looks good enough imo.
Wiring
See the schematic on GitHub: https://github.com/Epicpkmn11/Piano2040/blob/main/SCHEMATIC.md
Key spring
For the 'spring' to keep the keys lifted when not pressed I just used a few pieces of LDPE foam (the squishy style packing foam), you might already just have some of this laying around already cause it comes as padding in the boxes of loads of things that need protection in transit
If you don't have any on hand I'm not sure this is worth buying, I just keep a pile cause it's nice squishy material.
Mine was about an inch thick and I cut it to a depth of:
Full and Black keys: 1.3mm
Left and Right keys: 1.5mm
Center keys: 2.5mm
Flashing firmware
More details in the GitHub README: https://github.com/Epicpkmn11/Piano2040#readme
You will need to build and flash the firmware to the RP2040. There is no menu on the keyboard, all configuration must be done in GlobalConfiguration.h. Once the keyboard is flashed you can boot it back into flash mode (BOOTSEL) by holding the leftmost 'C' key on the keyboard while you plug it in.
You can also hold the leftmost 'C#' and 'D#' keys to boot the keyboard into MIDI or PC keyboard mode respectively without changing the config. Holding both will boot the keyboard into debug mode.