In the past I’ve used photo-interrupters as key contacts on both manual keyboards and a pedal board, but on those occasions my go-to MIDI encoder was a Midi Boutique hwce-2x and I didn’t encounter any problems.
Currently I’m building a three-manual “budget” console using photo-interrupters as the key contacts on the manual keyboards and Arduinos as the Midi encoders – and I’ve hit a problem that has me totally baffled.
My original intention was to use an encoder based on the Arduino Due for the keyboards and expression pedals, and a smaller encoder based on the Arduino Pro-Micro for the “pistons”. I chose these particular Arduino boards because they do MIDI over USB, thus obviating the need for (and cost of) a MIDI-to-USB interface.
As I completed the photo-interrupter installation on each keyboard I bench-tested it using the Pro-Micro and everything seemed OK.
It was when I mounted the keyboards into the console and connected them to the Arduino Due that I hit problems :
The Choir keyboard performed flawlessly, delivering clean Note-on/Note-off MIDI messages to the Midi-Ox monitor display. But when the Great and Swell keyboards were connected to the encoder they promptly began delivering a continuous stream of random Note-on/Note-off messages.
This had me baffled because the geometry, the circuits and the components were identical for the three keyboards.
Eventually, after consulting Google, I decided to replace the 4k7 pull-up resistors on the encoder with 2k2 resistors and this made an immediate improvement – so much so that at first I thought I’d solved the problem.
However, as I carried out more thorough testing I found that on both the Great and the Swell manuals a few individual keys were not behaving correctly, either not delivering a message at all, or delivering garbage.
At this point I began to suspect that the problems might have been due to the fact that the Arduino Due operates at 3.3 volts rather than 5 volts like most other boards, so I decided to substitute an Arduino Mega that I’d also programmed as a MIDI encoder and that I knew worked satisfactorily with reed-switch key contacts.
Using the Mega’s built-in pull-up resistors I found that the Choir keyboard worked correctly (as it had with the Due), but the Great and Swell keyboards were totally dead, so I promptly set about installing 2k2 pull-up resistors into the encoder circuitry. This brought the Great and Swell keyboards to life – but all was still not well.
Before I summarise the current state of affairs I should explain that the keyboard wiring is an 8x8 matrix arrangement; the keyboards are connected to the encoder by means of 16-way flat cables with IDC connectors that plug into four 16-way IDC headers that in turn are connected to the Arduino pins; and the Arduino is programmed so that the headers are on MIDI channels 1 through 4 respectively.
So, the current situation:
1. The CHOIR keyboard works perfectly on Channels 1, 2, 3, and 4.
(This leads me to believe there is nothing intrinsically wrong with the Arduino programming or the circuitry.)
2. The GREAT keyboard works perfectly on Channel 1, but spontaneously delivers varying degrees of MIDI garbage (continuous stream of multiple Note-on/Note-off messages) as soon as it is connected to Channels 2, 3, 4, and before pressing any key.
3. The SWELL keyboard works perfectly on Channel 1, but on Channel 2 it delivers a continuous stream of Note-on/Note-off messages (mainly 036-C, 052-E, 092-G i.e. first note in each group of eight) when a key is pressed. On Channel 3 Several Note-on/Note-off messages appear simultaneously when a single key is pressed. On Channel 4, some notes are OK; others generate spurious messages when pressed; some notes are dead
Normally I’m quite good at trouble-shooting, but this one has me beat – I can’t find a common thread! I guess I’m out of my depth and any help would be welcome.
If you have read this far – thank you for your patience!
Graham
Currently I’m building a three-manual “budget” console using photo-interrupters as the key contacts on the manual keyboards and Arduinos as the Midi encoders – and I’ve hit a problem that has me totally baffled.
My original intention was to use an encoder based on the Arduino Due for the keyboards and expression pedals, and a smaller encoder based on the Arduino Pro-Micro for the “pistons”. I chose these particular Arduino boards because they do MIDI over USB, thus obviating the need for (and cost of) a MIDI-to-USB interface.
As I completed the photo-interrupter installation on each keyboard I bench-tested it using the Pro-Micro and everything seemed OK.
It was when I mounted the keyboards into the console and connected them to the Arduino Due that I hit problems :
The Choir keyboard performed flawlessly, delivering clean Note-on/Note-off MIDI messages to the Midi-Ox monitor display. But when the Great and Swell keyboards were connected to the encoder they promptly began delivering a continuous stream of random Note-on/Note-off messages.
This had me baffled because the geometry, the circuits and the components were identical for the three keyboards.
Eventually, after consulting Google, I decided to replace the 4k7 pull-up resistors on the encoder with 2k2 resistors and this made an immediate improvement – so much so that at first I thought I’d solved the problem.
However, as I carried out more thorough testing I found that on both the Great and the Swell manuals a few individual keys were not behaving correctly, either not delivering a message at all, or delivering garbage.
At this point I began to suspect that the problems might have been due to the fact that the Arduino Due operates at 3.3 volts rather than 5 volts like most other boards, so I decided to substitute an Arduino Mega that I’d also programmed as a MIDI encoder and that I knew worked satisfactorily with reed-switch key contacts.
Using the Mega’s built-in pull-up resistors I found that the Choir keyboard worked correctly (as it had with the Due), but the Great and Swell keyboards were totally dead, so I promptly set about installing 2k2 pull-up resistors into the encoder circuitry. This brought the Great and Swell keyboards to life – but all was still not well.
Before I summarise the current state of affairs I should explain that the keyboard wiring is an 8x8 matrix arrangement; the keyboards are connected to the encoder by means of 16-way flat cables with IDC connectors that plug into four 16-way IDC headers that in turn are connected to the Arduino pins; and the Arduino is programmed so that the headers are on MIDI channels 1 through 4 respectively.
So, the current situation:
1. The CHOIR keyboard works perfectly on Channels 1, 2, 3, and 4.
(This leads me to believe there is nothing intrinsically wrong with the Arduino programming or the circuitry.)
2. The GREAT keyboard works perfectly on Channel 1, but spontaneously delivers varying degrees of MIDI garbage (continuous stream of multiple Note-on/Note-off messages) as soon as it is connected to Channels 2, 3, 4, and before pressing any key.
3. The SWELL keyboard works perfectly on Channel 1, but on Channel 2 it delivers a continuous stream of Note-on/Note-off messages (mainly 036-C, 052-E, 092-G i.e. first note in each group of eight) when a key is pressed. On Channel 3 Several Note-on/Note-off messages appear simultaneously when a single key is pressed. On Channel 4, some notes are OK; others generate spurious messages when pressed; some notes are dead
Normally I’m quite good at trouble-shooting, but this one has me beat – I can’t find a common thread! I guess I’m out of my depth and any help would be welcome.
If you have read this far – thank you for your patience!
Graham