PACMOD MIDI DJ Controller

For my son’s birthday I made him a DJ controller designed to resemble an old cabinet arcade machine. What follows is a brief overview of the process to make it, including code.

The Teensy was chosen as the brains because of the way it handles USB. Not only does it have native USB, rather than the FTDI USB-to-serial interface that turns making use of the port a series of work-arounds, but as you’ll see in the code the MIDI library makes writing the firmware a trivial pursuit.

Caveat: I found out later that my scaling of the sliders is off & doesn’t allow for full travel in Traktor. Since the controller is away at college with my son I haven’t had access to fix this. I’m certain that it’s just a matter of changing the scale factor, though.

UPDATE: A typo in the code was identified in the comments here that was causing the limited travel. The code posted below has been updated to reflect this.

Once all the parts were in hand the placement of the buttons was measured and marked out in pencil. Once the holes were cut I used a Dremel to put in the 4 indentions that index the buttons and keep them from rotating.

Pot slots

Drilling the mounting holes for the joystick was pretty straight-forward. The slots for the pots were marked out and small holes drilled at each end. A small cut-off wheel on the Dremel connects the dots.

Preparing wiringWiring crimped & solderedButtons being wired

Wiring used quick-disconnects that were both crimped & soldered

PCB ready to etch

I etched a custom PCB as a breakout for the Teensy that used tall female headers as a socket for the microcontroller

Mounted PCB

After programming, I had the enclosure powder coated at a local shop and mounted everything. The final step was to apply a vinyl decal made by friends at Innovative Tint & Graphics.

Mapping

The mapping tried to make use of as much of one for an existing controller as possible, just switched to a different channel.

You’ll want to go over to the Arduino playground and pick up the debounce library Bounce.h to include. It’s a very handy way to easily debounce mass inputs as demonstrated below.

I think the comments and naming make everything pretty clear as to what’s going on. I’ve even left in some junk that was really only part of the development and debugging. The line Serial.begin(38400) is one of these things. It doesn’t need to be there for the code to function. It was just used for the Arduino debugging statements that are now commented out.

If you’re not familiar with Teensy, there’s a good primer on the PJRC site. The most important thing if you’re going to be using the Arduino environment is the Teensy Loader.