How to use 904 buttons with arduino withoud matrix ?

Hi,
I'm looking for a way to connect 904 push buttons with Arduino.
I have a complexity, 168 buttons must be pressed at the same time.

My project: I'm working to design and produce Electronic Triomino game.
I will prepare the PCB on EasyEDA and I'll request the PCB from PCBWay.

Here is my Proteus design:

Triomino_prototype_v1.PDF (101.4 KB)

I use MCP23017 port extenders to extend ports

I use multiplexer for voltage divider.

How it's work: When a player place a piece on (P1), 3 buttons will be pressed, each button on a different matrix. So button (R-L1-C1) is pressed, then on the code, I activate the multiplexer port X0, then the voltage divider will scan the resistor, and he found a value. Each value is associated on a number (from 0 to 5).

Demux is used for Leds to be activated when a piece is played (leds are RVB (Red=error, Green, OK, Blue=bonus score).

My prototype board: 10 pieces can be placed

My final board: 300 pieces can be placed

Here is my code that is not ready:

Prototype_v11.c (48.9 KB)

A matrix could still be an option if you connect a small diode in series with each button.

1 Like

Hello sambatti88

What is the task of the project in real life?

1 Like

I love DIY projects, and I need to build an Electronic Triomino board for 2, 3 or 4 players.
Each player has an LCD to display score.
When a player place a piece on the board, the microcontroller need to calculate the position of the piece then the value of the the three numbers of the piece (ex: 3-5-0), I will use voltage divider for that.
I'm looking for NFC/RFID approach, but my reader must be 6mm diameter max and reading distance very short (1 or 2 mm). So matrix still very easy, with magnetic buttons

Specify - something will mechanically hold the button pressed or are we talking about its logical status? In the second case, you can mark the button as selected in the program and open it, so the matrix circuit is quite suitable

Ahh, a retro 80's game. Got one somewhere, haven't played in years. Following! SO you're using a triangular grid with sensors for all 3 tips of every element? Yea, that'll get complex, but doable. Every element has 3 corners, so resistive dividers tell the value. You're looking to scan all connection points, looking for analog values. That means you really want to scan pins to analog inputs, no? It's not just about the presence/absence, but the actual value at each locus, I think. Please clarify.

I mean that the button when pressed, mechanically stay closed.

  • When I need a lot of switches I use an IR remote, only one Arduino pin is needed.
    Software controls push on push off behaviour .
    Not even close to 904 but maybe there is a compromise.

  • About $3.00

  • Add a plastic decal as needed.

At this point, whether or not you use a matrix doesn't seem terribly important. More important are things like, how will you wire 904 pushbuttons, how far are they from the arduino, what environment (home, vehicle, industrial) are they in, how many do you need to be concerned with being pushed at once, etc.

There are many possible solutions to this.

23 hours, no response. @sambatti88 Are you still with us? Could you please refine your description, as per my question 24 hours ago?

Hi @camsysca , I'm working on updating my description because I think that many people don't understant my project.

1 Like

Was I correct in the one sensing concept? are you trying to sense the value at each tip of each element?

@camsysca no, I updated the desciption, try to read the documents that I provided, you will understand better my need.

@cedarlakeinstruments I updated the description of my request, I tried to explain all my project and provided documents.

Ahh, sorry. We discourage posters from updating their first post, because it makes posts that follow read like complete nonsense.
Thanks, I'll re-read it now.

Exactly as I described. Good luck.

By the way, I took a look at your code. Please consider the use of arrays, constants, and variable names. It does compile, at least.
And go to preferences and set compiler warnings to ALL. There are messages you should deal with, even at this point in development.

You made our replies into nonsense. Good luck with your project.

1 Like

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