TI / ON / many · Integrated circuit
CD4051 8-Channel Analog Mux
One analog pin becomes eight. Bidirectional, so it multiplexes sensors into an ADC or fans a signal back out.
- Logic level
- 3-18 V (CD4051), 2-6 V (74HC4051)
- Package
- PDIP-16 / SOIC-16
1.Pinout diagram
Highlight a signalhover to preview, click to keep
Pins 1-8
Pins 9-16
Pin detail
Hover a pin for its mappings and gotchas. Click to keep it here.
- Logic level
- 3-18 V (CD4051), 2-6 V (74HC4051)
- Package
- PDIP-16 / SOIC-16
Fig. 1. CD4051 8-Channel Analog Mux, PDIP-16. Hover or tap a signal to light up every pin that carries it.
2.Caution
- It is a set of analog switches, not a buffer, so it works in both directions. The same chip reads eight sensors into one ADC pin or routes one DAC out to eight places.
- On-resistance for the CD4051 is about 470 ohm at 5 V and about 125 ohm at 15 V. The 74HC4051 is under 100 ohm at 4.5 V. Both vary with the signal level. Feeding a high-impedance load is fine; feeding anything that draws current puts a voltage across that resistance and the reading is wrong.
- An ADC with a sample-and-hold needs time to charge through that resistance. Settle for a few microseconds after switching channels before sampling, or every reading carries a smear of the previous channel.
- Three address pins select the channel, A is the low bit. INH high disconnects everything, which is how you parallel several chips onto one bus.
- VEE is the negative analog rail. Tie it to ground for single-supply work; tie it to a negative rail and the chip will pass signals that swing below ground, which no microcontroller input can do alone.
- The channel pins are scattered around the package in no sensible order. Wire from the numbers.
- For 16 channels the CD4067 is the same idea with four address pins.
3.Minimum circuit
What has to go around the chip before it will run.
| Part | Between | Why |
|---|---|---|
| Wire link | VEE (7) to GND | VEE sets the bottom of the analog range. On a single supply it goes to ground, and it must go somewhere. |
| Wire link | INH (6) to GND | Inhibit is active high. Held high, all eight channels stay disconnected. |
| 100 nF | VDD (16) to GND | Supply decoupling at the pin. |
VDD sets the largest signal the switches will pass, and the three address pins are digital inputs that must be driven, never left floating. With VEE on a negative rail the part switches signals that swing below ground. The 74HC4051 can do that too, down to -6 V. The reason to choose a CD4051 is its wider total supply span, up to 20 V.
4.Full pin reference
Every pin, alias and mapping. This table is included when you print the page.
Table 2. Pin assignments.
| Pin | Name | Also called | Functions | Notes |
|---|---|---|---|---|
| 1 | CH4ADC | - | Channel 4 | |
| 2 | CH6ADC | - | Channel 6 | |
| 3 | COMADC | Z, COMMON | Common in/out | The single pin that connects to whichever channel is selected. |
| 4 | CH7ADC | - | Channel 7 | |
| 5 | CH5ADC | - | Channel 5 | |
| 6 | INH | E, ENABLE | Inhibit, active high | Ground it to enable. High disconnects all eight channels. |
| 7 | VEEVSS down to VDD - 20 V (CD4051), 0 to -6 V (74HC4051) | - | Negative analog supply | Tie to ground for single supply. A negative rail here lets signals swing below ground. |
| 8 | VSS | GND | Ground | |
| 9 | C | S2 | Address bit 2 | |
| 10 | B | S1 | Address bit 1 | |
| 11 | A | S0 | Address bit 0 | Low bit of the channel number. |
| 12 | CH3ADC | - | Channel 3 | |
| 13 | CH0ADC | - | Channel 0 | |
| 14 | CH1ADC | - | Channel 1 | |
| 15 | CH2ADC | - | Channel 2 | |
| 16 | VDD3-18 V | - | Positive supply | Sets the maximum signal the switches will pass. 100 nF at the pin. |
Looking for a substitute?
Primary sources
To fix a wrong pin, edit data/boards/cd4051.json.