Sunday, 10 July 2016

Arduino MIDI Controller: Multiplexers

More, More, More!!

Over the last couple of tutorials we have been building up a MIDI Controller using a trusty Arduino UNO board. So far, we've learned how to connect buttons and potentiometers to the controller and generally had a lot of fun.

"But Dave!! I want to build a custom controller with a zillion pots and buttons! The UNO only has six measily analog inputs and a handful of digital ports! What can I do????"

Never fear! We can add lots of controls to our project with the help of Multiplexers.

Watch This!

What is a Mux?

A Multiplexer is a chip with multiple inputs that can be individually connected to a single output. By sending different combinations of signals to some control pins, each button or pot connected can be read by a single pin on the Arduino. The video explains this in detail.

We will be looking at two popular multiplexers in this lesson. The first is the 74HC4051 which has 8 inputs. The second is the 74HC4067 which has a impressive 16 inputs.

The Software

The Midi Controller program we have used in previous lessons can handle either type of multiplexer with some simple configuration. The video will show you how. Download the software HERE if you don't have it yet.

Stuff you need (With Amazon links)

Here are the parts you will need to do the experiment:

Arduino UNO or Arduino UNO (Official Adafruit Version)

2 x 10K Potentiometers (Linear taper) - Inexpensive
or model used in video

2 x Push Button Switch

74HC4051 Multiplexer (8 Input)
74HC4067 Multiplexer (16 Input)

Breadboard (63 pin width)


2 x 220 Ohm Resistors

Jumper Wires

MIDI Cable


  1. Hi!
    How to install leds for the buttons, if i want that when I push the button the led is lightning?
    Thanks You! :)

  2. This comment has been removed by the author.

  3. How do I put 2 74hc4067? They are connected in series or parallel?

  4. I can not use more buttons in ... Y2... Y7 imputs. I need to change something to use only buttons?

  5. I used buttons Yo, Y1, Y2, Y3 but not get in the other Imputs.

  6. Can I use Analog and Digital at the same time with this Program?

  7. Hi. Many Tks for this blog and this prog.
    May I share my experiment.
    Yes you can use analog and digital at the same time but it has to be one DEMUX board for each.
    I have manage to use up to 3 full DEMUX board but the arduino won't cope a fourth full used board due to lack of memory.
    My project is a 30 fader midi interface for a lighting program.