Description
The 16-Ch Analog / Digital Mux Module mounts a 74HC4067, a 16-channel multiplexer/demultiplexer IC that can route both analog and digital signals in both directions.
PACKAGE INCLUDES:
- 16-Channel Analog / Digital Mux Module
- 2x – Male header strips
KEY FEATURES OF 16-CH ANALOG / DIGITAL MUX MODULE:
- 16 bi-directional channels
- Can be used as multiplexer or demultiplexer
- Channels can handle analog or digital signals
- 3.3 and 5V logic compatible
1 of 16 input channels can be routed to 1 output or 1 input can be routed to 1 of 16 output channels. It can handle analog signals such as from analog sensors or a bank of potentiometers or it can handle digital signals such as from switches, digital sensors or even serial communications.
The 74HC4067 can operate over the range of 2 to 6V, so it is compatible with both 3.3 and 5V logic.
Four address lines (S0-S3) select one of the 16 channels and connects it to the input/output pin (SIG). It uses binary addressing, so address 0000 is Channel 0, address 1111 is Channel 15. When a channel is ON, it has a resistance of about 70 ohms which allows signals to flow both ways. With a 5V power supply, we measured about 60 ohms. Maximum current is 25mA through any of the channels.
There is an enable pin (EN) that is active LOW and defaults to that value. When LOW, the device enables the channel selected by the address lines. If EN is pulled HIGH, all channels are disabled.
Module Connections
On the electronics module there are 2 rows of breakout points. These can be used to connect wires or header pins can be soldered in depending on the application.
1×8 Header
- SIG = Signal Input / Output. This will usually connect to an analog input or digital I/O on the microcontroller
- S3 = Binary Address Bit 3. The address bits (3…0) connect to 4 digital output pins on the microcontroller to select channel.
- S2 = Binary Address Bit 2
- S1 = Binary Address Bit 1
- S0 = Binary Address Bit 0
- EN = Enable. Internally pulled LOW to enable by default. Can be pulled HIGH to disable all channels.
- VCC = 2 to 6V. Usually connected to 5V or 3.3V to match the microcontroller power.
- GND = Ground, must be common with the microcontroller.
1×16 Header
- C15 = Channel 15
- C14 = Channel 14
- ….
- C1 = Channel 1
- C0 = Channel 0
OUR EVALUATION RESULTS:
This is one of those devices that sounds complicated, but is actually easy to use. When using this device, it is perhaps easiest to think of it as a bank of 16 mechanical switches with one side of all the switches tied together with a built-in series resistor of 60-70 ohms that goes to a microcontroller analog or digital pin. The other side of the switches connect to analog or digital signals that you want to monitor or control. The main rule is that only one switch can be turned on at a time.
Since only one output can be active at a time these devices are generally most useful for sequentially reading multiple inputs rather than controlling outputs.
The board comes with male header pins. Whenever soldering header pins of this type, it is always recommended to insert the pins into a solderless breadboard while the module is being soldered to ensure the pins stay aligned with the breadboard spacing.
The example program below demonstrates some of its capability. It sets the device up on the A0 analog input pin and scans the 16 channels and prints out the analog value which will range from 0 to 1023. If the inputs are left floating, the readings will be random. If a pin is pulled low, it should read close to 0. If it is pulled to Vcc, it should read close to 1023.
74HC4067 16-Channel Mux Program
/* 74HC4067 Analog / Digital Mux Example This is setup to read 1 of 16 analog inputs such as from analog sensors which is the most common use of this device. The SIG pin can be connected to a digital pin if it is desired to work with digital data instead of analog. Accessing the device uses a table and small function to translate from channel 0-15 to the binary address to make life a little easier */ // Define pins used below #define S0_PIN 4 // Use any 4 available digital pins for addressing the 74HC4067 #define S1_PIN 5 #define S2_PIN 6 #define S3_PIN 7 #define SIG_PIN A0 // Use any available analog pin. // Table below is used to translate from 0-15 to binary address of device. int channel_address_table[16][4] = { // s0, s1, s2, s3 channel {0, 0, 0, 0}, // 0 {1, 0, 0, 0}, // 1 {0, 1, 0, 0}, // 2 {1, 1, 0, 0}, // 3 {0, 0, 1, 0}, // 4 {1, 0, 1, 0}, // 5 {0, 1, 1, 0}, // 6 {1, 1, 1, 0}, // 7 {0, 0, 0, 1}, // 8 {1, 0, 0, 1}, // 9 {0, 1, 0, 1}, // 10 {1, 1, 0, 1}, // 11 {0, 0, 1, 1}, // 12 {1, 0, 1, 1}, // 13 {0, 1, 1, 1}, // 14 {1, 1, 1, 1} // 15 }; //=============================================================================== // Initialization //=============================================================================== void setup() { pinMode(S0_PIN, OUTPUT); // Set addressing pins as outputs pinMode(S1_PIN, OUTPUT); pinMode(S2_PIN, OUTPUT); pinMode(S3_PIN, OUTPUT); Serial.begin(9600); // Set Serial Monitor window comm speed } //=============================================================================== // Main //=============================================================================== void loop() { int mux_Value; // Step through each much channel and report what we are seeing for (int i=0; i<16; i++){ Mux_Addr (i); delay(1000); // Slow things down for readability and allow address to settle mux_Value = analogRead(SIG_PIN); // Read analog value from mux Serial.print("Ch"); Serial.print(i); Serial.print(": "); Serial.println(mux_Value); //delay(1000); // Delay 1 second to slow everything down for readability } Serial.println(); delay(3000); // Read the mux channels every 3 seconds } // Function to update the mux binary address bits given the channel number 0-15 void Mux_Addr (int ch_Addr) { digitalWrite(S0_PIN, channel_address_table[ch_Addr][0]); digitalWrite(S1_PIN, channel_address_table[ch_Addr][1]); digitalWrite(S2_PIN, channel_address_table[ch_Addr][2]); digitalWrite(S3_PIN, channel_address_table[ch_Addr][3]); }
BEFORE THEY ARE SHIPPED, THESE MODULES ARE:
- Sample inspected and tested per incoming shipment
- Packed with header pins in resealable ESD bag.
Notes:
- None
Technical Specifications
Operating Ratings | ||
Vcc | Range | 2 to 6V (3.3V or 5V typical) |
I(max) | Source or Sink active channel | 25mA |
I(max) | Device quiescent current | < 8mA |
Ron | Typical @5V | 60Ω (measured) |
Dimensions | ||
PCB Board | L x W (PCB) | 40mm x 18mm (1.6 x 0.7″) |
Country of Origin | China | |
Datasheet | 74HC4067 |