CD4066B Quad Bilateral Switch

Photo of author

By Jackson Taylor

Home » Hardware » CD4066B Quad Bilateral Switch

As an Amazon Associate we earn from qualifying purchases.

The CD4066B is a CMOS integrated circuit that contains four independent switches in one 14-pin package. Each switch is “bilateral”, which means a signal can pass in either direction. You turn a switch on or off with a separate digital control pin, so a microcontroller or a logic gate can route signals without a mechanical relay.

What the CD4066B does

Think of each of the four channels as a small electronic switch. When the control pin is high, the two signal pins are connected. When the control pin is low, they are disconnected. Because the switch is bilateral, either signal pin can act as the input or the output.

The chip can pass both analog signals (such as audio or a sensor voltage) and digital signals. That makes it a handy general-purpose part when you want to turn a signal path on and off under logic control.

Hardware Hack

Stop Buying New Batteries for Your Tech

Electronics are expensive, but their power sources don't have to be. Discover the simple engineering trick to recondition dead batteries and bring your gadgets back to 100% capacity.

Watch the Free Video

Key features

  • Four independent switches in a single 14-pin package.
  • Bilateral operation, so signals flow in both directions.
  • CMOS logic-level control, with one control input per switch.
  • Wide supply range, usable from low-voltage logic up to higher CMOS supply levels. Check the datasheet for the exact limits.
  • Low power draw when idle, typical of CMOS devices.

CD4066B pinout

The pin layout is simple. Power goes to pin 14 (VDD) and ground (VSS) goes to pin 7. The four switches are arranged as follows:

  • Switch A: signal pins 1 and 2, control pin 13
  • Switch B: signal pins 3 and 4, control pin 5
  • Switch C: signal pins 8 and 9, control pin 6
  • Switch D: signal pins 10 and 11, control pin 12

Always confirm the pin numbers against the datasheet for the package you have, since the manufacturer’s diagram is the final reference. The original datasheet link is below.

DATASHEET

How to wire it

  1. Connect VDD (pin 14) to your positive supply and VSS (pin 7) to ground.
  2. Add a small decoupling capacitor close to the supply pins to keep the supply stable.
  3. Connect the signal you want to switch to one signal pin of a channel, and take the output from the other.
  4. Drive the control pin high to close the switch and low to open it.
  5. Tie any unused control pins to VDD or VSS. Never leave CMOS inputs floating.
See also
Best Fujifilm Camera: 6 Picks by Battery, Stabilization and Weight

Limits to keep in mind

An analog switch is not a perfect piece of wire, and a few limits matter in real circuits.

  • On-resistance: a closed switch still has some resistance, and it changes with the supply voltage and the signal level. This matters if you are switching into a low-impedance load.
  • Signal range: the signal should stay between VSS and VDD. A signal outside that range can damage the chip or make it behave unpredictably.
  • Current: it is meant for small signals, not for driving motors, lamps or relays directly. Use a transistor or driver for power loads.
  • Control voltage: the control pin must swing high enough relative to VDD to switch reliably. If you control it from a lower-voltage microcontroller, check the logic thresholds.
  • Crosstalk and noise: at higher frequencies, signals can leak between channels, so keep sensitive audio or high-frequency paths short and tidy.

Common uses

  • Signal routing: selecting between sources, or connecting and disconnecting a signal path.
  • Sample-and-hold circuits: a switch charges a capacitor and then isolates it.
  • Audio muting and switching: turning an audio path on or off without mechanical clicks from a relay.
  • Gain or filter control: switching resistors or capacitors in and out of an op-amp circuit.
  • Chopper and modulator circuits: switching a signal rapidly under clock control.
  • Microcontroller I/O expansion: using a few control lines to enable several signal paths.

Using it with a microcontroller

The CD4066B is easy to pair with a microcontroller because each control pin accepts a normal logic signal. One GPIO pin can enable or disable one channel. If you are new to reading inputs, it helps to understand basic Arduino button switch projects first, since those cover the logic-level handling you will use on the control side. Readers working with other boards may also like our guides on switch interfacing with 8051 and push button interfacing with dsPIC30F2010.

Keep in mind that the chip switches signals, not power. If your microcontroller runs at 5 V or 3.3 V, power the CD4066B from a supply that suits both the signal levels and the control levels.

See also
H- BRIDGE SQUARE WAVE INVERTER SIMULATION

CD4066B compared with similar parts

The older CD4016 is a similar quad switch, but the 4066 type was designed with lower on-resistance, which makes it the better choice for most new designs. If you need to select one of many inputs rather than just open and close individual paths, a multiplexer such as the CD4051 may suit you better. A 74HC4066 is a pin-compatible style of part in a faster logic family, but check its supply range before swapping it in.

Buying and testing

The CD4066B is available in through-hole DIP packages, which are easy to use on a breadboard, and in surface-mount versions. Prices and stock change often, so check a current listing before ordering. A quick bench test is easy: apply power, feed a known voltage into one signal pin, toggle the control pin, and measure the other signal pin with a multimeter.

FAQ

What does “bilateral” mean in a CD4066B?

It means each switch conducts in both directions. You can use either signal pin as the input, and the other one becomes the output.

Can the CD4066B switch both analog and digital signals?

Yes. It handles analog signals like audio or sensor voltages as well as digital logic signals, as long as the signal stays within the supply rails.

Sustainable Tech

Keep Toxic E-Waste Out of Landfills

Don't throw away your failing laptop, phone, or car batteries. Learn how to recondition them at home in just a few hours. It's better for the planet—and your wallet.

Learn How It Works

Can I use it to switch a motor or relay?

Not directly. It is intended for low-current signals. Use a transistor, MOSFET or driver IC for loads that need real current.

What happens if I leave a control pin unconnected?

A floating CMOS input can pick up noise, causing the switch to turn on and off randomly and drawing extra current. Tie unused control pins to VDD or VSS.

Revive Your Dead Electronics

Got a drawer full of dead gadgets or a failing car battery? Instead of paying a premium for replacements, use this simple trick to easily recondition them right from home.

See How It Works