Introduction
In this post, we will explore a basic setup using an Arduino to control a 16/32 multiplexer. The primary goal is to understand how Arduino can efficiently manage and scan through the channels of the multiplexer.
Hardware
For this test, you will need the following components:
- Arduino Uno board
- 16/32 multiplexer (Datasheet: Multiplexer Datasheet)
- 12V power supply for the multiplexer
Wiring
Connect the Arduino to the multiplexer following this wiring scheme:
- Arduino Pin 2 to Multiplexer 1H
- Arduino Pin 3 to Multiplexer 1L
- Arduino Pin 4 to Multiplexer 2H
- Arduino Pin 5 to Multiplexer 2L
- Arduino Pin 10 to Multiplexer CLK
- Arduino Pin 11 to Multiplexer RES
- Arduino GND to Multiplexer GND

Code Explanation
The provided Arduino code initializes the pins, sets up the multiplexer, and then scans through the channels. Here’s a program:
void setup() {
Serial.begin(9600);
// Set pins as OUTPUT
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
// Initialize the multiplexer
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, HIGH);
digitalWrite(10, LOW);
digitalWrite(11, LOW);
}
void loop() {
// Scan through channels
int cnt = 1;
digitalWrite(11, HIGH);
for (cnt = 1; cnt <= 32; cnt++) {
Serial.print("count: ");
Serial.println(cnt);
digitalWrite(10, HIGH);
delay(1000);
digitalWrite(10, LOW);
delay(100);
}
delay(2000);
// Reset the multiplexer
for (int i = 1; i <= 32; i++) {
digitalWrite(10, HIGH);
delay(10);
digitalWrite(10, LOW);
delay(10);
}
digitalWrite(11, LOW);
}
Conclusion
This simple test provides a foundational understanding of how Arduino can effectively control a 16/32 multiplexer. Experimenting with different setups and adapting the code can open up possibilities for more advanced applications. Feel free to modify and expand upon this experiment for your specific needs.
Refer to the video below to get more details of the test: