How do I connect these switches from a midi pedal to arduino - strage pin outs

Hi,

I am new to Arduino and may have bitten off more than I can chew already with my first project. I am trying to re-purpose a midi foot controller so I can customize what it does to interface with newer audio hardware.

The controller has 15 switches and 13 leds. I have traced the circuit board (and confirmed with powering up the leds and continuity testing the switches) and determined which pins are used to power each led, the grounds, and which pins are activated (closed? is that the right word) when each switch is pressed. The switches are momentary (activated as long as held down).

The leds all make sense - a common +ve pin and a -ve pin for each led.

Questions 1 - How do I connect these leds to an arduino (I am using a Mega) that use a common +ve and individual negative and be able to turn them on and off? Diagrams I have seen in arduino tutorials have all the -ve as common ground.

The switches have me a bit stumped. I figure that with so many switches and leds, and given it is an older controller, they ran out of pins on the micro-controller and had to double things up. The following shows which two pins are activated when each of the switches is pressed (I have given somewhat arbitrary numbers for the pins (which make sense to me on the board), but the relationships are correct). The first number is the switch, then a colon and then the two pins which are activated separated by a comma:

1: 2, 10
2: 6, 10
3: 8, 10
4: 10, 22
5: 10, 26
6: 2, 16
7: 1, 16
8: 16, 20
9: 22, 25
10: 25, 26
11: 2, 21
12: 1, 21
13: 20, 21
14: 21, 22
15: 21, 26

Question 2 - What is going on here? How would I connect these up to the arduino so that I could use them individually (and ideally, more that one at the same time)? I have done a little reading here on the forum and perhaps this could be some sort of matrix setup or need a shift register or something?

Please let me know if there is anything I can do to massage the pin out data better to make it more understandable or to make it easier for me to use when hooking things up.

Any insights would be much appreciated. Maybe I should have started with a blinking light or something :o

  1. Connect the common positive to 5V. Connect each LED through a resistor to a pin. The only difference from the normal setup is that the LED will be ON when the pin is LOW and OFF when it is HIGH.

  2. What does "the pin is activated" mean to you ?

Steve

slipstick:

  1. Connect the common positive to 5V. Connect each LED through a resistor to a pin. The only difference from the normal setup is that the LED will be ON when the pin is LOW and OFF when it is HIGH.

  2. What does "the pin is activated" mean to you ?

Steve

Hi Steve,

Thanks so much for your help.

The midi switch/led board has 23 pins which connect to a ribbon cable which then plugs into the main circuit board for the midi controller. What I did was trace the circuits to find out when I push one of the switches on the midi board, what 2 pins created a closed circuit. To confirm this, I used a continuity tester in my multimeter which would beep when I connected the two probes, one to each pin, as per my diagram above. So that is to say when I push switch 1, a circuit is created with pins 2 and 10. Does that make sense?

I am confused, as there is no common ground here. The switches are wired to use different pin configurations to complete a circuit.

I want to know how I could wire this, and code it, with the arduino so I can register when the buttons are pushed.

Sorry if my explanation or terminology is bad - I still have a lot to learn!

I'm sure your buttons are put in a matrix. Put it in a spreadsheet program (or on a piece of paper).

Columns with numbers 1..
Rows with numbers 1..

On the intersection of a column and a row, put the number of the button that connects when you press it. Note that you might have to measure in both directions. You say that 2 and 10 connect when you press the button, does that still happen when you switch the probes? If not, there are diodes involved.

    1   2   3   4   5   6   7   8   9  10
1
2                                      b1
3
4       b4
5
6                                      b2
7
8                                      b3
9
10

Note that b4 is a fake (not relating to your numbers).