Midi Accordian

Saw a Retweet by @moogmusicinc of a tweet

regan p. akers @Reganomics92
Moog Accordion. Have you thought about it?

and it inspired me to start to make a Midi Accordian.

Using bits of pipe and dowel left over from my Cello project, I made two pivoting sliders and use some chain to stop the two halves from moving too far apart. I took an old game controller apart and used one of the joysticks to sense the movement between the two halves.

The Arduino controller is connected to a joystick on the analog input A0. A midi optoisolator circuit converts the midi current-loop interface to logic levels and goes to the RX input on the Arduino. The TX output is connected to the 5 pin DIN midi output socket using two 100 ohm current limiting resistors. Four digital outputs (D10-13) are used to drive a matrix of switches. Four digital inputs (D6-9) are used to read the 'row' values.


The software sets one of the outputs LOW and the other three HIGH. If a switch of the selected column is pressed then one of the digital input pins (D6-9) will be pulled low. The diodes are used to isolate the switches in each 'row'. If two switches in a row are pressed at the same time and the diodes were not there then two of the digital outputs would be connected together and if one was set to HIGH and the other set to LOW the output circuit could be damaged. With the diodes in place, when a switch is pressed that is connected to a LOW output, the row is pulled LOW and the other diodes in that row would be reversed biased if their switch was pressed.

The software that runs on the Arduino uses pieces of software from my previous projects such as midi guitar, the Aniversal midi controller and the Doodlebug midi to keyboard convertor that can be used to play the Google Doodles.
accordian.cpp
This is the main software that controls the arduino (ATmega 328P) based controller.
 
radioshack logo
Arduino logo