MIDI Pitch Mod Wheel Arduino DIY

Some forum dwellers do some midi DIY; this is a recent project.

I’ve been attempting to move a more into keyboards in addition to guitar so I got a used M-Audio Hammer 88 controller. This weighted controller has a pitch wheel, mod wheel, volume slider, sustain pedal, soft pedal, and an expression pedal. I like to have a keyboard at home and a keyboard at practice (only carrying a USB stick to practice is very easy on the back…), so I decided to modify my daughter’s Casio CDP-100 weighted 88 key that is collecting dust. It’s got speakers, reverse polarity sustain pedal, and a 5-Pin DIN midi out, but nothing else. It “feels good.”

There are some quirks about the CDP-100 that I wanted to correct AND add functionality:

  1. Add midi controllers to match the Hammer 88 (make a much cheaper duplicate with the CDP-100 weighted keys)
  2. Fix the blasted 5.5mm x 1.5mm reverse polarity DC connector
  3. Add a way to merge a future keyboard into the midi IO stream
  4. Add a way to merge an Art-11 midi foot pedal (and 12VDC power) for program changes
  5. Merge the CDP-100 midi output with all new controllers and signals.
  6. Use a normally closed sustain pedal (like Yamaha FC4)
  7. Add some LEDs to confirm location of new controllers and Midi IO

I took pictures of the construction sequence. It’s a wooden enclosure that replaces the left side of the CDP-100 and contains an Arduino Mega, all the controllers, the Midi IO, etc. Pictures are pretty self explanatory.

Notes:

  1. Midi requires Opto Isolators on input, so an Arduino shield was made to house the simple electronics. There are three midi inputs and one merged midi output to Cantabile.
  2. Pitch and Mod wheels are not full travel! Even though the pot can move 300 degrees, the wheel only moves 90 degrees. That’s a lot of resolution loss and midi pitch is 2^14 resolution. An Arduino analog input only has 2^10 resolution from 0-5VDC, so the smaller pot movement degrades the pitch resolution more. I ended up using an Exponential Moving Average for the Pitch wheel to try to provide “fake” resolution. Every loop sends an updated pitch CC until it reaches the pot position.
  3. Other than removing the left keyboard cover, there were no modifications to the CDP-100. It can be returned to normal with two bolts.
  4. The enclosure seemed roomy until the wires were added!
  5. Pots are noisy! So every analog controller input as a deadband to avoid flooding the midi IO. Also, every output has an if-then to never send a duplicate midi CC value.
  6. Use resettable fuses (the four tan components in a row) on all 5V outs to pots/pedals/switches, especially those with TRS jacks. I’ve blown Arduino internal 5V voltage regulators when inserting 1/4 TRS plugs because there can be a momentary shunt from 5V to Ground.

I’ll probably add few more comments when I review.

4 Likes

I enjoyed flipping through the photos. Nice job! Reminds me I need to fix of the pitch wheel on one of my Axiom 61 1st gen units :grinning:

Hi @easteelreath

Very nice work. I bet that was great fun to put together and get working.

Brad

I’m no expert on the guts, but as someone who has worked with wood my whole life, some very nice woodwork on your part. Adaptation at its finest