I want some help with the ports

Hello! I want to make a Midi Controller using MIDIUSB library aiming to be able to make a DJ Controller. I want to use:
19x Potentiometers
5x Slide Potentiometers
5x Rotary Encoders
32x Push Button Switches

First of all, I know that the Arduino Pins aren't enough to handle everything, so can someone guide me on what kind of Multiplexors-Port Expanders will I need?

I am thinking of buying this "Arduino":Leonardo r3 atmega32u4 development board with usb cable geekcreit for arduino - products that work with official arduino boards Sale - Banggood.com

And I don't know if it's possible to switch 16 of the buttons with these:10 pcs rgb series red mechanical switch for cherry mx mechanical keyboard replacement Sale - Banggood.com

Any other tip would be greatly appreciated!
Thank you in advance, and sorry for my bad English! :slight_smile: :slight_smile:

I can't give you a recommendation, but you can get analog and digital multiplexing chips. BTW - The Arduino analog inputs are multiplexed inside the ATmega chip... There is only one multiplexed analog-to-digital converter inside the chip.

And I don't know if it's possible to switch 16 of the buttons with these:10 pcs rgb series red mechanical switch for cherry mx mechanical keyboard replacement Sale - Banggood.com

You can use any switches you want because you only need to "read" an open or closed contact.

19x Potentiometers
5x Slide Potentiometers
5x Rotary Encoders
32x Push Button Switches

That's a lot of controls for a DJ controller! The Arduino should be able to handle it (unless you need lots of memory or something) but I'd advise you to build or "prototype" something simple first.

An Arduino Due will be much easier. It has 54 digital pins, all of which have interrupt capabilities (needed for rotary encoders, Leonardo only has 5, you need 10), and 12 analog pins. This means you only need some analog multiplexers.

You may be interested in my MIDI Controller library as well.

Pieter

Pots - I would use three SPI 8-channel ADC, such as
https://www.digikey.com/product-detail/en/microchip-technology/MCP3208-CI-P/MCP3208-CI-P-ND/305928
Can be read much faster than the onboard 10-bit 110uS ADC.
5 rotary encoders, need 10 pins with PCINT inputs.
32 push buttons, wire to 4 8-bit ports, read whole port at once and see any 0's have showed up.

PieterP:
An Arduino Due will be much easier. It has 54 digital pins, all of which have interrupt capabilities (needed for rotary encoders, Leonardo only has 5, you need 10), and 12 analog pins. This means you only need some analog multiplexers.

You may be interested in my MIDI Controller library as well.

Pieter

Seems such an attractive choice. What kind of a multiplexor do you recommend, because I don’t know a lot about electronics-etc. Would 74HC4051 work and do I need one or more? Also does arduino due support MIDIUSB Library, because for some reason, I really want to use USB, rather than MIDI. Thank you a lot!

Yes, Due supports MIDI over USB.

PieterP:
Yes, Due supports MIDI over USB.

What about the multiplexers? How many do I need and what type-model would you recommend?

CrossRoads:
Pots - I would use three SPI 8-channel ADC, such as
https://www.digikey.com/product-detail/en/microchip-technology/MCP3208-CI-P/MCP3208-CI-P-ND/305928
Can be read much faster than the onboard 10-bit 110uS ADC.
5 rotary encoders, need 10 pins with PCINT inputs.
32 push buttons, wire to 4 8-bit ports, read whole port at once and see any 0's have showed up.

User interfaces don't need to be pinching microseconds. The onboard ADC should be more than enough to handle this.

xToOToXiC:
What about the multiplexers? How many do I need and what type-model would you recommend?

A 74HC4051 will be just fine for reading a bunch of pots.