Skip to content

How to Use a Multiplexer with Arduino to Expand Inputs & Outputs

How to Use a Multiplexer with Arduino to Expand Inputs & Outputs

Introduction.

Do you have more sensors or devices than your Arduino has input/output pins? Don’t worry! With a multiplexer (MUX), you can expand your Arduino’s I/O capability without changing the microcontroller. In this guide, you’ll learn what a multiplexer is, how to connect it, and how to control it using Arduino code.


Materials for the Project

  1. 1x Arduino Nano
  2.  2x 74HC595 IC
  3. 2x CD4021 IC
  4.  2x CD4051 IC
  5. 16x 10k Resistors
  6.  6x 16-Pin IC Bases
  7. Female And Male Headers
  8.  JUMPER WIRES  

What is a multiplexer?

A multiplexer (or MUX) is a digital switch that allows you to select one of many inputs/outputs using a few control pins. Think of it as a rotary switch controlled by the Arduino.

Common Multiplexer ICs:

IC Name Channels Type
74HC595 IC   Analog/Digital
CD4021 IC   Analog/Digital
CD4051 IC   Analog/Digital

Download Circuit Diagram

IO Expantion 3IO Expantion 3IO Expantion 1


Arduino Code IO EXPANSION

Gerber files


Required Components

  • Arduino Uno (or any compatible board)

  • 74HC595 IC andCD4051 IC Multiplexer

  • Potentiometers or sensors (for inputs)

  • LEDs or relays (for outputs)

  • Jumper wires

  • Breadboard

  • Power supply (5V)


Why Use a Multiplexer?

✅ Save Arduino pins
✅ Read from or write to many devices
✅ Cost-effective I/O expansion
✅ Supports both analog and digital signals


Applications

  • Multiple sensor reading (temperature, light, etc.)

  • LED matrix control

  • Keypad reading

  • Robotics and automation systems

  • Audio or analog signal routing


Conclusion

Using a multiplexer with Arduino is a powerful way to handle more I/O devices while using fewer pins. Whether you’re building a smart home system, a robot, or a multi-sensor data logger, MUX chips can help you scale easily.


For more DIY electronics circuits and tutorials, keep visiting SekhoHub.online—Pakistan’s growing platform for electronics learners and makers.

Leave a Reply

Your email address will not be published. Required fields are marked *