Project Code, CAD Files, and Build Guide
Melodicade - A portable 4.5 octave MIDI keyboard using arcade push-buttons in the Wicki-Hayden button layout.
Goals of this project:
Create a portable single deck instrument that could be played in the lap, or worn on the body with a strap if desired.
Experiment with an LCD screen for feedback of settings, rather than simple LED lights, or audio cues that pollute live performances.
Bring the design language and usability upgrades from the 2019 dual-deck Harmonicade project to the single-deck Melodicade, allowing for easier construction, and parts that can be modified without reprinting an entire case.
Build in a way that allows construction without access to (or the desire to use) a large volume 3D printer for parts. To that end:
The case walls, decks and panels are fastened together with wood screws rather than being printed in place.
Case walls share the same width/height dimensions and could easily be swapped with 1/2" x 3" (13mm x 64mm) hobby board.
Button decks and bottom panels could be constructed using flat 1/8" (3mm) wood project panels/acrylic sheets and a laser cutter/CNC machine (or some careful drill work with a step bit).
What was learned from this project:
This was my first experience working with character LCDs. It was interesting discovering the history of Hitachi HD44780 compatible displays, and how character memory is updated to the display.
This was also my first experience with I²C (being used to control the LCD display), cutting down on wiring complexity.
I went light on sanding, scraping and painting, instead embracing the printing lines and leaving most parts as they came straight from the bed. The textured look and feel has grown on me, and this might be my preferred route forward.
After enough time spent in the "good enough" rut, the chewed up state of Melodicade Prototype #3 finally pushed me to build something more polished, and I'm glad that I spent the time. I'm satisfied to keep making music with this for a while yet.
Thingiverse STL Files:
Note: This will require a 3D printer with a 300mm2 or larger build plate, such as the Creality CR-10.
Shopping list used for this build:
Note: In total, parts cost approximately $450 USD for this project (mostly from the Sanwa buttons), as built in 2020. Actual cost is more like $325 if intending to use all of the remaining parts that can only be purchased in larger spools, kits or multi-packs.
1 x Teensy 3.6
4 x Sanwa OBSF-24 White
1 x Sanwa OBSF-24 Red
1 x Sanwa OBSF-24 Blue
3 x Sanwa OBSF-24 Green
1 x Sanwa OBSF-24 Black
46 x Sanwa OBSF-24 Green
39 x Sanwa OBSF-24 White
4 x 10K Ohm Potentiometers with Knobs
Panel Mount Jacks:
1 x 1/4" Female TS Mono Panel Mount Jack
1 x Micro USB 5-pin Male to USB Type B 2.0 Female Extension Panel Mount Jack
1 x 5-pin DIN Female Connector Panel Mount Jack
1 x Spool 22 AWG Gauge Solid Hook-Up Wire - Black
1 x Spool 22 AWG Gauge Solid Hook-Up Wire - Red
95 x 1N4148 Switching Diodes
1 x Kit Heat Shrink Tubing
2 x 220 Ohm Resistors
1 x Spool PLA Filament 1.75mm - Black
1 x Spool PLA Filament 1.75mm - White
1 x Spool PLA Filament 1.75mm - Gray
1 x 16x2 LCD Character Display (With I²C Interface)
48 x Wood Screws (M4 x 25mm)
4 x Black Rubber Feet
All information in this guide is provided "as is", with no guarantee of completeness, accuracy, timeliness or of the results obtained from the use of this information, and without warranty of any kind, express or implied, including, but not limited to warranties of performance, merchantability and fitness for a particular purpose.
By following this guide, you agree to be responsible for any decision made or action taken in reliance on the information given, or for any consequential, special or similar damages, even if advised of the possibility of such damages.
Note: If you intend to assemble a Harmonicade add-on deck at some point, it may be preferable to print the DB25 connector housing side wall from that project and wire up the DB25 connector to save time and wasted parts later.
Print all 6 case pieces (top panel, bottom panel, left, right, front and rear walls), and optionally the stiffening braces for the underside of the top deck.
Screw the top panel and 4 walls together to give the deck added stability while working on the project.
Snap each of the colored arcade buttons into their respective slots in the top panel.
Hot-glue or otherwise secure the stability braces to the top deck before wiring, as it's much easier without wires in the way.
Screw in the 4 potentiometers with their pins facing sideways to make room for the LCD screen.
Install the TS jack, and 5-pin DIN jack for soldering later.
Power up the LCD screen to check for light bleed around the sides that will show through the top deck. Cover with vinyl tape, or paint any exposed areas with black acrylic (being careful not to contaminate the LCD inside) before installing the screen.
Hot-glue or otherwise secure the LCD screen in place.
Black wire soldered to row lugs horizontally, 1N4148 diodes soldered to column lugs, and then soldered together vertically.
Cut a black wire to the length of each entire row of buttons, and shave the shielding at each lug position to connect each row via one wire. Note that the control buttons are also a single row, just shaped as a sideways "U". Solder the wires to the bottom-most lug of each button.
(Optional) Strip the shielding from the wire entirely allowing you to quickly solder, and then cover with a single piece of electrical tape, or run a bead of hot-glue down the length to insulate the exposed wire from making contact with the column diodes where they cross.
Solder a 10-20cm long wire link from the end of each row (top to bottom) to the defined row pins on the Teensy, using the photo above as reference:
Name Teensy 3.6 Pin
Matrix Row 0 32
Matrix Row 1 31
Matrix Row 2 30
Matrix Row 3 29
Matrix Row 4 28
Matrix Row 5 27
Matrix Row 6 26
Matrix Row 7 25
Matrix Row 8 24
Matrix Row 9 12
Note: Note button columns are in an alternating zig-zag arrangement with the exception of Col 9 which just skips over the unused matrix locations. Control buttons will be soldered to each column separately as described in the following section.
Solder a 1N4148 diode to the top-most lug of each button in a column, with the stripe facing away from the button. If angled left/right in a manner consistent with the zig-zag layout, you should have a neat straight row to connect through vertically.
(Optional) If your diode legs are long enough, you may be able to solder them directly to each other as I did, saving the need to cut and strip lengths of red column wire.
Similar to how the horizontal rows were soldered previously, solder the diodes for each vertical column together.
Solder a 10-20cm long wire link from the end of each column (left to right) to the defined column pins on the Teensy, using the photo above as reference:
Name Teensy 3.6 Pin
Matrix Col 0 2
Matrix Col 1 3
Matrix Col 2 4
Matrix Col 3 5
Matrix Col 4 6
Matrix Col 5 7
Matrix Col 6 8
Matrix Col 7 9
Matrix Col 8 10
Matrix Col 9 11
Control buttons share a single common row as described above, but are each connected into the 10 separate columns separately.
Solder a 1N4148 diode to the top-most lug of each button, with the stripe facing away from the button.
Jumper wires should be measured, cut and connected to the existing columns in the following arrangement (perspective is from the underside of the buttons as in the reference photo):
8 6 4 2 0
9 7 5 3 1
Wiring everything else to the Teensy:
DIN MIDI Connector:
Connect DIN pin 5 to Teensy pin 1 through a 220 ohm resistor.
Connect DIN pin 2 to a shared GND pin on the Teensy.
Connect DIN pin 4 to +3.3V on the Teensy through a 220 ohm resistor.
Connect the TS tip connector to pin 39 on the Teensy.
Connect the TS ground connector to a shared GND pin on the Teensy.
Wire the leftmost lugs of each pot together, and connect them all to the +3.3V pin on the Teensy
Wire the rightmost lugs of each pot together, and connect them all to a shared GND pin on the Teensy.
Wire the center lug of each pot to the appropriate pins as defined below:
Name Teensy 3.6 Pin
Pot Left/Left A22
Pot Left/Middle A21
Pot Right/Middle A15
Pot Right/Right A14
Wire the pins of each I²C connector to the appropriate pins as defined below:
Name Teensy 3.6 Pin
I2C Clock (SCL) A5 (SCL0)
I2C Data (SDA) A4 (SDA0)
Test everything thoroughly.
Wrap the Teensy MCU with an insulator (tape or otherwise) to prevent any errant shorts against exposed wiring, and tuck into the cavity behind the LCD.
Finish assembling the case panels.