Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Semiconductors & ICs
  4. ›Analog Multiplexers

Component guide · Intermediate · 3 min read

Analog Multiplexers

CD4051 and CD74HC4067

By Geekobot Learning Team · Updated 24 Oct 2026

On this page
Short answerWiringReading all 16 channelsLimits and alternativesTry itCommon mistakesFAQsParts and next steps
Short answer

An analog multiplexer is an electronic rotary switch. Select lines choose which of its 8 (CD4051) or 16 (CD74HC4067) channels connects to one common pin. Connect the common pin to an analog input and you can read 16 sensors with one ADC pin and four digital pins. It passes signals both ways, so it also routes digital signals, but it adds some resistance and needs a short settling time.

Key specs at a glance

CD74HC4067
16 channels, 4 select lines (S0 to S3), EN active low
CD4051 / 74HC4051
8 channels, 3 select lines
Supply
2 to 6 V for HC types; signals must stay within the supply
On-resistance
Roughly 70 to a few hundred ohms depending on supply
Direction
Bidirectional: use as mux or demux
Uses
Many pots, sensors, FSRs, soil probes or buttons on few pins
01

Wiring

Connect VCC and GND, tie EN (enable) to GND, connect S0 to S3 to four digital pins, and SIG (common) to an analog pin. Sensors connect to C0 to C15. Run the multiplexer from the same voltage as your ADC reference, 3.3 V on an ESP32 or Pico, so signals stay in range.

02

Reading all 16 channels

Set the select pins, wait a moment, then read.

Scan a CD74HC4067 · Arduino C++Verify & upload in Electrolark
const byte S[4] = {4, 5, 6, 7};
const int SIG = A0;

void setup() {
  Serial.begin(115200);
  for (byte i = 0; i < 4; i++) pinMode(S[i], OUTPUT);
}

int readChannel(byte ch) {
  for (byte i = 0; i < 4; i++) digitalWrite(S[i], (ch >> i) & 1);
  delayMicroseconds(10);          // let the input settle
  analogRead(SIG);                // discard first reading
  return analogRead(SIG);
}

void loop() {
  for (byte ch = 0; ch < 16; ch++) {
    Serial.print(readChannel(ch)); Serial.print(ch < 15 ? ',' : '\n');
  }
  delay(200);
}
03

Limits and alternatives

Settling

the ADC's sample capacitor holds the previous channel's charge. With high-impedance sources (above about 10 kΩ), add a short delay and discard the first reading, or buffer the signal.

Signal range

a signal above VCC or below GND can damage the chip or leak into other channels. Use a voltage divider first.

Current

it is a signal switch, not a power switch; do not drive motors or LEDs through it.

Alternatives

an ADS1115 adds four precise inputs over I2C; a 74HC595 adds digital outputs; a PCF8574 or MCP23017 adds digital inputs and outputs.

04

Try it: ADC resolution calculator

Change the values and the diagram and results update as you type.

05

Common mistakes to avoid

  • !Leaving EN floating or high.
  • !Feeding signals outside the supply range.
  • !Reading straight after switching channels without settling.
  • !Running the mux at 5 V into a 3.3 V ADC.
  • !Switching load current through it.
06

Frequently asked questions

How many sensors can I read with one analog pin?

16 with a CD74HC4067, or more by chaining several multiplexers on separate enable lines.

Can a multiplexer read buttons?

Yes. It works for digital signals too; add pull-ups on the button side.

CD4051 or 74HC4051?

The 74HC4051 is faster and has lower on-resistance at 5 V; the CD4051 tolerates higher supply voltages.

Why are my readings mixed between channels?

Not enough settling time or high-impedance sources. Add a delay and discard the first reading.

Does it work with ESP32?

Yes, powered from 3.3 V.

Parts for this guide

  • Analog and UART Multiplexer Module
    ₹53View
Shop Interface & RF Encoder ICs

Calculators

ADC resolution calculator

Terms in this guide

MultiplexingDriving several displays or LEDs from a few pins by switching between them faster than the eye can see.ADCAnalog-to-digital converter: turns a voltage into a number. A 10-bit ADC gives 0 to 1023; a 12-bit ADC gives 0 to 4095.Analog signalA signal whose voltage varies continuously, such as a sensor output of 0 to 3.3 V, rather than switching only between HIGH and LOW.CMOSComplementary metal-oxide-semiconductor: the low-power transistor technology used in 74HC and CD4000 logic and in most microcontrollers. CMOS inputs draw almost no current but must never float.

Keep learning

Concept explainerBeginnerADCs ExplainedAn analog-to-digital converter (ADC) measures a voltage and returns a number.4 min read · Electronics FundamentalsComponent guideIntermediateADC and DAC ModulesAn external ADC module gives a microcontroller more, better or cleaner analog inputs.3 min read · Semiconductors & ICsHow-toIntermediate74HC595 Shift RegisterThe 74HC595 turns three microcontroller pins (data, clock and latch) into eight outputs, and you can chain more chips to get 16, 24 or more outputs from the same three pins.3 min read · Semiconductors & ICsComponent guideBeginnerPotentiometers and TrimmersA potentiometer is a three-terminal variable resistor: the outer pins connect across the full resistance and the middle pin (wiper) taps a point you set with the knob.3 min read · Passive ComponentsConcept explainerBeginnerLogic Gate ICsLogic gate ICs combine digital signals: AND, OR, NOT, NAND, NOR and XOR each give a HIGH or LOW output from their inputs.3 min read · Semiconductors & ICs

Sources

  • TI CD74HC4067 datasheet
  • TI CD4051B datasheet
  • Nexperia 74HC4051 datasheet

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWiringReading all 16 channelsLimits and alternativesTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide1 item · ₹53

Analog and UART Multiplexer Module

Run itChange the inputs and watch the output
Serial monitor115200 baud
0,1,0,716,1,0,6,1,2,6,4,5,3,2,3,4

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question