Making a little "lots of joysticks" device

I want a "lots of joysticks" midi controller.
I'm a developer of a qt c++ app on linux, but arduino will be new to me so any help is appreciated.

So I was hoping for 9 joysticks, but that's 18 analog inputs.
Just bought a bunch of joysticks and an arduino nano Every.

I think the Every can be convinced to do 14 analog inputs with some messing around. So I hook x and y of the joysticks (7 joysticks) to the analog inputs, send power around, and write a (hopefully very tiny bit of) code.

My plan is to take some 3/16" plywood and make a little box for it all.

Now, I'll probably have to jump through some hoops on linux, eh? I'm on kubuntu (ubuntu's kde variety).

Probably have to look for which usb port it's on and do some weird serial i/o or something.

If anyone has already gone down this rabbit hole (somebody MUST have) do you have any wise words for me? Or any words at all - no judgement - I need help here :slight_smile:

Thanks mucho

...Steve

You can wait for that person to appear or read, and use this link for much faster response: How to get the best out of this forum - Development Tools / IDE 1.x - Arduino Forum

There may be an analog mux in your future.

Doesn't matter which Arduino you use. Most, if not all have only one A/D converter, with a multiplexer that selects/reads one input at the time.
A common external analogue muxer is the 16-channel 74HC4067.
Leo..

That may have been an unfortunate choice:

I suggest a Pro Micro. Don't confuse with Pro Mini.

i get that a multiplexer chip would get me more analog inputs.

i just am tryna keep this simple and fast (ideally). I think 14 inputs for 7 joysticks should do the trick for a midi controller.

there are commercial midi controllers with tons of sliders - i just want joysticks for pitchbend and pan and other "snap back to 0 signed" controls. you can't FIND that in a commercial device from my searches.

from my reading, this Every board ain't great at being a midi controller. But all i really need is to get the 14 values over usb to my linux pc. My hope is that if it won't "do" a midi device, that I can open the usb "device" in my midi sequencer and read the 14 values as they change.

i've thought about just using a game usb joystick, but that only gets me 2 joysticks. I at least want 4.

Tomorrow the nano every board and joysticks get here. Then I install this whole arduino stuff on kubuntu. Hopefully that's easy. I'd imagine the arduino suite of stuff installs pretty well on kubuntu.

When yall learned this stuff, was it rough or pretty manageable? I played with a 160 in one radio shack kit when i was a kid. and did some wire wrapped and breadboard SIMPLE stuff. But as soon as I got a REAL computer, it was software time and I never looked back... sigh. Till now when I'm 60 :slight_smile: Life is weird.
Hey maybe you guys'd be interested in my silly "about Steve" thing I wrote up:

(don't look at it on mobile - it's crap on that - and make the font bigger - websites have never been my forte)

overall my plan is use those pin connectors to get the 14 x,y lines to the chip, and power all around, install arduino toolchain, get those dang 14 values into c or whatev and get em out to usb/serial when a value changes. then write a thing in my sequencer that finds and opens this thingo and uses whatever values are comin' in. oh and a little thin plywood topped box with 28 dang tiny bolts and maybe holdoffs or somethin.

well. i hooooope this is easy. that's my main question - will this be a 3 day project or will it be a 2 month project... I'm up for 2 months if it needs to be. but if it's gonna be REAL rough, yall should let me know :slight_smile:

And you say that about pickin the wrong board due to the usb logic, eh?

I've found this link...

I think I'll at least start with this chip. If it turns out to not even be able to deliver the values over usb, I'll pick another (they're pretty dang cheap!)

And that'll be one with code for a midi controller aaaalready built and pluggable. i hope :slight_smile:

and then i'll prob need the multiplexer. At least i know what that is. I won't need a dang clock chip - the arduino MUST be able to do that...

I have an idea to avoid using an analog multiplexer, or any other external circuits. But it's just an idea, I haven't tried it and it might be a dumb idea.

6 digital output pins and 6 analog input pins.

3 of the digital pins act as the 5V connection for 3 groups of 6 pots. The other 3 digital pins provide the grounds for each group.

One 5V pin and one ground pin are activated at any time. The others are set to INPUT so they don't affect the pot readings

The 6 analog pins read the values from the selected pots. They are connected to 3 pots each, but 2 of the pots are isolated because they are not connected to 5V or ground.

In effect, the Arduino acts as a multiplexer.

Make sense? I can draw a schematic this evening if needed.

@dougp @Wawa @Railroader opinions? Dumb idea?

Control Surface is not a chip, it is software only. It can support many sorts of Arduino.

I am assuming that your joysticks have no return to zero springs on them, otherwise the project will be a bit pointless. But all the joysticks I have seen have them on.

I don't know what a "dang clock" is could you explain please.

There is a very good book from Tom Almy called "Far Inside The Arduino: Nano Every Supplement" He covers comprehensibly all the things you can do with it.

You can get the code from his examples here

You can probably work out what you need to do to use that chip in your project.

Better still buy the book.

Interesting idea, I have no idea if it would work.

I only worry about the charge on the sample and hold capacitor to the one A/D converter, not being discharged when ever a new input group is sellected.

Just speculating - take another controller I/O and use it to ground the wiper connection for the new group then set it to input to take a reading.

I'm still hopin' to not need a multiplexer.
The arduino nano every can do 14 analog inputs - so 7 joysticks should be no prob for it.

I think my main issue will be trying to do a "no driver needed" midi usb controller. I don't think the Every has the necessary usb-iiiiish hardware. But I'll try to get the 14 values to my linux pc somehow. Maybe a "raw serial over usb" sort of thing will work...

Nevermind about a "dang clock" - I can barely remember back to my youth when I was using breadboards and 74xxx ICs. I thought a multiplexer needed a clock signal from, like, a 555? That memory is nearly as old as me... Can't be trusted.

And I want the return to 0 - for pitchbend and pan. It would be niiice to have half of them with NO return to 0 springs - but I can't seem to find any :frowning: Iiif you gotta link to some "no return" joysticks or whatev you call em - please point me there. I think I've read you can take the springs out, but I'm not sure if I'm up for that level of surgery. We'll see - I've got extra.

Doesn't that same problem occur with a multiplexer chip like '4067? Or the Arduino's internal analog multiplexer?

An often used fix is to read the analog pin twice and discard the first reading.

No, a 74HC4067 is just a 16-position selector switch.
Three pins select the position in a binary fashion.
000 = first position
001 = second
010 = third
etc.

16 inputs, one output, or vice versa.
The 74HC4051 is the smaller 8-channel version.
Leo..

What if pot 1 and pot 2 of the un-selected group 1 are both set to zero ? That will probably affect reading 1 and reading 2 of the selected group.

Even worse: group 2 is selected, pot 1 is set to 1, pot 2 is set to 0 and group 1 is set as described above: HIGH output is shorted to LOW output.

Diodes could solve the problem but shift the voltage down a bit...

Yes I know this, but in this case you have the unselected output as an input, not an other voltage source. Therefore there will be a high impedance from the input, which will keep being high for a considerable amount of time. Thus rendering the normal read twice trick ineffective.

I think the only sure fire way to know if this idea works is to test it.

I'm going to have to draw that schematic. English isn't a good way to describe any circuit unambiguously. I don't think the problems you describe will happen, but prepared to be convinced.

For the joy sticks NO never done it.

For Ubuntu easy just install Arduino ide and use Serial.print to print the Analog values.

That person is still missing in the rabbit hole, went down never came back.

Then reading and following the rest of reply #2 and/or the given replies looks like needed.