75 Button Matrix

Hello all,

I am looking for advice and help on how to create a button matrix that has 75 buttons on it. I know that is alot!!!

I will be making the matrix using 15 rows and 8 columns in my matrix.

Problem is.... the Leonardo doesn't have enough analog or digital pins. I though about using the MEGA but that, as far as i am aware, can't be used as a HID or support the joystick.h library.

I have written the code for the leo but i need a way to expand the board to be able to accept the number of rows or columns.

Can anyone point me in the right direction for this please. i am assuming i will need to use i2c in some way.

thanks in advance!

It does have enough pins ofr 75 keys in a matrix!

5x15 = 75. Why 8 columns?

You can reprogram the 16U2 on a Mega to be an HID device. There are lots of topics on that.

its the way the unit is set up... if i do it 5x15 it would be a nightmare to wire up
This is what the button layout is like:

Nice. I just have to say you the opposite of me. I usually do the software and never get around to doing nearly the same level of work on the hardware.

I punted on reprogramming the 16U2, as easy as it might be for some I found that using a (forget which) Arduino with HIB out of the box controlled as a sub processor was better expenditure of my time.

For you matrix, you could use I2C I/O expanders. If you used a matrix keyboard library you’ll have a different sort of work from what you’d need to do to modify your own scanner. Although with an expander you could do one input per switch, more wire less code. I tend to code as I have intimated.

Look at the PCF8575. I got bare DIPs, they work well. I see them on breakout boards also for your convenience.

HTH

a7

From the grouping shown, I would suggest wiring it as 12 groups of 7 buttons, (altho 10 groups only have 6 buttons),
then use Keypad.h library to read them.

if i used Hoodloader2 would that work to enable the 16u2?

samsee23:
its the way the unit is set up… if i do it 5x15 it would be a nightmare to wire up
This is what the button layout is like:

Imgur: The magic of the Internet

I don’t really see a difficulty with wiring a 5x15 matrix, the physical arrangement is not relevant to what the keys represent in the code.

You could also use two HT16K33 chips that will handle 39 keys each.

Also note that there are four three pins on the Leonardo ICSP header that can be used for general input/output, D14/MISO, D15/SCK, and D16/MOSI. There is also D17/SS but this is connected to the Rx LED and not easily accessible.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.