Pages: 1 [2] 3   Go Down
Author Topic: Multiplexer (Mux) Shield  (Read 5897 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 180
Arduino does the job
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

looks like something I was working on smiley
http://wtfmoogle.com/?p=466
32 a/d inputs and linkable to have i believe a max of 256 inputs smiley
 
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

http://wtfmoogle.com/?page_id=398
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 180
Arduino does the job
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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.
Logged

Indiana
Offline Offline
Newbie
*
Karma: 0
Posts: 32
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

http://mayhewlabs.com/arduino-mux-shield

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!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Full Member
***
Karma: 0
Posts: 107
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Indiana
Offline Offline
Newbie
*
Karma: 0
Posts: 32
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there mates 8-)

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
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 107
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



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.

Code:
}
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.
« Last Edit: March 07, 2010, 05:50:49 pm by DeFex » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 107
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: March 07, 2010, 06:06:00 pm by DeFex » Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!!
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 107
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Indiana
Offline Offline
Newbie
*
Karma: 0
Posts: 32
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
http://www.sparkfun.com/commerce/product_info.php?products_id=9832.  

As always, you can still get them direct from me too: http://mayhewlabs.com/arduino-mux-shield

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

[media]http://www.youtube.com/v/-h2intYYghk[/media]

Thanks, and let me know what project you are using the Mux Shield for!
« Last Edit: July 24, 2010, 09:16:35 am by markgtr813 » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17292
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: July 23, 2010, 01:22:02 pm by retrolefty » Logged

Pages: 1 [2] 3   Go Up
Jump to: