Arduino Uno is enough

hi i did a dj console, but i want to expand is capability's. i need more encoders, 8 actually
48 buttons, 16 potentiometers and around 42leds.
the solution i found for the 8 encoders is to use pcf8574.
now before is start but this big mess in my head, i would like your ask you, us Arduino Uno capable
to handle all this, or is to slow for this big project.

please see my wiring in the picture how i am thinking to connect the whole thinks. are my connections correct?? please advice.

Uno will be ok.

For your LEDs I would suggest max7219. This will make things much simpler: only one chip, 2 caps and one resistor instead of 4 (8?) chips, 32 (48?) resistors and 4 (8?) caps.

I am not sure pcf8574 is a good solution for encoders. If the encoders are turned quickly, it is easy to miss the signals if the circuitry is not quick enough to respond. I2c chips are not the quickest.

For your 48 buttons, please explain how they will be used. Will more than one button ever be pressed at the same time? Will any toggle switches be used?

A ledstrip is easier than all those shift registers.
There are shift registers that can drive leds: https://www.adafruit.com/product/457
Can you cascade all the shift registers together ?

The 16 channel analog multiplexer/demultiplexer is a good solution for potentiometers. It is fast and there are no problems with accuracy for a potentiometer.

For the buttons, it is possible to use the digital signals and "165" shift registers. I have 32 shiftregisters in a Wokwi project. To keep scanning at a high speed, there should be no other code that takes a lot of time.

I share the doubts with @PaulRB about the encoders. Via the I2C bus is slow, and one or two interrupts per decoder might be needed. How fast are the encoders pressed ? and how many at the same time ? Is it possible to give the encoder a "swirl" like a free running scrollwheel of a mouse ?

The Arduino Uno can deal with all the buttons and leds. No problem. It is the perfect board for simple tasks.
If you want to add dimming leds, visual effects for the leds, a SD memory card, a display, internet connection, or whatever, then the Arduino Uno might not have enough memory.

Some use a Teensy 4.1 for such projects. But that is not a Arduino board, but a "Arduino-compatible" board.

no the encoder will be turn slow, by hand few click at the time, fastest that it may be is half rotation or a full rotation in one second.
no toggle switch, just push buttons, push on release off. in very rare case yes it may happend to need to push 2 buttons, one push on, and then the other push on.. never both the same time.

when you are talking about how fast the encoder will turn, i assume u are talking about 10 full revolutions in one second.. i dont think 2 revolutions in one second are fast?
please clarify this.

Then it will be much simpler to organise your buttons into a matrix. You can use more pcf chips to read the matrix. All pcf chips should be connected to A4&5. Each must be given a different address on the i2c bus by wiring their address pins differently.

You could also consider pcf8575 which is very similar to pcf8574 but has 16 pins.

Have all the buttons and all the encoders connected to "165" shift registers and scan them all 100 times per second. Would that be fast enough ?

is more that enough, imagine you push the play button or the pause button on a cd player.
i dont think so you need to read the buttons 100 time per second.

But a Nano will almost always be much more practical. :sunglasses:

.

But a MAX7219 is far more sensible.

Get one of the MAX7219 matrix modules, wire your 32 LEDs into a 4 (cathode rows) by 8 (anode rows) matrix and wire it to the module instead of the matrix supplied with the module.

Or do you actually have two lots of 32 LEDs ? Each MAX7219 actually drives an 8 by 8 - 64 LED matrix.

xaxax more complicate thinks...

for the moment i have only 32 leds, but in my mind i assume i will need total 56 leds.
the 30 leds will be use for the (vu meter) to indicate the music volume. the rest will be on/off
if a button is preset a led will lid, if that button pressed again the led will be off. so on for the rest of the remaining leds.

i don't know if the max7219 can do this. i assume is nothing more complex by adding 4 74hc595
and i assume is working like the 74hc595. i dont know

the way this think will work is with MIDI note.. the Arduino will receive midi commands and it will pass it to the appropriate led.

It can. There are libraries to make using mx7219 easy in your sketch. As I said in reply #2, the circuit is much easier than 8x 74hc595.

Even without a library, all things are possible with the MAX7219. This by Uri Shaked, the maker of Wokwi: https://wokwi.com/arduino/projects/290144516831183368

I would consider the Arduino MEGA. It has 16 analog inputs for the 16 potentiometers. You could use 14 pins for a 7x7 matrix of buttons and another 14 pins for a 7x7 matrix of LEDs. There are 24 Pin Change Interrupt pins for encoders (you only need 8 or 16 for your 8 encoders). The only external components you would need are 7 current limiting resistors for the LEDs and 7 transistors for the LED column drivers.

your help is so much appreciate.
now i was thinking the whole project, i remember one major issue, Arduino Uno is not a usb midi compliant.
now to use my console with Arduino, i need to have 2 extra programs, midi loop and hairless midi.
even when i flash the Arduino and make it a midi compliant, it didn't work.
ok this is not a big issue, i can live with the 2 extra programs. wondering there is arduino that is usb midi compliant? so to overcome the 2 extra softwears.

There is a USB MIDI library for the Arduino Leonardo and Arduino Micro. The Leonardo is very similar in size and pins to the UNO so it will require external hardware for 16 analog inputs, 8 encoders, 48 buttons and 42 LEDs. The external hardware is about the same as you would use for an UNO.

so arduino Uno is not my friend..arduino Leonardo is my friend for this:)

If you want a USB MIDI device, the Leonardo is a much better friend than the UNO.

so to put all together.
Arduino Leonardo, one pcs , MAX7219 to connect all my leds (are no more than 64), three pcs
pcf8575 (for my 48 buttons), two pics pcf8574 for the 8 encoders. and i assume one pcs 74hc4067 for my potentiometer. exept if i can use pcf8575 too for my potensiometers.

Not only can the MAX7219 do this, but it is the proper way to do it as it is specifically designed to drive arrays of up to 64 LEDs each chip, whereas a 74HC595 is definitely not designed to drive LEDs.

And it is easier to program than your chain of 74HC595s since you only modify one column of eight LEDs at a time, rather than the whole lot.

The UNO is a rather inconvenient board. As is the Leonardo - the Pro Micro is the more practical version.

A PCF8575 is not going to be much use for potentiometers. It has no analog functionality.

Another possibility is to use sx1509 chip. It is similar to pcf8574/5 and has 16 pins. But it also has an extra feature which is that it can scan a matrix of up to 64 buttons.