Build your own MIDI circuits
Frequently Asked Questions.
MIDI & Music
MIDI and Music Information
MIDI Diatonic 40 + 11 Accordion Encoder with LCD Menu


MIDI Diatonic Accordion with LCD Menu


This MIDI Diatonic Accordion with LCD Menu Encoder is capable of encoding 51 momentary action, push to make, single pole single throw (SPST), switches, 40 switches are used for the Melody section and 11 switches are used for the Bass/Chord section.


The switches produce the equivalent MIDI note-on/note-off data commands on MIDI Channels 1 to 3. The 40 Melody switches are on MIDI Channel 1, the Bass switches use MIDI Channel 2 and the Chord switches use MIDI Channel 3.  The encoded switches are wired via IN4148 diodes.


This unit provides a MIDI output to a standard MIDI DIN socket. This unit can work in standard MIDI mode, at a MIDI Baud rate of 31250.


16x8keys_LCD.JPG (43949 bytes)


MIDI Diatonic Accordion with LCD Menu


PRICE:  €75.00





The MIDI Diatonic Accordion with LCD Menu Unit consists of:

  • The MIDI channel, Program Change, Velocity and Transpose are selected via the switches on the LCD menu,
  • An assembled Arduino MEGA board,
  • A 2.1mm power socket, and associated LED, 
  • USB power or external power choice,
  • A MIDI 5-pin DIN output socket,
  • The switches circuit schematic is available,



The MIDI Diatonic Accordion with LCD Menu unit requires:

  • a 9v battery or equivalent DC power source or USB connection,
  • Suitable key-switches, magnetic reed switches or hall effect switches,
  •  and associated IN4148 diodes


Circuit Schematic:

A switches circuit schematic of the MIDI Bass Pedal Encoder with LCD Menu shows the switch connections. There is also a circuit schematic diagram using Hall Effect switches.


Mapping of the the 40 switches for the Melody section and mapping of the 11 switches for the Bass/Chord section, are available


The circuit schematic for the Arduino MEGA and the Arduino Mega Pins layout,  are also available.






Menu Selection & Specification: :

The Menu Selection button cycles through the Menus:

  • MIDI Channel: 1 to 16
  • Program Change: 0 to 127
  • Velocity: max 127
  • Transpose: +/- 2 Octaves in semitone steps

 For each Selection the Value up/down buttons can set the MIDI Channel, Program Change, Velocity and Transpose values. Also the MIDI Channel, Program Change and Velocity values are stored in EEPROM so they are remembered each time the unit is powered up or reset.


Note that the switches need to be pressed and released quickly to get into each menu. There is a compromise between switch debounce delay and menu delay when running through menu selections. Pressing a switch once enters the next value, while holding the switch down continually runs through menu selections



MIDI OUT Wiring:

 midi_out_LCD.JPG (56402 bytes)

     *Click to Enlarge*

The MIDI OUT connector uses  5-Pin 180 degree DIN socket. Note that the MIDI OUT wiring is polarised and the correct pins should be used.





MIDI Diatonic Accordion Encoder Wiring:

The switches are organized in a 8 x 7 matrix (up to 56 switches) arrangement.  Note only 51 switches are required, and ONLY the switches required need to be wired to the matrix.

The lowest note  is switch SW1 wired via diode D0 between Pins 22 and 23 of the Arduino MEGA.

The next note  is switch SW2 wired via diode D1 between Pins 22 and 25 of the Arduino MEGA.

The next note  is switch SW3 wired via diode D2 between Pins 22 and 27 of the Arduino MEGA.

The next note  is switch SW4 wired via diode D3 between Pins 22 and 29 of the Arduino MEGA.

The next note  is switch SW5 wired via diode D4 between Pins 22 and 31 of the Arduino MEGA.

The next note  is switch SW6 wired via diode D5 between Pins 22 and 33 of the Arduino MEGA.

The next note  is switch SW7 wired via diode D6 between Pins 22 and 35 of the Arduino MEGA.


The other 7 pins 24,  26, 28, 30, 32, 34 and 36 are wired in a similar manner to all the other switches.


Pin D22 is connected to switches SW1 to SW7,

Pin D24 is connected to switches SW8 to SW14,

Pin D26 is connected to switches SW15 to SW21,

Pin D28 is connected to switches SW22 to SW28,

Pin D30 is connected to switches SW29 to SW35,

Pin D32 is connected to switches SW36 to SW42,

Pin D34 is connected to switches SW43 to SW49,

Pin D36 is connected to switches SW50 to SW51,


Each of the other side of these group of 7 switches (eg SW1 to SW7 etc.) is wired to a diode on the Cathode (K) side (end of diode with stripe).

The other side of each of these diodes is looped to  other diodes. 


Power Supply:

The  Arduino MEGA can be powered via the USB connection or with an external power supply. The power source is selected automatically. 


External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector. A low dropout regulator provides improved energy efficiency.


The board can operate on an external supply of 7 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.