Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use cd4051: Examples, Pinouts, and Specs

Image of cd4051
Cirkit Designer LogoDesign with cd4051 in Cirkit Designer

Introduction

The CD4051 is an 8-channel analog multiplexer/demultiplexer manufactured by AWE with the part ID 123. This versatile component allows the selection of one of eight input signals to be routed to a single output, or vice versa, depending on the configuration. It is widely used in signal routing, data acquisition systems, and switching applications due to its ability to handle both analog and digital signals.

Explore Projects Built with cd4051

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Bluetooth-Controlled Multi-Function Arduino Nano Gadget
Image of Copy of Smarttt: A project utilizing cd4051 in a practical application
This is a portable, microcontroller-driven interactive device featuring Bluetooth connectivity, visual (RGB LED), auditory (loudspeaker), and haptic (vibration motor) feedback, user input (pushbutton), and a rechargeable power system (TP4056 with Li-ion battery).
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Powered Wi-Fi Controlled Robotic Car with OLED Display and Ultrasonic Sensor
Image of playbot: A project utilizing cd4051 in a practical application
This circuit is a battery-powered system featuring an ESP32 microcontroller that controls an OLED display, a motor driver for two hobby motors, an ultrasonic sensor for distance measurement, and a DFPlayer Mini for audio output through a loudspeaker. The TP4056 module manages battery charging, and a step-up boost converter provides a stable 5V supply to the components.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO with MPU-6050 Sensor Array and Multiplexer Control Circuit
Image of smrpe: A project utilizing cd4051 in a practical application
This circuit is designed to interface multiple MPU-6050 sensors with an Arduino UNO for motion tracking purposes. The HCF4052BE analog multiplexer/demultiplexer is used to switch between the MPU-6050 sensors' SCL and SDA lines, allowing for multiple sensors to share the same I2C bus. The Arduino runs embedded code to read capacitive touch inputs, accelerometer and gyroscope data from the MPU-6050 sensors, and transmit this information via Bluetooth and Wi-Fi using software serial communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Battery-Powered Multi-Sensor System
Image of Dive sense: A project utilizing cd4051 in a practical application
This circuit consists of a TP4056 module connected to a 3.7V LiPo battery, providing a charging interface for the battery. The TP4056 manages the charging process by connecting its B+ and B- pins to the battery's positive and ground terminals, respectively.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with cd4051

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Copy of Smarttt: A project utilizing cd4051 in a practical application
Bluetooth-Controlled Multi-Function Arduino Nano Gadget
This is a portable, microcontroller-driven interactive device featuring Bluetooth connectivity, visual (RGB LED), auditory (loudspeaker), and haptic (vibration motor) feedback, user input (pushbutton), and a rechargeable power system (TP4056 with Li-ion battery).
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of playbot: A project utilizing cd4051 in a practical application
ESP32-Powered Wi-Fi Controlled Robotic Car with OLED Display and Ultrasonic Sensor
This circuit is a battery-powered system featuring an ESP32 microcontroller that controls an OLED display, a motor driver for two hobby motors, an ultrasonic sensor for distance measurement, and a DFPlayer Mini for audio output through a loudspeaker. The TP4056 module manages battery charging, and a step-up boost converter provides a stable 5V supply to the components.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of smrpe: A project utilizing cd4051 in a practical application
Arduino UNO with MPU-6050 Sensor Array and Multiplexer Control Circuit
This circuit is designed to interface multiple MPU-6050 sensors with an Arduino UNO for motion tracking purposes. The HCF4052BE analog multiplexer/demultiplexer is used to switch between the MPU-6050 sensors' SCL and SDA lines, allowing for multiple sensors to share the same I2C bus. The Arduino runs embedded code to read capacitive touch inputs, accelerometer and gyroscope data from the MPU-6050 sensors, and transmit this information via Bluetooth and Wi-Fi using software serial communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Dive sense: A project utilizing cd4051 in a practical application
ESP32-Based Battery-Powered Multi-Sensor System
This circuit consists of a TP4056 module connected to a 3.7V LiPo battery, providing a charging interface for the battery. The TP4056 manages the charging process by connecting its B+ and B- pins to the battery's positive and ground terminals, respectively.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Signal routing in data acquisition systems
  • Audio signal switching
  • Sensor multiplexing
  • Analog-to-digital conversion (ADC) channel expansion
  • Digital signal selection in microcontroller-based systems

Technical Specifications

Key Technical Details

  • Supply Voltage (VDD - VSS): 3V to 18V
  • Analog Signal Range: VSS to VDD
  • Control Logic Voltage Range: 3V to 15V
  • On-Resistance (RON): ~125Ω at VDD = 10V
  • Maximum Input Current: ±10mA
  • Power Dissipation: 700mW (maximum)
  • Operating Temperature Range: -55°C to +125°C
  • Package Types: DIP, SOIC, TSSOP

Pin Configuration and Descriptions

The CD4051 has 16 pins, as described in the table below:

Pin Number Pin Name Description
1 VEE Negative supply voltage (commonly connected to GND for single-supply operation)
2 A Address select bit A (control input)
3 B Address select bit B (control input)
4 C Address select bit C (control input)
5 INH Inhibit control (active HIGH to disable all channels)
6 X0 Channel 0 input/output
7 X1 Channel 1 input/output
8 X2 Channel 2 input/output
9 X3 Channel 3 input/output
10 X4 Channel 4 input/output
11 X5 Channel 5 input/output
12 X6 Channel 6 input/output
13 X7 Channel 7 input/output
14 COM Common input/output
15 VDD Positive supply voltage
16 VSS Ground (0V reference)

Usage Instructions

How to Use the CD4051 in a Circuit

  1. Power Supply:

    • Connect the VDD pin to the positive supply voltage (e.g., 5V or 12V).
    • Connect the VSS pin to ground (0V).
    • If using a dual-supply configuration, connect VEE to the negative supply voltage.
  2. Control Logic:

    • Use the address select pins (A, B, and C) to select one of the eight channels. The binary value of these pins determines the active channel:
      • 000 selects X0
      • 001 selects X1
      • 010 selects X2, and so on up to 111 for X7.
    • If the INH pin is set HIGH, all channels are disabled regardless of the address inputs.
  3. Signal Routing:

    • Connect the signal source(s) to the X0-X7 pins.
    • The selected signal will be routed to the COM pin (or vice versa for demultiplexing).
  4. Decoupling Capacitors:

    • Place a 0.1µF ceramic capacitor close to the VDD pin to reduce noise and stabilize the power supply.

Example: Connecting the CD4051 to an Arduino UNO

The CD4051 can be easily interfaced with an Arduino UNO for channel selection. Below is an example circuit and code to read multiple analog sensors using the CD4051.

Circuit Connections

  • VDD: Connect to 5V on the Arduino.
  • VSS: Connect to GND on the Arduino.
  • A, B, C: Connect to Arduino digital pins (e.g., D2, D3, D4).
  • COM: Connect to an analog input pin on the Arduino (e.g., A0).
  • X0-X7: Connect to the analog sensors.

Arduino Code

// CD4051 Multiplexer Example
// Reads 8 analog sensors using the CD4051 and Arduino UNO

// Define control pins for the CD4051
const int pinA = 2; // Address select bit A
const int pinB = 3; // Address select bit B
const int pinC = 4; // Address select bit C
const int comPin = A0; // Common pin connected to Arduino analog input

void setup() {
  // Set address pins as outputs
  pinMode(pinA, OUTPUT);
  pinMode(pinB, OUTPUT);
  pinMode(pinC, OUTPUT);

  // Initialize serial communication for debugging
  Serial.begin(9600);
}

void loop() {
  for (int channel = 0; channel < 8; channel++) {
    // Set the address pins to select the channel
    digitalWrite(pinA, channel & 0x01); // LSB
    digitalWrite(pinB, (channel >> 1) & 0x01);
    digitalWrite(pinC, (channel >> 2) & 0x01);

    // Read the analog value from the selected channel
    int sensorValue = analogRead(comPin);

    // Print the channel number and sensor value
    Serial.print("Channel ");
    Serial.print(channel);
    Serial.print(": ");
    Serial.println(sensorValue);

    delay(500); // Wait for 500ms before reading the next channel
  }
}

Important Considerations

  • Ensure the input signal voltage does not exceed the supply voltage range (VSS to VDD).
  • Avoid exceeding the maximum input current of ±10mA to prevent damage.
  • Use pull-down resistors on unused address pins to avoid floating inputs.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Signal Output:

    • Verify that the INH pin is LOW. If it is HIGH, all channels are disabled.
    • Check the address pins (A, B, C) to ensure the correct channel is selected.
  2. Signal Distortion:

    • Ensure the input signal voltage is within the specified range (VSS to VDD).
    • Check for excessive load on the COM pin, which may cause signal degradation.
  3. High On-Resistance:

    • The on-resistance increases at lower supply voltages. Use a higher supply voltage (e.g., 10V or 12V) if possible.
  4. Intermittent Operation:

    • Add decoupling capacitors near the power supply pins to reduce noise.
    • Ensure all connections are secure and free from loose wires.

FAQs

Q: Can the CD4051 handle digital signals?
A: Yes, the CD4051 can route both analog and digital signals, provided the signal levels are within the supply voltage range.

Q: Can I use the CD4051 with a 3.3V microcontroller?
A: Yes, the CD4051 can operate at 3.3V, but ensure the input signals and control logic levels are compatible with the supply voltage.

Q: What happens if multiple channels are selected simultaneously?
A: The CD4051 is designed to select only one channel at a time. If multiple channels are selected due to incorrect address inputs, the behavior is undefined and may result in signal interference.