Pages: [1]   Go Down
Author Topic: Using 4051 analog multiplexer/demultiplexer  (Read 3842 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'm using a CD74HCT4051E Analog Multiplexers/Demultiplexer. I've read many posts on how to use it with the Arduino.

My initially I wanted to do a little test to ensure that my wiring was correct. So I wanted to connect a little piezo buzzer with a battery to from the Z or common pin (pin 4) of the 4051 and then the other end of the buzzer I connected to the Y0 or the first in/out (pin 13) of the 4051.

I have not connected any other power or pins or anything to the the arduino, or connected any power to the 4051.

I expected that the buzzer would NOT go off as the 'latch' between the 'Z' input and the Y0 input is not connected in its normal state. But the buzzer did go off. I tested the rest of the in/outs and they all seem to be connected to the Z pin. I used a multi-meter and found that the Z pin has connectivity to all the in.out pins (Y0-Y7).

I would expect that in their normal state that the Z pin is not connected to any other in/out pin. Do I have this wrong?

thanks
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

p.s - I base my wiring knowledge off this post http://www.arduino.cc/playground/Learning/4051

You'll need to refer to that link as I'm referring to the diagram there in my post above.
Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
or connected any power to the 4051.
This makes no sense. All "chips" have to be powered in the first place to provide useful operationallity. By looking at the internal wiring, one could deduce what will happen without any Vdd applied, but this is more or less a forensic post-mortem...

In the first place, no voltage should be applied to any input pin above Vdd+0.6V or below Vss -0.6V. When a chip is not powered, everything is critical, and - as said - undefined.

An analog switch (4016/4066) or multiplexer (4051/52/53) is not a "relay"!

As an aside. In contrast to the given link, note that the connection is bi-directional, there is neiter input nor output but "throughput" :-) The internal resistance is about 100 ohms.
« Last Edit: September 18, 2010, 05:34:48 am by mpeuser » Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 130
Posts: 8621
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It's possible the chip is being powered through the clamping diodes on the IO pins, but that's pretty irrelevant as it doesn't make sense to "test" something like this. You really should wire it up properly or not at all.
Logged

Rob Gray aka the GRAYnomad www.robgray.com

0
Offline Offline
Tesla Member
***
Karma: 148
Posts: 9753
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The 4051 control pins should not be allowed to "float" or unexpected things will happen. You may need to have a high value resistor between the control pin and ground to make sure that the control pin is low when it is not being made high.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks for the replies. So looks like I need to set the whole thing up before I can truly know if it will work correctly.

deSilva - you say 'In the first place, no voltage should be applied to any input pin above Vdd+0.6V or below Vss -0.6V' but the reference sheet for my 4051 says that the switch voltage is 0-10V (refer to http://focus.ti.com/docs/prod/folders/print/cd74hct4051.html)

Is that correct?
Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Some "mixed" chips have more than one reference voltage, which is most often used for output (drivers). In some kind this has to do with "output", too, as the analog output should mirror the input.....

The 405x are special in that they are made to allow NEGATIVE input, as their main application is audio, which is AC. To avoid the need for adding a constant DC to it, the 405x have a second analog reference, call Vee.You can set this pin to a negative voltage downto -5 V, so you can get a total voltage swing of 5 - -5 = 10V. In your application however, Vee shoud be connected to ground.

OT: There is one little known exception from the general rule: 4049 and 4050. Those drivers/inverters are specifically made to be tolerant to a higher input voltage than their Vcc. This is why you find them sometimes as a protection between microcontroller inputs and the real world.

« Last Edit: September 19, 2010, 03:40:04 am by mpeuser » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay - so here is how I will connect it up. E, Vee and GND will go to the GND on my Arduino. The S0, S1 and S2 will go to the digital pins on my Arduino. Vcc will go to the +5v on my Arduino. The A pin will go to my buzzer which then goes to a 9v battery and then to the A0 pin. The polarity at the A pin or the A0 pin doesn't matter I assume - as you say they are just throughput.

So if I then turn on the correct digital pins for A0, the buzzer should go off...is that correct?

I don't want to use a buzzer long term, but its just a test to see that the Arduino is switching correctly.

thanks for your help
« Last Edit: September 19, 2010, 04:52:38 am by backdrop » Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please make sure that the multiplexer pins see no higher voltage than +5V and no lower than 0V !!!!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

okay I'll use a smaller battery than 9v - or I'll use the power from the Arduino which is 5v.

Also how can I have a voltage lower than 5v when I'm using DC power? Are you saying that the multiplexor inputs are polarity sensitive and that I could get the polarity around the wrong way?
Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No.
There are no inputs. There are "throughputs". They work from Vee upto Vdd.
Vee can be between Vdd and Vss - 5V. When you have Vdd =5V and Vee = -5V you can use AC signals +/- 5V wrt ground. However the Arduino will not like anything negative!
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I used a multi-meter and found that the Z pin has connectivity to all the in.out pins (Y0-Y7).

When you use a meter to measure connectivity the meter has a power supply that gives a voltage on the outputs of the meter. As this voltage is not referenced to anything (it is floating) you can't use the meter to see if there is a path through a powered circuit. As has been pointed out you can't use an un powered circuit either. So in this case your multimeter should not be used for this type of measurement.
Logged

Pages: [1]   Go Up
Jump to: