Original Hammond Organ Bass Pedals Used In MIDI Application

I wanted to make a switch module that would interfaces the 25-note mechanical bass pedal clavier from an original '60s Hammond B3 organ.
The module houses an Arduino, and 25 micro switches for the Hammond bass clavier to properly interface with.
Switches found here:

With this, I'm able to use real Hammond bass pedals with pretty much any modern "clone-wheel" organ that's on the market today. (In my case, a Crumar Mojo)
The advantages of this are as follows:

  1. That I already have the Hammond pedals on hand (so no need to purchase them)
  2. They also provide the real-deal sturdy feel of the original Hammond B3.

After some initial research, I came across an instructables post by Royce Taft in which something very similar to this had already been done:

Royce's setup involves using 2 separate ATmega328 chips working in tandem (2 were required because a single 328 chip does not contain enough inputs). It also involved making up the entire circuit on a perfboard to facilitate the chips, as well as all other necessary components. Although there is fun to be had in doing all of this, it makes more sense if you just go with an Arduino with more inputs. I bought a ELEGOO MEGA 2560 for only $15.99.

With the more versatile MEGA 2560, I revamped all the code for a single chip. I also made the following changes/updates to code:

  1. Royce used pull-down resistors for every note in his build. I didn't want to have to use external pull down resistors for the 25 inputs, so I utilized the 2560's internal pull-up resistors. And in doing so, I then reversed the logic to properly recognize the switches being pulled to 0V for an active note signal.

  2. Royce wrote the code in for a volume (or "velocity") pedal, which I removed.
    I didn't need this because the clonewheel organ I use (as well as pretty much any other) has a dedicated input for a CV pedal, which controls the universal volume of the entire instrument (both manuals as well as bass pedals simultaneously).
    The velocity data of the notes themselves is not important in organs as it would be in say, a piano-type instrument. In my program, I just left all notes coded at full (127) velocity, via a universal variable "vol" (in case it ever needed to be adjusted).

  3. Rather than have the specific midi channel coded individually in every note, I just made universal variables "onmidi" & "offmidi". (For my clonewheel organ, I had to use midi channel 2. If this ever needed to be changed, It can now be done by altering just two lines of code.)

The following is my code if anybody else is interested in building a similar project.
Take a look at both the original as well as mine, if you are interested in spotting all the differences. I'll try to post some video of it in action in the near future.
Enjoy.

1 Like

Attached is the code:

midi_hammond_bass_pedals.txt (8.79 KB)

You might want to investigate arrays so that your code can be massively reduced in size...

(for instance you only need one array for all these)

void loop()  {
  A = digitalRead(22);
  B = digitalRead(23);
  C = digitalRead(24);
  D = digitalRead(25);
  E = digitalRead(26);
  F = digitalRead(27);
  G = digitalRead(28);
  H = digitalRead(29);
  I = digitalRead(30);
  J = digitalRead(31);
  K = digitalRead(32);
  L = digitalRead(33);
  M = digitalRead(34);
  N = digitalRead(35);
  O = digitalRead(36);
  P = digitalRead(37);
  Q = digitalRead(38);
  R = digitalRead(39);
  S = digitalRead(40);
  T = digitalRead(41);
  U = digitalRead(42);
  V = digitalRead(43);
  W = digitalRead(44);
  X = digitalRead(45);
  Y = digitalRead(46);
...

And do something like

void loop()  {
  for (byte i = 0 ; i < NOTE_COUNT ; i++)
    note[i] = digitalRead (note_pin[i]) ;
...