Hello everyone, I am a science student and Arduino newbie from Québec. This project is my end goal with Arduino, and my goal is to complete it within 18 to 24 months.
I would like to make a midi DJ tool with a ludicrous amount of potentiometers (~60), LEDs (~100) and buttons (~100). For reference, the NI Kontrol S4 is about half as big.
As Arduino only has 20 total I/O, this is rather problematic. What are my options? My budget is ~2000$, but I'd rather not have to use 8 separate Arduino boards.
I don't know the theory behind multiplexers, but I know they could be of use. I know I could also matrix the inputs in order to control 2^n discrete inputs (where n is the number of inputs), however I don't know if ICs are available to do just that, and I don't know about continuous inputs (potentiometers).
What should I be looking for? Do you have any experience with projects manageing large numbers of inputs/outputs?
As Arduino only has 20 total I/O, this is rather problematic. What are my options? My budget is ~2000$, but I'd rather not have to use 8 separate Arduino boards.
Digital I/O Pins 54 (of which 14 provide PWM output)
Analog Input Pins 16
So a few of these all talking together via serial comm to a master could be made to work. Or just research shift registers for adding external digital I/O (slower and takes more coding) and analog muxes for increasing analog inputs (again slower and takes more coding)
retrolefty:
just research shift registers for adding external digital I/O (slower and takes more coding) and analog muxes for increasing analog inputs (again slower and takes more coding)
When you say slow, do you mean it affects the latency? Because anything beyond ~50ms latency would really affect the final result. I don't mind doing more coding (in fact I love it), but I'm aiming for low latency.
When you say slow, do you mean it affects the latency? Because anything beyond ~50ms latency would really affect the final result. I don't mind doing more coding (in fact I love it), but I'm aiming for low latency.
Yes, latency would increase over standard digital reads and writes as shift registers are a single digital serial out (for adding output pins) or singe digital in (for adding input pins) that require clocking the bits out one at a time through the shift register. However 50 milliseconds is quite a bit of time for a arduino and you can shift in and out quite a few bits in that time frame, you just have to do the math once you get a total bit count you are shifting with.
Multiplexing circuits are faster as you don't have to clock single bits in or out, but they require more support pins, 8 output pins to address 256 I/O points for example.
Another question: if I connect my Arduino via USB to a computer, do I have to run a program in the background to use it, or is there a way to use it as a regular MIDI controller?
Another question: if I connect my Arduino via USB to a computer, do I have to run a program in the background to use it, or is there a way to use it as a regular MIDI controller?
I would think that would take both custom programs on the PC side as well as the arduino side. The link from an arduino to the PC is via a simple comm port only. The USB connection just establishes a new PC comm port to use with the arduino with any pc application that can utilize com port serial communications.
Take a look at this library. It does not work with Arduino 0022(it works with 0018) but the documentation will show you how to connect midi in and out ports to your arduino. http://ruinwesen.com/mididuino
This library however seems to work:
If you merge the "Quick and dirty arduino midi over usb" tutorial and the schematic from the first library's documentation you'll have a working USB Midi controller without the use of additional software.
BTW since I'm on the same project as you are, why do you need so many I/Os? It's really an overkill. All you need for a DJ Deck is are about 10 Digital Inputs and 1 analog per deck(the number of outputs depends on if you want leds/lcd or not) and about 15 analog and 15 digital inputs for the mixer(depends on how many channels you want).
Could you post a picture/render of your model?
I'm not much with music... but seems like you'll need about 200 Digital I/O lines (100 each).
If you get an Arduino Mega, a few latches some logic and some parallel port interface or port expanders that work with a parallel bus, you're good to go. From the top of my head you can reach 56k * 8 or 16 (depending on the chip you use for the I/O) bits of IO lines. The logic to interface all this wouldn't be simple, but that's way more than what you need.
If you need those many I/O's I think that this is the way to go. Can you imagine how long would it take to process 200 bits through I2C? A bit longer, considering all the processing the table still has to do.
And, since you'll need 20 analog inputs, you can drop a parallel A/D converter on the bus. This isn't by far the easiest or simplest solution, but your problem is not the simplest either.
antonmorvolhert:
BTW since I'm on the same project as you are, why do you need so many I/Os? It's really an overkill. All you need for a DJ Deck is are about 10 Digital Inputs and 1 analog per deck(the number of outputs depends on if you want leds/lcd or not) and about 15 analog and 15 digital inputs for the mixer(depends on how many channels you want).
TL;DR imagine the biggest damn controller you could find a use for, I'm building it.
I started this project because I found that most commercial MIDI controllers were either too generic (Hercules RMX) or too pricy for a beginner (Kontrol S4). There are plenty of ways DJs like different things, like 3- versus 4-way EQs, number of channels, and it goes on...
The goal here is to make a basic MIDI mixer that can be upgraded several ways by strapping other components to it. As such, I'm planning the controller to be as big as anyone could want it to be, so everyone can have a mixer that fits their needs.
As an example, if you first get the 2-way mixer and figure you'd appreciate a 4-way one, you could just get two more channels.
I'm sorry if this sounds confusing, I'm currently pretty sick and my antibiotics are making me dumb.
cigue: TL;DR imagine the biggest damn controller you could find a use for, I'm building it.
I think you'll have to go elsewhere... Arduino-like controllers can be powerful, but not that powerful for what you want. That being said, I keep getting amazed by the uses Arduino users find for it.
But in the end, this is a 16MHz 8 bit machine. Just keep that in mind first.
Then, if you want to make the system expandable, the way to go is really the external memory bus. But there's no support for that in the Arduino environment and to use it, you probably have to dig deep into electronics and even write your own libraries to use the external memory bus. Not that it's a bad, it's a good learning experience, but you're more interested in the end result.
Next, I am not 100% sure that the Arduino Mega actually has all the necessary pins for this external memory access mapped out of the board. I know the seeeduino mega has and also the yourduino...
But for something really big, the Arduino might come short of what you're expecting.
bubulindo:
I think you'll have to go elsewhere... Arduino-like controllers can be powerful, but not that powerful for what you want. That being said, I keep getting amazed by the uses Arduino users find for it.
But in the end, this is a 16MHz 8 bit machine. Just keep that in mind first.
Why I think this might be possible is that this is only a big projects as per the number of total inputs, but overall no more than three inputs will be in use at any given time.
bubulindo:
...but you're more interested in the end result.
I am also VERY interested in the learning process, thank you
So you really just need 4 16-input muxes (4 analog ports, 2 pins for selection), 2 8x8 LED Matrix controllers (3 SPI pins, 2 chip selects), and 2 sets of shift-in registers, with the pins DIODE-ANDed together into 2 hardware interrupt pins so you know which one to scan - and could probably use a little bit of external logic to set them up as 3 groups of 32, and depending on the interrupt (one, the other, both) you know which group to scan for a button push.
Then just write the software to scan the pots for changes, change LEDs states as needed, and respond to interrupts (heck, even do those as SPI reads for really fast response vs software shift-in) for the button pushes.
antonmorvolhert:
BTW since I'm on the same project as you are, why do you need so many I/Os? It's really an overkill. All you need for a DJ Deck is are about 10 Digital Inputs and 1 analog per deck(the number of outputs depends on if you want leds/lcd or not) and about 15 analog and 15 digital inputs for the mixer(depends on how many channels you want).
TL;DR imagine the biggest damn controller you could find a use for, I'm building it.
I started this project because I found that most commercial MIDI controllers were either too generic (Hercules RMX) or too pricy for a beginner (Kontrol S4). There are plenty of ways DJs like different things, like 3- versus 4-way EQs, number of channels, and it goes on...
The goal here is to make a basic MIDI mixer that can be upgraded several ways by strapping other components to it. As such, I'm planning the controller to be as big as anyone could want it to be, so everyone can have a mixer that fits their needs.
As an example, if you first get the 2-way mixer and figure you'd appreciate a 4-way one, you could just get two more channels.
I'm sorry if this sounds confusing, I'm currently pretty sick and my antibiotics are making me dumb.
My question remains the same. Do you really need all those buttons? Do you have any sketches we could see because from what I understand you just want to make a huge controller that it's gonna have only 1/5 of its functions used. If you really put all those I/Os I'm guessing you're gonna get some latency problems...