Hall Effect MPE Controller

With the advent of MPE and MIDI 2.0, more and more MIDI devices are supporting some degree of polyphonic expression control.  Unfortunately,  most MPE controllers are either very expensive or lack tactile feedback.  My goal with this project was to design an MPE-capable musical input device that would fulfill the following design goals:

  • tactile feedback. A performer should be able to feel what they’re doing easily.

  • a reasonable degree of expressivity.

  • an open source platform that would allow for reuse and re-contextualization of the hardware components.

  • a physical design that could be ordered from a limited number of existing vendors and assembled without soldering, laser cutting or 3d printing. Ordering assembled PCBs from a provider like PCBWay or JLCPCB, while somewhat complex, is acceptable to me by this metric.

  • a cost of less than $100 per unit when ordered in reasonably small quantities.

INTERFACE AND SENSORS
Wooting sells its Lekker Hall effect key switches to end users, providing a handy front end for measuring the depth of a key press.  These key switches, unlike regular key switches, have no electrical components; they just a have a small magnet at the base of the plunger that moves up and down as the key is pressed.  I designed a custom circuit board to host a number of linear Hall effect sensors that can detect the position of these magnets. Additionally, the circuit board holds the key switches in position.

In addition to that sensor board, I designed a board to host a Teensy 4.1, which is connected to the sensor board via a 20 pin cable, allowing the sensors to be powered by and communicate with the teensy.  This board exposes VCC, GND and the Teensy ADC pins on standard 2.54mm pins, allowing it to be reused for other projects.  The sensor board also has exposed pins, allowing other microcontrollers to be swapped in.

The physical key layout can be seen in the image below. By arranging the keys in a standard piano formation and using standard typing keyboard spacing, the interface should feel familiar to many musicians.

The four buttons on the left send MIDI CCs and control octave transposition. The 13 at right send note data.

PHYSICAL
To stabilize the key switches, I designed a bracket plate that could be manufactured out of standard PCB material, minimizing the number of different vendors required to build one of these.  These different boards are connected and offset by 25mm M3 spacers at the corners, held in place via 8 M3 screws.  A previous version used simple 30mm M3 screws and washers, but the spacers are a little more robust.

FIRMWARE
The Teensy firmware takes in signal from the Hall effect sensors, automatically calibrates it (as the measured value seems to vary somewhat), and converts that signal to MIDI notes and pressure for the keyboard buttons, MIDI CCs for the top left two buttons and octave transposition for the left bottom two buttons. This data is sent via USB from the Teensy.

SOFTWARE
This controller should work with most MPE capable synthesizers, as long as they respond to the 16 channels of MPE normally (meaning, channel 1 is an Omni control channel and 2-16 are reserved for individual voices). Ableton has a number of easy options for getting started with MPE, and is a good place to start.

FUTURE STEPS
There are two primary goals with future versions - see how many sensors I can multiplex onto one analog pin reliably so that I can create much larger control surfaces and update my code to allow for more intelligent note-off handling when the number of MIDI notes exceeds the MPE maximum. 

DOWNLOADS
A full bill of materials, firmware and Gerber files are available upon request. Please send me an email (nathan@nathanprillaman.com) if you would like to put together your own unit. I ordered my PCBs (assembled) from JLCPCB without any issues, but there are still a few complexities in the parts placement process that I would like to make sure are consistent before I make these files available publicly. I would like to avoid getting a bunch of emails saying “my parts are rotated in the 3d viewer.” Parts placement with JLCPCB is a little bit idiosyncratic and inconsistent, and though their engineers usually fix any issues that arise, I would like confirm I can do an order from them without any manual intervention before I unleash these files. This is meant to be an accessible entry into this sort of thing for my students, after all. If you’re willing to fiddle with it, I’ll happily send you the files as-is, and you’ll be able to have your very own unit without much issue.

The controller.

A closeup of the underside of the sensor board. The stabilization pins of the key switches are visible in white, to the left and right of each hall sensor. The sensors are mounted on the underside of the board to eliminate the need for a separate spacer and stabilizer between the key switches and the sensors.

A short demo of the controller in action. Sounds are from Ableton’s Wavetable synth, plus a track of pre-recorded drums.