16CH BIDIRECTIONAL MULTIPLEXER

Description

  • Read or write 16 channels using only 4 pins on your microcontroller
  • Wide analog input voltage range
  • Break-Before-Make switching
  • Fast switching and propagation speeds
  • Analog and digital signals can be multiplexed
  • Low ON resistance
  • Easy to use and set up

Great module to expand the i/o of your Arduino-compatible board. Control 4 stepper driver boards with only 5 digital pins, read 16 analog sensors with only one analog in and 4 digital outs, or read 16 switches… There are so many possibilities!

Supply voltage 2 to 6 VDC 50 mA
High noise immunity NIL = 30%, NIH = 30% of VCC at VCC = 5V
Low ON Resistance VCC = 4.5V. . . 70 Ohms (Typ)
VCC = 6V . . . 60 Ohms (Typ)
Switch turn On
E to Out
55 ns Max.
Input (control) capacitance 10 pF
Operating temperature . -55 ℃ to 125 ℃
Switch frequency response bandwidth at -3dB 89 MHz
Switch input capacitance 5 pF

Easy to connect, with only five cables plus power supply. You can pin the module on the breadboard and use the male to male jumper cables, or use the male to female jumper cables to connect the module directly to the Arduino-compatible board.

To supply voltage to the board, connect the +5v pin to the 5v power pin and the GND pin to the GND pin. Connect S0, S1, S2 and S3 to any digital pins (4, 5, 6 and 7 on the example), connect the signal you want to send or read to Z. Choose the channel based on the following table. With the Arduino example provided it’s even easier!

Truth table

  • S0
  • 0
  • 1
  • 0
  • 1
  • 0
  • 1
  • 0
  • 1
  • 0
  • 1
  • 0
  • 1
  • 0
  • 1
  • 0
  • 1
Truth table

  • S1
  • 0
  • 0
  • 1
  • 1
  • 0
  • 0
  • 1
  • 1
  • 0
  • 0
  • 1
  • 1
  • 0
  • 0
  • 1
  • 1
Truth table

  • S2
  • 0
  • 0
  • 0
  • 0
  • 1
  • 1
  • 1
  • 1
  • 0
  • 0
  • 0
  • 0
  • 1
  • 1
  • 1
  • 1
  • Truth table

  • S3
  • 0
  • 0
  • 0
  • 0
  • 0
  • 0
  • 0
  • 0
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • Truth table

  • Selected channel
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    /**Rewieved by Dr. Mangus for Mango Labs
    * This example demonstrates how to read analog signals
    *
    * For more about the interface of the library go to
    * https://github.com/pAIgn10/MUX74HC4067
    */
     
    #include "MUX74HC4067.h"
     
    // Creates a MUX74HC4067 instance
    // 1st argument is the Arduino PIN to which the EN pin connects
    // can be left floating: LOW is enabled
    // 2nd-5th arguments are the Arduino PINs to which the S0-S3 pins connect
    MUX74HC4067 mux(3, 4, 5, 6, 7);
     
    void setup()
    {
    Serial.begin(9600); // Initializes serial port
    // Waits for serial port to connect. Needed for Leonardo only
    while ( !Serial ) ;
     
    // Configures how the SIG pin will be interfaced
    // e.g. The SIG pin connects to PIN A0 on the Arduino,
    // and PIN A0 is a analog input
    mux.signalPin(A0, INPUT, ANALOG);
    }
     
    // Reads the 16 channels and reports on the serial monitor
    // the corresponding value read by the A/D converter
    void loop()
    {
    int data;
     
    for (byte i = 0; i < 16; ++i)
    {
    // Reads from channel i. Returns a value from 0 to 1023
    data = mux.read(i);
     
    Serial.print("Potentiometer at channel ");
    Serial.print(i);
    Serial.print(" is at ");
    Serial.print((double)(data) * 100 / 1023);
    Serial.println("%%");
    }
    Serial.println();
     
    delay(1500);
    }
    1. In this example we are connecting:
      Arduino    Multiplexer
      (D3   —– EN) can be left floating
      D4     —– S1
      D5     —– S2
      D6     —– S3
      D7     —– S4
      A0     —–  Z
      GND —–  GND
      5V     —– VCC
    2. Download and install the Arduino environment from here or use the web editor.
    3. Before compiling the code you must install the MUX74HC4067 libraries.
      Download the Arduino libraries here.
    4. Unzip and paste the folder in the Arduino libraries folder. It’s in the same location as your default sketches. To find the sketchbook location, go to File /Preferences.
    5. Download the sketch here and open, or open the Arduino environment and copy the code into a blank sketch.
    6. Connect your board to your computer with the included USB cable.
    7. Select your board in Tools / Board / Arduino Uno.
    8. Select your port in Tools / Port / COM# (Arduino Uno). This may be slightly different depending on your operating system.
    9. Upload by pressing the arrow in the circle to the upper left.
    10. To open the serial monitor, press the magnifying glass icon on the upper right.
    11. Set the baud rate to 9600 on the lower right.
    12. Touch the i/o channels of the multiplexer (labeled y0 to Y15)  with the unconnected end of the jumper cable and watch the values rise on the serial monitor (there could be some noise because the channels are floating).