Multiplexer Breakout Hookup Guide
Introduction
The SparkFun Multiplexer Breakout provides access to all pins and features of the 74HC4051, an 8-channel analog multiplexer/demultiplexer. The 74HC4051 allows you to turn four I/O pins into eight multi-functional, individually-selectable signals, which can be used do everything from driving eight LEDs to monitoring eight potentiometers.
A multiplexer, commonly abbreviated down to "mux", is an electronically-actuated switch, which can turn one signal into many. It routes a common input signal to any number of separate outputs. Similarly, a demultiplexer routes any number of selectable inputs to a single common output.
The 74HC4051 can function as either a multiplexer or a demultiplexer, and it features eight channels of selectable inputs/outputs. The routing of common signal to independent I/O is set by digitally controlling three select lines, which can be set either high or low into one of eight binary combinations.
Covered In This Tutorial
This tutorial covers everything you should need to assemble the Multiplexer Breakout then wire it and integrate it into your project. Included in the tutorial are a pair of Arduino examples, which demonstrate how to use the mux for both digital output and analog input. The tutorial is split into the following sections, which you can navigate through using the bar on the right.
- 74HC4051 Breakout Overview -- A quick introduction to the workings of the 74HC4051 and the extra features of the breakout board.
- Board Assembly -- Tips and tricks for soldering headers or wires to your breakout and mounting it into your project.
- Arduino Example: Output -- An Arduino circuit and example code demonstrating how to use the multiplexer to drive eight LEDs.
- Arduino Example: Input -- Circuit and an Arduino sketch explaining how to use the board to read eight analog voltage-producing photocells.
Suggested Reading
Muxes are a great tool for electronics users of all experience levels -- anyone who needs to multiply their project's pin count. There are a few subjects you should be familiar with before diving into multiplexing, though. If the subjects below sound foreign to you, consider browsing through that tutorial before continuing on.