36 tactile buttons?

Hello everyone, I would like to use 36 tactile buttons (divided into 4 groups of 9 buttons each) in a circuit that uses a ChipKit MAX32.
I have attached a scheme.

What I would like to get with this experiment is :
if one of these buttons has been pressed and which of the 4 groups it belongs to.

It's possible?

Thanks in advance to everyone!

Yes.

But all the resistor are overkill (and might even be to much for the supply). You only need 4. Or even 0 if you use the internal pull up/down.

But yeah, no idea with a ChipKit... Why post here for a chip kit??????

PS You did NOT attach a schematic. That's what we call in the business a Fritzing mess.

septillion:
Yes.

But all the resistor are overkill (and might even be to much for the supply). You only need 4. Or even 0 if you use the internal pull up/down.

But yeah, no idea with a ChipKit... Why post here for a chip kit??????

PS You did NOT attach a schematic. That's what we call in the business a Fritzing mess.

Yes.

But all the resistor are overkill (and might even be to much for the supply). You only need 4. Or even 0 if you use the internal pull up/down.

Mmm so I need just 1 resistor for each group? over 500 ohm?

But yeah, no idea with a ChipKit... Why post here for a chip kit??????

I have MEGA 2560 and MAX32 and I am in a long comparative session. Just very similar in what I need!
But for sure I could to write the same post for a MEGA2560.

PS You did NOT attach a schematic. That's what we call in the business a Fritzing mess.

Sorry, little time to paint it. But finally is correct?

aldoz:
Mmm so I need just 1 resistor for each group? over 500 ohm?

Yes, all switches and resistors are in parallel. Which would have been obvious from the start from a real schematic.

Even 10k is fine. Or the internal pull up/down which is quicker....

aldoz:
I have MEGA 2560 and MAX32 and I am in a long comparative session.

Then you also need a comparison of the support fora...

aldoz:
Sorry, little time to paint it.

No need for paint, pen and paper will do :wink:

in first thank you so mutch for support!

Yes, all switches and resistors are in parallel. Which would have been obvious from the start from a real schematic.

Even 10k is fine. Or the internal pull up/down which is quicker....

Then 4 x 10k resistors. Good.

Then you also need a comparison of the support fora...

haha no way. Here is good!

No need for paint, pen and paper will do :wink:

Just can't paint either with a pen a right electrical scheme!
I am just an amateur with very poor technical base.
I got little time to paint what you saw but yea just very bad about.

But pen and paper is way faster than Fritzing is ever going to be...

aldoz:
Then 4 x 10k resistors. Good.

Are you just going to keep ignoring that the internal pull-up resistors are a thing?

PieterP:
Are you just going to keep ignoring that the internal pull-up resistors are a thing?

No just never handled it neither on MEGA and I need some info about :slight_smile:

How I can use it instead the 4 resistors?

Google my friend, Google :wink: And let Google become your friend as well.

  • You may also try Bing but I found out it's way harder to get friends with Bing...

:slight_smile: I find something interesting :

Pull-up resistors don't work the same as Arduino.

  1. Not all pins have pull-up resistors available.

  2. The pinMode/digitalWrite combination in the previous post doesn't affect pull-ups in Max32.

If you need pull-up resistors on input pins you'll need to add them externally.

No big deal. I had a bunch of 10k resistors in my parts box. Just something to watch if you're moving a project that uses input switches from Arduino to Max32.

So now I know pull up resistors are applied to the pins but not all pins.
Ok, so I need 4 pin with this feature BUT reading these words, I think it's better to use resistors considering my code that is written for MEGA2560.

Another question, now I have 4 resistors in parallel. This could affect their work or (with long time) damaging these little things?

Resistors in parallel isn't a problem. At least, taking in consideration the voltage and power ratings but is not unique to parallel.

But if you did it right, those 4 resistors are not in parallel....

septillion:
But if you did it right, those 4 resistors are not in parallel....

So better not in parallel?

I think I told you before that a MAX32 is a 3.3volt board (like a Due).
Connecting pull up/pins/switches to 5volt could damage that board.
Leo..

It's not a question of better... Like I said, if you do it right (aka want it to work) they are not in parallel.

And Wawa makes a very very good point as well.

Now I trust you realise that you only have four inputs here - you can tell that a button in a group of nine is pressed, but not which of the nine buttons it was.

You effectively have only four buttons, each of which has nine alternate things that may press it.

Paul__B:
Now I trust you realise that you only have four inputs here - you can tell that a button in a group of nine is pressed, but not which of the nine buttons it was.

You effectively have only four buttons, each of which has nine alternate things that may press it.

Thanks again to all you guys.

Yes I just want to know what of the 4 groups has a button pressed. Not important what is exact number of the 9 buttons of the group . Just want to know when a group has a button pressed.

What do you think of this schema?
it's ok?

Yes, that is the general idea. All the buttons in parallel, one pull-down resistor. Repeat for each of your four sections.

That said, I always advise that you make a habit of connecting the buttons to ground, and the pull-up resistor to "Vcc" - your 5 V or 3.3 V supply line that apparently the ChipKit uses. So your black and red are exchanged in that diagram.

This is because it is generally a bad idea to have your supply line wandering out to pushbuttons and the like - there is a risk however slight of it being shorted to ground or picking up or radiating interference to other devices.

The resistor is always close to the microcontroller so is much safer connected to Vcc. In addition, most microcontrollers implement a built-in pull-up "resistor" (or current source) function which may be adequate instead of your 10k resistor.

Thank you Paul for great advices!

take a look on the new schema; do you mean this?

No way to use internal pull up resistor of my MAX32, I read a lot of problematics about and I have no technical level to handle that! :slight_smile: just prefer a simple way using normal resistors.
And (lucky) the resistors will be put not too close to the board!

That looks right.

I do not know about the MAX32 but using internal pull-ups should be dead easy in software.

Really thank you Paul! you are very kind! and now I know how to propely make the wires!

I know little about internal pull-up resistor.. I know each MEGA2560 and MAX32 has this feature.
Just know also that these boards has some pins with that feature and not all pins.

Over all that I read some big difference using it between MEGA and MAX32 when you write the
code to handle it.

So, just prefer the use of standard resistors!