Large amount of analogue pins

Hello!

I am currently working on a project to make a fader wing with 100 faders and a some buttons and switches (number of buttons and switches not yet decided).
I am planning to convert those to a midi signal to be used by a software.

Only problem is, even the arduino mega only has 16 analog pins.
Is there a fairly simple way (I'm no engineer :frowning: ) to use max 3 arduino megas (or another board) to control 100 linear potentiometers?

Any help appreciated!
Thanks

Try an analog multiplexer on for size:

or

You may have some other constraints that make your project a challenge…

a7

Such as?
(Sorry, I'm not too knowledgable, and I know this is quite a challenging project)

Thanks, I will check out those breakoutboards

Edit: When using those multiplexers, is it possible to have say 2 of the faders up at the same time and will they both register? Or is it 1 fader at a time as it's communicating through 1 pin?

Thanks

Also, I can afford to buy multiple arduinos, so if there is a way to connect all of those and consolidate them to max 3 USB ports that output midi.

Haha, only the usual. Time, space and I/O pins.

As for multiplexers, just read up on them a bit.

Basically you set an address using digital outputs, then the multiplexer switches to whatever input channel you selected. Think of it like a rotary switch under program control.

Yes in case that doesn't make it clear, you can have 100 different analog signals and switch your way down to fewer analog inputs. Even down to just one.

So you might find scanning the analog inputs and looking at the keyboard or whatever, and doing any calculations or algorithmic stuff… starts to add up to yes, a challenge.

But nothing alarming yet in your description, so tell us more, in whatever width strokes you'd like, about the project.

Key - develop in sections. Plan first. Keep seeking advice where you need to, and

Read read read code and examples and such like, google for the gal who already did anything like this, &c.

We here.

a7

Beginners often imagine that using multiple Arduinos is a good way to build a project with many inputs/outputs. But using multiple Arduinos brings complications that beginners are unaware of, like the difficulty of getting those Arduinos to collaborate and communicate with each other. This makes the project much more complex and difficult overall.

Using a single Arduino and giving it more inputs/outputs can be complex, but it is still a much better option for a beginner.

Yes. The Arduino can regularly check each fader through the multiplexer(s), so that movements are not missed.

For making a midi device, Mega is not a good choice because it does not have a processor with native USB. Instead, it relies on a separate chip for the USB interface. This makes it either difficult or impossible for it to act as a midi device, or requires extra PC software to make the Arduino appear as a midi device.

Other types of Arduino, like Pro Micro (do not confuse with Pro Mini) have processors with native USB and can appear as a midi device when plugged into any PC/laptop.

So rotary switch meaning that I will have to program which switch the arduino is listening on? If so I don't think it will be ideal for me as I need every single fader to be useable at any given moment.

The plan of the project is to have 3 rows of 33 faders and 1 separate fader as master, along with a couple buttons and switches (the number of switches and buttons I haven't decided yet).

For faders, I was planning to use something like the SL4515G-B104L15CM or it's variants. I honestly have no idea what kOhm faders to use (I am googling about that right now)

The output from the arduino as midi will go into a software, which I can use to map each midi signal to something, and everything will be outputted to DMX through a USB-DMX interface.
I thought that using a computer will be much easier than trying to build my own DMX controller from scratch, as I am no where near smart enough, and I have found many DIY arduino fader wings online; so I thought I can just upscale those to make my large fader wing.

I'm planning to put everything in a pelican or flight case, so the bottom half will be with faders and top part to have a monitor. Planning to make a custom acrylic or some top plate that I can mount into the case and mount the faders to.

I have a fair bit of time and money (nothing crazy in terms of money; total budget excluding case and custom front plate is around 250$ or so)

Thank you very much for your reply!

I will look more into multiplexers.

Do you recommend any board for this?

My initial thought with having multiple arduinos was that I could connect each row of 33 faders to 1 arduino and use it as a completely independant midi device without communicating with each other.

Is there any other options apart from multiplexers? I will look into it but main worry is that it won't register a fader movement while it's cycling (or i think the cycles are fast enough to keep up with a human?); sometimes multiple faders at the same time quickly etc..

Maybe arduino isn't the ideal platform (funny to ask in an arduino forum)
I jumped on arduino as pretty much all the other examples use an arduino, and I have previous experience using arduino.

Sorry to ask so many stupid questions, I'm not very experienced, and I want to make sure that I have all the info required before sinking any money.

Arduino can be used for building a DMX controller, so I'm not sure using MIDI would be an advantage. It might only make the project more complex.

I also wanted to use a computer as I am familiar with Onyx and DasLight and OLA, which all supports midi and I thought it would be much easier to use those

plus they all have very useful features that I need and think it's difficult to progrma myself

Hi, @clowaasdda
Welcome to the forum.

Can you please tell us your electronics, programming, arduino, hardware experience?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

I've made a robot car that senses things around it to avoid with arduino (this project took sooo long)
also made a lot of home automation stuff too
Participated in lots and lots of robotics competition (idk if it would help) and won a couple
Can program in python proficiently and can do c++ with a bit of stackoverflow
Can solder; I fix computers myself and for friends

Yea, I would say I'm not too bad with computers and programming;

Sounds good. And all of that, robots or whatever, will def help.

I have trouble with words, but you are mix and match MIDI and DNX, for reasons that may be entirely valid.

I would benefit from a block diagram showing all the parts of this, including the host computer or instrument or whatever, and where each protocol is the one you have chosen as the route between to blocks.

You might too. :wink:

a7

Thanks!

Don't know what a block diagram is but:

Faders/Buttons (inputs) -> Arduino -> Midi out via USB -> Mac/Windows (I have both) USB -> Software (most likely OLA or Onyx) -> DMX output to lights via USB interface

The arduino/midi is basically acting like a keyboard, or HID that can be mapped in the software. The software contains the patches for all of the DMX channels and fixtures, which I can directly map to each fader of the arduino.

The USB interface is an NX DMX or a Sushi-DS most likely (might get something else), which are both supported by their respective software, so I don't have to worry about anything there.

The

There's always wikipedia

A block diagram is a diagram of a system in which the principal parts or functions are represented by blocks connected by lines that show the relationships of the blocks.[1] They are heavily used in engineering in hardware design, electronic design, software design, and process flow diagrams.

So now you know. But I am all set with your description, THX.

Interesting project.

a7

Lol... Sorry for being stupid; Should have googled?

Should I make a diagram??

Btw, thanks for your help so far!

For yourself, if. I'm all set. But yes, a block diagram of the hardware and/or software is usually a good place to start storming your brain.

And if you want to atone for not googling (!) and you haven't come across the concept of pseudo code, give yourself 5 minutes to look into that. Another common and useful development tool. Can't have too many.

a7

Hello clowaasdda

Keep it simple and stupid.

Start with one Arduino Due your project to do all the IO business and your can scale this functional unit later on.

In case of a malfuction you have to exchange the related Arduino Due only.

Enjoy the hobby and have fun.

Ill look into pseudo code

And ill make a block diagram!
Thanks

Yea I agree, I want to keep this as simple as possible

May I ask why an Arduino Due (except for it having an arm cpu?)

Of course, My plan was to buy a small portion, not the whole 100 faders and waste money

Thanks for your advice!

Maybe. The Due uses 3.3 volt logic, which may end up being srsly swimming upstream with respect to everything that is 5 volt.

Yes you can level shift. Yes you can find modules that operate on 3.3.

Yes you can avoid all that.

a7