the MIDI Dickhole Keypiss

Last updated: July 26nd, 2009

About

The Dickhole Keypiss is a USB MIDI controller based on the Teensy++ AVR board. Its main user interface includes a touchtone keypad from a vintage analog telephone, a rotary encoder, and a two-digit LED numeric display.

It is primarily geared at being a sample trigger -- you can turn the encoder knob to select a controller number, and press one of the 12 keys to trigger a sample in that "bank". It was used by CRM114 Discriminator at toorcamp in July 2009 and at Someday Lounge in PDX on July 17th 2009.

The unit was intended to mirror the filmtastic sequence of punching in launch codes during the cold war. Playing this device should feel like permanently dialing the launch sequence, initiating the war.

Schematics/PCB

The circuit board was etched at home using a simple copper-clad board (only single sided is necessary), iron on transfer paper, and ferric chloride. In other words, you can print out the PCB pdf and make one yourself... in your bathroom...in about 20 or 30 minutes. Soldering the parts probably takes 45 minutes or an hour, and loading the firmware should take about 15 minutes.

Bill of Materials

The Dickhole Keypiss was built on the cheap, but the Teensy++ and enclosure were purchased retail (also on the cheap). If you want to build your own, you'll need to assemble the following:

Telephone keypad: $0 (junk box)

Copper clad board: < $1 (surplus, I think Eric or Laen got a bunch on eBay)

Rotary encoder: $0 (from Don, they're about $0.64 retail)

Encoder knob: $0 (I never buy knobs that nice, I must have scrounged it). In in a pinch you can forego the knob or superglue an action figure's head to the encoder.

Teensy++ controller board: $27 retail (I got mine cheaper)

LED digits: 2 at $1.57 each retail. Mine were LA6960 and I had them in the parts bin for 15+ years, so my cost really was $0.

Current limit resistors: < $0.10 each...so let's liberally call it $2.00 total (mine were cheap after I bought Paul beer).

USB cable: $0 (I dunno, it came with a camera or something. You can get these retail at FreeGeek for like $1.00)

Enclosure: $0.49 retail (This former jewelry case was normally $0.99 but I hit the magically colored special [black!!] at the Goodwill).

My cost: About $13.49.

Your DIY cost: Probably less than $35, including the $27 Teensy++

Note: Other than the board itself, this list does not include the materials required to make your own homebrew PCB.

Images

Click any of the images below to zoom in and slideshow. If you seek punishment, you can peruse the directory of full size originals.

Firmware

The following firmware can be compiled using the familiar gcc toolchain, linked against Dean Camera's LUFA (as of May 2009), and uploaded with Paul's custom Teensy firmware/loader software. If you're using a more modern version of LUFA, you will probably have problems. If you port it, please feel free to contribute back to me.

The source is here: keypiss.tgz There are a bunch of files, among them are:

keyscan.c - Code for scanning in the keypad matrix.

midi.c - LUFA helpers for writing note and controller changes to the usb endpoint

usb_midi_descriptors.c - Declares implementation specific details of MIDI within the world of LUFA

keypad.c - main program.

Pd patches

Sorry, for now, you'll have to roll your own Pd patches. Because it's midi, this should hopefully be straightforward.

How it works

The main approach for the Dickhole Keypiss is to generate a controller change (CC) event when the knob is rotated while updating the 2-digit display. Pressing a number (1-12) on the telephone keypad will generate an appropriate note-on MIDI message, and then later releasing the button will generate the corresponding MIDI note-off message.

In the AVR code, a hardware timer is used to poll the state of the keypad and the rotary encoder. The LUFA USB scheduler handler then checks to determine when state has changed and then transmits the appropriate action.

The AVR/teensy drives the two-digit LED displays directly, with surface mount current limiting resistors on the bottom of the board. There is adequate code in place to translate the rotary value into the appropriate LED controller number. The controller number is limited to values between (and including) 0 and 99.

What to fix/change next: