It is currently Thu Mar 28, 2024 3:24 am


Arduino to convert an Allen MOS-2 to a MIDI controller

Building organ consoles for use with Hauptwerk, adding MIDI to existing consoles, obtaining parts, ...
  • Author
  • Message
Offline

larason2

Member

  • Posts: 751
  • Joined: Thu Feb 04, 2016 9:32 pm

Arduino to convert an Allen MOS-2 to a MIDI controller

PostFri Feb 05, 2021 4:03 pm

I recently finished a project to convert my Allen MOS-2 225 RTC to a MIDI controller using an Arduino Mega. Only the keyboards and pedals work currently, but the plans are also to wire up the expression pedals and the combination action someday. As far as I know, this is the only Arduino project of this kind to wire a whole organ console using one Arduino, where the complete code and schematics are present along with instructions. An Arduino Mega is relatively inexpensive compared to other options available, which makes it an attractive unit to use. Let me know what you think of it!

https://create.arduino.cc/projecthub/La ... ans-f3756c
Offline
User avatar

engrssc

Member

  • Posts: 7283
  • Joined: Mon Aug 22, 2005 10:12 pm
  • Location: Roscoe, IL, USA

Re: Arduino to convert an Allen MOS-2 to a MIDI controller

PostSat Feb 06, 2021 1:32 am

Maybe I'm missing something, but with a 6 row by 7 column matrix, how does one connect a 61 key manual?

Rgds,
Ed
Offline
User avatar

NickNelson

Member

  • Posts: 880
  • Joined: Tue Dec 20, 2005 10:31 am
  • Location: Yorkshire, UK

Re: Arduino to convert an Allen MOS-2 to a MIDI controller

PostSat Feb 06, 2021 2:18 am

The 6x7 matrix relates to the pedals, according to the description the manuals are 6x11 matrices.

Nick
Offline
User avatar

engrssc

Member

  • Posts: 7283
  • Joined: Mon Aug 22, 2005 10:12 pm
  • Location: Roscoe, IL, USA

Re: Arduino to convert an Allen MOS-2 to a MIDI controller

PostSat Feb 06, 2021 2:43 am

Yep. Got it. What I was interested in was wiring the whole organ console using one Arduino (vs a separate encoder for each manual), Admittedly I haven't done much to any extent with an Allen MOS-2, but thinking in terms of how this project could be applied to other (larger) instruments as the schematic shows only a 6 row by 7 column matrix,

So my question refers to how to connect multiple keyboards (6 X11 matircies) plus a pedal board (6 X 7 matrix) to a single Arduino Mega?

Will need to do a re-read.

Rgds,
Ex
Offline

larason2

Member

  • Posts: 751
  • Joined: Thu Feb 04, 2016 9:32 pm

Re: Arduino to convert an Allen MOS-2 to a MIDI controller

PostSat Feb 06, 2021 12:43 pm

The pedalboard uses a 6x7 matrix, but the manuals use a 6x11 matrix each, as Nick said. I only did this because it was how the manuals were already wired. Since publishing this, there are ways to accommodate more inputs on a single Arduino. One thought I had is you could use a single set of 6 or 8 pins for the rows on all manuals. 8 would be more ideal, as the you could use 8 pins for the columns instead of 11. That means you could wire both manuals and the pedal with only 32 digital pins. You could add another manual or 64 stops with an additional 8 pins.

I’m also working on a design using multiplexers, where you only need 4 pins for a column of 8 pins. Once I finish the design, I will post it here as well. With this type of design, you could easily accommodate 4 manuals and pedal, and 128 stops+ on a single Arduino. It would only work for data input, however. I also have a design to accommodate bussed keyboards using multiplexers on a single Arduino. The capability of that system would also be very good, easily accommodating 4 manuals and many stops. Another future project is to accommodate a combination action with inputs and outputs on a single Arduino using multiplexers and I/O boards. I’ll keep you updated on my progress.
Offline

JmG

Member

  • Posts: 23
  • Joined: Sun Feb 07, 2021 1:45 am

Re: Arduino to convert an Allen MOS-2 to a MIDI controller

PostSun Feb 07, 2021 10:47 am

Hello,
This is my first post on this forum that I follow since the last autumn. I'm French and not very good for translation in English.
Actually I'm making a new console from my old Johannus Sweelinck 10 bought 24 years ago. For now I just keep the case and pedal and the two keyboard with the 5 channels amplifier. The keyboard and pedals are connected to the computer (MacPro 8cores Xeon E5 @ 3Ghz 128Gb Ram) through a Arduino Mega 2560 directly on USB. The keyboards are connected by a matrix 8x8 and the pedals with a 3x4 matrix. The Arduino program is build with the control surface library and is very concise and efficient. I can share it if you want but it is not finished yet because I must add a part for the pistons. The 3 expression pedals are also working through the analogics inputs of the Arduino. All this only powered by the USB connection. I'm waiting for 3 new fatal TP63 keyboards. Those keyboards will be connected also on the Arduino. Each new keyboard have a encoder from Midiboutique "mkcv64smf" . The mkcv64smf are chained. The last is through a optocoupler link to a RX pin of the Arduino. As I have the mkcv64smf , I have tested the configuration and I'm confident that all this can work just through the Arduino USB. If my experience can help someone I 'll be happy !
Offline

JmG

Member

  • Posts: 23
  • Joined: Sun Feb 07, 2021 1:45 am

Re: Arduino to convert an Allen MOS-2 to a MIDI controller

PostSun Feb 07, 2021 10:58 am

In complement there is no problem for connecting the matrix because 8 pins of each matrix is shared and for now I'm scanning two (8x8) an one (4x8) and also a another (8x4) for the pistons with only 40 pins without any shifting register.
Offline

larason2

Member

  • Posts: 751
  • Joined: Thu Feb 04, 2016 9:32 pm

Re: Arduino to convert an Allen MOS-2 to a MIDI controller

PostTue Feb 09, 2021 11:49 am

Thanks JmG for your response. I thought that using the same pins as rows on all channels would work, but I'm glad to get confirmation from your project. I've also ordered the optocoupler (6N137's) for Midi In, and some I/O expanders and am hoping to get the combination action working using just one Mega. I never thought of using the control surface library, that's a good idea. I will take a look at what is available. Cheers!
Offline
User avatar

engrssc

Member

  • Posts: 7283
  • Joined: Mon Aug 22, 2005 10:12 pm
  • Location: Roscoe, IL, USA

Re: Arduino to convert an Allen MOS-2 to a MIDI controller

PostTue Feb 09, 2021 12:39 pm

Very interesting and useful information. My present project is for 4 - 61 note manuals, (8 X 8 matrix), l - 32 note pedal board (4 X 8 matrix), and 4 - analog expression pedals. Would like to add 80 stops and 45 pistons.

Question - should I figure on using one Arduino Mega for just the manuals and another Mega for everything else?

Rgds,
Ed
Offline

larason2

Member

  • Posts: 751
  • Joined: Thu Feb 04, 2016 9:32 pm

Re: Arduino to convert an Allen MOS-2 to a MIDI controller

PostTue Feb 09, 2021 1:05 pm

The Mega has 54 digital pins and 16 analog pins (which can be used as digital pins). If you wire a common row input for all of them, and you’re planning on 8x8 matrix, that would use 8 pins, leaving you with 46 digital pins and 16 analog pins. That leaves you enough inputs for 7 8x8 matrices, or 64x7 inputs (448 inputs). If you wire the pedalboard with 4 columns, 4 keyboards and 1 pedalboard would only use 36 columns, meaning you would still have 64-36=28 pins available. I would reserve 4 of your analog pins for the expression pedals, meaning 24x8=192 inputs left for stops, etcetera. So you could easily wire the whole console for input using just one mega. However, if you want to actuate SAMs using the Arduino, you would need more outputs, which can be done using more arduinos or I/O expander boards, depending on what current demands your transistors have.
Offline
User avatar

engrssc

Member

  • Posts: 7283
  • Joined: Mon Aug 22, 2005 10:12 pm
  • Location: Roscoe, IL, USA

Re: Arduino to convert an Allen MOS-2 to a MIDI controller

PostTue Feb 09, 2021 1:27 pm

In my project, the stops and pistons are lighted. Does the sketch you wrote need anything add'l to cover all these items you mentioned?

Rgds,
Ed
Offline

larason2

Member

  • Posts: 751
  • Joined: Thu Feb 04, 2016 9:32 pm

Re: Arduino to convert an Allen MOS-2 to a MIDI controller

PostTue Feb 09, 2021 2:30 pm

to light LED’s, you need to specify a pin as output, then write HIGH to the pin using Digitalwrite. To turn it off, switch the pin back to input. You have 125 LED’s, so just to run those you could either get two more Arduino Mega’s, which would run them all handily, or a get a single Arduino and get a bunch of 74HC138 demultiplexer boards. There’s a tutorial here to show how to wire them so that with only 4 pins, you can control up to 8 LED’s.

https://www.google.ca/amp/s/www.instruc ... _page=true

You can also chain them to get up to 32 LED’s controlled on 4 pins using an inverter. Even this way though, you still need 16 free pins, so you wouldn’t be able to wire up your whole console project on one Arduino. You wouldn’t need a mega for the LED’s though. You could easily get away with a Due if you had 16 of the 74HC138 boards. If you didn’t want to mess with wiring them in groups of 4 with an inverter, you could also get a mega, and wire each 74HC138 boards to their own 4 pins. You would also need the 125 LED’s and a appropriate resistor for each.
Offline

JmG

Member

  • Posts: 23
  • Joined: Sun Feb 07, 2021 1:45 am

Re: Arduino to convert an Allen MOS-2 to a MIDI controller

PostTue Feb 09, 2021 3:16 pm

You can also use the I2C bus for the leds with some CI like PCF8574 and PCF8574A, each of these CI can drive 8 leds.
Johannus use this trick in my organ. I have just tested detecting a push button and lighting the associated led, this works.
Now i just have to decode the midi message from Hauptwerk and put every things together.
Offline

larason2

Member

  • Posts: 751
  • Joined: Thu Feb 04, 2016 9:32 pm

Re: Arduino to convert an Allen MOS-2 to a MIDI controller

PostTue Feb 09, 2021 3:30 pm

That’s true. There’s also the MCP23017, which has 32 inputs, and you can hook up to 8 to a single I2C bus. Using four of these, you could get away with just the one Arduino. Thanks for reminding me of that! There is an arduino library for using this board, which makes programming easy. Instead of using output/HIGH, you’d have to wire it similar to the demultiplexer though, where the LED’s are turned on when the pin is Output/LOW.
Offline
User avatar

NickNelson

Member

  • Posts: 880
  • Joined: Tue Dec 20, 2005 10:31 am
  • Location: Yorkshire, UK

Re: Arduino to convert an Allen MOS-2 to a MIDI controller

PostWed Feb 10, 2021 3:00 am

larason2 wrote:There’s also the MCP23017, which has 32 inputs, and you can hook up to 8 to a single I2C bus.


Yes, I've used these (though they actually have only 16 lines per chip which can be configured individually as inputs or outputs). I also have had PCB's made for these of which I have quite a few spare if anyone wanted to experiment with them.
Image .
I was thinking about modifying my optical scanning system to use these, but decided eventually that even using the fastest I2C protocol it wouldn't be quick enough for multiple keyboard scanning. For stops control work they would be just fine I think.

Nick

ps I quite like your (larason2) arduino design. The only issue I have is that there ought to be a second 220R resistor in the TX0 line.
Last edited by NickNelson on Thu Feb 18, 2021 12:38 am, edited 1 time in total.
Next

Return to DIY organ consoles / MIDI

Who is online

Users browsing this forum: No registered users and 13 guests