Maker Pro
Maker Pro

Analog multiplexor help

J

Jan Nielsen

Jan 1, 1970
0
I was recommended to use a analog multiplexor to expand the number of
ADC ports on a picaxe "cpu" earlier.

I have now tried to use them for a few days and cant get it working, any
help please :)

When I connect everything theres light in 2 of the 8 LEDs I used for a
test, even when all 3 pins are low, if I remove the signal wire the 2
LEDs still light.

I connected the 8outputs to a LED each (with an resistor) and the pin3
to a free output pin on the picaxe, and tried directly to +VDC too.

GND to gnd ofcause, and +VDC to +VDC.
I left the E and Vee unconnected, what are they used for anyway ?

What am I doing wrong ?

/Jan
 
J

John Larkin

Jan 1, 1970
0
I was recommended to use a analog multiplexor to expand the number of
ADC ports on a picaxe "cpu" earlier.

I have now tried to use them for a few days and cant get it working, any
help please :)

When I connect everything theres light in 2 of the 8 LEDs I used for a
test, even when all 3 pins are low, if I remove the signal wire the 2
LEDs still light.

I connected the 8outputs to a LED each (with an resistor) and the pin3
to a free output pin on the picaxe, and tried directly to +VDC too.

GND to gnd ofcause, and +VDC to +VDC.
I left the E and Vee unconnected, what are they used for anyway ?

What am I doing wrong ?

Not connecting E and Vee, for starters. Read the datasheet.


John
 
C

Chris

Jan 1, 1970
0
I was recommended to use a analog multiplexor to expand the number of
ADC ports on a picaxe "cpu" earlier.

I have now tried to use them for a few days and cant get it working, any
help please :)

When I connect everything theres light in 2 of the 8 LEDs I used for a
test, even when all 3 pins are low, if I remove the signal wire the 2
LEDs still light.

I connected the 8outputs to a LED each (with an resistor) and the pin3
to a free output pin on the picaxe, and tried directly to +VDC too.

GND to gnd ofcause, and +VDC to +VDC.
I left the E and Vee unconnected, what are they used for anyway ?

What am I doing wrong ?

/Jan

Hi, Jan. I'd guess you're talking about the 74HC4051 mentioned in an
earlier post.

As Mr. Larkin said, the datasheet usually tells all. At least, for
those with a basic electronics background who know where to look.

Since you're a newbie, though, you might want to check the website of
the place where you purchase your ICs. Many have links to the IC
datasheets available on the page where you see the price and
availability.

One source for the HC4051 is On Semi -- here's a link to their
datasheet:

http://www.onsemi.com/pub/Collateral/MC74HC4051A-D.PDF

The 4051 is a curious chip, with an analog section and a digital
section. It's made so you can switch ground-referenced AC signals
that go below GND. To do that, you have to provide a positive and
negative analog voltage which is higher and lower than the maximum and
minimum amplitude of your signal at Vcc and Vee (i.e. +/-5V analog
supply).

However, and I don't believe it directly says this on this datasheet,
if all your input signals are between the digital supply rails (like
your LM35), you can tie Vee to GND and get away without a dual supply.

One thing it does say pretty clearly is that the "E" is an enable, and
it has to be tied low to get it to work. This can be neat if you want
to parallel the single multiplexed pins and, say, make a 24-to-1
analog multiplexer from three 4061s. But if you're just using one
chip, and you don't want to turn the output off, just tie it to GND
and be done with it.

The curious thing is, all datasheets aren't the same. If you look at
the Fairchild datasheet:

http://www.fairchildsemi.com/ds/MM/MM74HC4051.pdf

the information about Vee is specifically mentioned on the first
page. Go figure. In days of yore, I always kept the National Semi
Logic databooks on the shelf for reference. I generally found them to
be the most descriptive. You can now find that set of logic
datasheets at the Fairchild site.

Good luck with your project

Cheers
Chris
 
J

Jan Nielsen

Jan 1, 1970
0
Chris skrev:
On Apr 17, 2:20 pm, Jan Nielsen
Hi, Jan. I'd guess you're talking about the 74HC4051 mentioned in an
earlier post. Yes

However, and I don't believe it directly says this on this datasheet,
if all your input signals are between the digital supply rails (like
your LM35), you can tie Vee to GND and get away without a dual supply.
For a test the 8in/out puts are connected to a LED and the input/output
is connected to VDC+.

So by setting the 3 signal pins I should be able to control which LED is
on, right ?

The signal to the pins is from a picaxe, so its probaly around 4.7V and
the supply is about 4.7V too.
One thing it does say pretty clearly is that the "E" is an enable, and
it has to be tied low to get it to work. This can be neat if you want
to parallel the single multiplexed pins and, say, make a 24-to-1
analog multiplexer from three 4061s. But if you're just using one
chip, and you don't want to turn the output off, just tie it to GND
and be done with it.

I have tied E and Vee to GND now, but it didnt help.
When I power the chip, it still sends out power to 2 of the LEDS.
I thought that 1) all outputs is off till I select one, 2) only one
output in on at a time.

I can disconnect the pin3 that holds the power I want to switch and they
keep lit, so its using its own power to lit these 2 leds.

Its Y2 and Y6, the second top pin on both sides.


/Jan
 
E

ehsjr

Jan 1, 1970
0
Jan said:
Chris skrev:


For a test the 8in/out puts are connected to a LED and the input/output
is connected to VDC+.

So by setting the 3 signal pins I should be able to control which LED is
on, right ?

The signal to the pins is from a picaxe, so its probaly around 4.7V and
the supply is about 4.7V too.



I have tied E and Vee to GND now, but it didnt help.
When I power the chip, it still sends out power to 2 of the LEDS.
I thought that 1) all outputs is off till I select one, 2) only one
output in on at a time.

I can disconnect the pin3 that holds the power I want to switch and they
keep lit, so its using its own power to lit these 2 leds.

Its Y2 and Y6, the second top pin on both sides.


/Jan

Sounds like you might have a problem on the channel C
input. What does it connect to? You cannot disconnect
it - it has to be connected to either a high or a low.
Same is true of the other pins.

Can you post a schematic?

Ed
 
J

Jan Nielsen

Jan 1, 1970
0
ehsjr skrev:
Sounds like you might have a problem on the channel C
input. What does it connect to? You cannot disconnect
it - it has to be connected to either a high or a low.
Same is true of the other pins.

Right, it cant be disconnected since it will fluctate ?
The 3 pins are connected to digital output pins of the picaxe, so will
be 0V og 4.7V when off/on.
Can you post a schematic?

I have assembled it on breadboard, but I can draw up a schematic, will
post it in an hour or 2.


/Jan
 
J

John E.

Jan 1, 1970
0
I have assembled it on breadboard, but I can draw up a schematic, will
post it in an hour or 2.

You must post to alt.binaries.schematics.electronic , of course, not
sci.electronics.basics. s.e.b. doesn't allow images to be posted. Just in
case you weren't aware...

FYI,
 
J

Jan Nielsen

Jan 1, 1970
0
I have assembled it on breadboard, but I can draw up a schematic, will
post it in an hour or 2.
Here is my attempt in pad2pad, its a board design instead of a schmatic,
but hopefully it gives you the information about connections.

http://codebin.dk/stuff/multiplex.jpg

The layers is just there for clarity, and I have omitted the LED
connections.


/Jan
 
E

ehsjr

Jan 1, 1970
0
Jan said:
ehsjr skrev:



Right, it cant be disconnected since it will fluctate ?

It will be "floating" at an indeterminate level, making
the result unpredictable.
The 3 pins are connected to digital output pins of the picaxe, so will
be 0V og 4.7V when off/on.



I have assembled it on breadboard, but I can draw up a schematic, will
post it in an hour or 2.

Good. Temporarily remove the connections from the channel select
inputs to the PICAXE, and connect them to either low or high.
You can manually test the chip that way by tieing each channel
high or low per the datasheet to make sure you get the correct
result. If it works properly that way, then the PICAXE is
pulsing the C input, or putting it at an invalid level. Don't
overlook the possibility of a flaky connection in the breadboard.

Ed
 
J

Jan Nielsen

Jan 1, 1970
0
ehsjr skrev:
Good. Temporarily remove the connections from the channel select
inputs to the PICAXE, and connect them to either low or high.
You can manually test the chip that way by tieing each channel
high or low per the datasheet to make sure you get the correct
result. If it works properly that way, then the PICAXE is
pulsing the C input, or putting it at an invalid level. Don't
overlook the possibility of a flaky connection in the breadboard.

With a new chip (multiplexor) and the signal wired to GND I get a +vdc
on a6 and a1.

Actually nomatter where I test the signal cables, those 2 and only those
are active.

Could I have the wrong datasheet?
"4051 - 8 CHANNEL ANALOG MULTIPLEXER" is all the data I have on it, and
no link to datasheet from the supplier.

the chip reads hef4027bp which seems to be something different ?


/Jan
 
A

Anthony Fremont

Jan 1, 1970
0
Jan said:
ehsjr skrev:

With a new chip (multiplexor) and the signal wired to GND I get a +vdc
on a6 and a1.

Actually nomatter where I test the signal cables, those 2 and only
those are active.

Could I have the wrong datasheet?
"4051 - 8 CHANNEL ANALOG MULTIPLEXER" is all the data I have on it,
and no link to datasheet from the supplier.

the chip reads hef4027bp which seems to be something different ?

Of course it's something different, that's why they put part numbers on
them. ;-) According to its datasheet that chip is a flip-flop:
http://www.chipcatalog.com/Philips/HEF4027BP.htm
Who was your "supplier"?

Hopefully you haven't killed any output port pins on the PICAXE. From now
on, you should probably use 1K resistors between the PIC i/o pins and the
logic device being driven. That way if you accidentaly try to drive a pin
high and it is shorted to ground, it won't burn out the pin since the
resistor would limit the current to 5mA. The resistor will have virtually
no effect on things when an output pin is connected to a true input pin.
 
J

Jan Nielsen

Jan 1, 1970
0
Anthony Fremont skrev:
Of course it's something different, that's why they put part numbers on
them. ;-) According to its datasheet that chip is a flip-flop:
http://www.chipcatalog.com/Philips/HEF4027BP.htm
Who was your "supplier"?

Hopefully you haven't killed any output port pins on the PICAXE. From now
on, you should probably use 1K resistors between the PIC i/o pins and the
logic device being driven. That way if you accidentaly try to drive a pin
high and it is shorted to ground, it won't burn out the pin since the
resistor would limit the current to 5mA. The resistor will have virtually
no effect on things when an output pin is connected to a true input pin.
My supplier is just one of the electronics shops in denmark, I will try
to get the right one.

I dont think the pic is damaged, but even if, the small picaxe is only 3$ :)



/Jan
 
P

Peter Bennett

Jan 1, 1970
0
With a new chip (multiplexor) and the signal wired to GND I get a +vdc
on a6 and a1.

Actually nomatter where I test the signal cables, those 2 and only those
are active.

Could I have the wrong datasheet?
"4051 - 8 CHANNEL ANALOG MULTIPLEXER" is all the data I have on it, and
no link to datasheet from the supplier.

the chip reads hef4027bp which seems to be something different ?


/Jan

A 4027 is a dual JK flip-flop - a totally different part. The pins
you are calling A6 and A1 are the Q output from one flipflop, and the
/Q output from the other.

You need a chip that is marked 4051 (or has "4051" somewhere in its
part number).

Do a google search for "4051 datasheet" (without the quotes) - the
first link I see is to Fairchild's product folder on the CD4051. All
the details on that part are available there.

Note that the letter prefix and suffix around the number will vary
between makers, but the number indicates the function of the part.


--
Peter Bennett, VE7CEI
peterbb4 (at) interchange.ubc.ca
new newsgroup users info : http://vancouver-webpages.com/nnq
GPS and NMEA info: http://vancouver-webpages.com/peter
Vancouver Power Squadron: http://vancouver.powersquadron.ca
 
Top