Melodicade

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.

Design started:

  • February 2020

Build completed:

  • April 2020

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.
  • Experiment with an LCD screen for feedback of settings, rather than simple LED lights, or audio cues that pollute live performance.
  • Bring the design language and usability upgrades from the 2019 Harmonicade project to the Melodicade, allowing for better playability, easier construction, and parts that can be modified without reprinting the 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 to learn about 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, embracing printing lines and leaving most parts as they were straight from the bed this time. The textured look and feel has grown on me, and this might be my preferred route going forward.

Notes:

Having access the full spread of the Harmonicade's two decks is great, but the downside lack of portability still had me mainly reaching for the Melodicade prototype #3 when accompanying my son or daughter with viola or recorder practice. After enough time spent in the "good enough" trap, the chewed up state of this prototype finally pushed me to build something more polished, and I'm glad that I spent the time. For once I can't immediately think of something that I want to change (at least hardware wise), and I'm satisfied to keep making music with this for the foreseeable future.

Thingiverse STL Files:

Note: This will require a 3D printer with a 300mm2 or larger build plate, such as the Creality CR-10.


Melodicade Printing List

Shopping list used for this build:

Note: In total, parts cost approximately $300 USD for this project (mostly from Sanwa buttons) without modifications, as built in 2020.

Teensy 3.6:

https://www.pjrc.com/store/teensy36.html

  • 1 x Teensy 3.6 or other Arduino compatible micro-controller with sufficient I/O pins

Buttons:

https://paradisearcadeshop.com/home/controls/buttons/sanwa/357-sanwa-obsf-series

  • Control panel:
    • 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
  • Note buttons:
    • 46 x Sanwa OBSF-24 Green
    • 39 x Sanwa OBSF-24 White

Potentiometers:

https://www.amazon.com/gp/product/B07B64MWRF

  • 4 x 10K Ohm Potentiometers with Knobs

Panel Mount Jacks:

https://www.amazon.com/gp/product/B00CMXRLXM

  • 1 x 1/4" Female TS Mono Panel Mount Jack

https://www.amazon.com/gp/product/B07G4XYJ5W

  • 1 x Micro USB 5-pin Male to USB Type B 2.0 Female Extension Panel Mount Jack

https://www.amazon.com/gp/product/B01CJDJTSO

  • 1 x 5-pin DIN Female Connector Panel Mount Jack

Wiring:

https://www.amazon.com/gp/product/B010T5Y6PU

  • 1 x Spool 22 AWG Gauge Solid Hook-Up Wire - Black

https://www.amazon.com/gp/product/B010T5YOR0

  • 1 x Spool 22 AWG Gauge Solid Hook-Up Wire - Red

https://www.amazon.com/gp/product/B06XB1R2NK

  • 95 x 1N4148 Switching Diodes

https://www.amazon.com/gp/product/B072PCQ2LW

  • 1 x Kit Heat Shrink Tubing

https://www.amazon.com/gp/product/B072BL2VX1

  • 2 x 220 Ohm Resistors

Filament:

https://www.amazon.com/dp/B07DN35CXQ

  • 1 x Spool PLA Filament 1.75mm - Black

https://www.amazon.com/dp/B07DN35CXQ

  • 1 x Spool PLA Filament 1.75mm - White

https://www.amazon.com/dp/B07DN35CXQ

  • 1 x Spool PLA Filament 1.75mm - Gray

Miscellaneous:

https://www.amazon.com/gp/product/B019K5X53O

  • 1 x 16x2 LCD Character Display (With I²C Interface)

https://www.amazon.com/gp/product/B07WRC6SDV

  • 48 x Wood Screws (M4 x 25mm)

https://www.amazon.com/gp/product/B07PXNTT7K

  • 4 x Black Rubber Feet

Build Guide:

Deck Wiring Instructions:

1N4148 diodes soldered to column lugs, black wire soldered to row lugs.

Rows:

  • Cut black wire into 85 x approximately 3cm long links, and strip 5mm of shielding from both ends.
  • Bend the ends into J-shaped hooks using a needle-nosed pliers, and link the bottom-most lug of each button in a row together.
  • (Optional) Cut a single wire to the length of each row, and shave the shielding at each lug position to connect each row via one wire.
  • Solder the ground wires to the bottom button lugs.
  • Solder a 10-20cm long wire link from the end of each row (top to bottom) to the defined row pins on the Teensy.
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

Columns:

Note: Button columns are in an alternating zig-zag arrangement with the exception of the final column (left side of the photo) which skips over the unused matrix locations with jumper wires.

  • 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.
  • (Optional) If your diode legs are long enough, you may be able to solder them directly to each other, saving the need to cut and strip links of red column wire.
  • Bend the diode wire opposite the button into a small hoop to allow it to hold your wire for soldering later.
  • Cut red wire into 81 x 3cm long links, and 3 x 6cm long links, and strip 5mm of shielding from both ends.
  • Bend the ends into J-shaped hooks using a needle-nosed pliers, and link each column of diodes together in a chain.
  • Solder the wires to the diodes.
  • Solder a 10-20cm long wire link from the end of each column (left to right) to the defined column pins on the Teensy.
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:

Note: Control buttons share a single common row, but are each divided into the 10 separate columns.

Row:

  • Cut black wire into 9 x approximately 4cm long lengths, and strip 5mm of shielding from both ends.
  • Bend the ends into J-shaped hooks using a needle-nosed pliers, and link the bottom-most lug of each button together.
  • (Optional) Cut a single wire to length to reach the bottom-most lug of each control button, and shave the shielding at each lug position to connect each button via the one wire.
  • Solder the ground wires to the bottom button lugs.
  • Solder a 10-20cm long wire link from a row lug to the defined row pin on the Teensy.

Columns:

  • 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 photo above):
 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 GND.
  • Connect DIN pin 4 to +5V (labeled VUSB) on the Teensy through a 220 ohm resistor.

Potentiometers:

  • 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 GND pin on the Teensy.
  • Wire the center lug of each pot to the appropriate pins as defined below:
Name:                Teensy Pin:
Pot Left/Left        A17
Pot Left/Middle      A16
Pot Right/Middle     A15
Pot Right/Right      A14

LCD Screen:

Name:                 Teensy Pin:
I2C Clock (SCL)       A4
I2C Data (SDA)        A5
+5V                   VUSB
GND                   GND

Final Assembly:

Once everything is wired:

  • Hot glue the LCD into place.
  • Secure the Teensy behind the LCD with zip ties to prevent it from moving around.
  • Zip the screws in, and you're done.