Multiplexer (Mux) Shield

My intended project is a midi controller, hddj sytle with a couple of hdds, possibly trying to add motors to them to make them behave like a real turntable, a load of rotary encoders, faders, buttons etc.

One concept I hope to try is controlling a bunch of LCD modules. It always bugged me that the arduino could only handle 1 or 2 LCD modules or i2c would have to be used, requiring more chips and a major speed bump. Maybe the Mux Shield will offer a good solution here too...

The way I have done that is to use new soft serial to make a lot more serial ports, then use serial displays. Then you can have as many LCDs are there are pins.

Mowcius

looks like something I was working on :slight_smile:

32 a/d inputs and linkable to have i believe a max of 256 inputs :slight_smile:

problem I'm running into is Pots always have a value and it is hard to switch between sessions without messing your preset values up. so I came up with a better solution using rotary encoders and I2c

I'm going to use encoders for that reason :slight_smile: analog Pots are ok for certain things if they are hard coded and values remembered/saved or limitations accepted/worked around :slight_smile:

With the pots You could read the value from your device into the arduino and then ignore any values read from the pot until you've matched its position to the value in your device. Use a switch/software to set/toggle the pot into 'match' mode or switch into 'match' mode and make it start sending midi data automatically once its matched the value.

For anyone who is interested in purchasing one of these shields, here is the website where you may do so:

I tend to forget to check my messages on the forum, so if you have questions, please use the form on my site or the email found on the site.

Thanks!

Is it possible to use two of this shields at the same time, if I need even more analog inputs?

I have received this shield, it is nicely designed in that the pins which are used do not interfere with the pins commonly used for LCD and serial. it seems perfectly well made with nice solder masking.

Delivery was very prompt!

I particularly like that the reset button and power LED have been brought up as well.

One problem I had is that the solder pins of some of the headers (MUX0, 0-3 and accompanying VCC) touch the USB housing on a duemilanove. i fixed it by filing the pins a bit so they are not pointy. it is still really close but they are not touching any more.

I am going to use it with 4 of the encoder sets from SURE electronics (which are debounced and made more easy to read with pics) for 16 inputs + buttons for a MIDI controller/sequencer.

Thanks for a great product!

Glad it has worked well for you DeFex!

Concerning the headers and USB housing: I have put a small piece of clear tape over the top of my USB jack. It's usually not a problem unless the shield gets pushed down all the way. Maybe in the next revision of the board, I'll find a true solution.

Be sure to let us know how your project turns out!

Hi there mates :sunglasses:

I hope some of you can help me. Im trying to make an arduino drum set and since this is the only reason i bought one i have no experience with it.

Basically i just need around 16 analog inputs so i can connect piezos on them. I found the SparkFun 16-Channel Analog/Digital Mulitplexer CD74HC4067.
Yours seems better but its overkill for my needs:P.

So would this one do the job perfectly or do i need your shield?

Thanks and sorry if its off topic. Cheers

My main loop was already had a counter to only read 1 analog read per cycle, so it was easy to make a function using the example code. and it works exactly the same as before,

The other ports will be for buttons, and possibly encoders, if the loop is fast enough to read encoder pulses.

}
void stepMUX(int i){
    digitalWrite(CONTROL0, (i&15)>>3); 
    digitalWrite(CONTROL1, (i&7)>>2);  
    digitalWrite(CONTROL2, (i&3)>>1);  
    digitalWrite(CONTROL3, (i&1));     
}    


void loop() {


  // ARC analog read counter. only one analog read per loop 
  ARC ++;
  if (ARC > 15) {
    ARC = 0;
  }  //number of analog controllers 
     //cases are out of order because thats the order of the pots on the board.

  switch(ARC){ 
  case 3:
    stepMUX(ARC);
    tread = analogRead(0);
    tread = map(tread, 0 ,1023, 0, 32);
    attack = exptable[tread]; 
    break;
  case 2:
   stepMUX(ARC);
    tread = analogRead (0);
    tread = map(tread, 0 ,1023, 1, 32);
    decay = exptable[tread];    
    break;
    case 1:
     stepMUX(ARC);
    sustain = analogRead(0);
    sustain = map(sustain, 0, 1023, 0, 1023);
    break;  
   case 0:
     stepMUX(ARC);
    tread = analogRead(0);
    tread = map(tread, 0, 1023, 1, 40);
    release = exptable[tread]; 
    break;  
     case 4:
     stepMUX(ARC);
    tread = analogRead(0);
    syncsubval = map(tread, 0, 1023, 0, 4);    
    break;
     case 5:
   //etc
     
  }

//rest of main loop

}

Thanks again, i really like it.

Rimidalv you could probably do that just as well as you would with the analog ins, the switching of the MUX takes very little time compared to the time it takes to do an analogread. the only thing that concerns me would be that (even without the MUx) reading analog inputs one by one, it might be possible that a hit could happen entirely between reads.

you would need an op amp and carefully selected resistor/capacitor filter on each the peizos (well you probably need an opamp anyways)

you could use the other inputs for some controls or for your drums, like sensitivity, CCvalues and what MIDI note they play on(if its MIDI) if its generating its own sound you could control the pitch and decay of each drum.

Mine Just arrived!

Cheers Mark, It saved me a load of hassle.

How Can I use it to switch individual Digital Pins On or Off?

Thanks in Advance!!

Just a note, because the information can be a bit hard to find. when using analog pins as digital input on the mega, they are pin 53,54,and 55 for MUX 0,1,and 2

I thought I should update this thread with some news about the Mux Shield!

First off, I redesigned the header layout and added ground pads - small improvements. Here is a new photo of what it looks like (courtesy of SparkFun):

The shield is now also available for sale at SparkFun:
Mux Shield II - DEV-11723 - SparkFun Electronics.

As always, you can still get them direct from me too: Mux Shield | Mayhew Labs

SparkFun made a video of how they are using the Mux Shield for a musical staircase:

Thanks, and let me know what project you are using the Mux Shield for!

MM, looks like a nice design. The only suggestion I would make is around your pin choice for controlling the board:

"Requires digital pins 2,3,4,5 and analog pins 0,1,2 – 48 inputs/outputs for the price of 7 pins"

Pins 2 and 3 are the optional two user interrupt pins on the standard 168/328 Arduino boards and would prevent the use of user interrupts while you board is functioning? Interrupt functions can be so very useful for some projects its unfortunate to not have access to them when using your shield when your shield does not actual utilize interrupts?

PS: The SparkFun link seems to be broke?

Lefty

Someone missed an 'e'...

Should be: Mux Shield II - DEV-11723 - SparkFun Electronics

:slight_smile:

Interrupt functions can be so very useful for some projects its unfortunate to not have access to them

I may change what pins are the control lines in the future since interrupts are pretty much a necessity in moderate to advanced designs. Like all my stuff, this product was designed initially for a need that I had (audio control surface) that did not require interrupts.

Thanks for the suggestion and watch for it in Version 3.0!

To celebrate the new line of Arduino boards, I am having a Mux Shield Sale! I am really excited about the new Arduinos and the creative projects that will be possible because of them! To say "thank you" to the Arduino community for making this platform so powerful, I am having this deal:

For the next two weeks (September 27 – October 11) the Mux Shield is on SALE for 25% off! Check out the product page to order:

Enjoy!

  • Mark

Just a quick reminder that there are five days left on the Mux Shield sale! Act now and get 48 glorious inputs for all your knobs and sensors!

Actually, it will always come with 48 inputs... too many PitchMen episodes for this guy.