Multiplexer CD74HC4051, always giving a true out

arduinomultiplexer

I'm testing a multiplexer from Texas Instruments (CD74HC4051). Both +5V and Ground rails are connected to the Arduino Duemilanove board.

I've got a +5V signal in the channel A7 (pin4) and A0 (pin 13), moving my address selectors to different addresses than A0 and A7 still keeps the output active.

When dashing through all the 8 addresses, the output is basically always +5V.

How come?

The images below are: the CD74HC4051 pinout, my setup connections, and the 4051 truth table. The photos at the end of the post show three different address configurations.

CD74HC4051 Pinout:

CD74HC4051 Pinout

Setup connections:

Setup connections

enter image description here

Photo 1 – Address False, False, False:
Setup with address False, False, False

Photo 2 – Address True, False, False:
Setup with address True, False, False

Photo 3 – Address True, True, True:
Setup with address True, True, True

Below is the schematics with the pull down resistors. This solves the impedance issue of the IC pin internal resistance and possible noise and float signal to the pin.

Schematics with the pull down resistors

Best Answer

Being CMOS, you need to make sure that all of the address inputs are either connected to Vcc or GND since once you charge up the gate capacitances of the decoder's input MOSFETs they'll stay charged up for a long time when the address dip switches go open-circuit.

I don't see any pull-downs on the chip side of your address dip switch, so you need to connect about 10k from each of them to GND.