Picaxe 08M + Multiplexer

George Sephton

Senior Member
Hi,
I have a DG406 Multiplexer but I'm having difficulty making it work, I've searched around for a "typical circuit" or a pin description but have found nothing useful. I understand pins A0-A3 need an input of more than 2.5V I think it is to select, enable has to be high with >2.5V also. I have 5V connected to V+ and GND connected to GND. What does V- have to be connected to as I have it connected to GND at the moment and dont have a -5V supply. Finally what does D do? It's really confusing as I don't know whether to connect it to GND or 5V, tried both but no results. with nothing connected to A0-A3, S1 should light up but it doesn't, that's with it setup to be connected with 5V, GND, EN and V- to GND.

Any help would be appreciated,
George S.
 

gengis

New Member
http://www.mrl.nott.ac.uk/~mbf/antarctica/files/DG406.pdf

The data sheet does show V- connected to a minus 15 volt supply rail and V+ to +15, and the specifications say it works over a 4.5 to 20 volt range.

D is the common output for the digitally selected input - that would be whatever voltage on the selected input will be on D.

It is an analog 'plexer so is usually used to select a particular analog voltage (like a sensor) to route that input to an A/D converter. It does have some "on resistance" like 175 ohms max so typically you'd use a voltage follower or high impedance input of an A/D.

Read the part: "Operation with Supply Voltages Other than ±15V" for how or what you can connect the minus to and how it will affect the analog input range. Generally if you only have + voltage to transfer, you only need a + supply and can connect minus to ground. Also read about input voltage protection - similar to diode clamps you'd use to protect the 'axe from over voltage.

good luck
 

George Sephton

Senior Member
I've read through those things on the datasheet and looked at the single supply stuff. I take it the multiplexer should be affected by nothing conected to D? I'm only usin outputs so just connecting voltages to A0-A3. As it stands now I have 5V to V+, GND to V-, GND to GND, A0-A3 to GND and EN to 5V. Everything else has nothing connected to it except a multimetre on S1 (pin 19) by the truth table thats should be high, even if it's only a small voltage, but there's nothing happeneing and I've tried replacing it with another new one. Still no luck.
Thanks,
George S.
 

hippy

Ex-Staff (retired)
Everything else has nothing connected to it except a multimetre on S1 (pin 19) by the truth table thats should be high, even if it's only a small voltage, but there's nothing happeneing
I'm not quite sure I'm following what you have circuit wise ... this is effectively a 16-way rotary switch controlled by A0-A3, depending on setting, one of S1 through S16 will connect to D.
 

George Sephton

Senior Member
So what does D do exactly? Im not following what people are saying. Do I have to connect D to anything special or will it work with D left floating?
 

gengis

New Member
D is the output - it is connected to one of 16 analog inputs depending on logic input (via the truth table in the datasheet)

Ground D and put a high enough input and select that input and you kill the chip. D gets connected to an input - like the A/D on the axe or a bar graph display etc.. - where ever you want to switch that analog input to.

Analog is what it is designed for but whatever voltage level is on the input(s) can be switched through to the output.

Can you draw a schematic of what you have done and post it?
OR perhaps you should say what you want to achieve.

I'm having trouble understanding your confusion. The data sheet shows a picture of the internal function. The chip is the functional equivalent of mechanical selector switch with 16 inputs (S1----S16) and one output (D).

You would use it for something like an A/D converter where you need to convert 16 different voltage levels into digital numbers - where 16 separate A/D converters may be impractical this allows a single one to do the work of 16 (only one of its uses).
 

premelec

Senior Member
If you think of the MUX as a single pole multi throw switch the D appears to be the contact that is common and switched to the selected input - if D is not connected you have no MUX switch action - Hippy has stated the situation clearly... perhaps drawing the part as a switch on paper will help you see what the MUX does... hope I've understood your question...
 

hippy

Ex-Staff (retired)
@ Goerge : You have described what you are doing, so as Flooby suggests ... perhaps you could tell us what it is you are trying to achieve ?

It seems you are trying to use the chip in a role other than as a multiplexor / demultiplexor and it's hard to say how it should be wired as what your actual use / need is isn't clear.
 

George Sephton

Senior Member
Oh, I may be getting this the wrong way round. I want to have 4 outputs from the PICAXE (connected to A0-A3) and this can then be used to give 16 outputs which give out a voltage... I don't want to do it the other way round, take 16 inputs and convert it into 4 outputs that are then read by the PICAXE.
 

gengis

New Member
Oh. This isn't the part you want. I take it you are just concerned with digital signals? 4 outputs from the axe will produce 16 outputs? When you go in that direction you call it demultiplex.

The animal you want would be called a: 4 to 16, binary, demultiplexer, or decoder, or something like that.
This is one such device
http://www.nxp.com/pip/74HC_HCT154_6.html

Data sheet:
http://www.nxp.com/acrobat_download/datasheets/74HC_HCT154_6.pdf

Four inputs A0 - - -A3, TO 16 outputs Y0 - - - Y15

With that gizmo your four picaxe outputs could turn on and off up to 16 different outputs.

Analog multiplexers can work bidirectionally, and could also be used in this capacity but they aren't designed for it and won't handle lots of current.
 

gengis

New Member
Not to add to the confusion factor but the downside of the 4 to 16 decoder is that only one of the 16 can be on at any one time. If you needed some combination of 16 outputs to be on at the same time you'd use something called a serial input/parallel output shift register. Then you toggle the data out sequentially on a single pin (data) and use one or two other pins to shift the data (the clock signal) and maybe a latch signal to hold the outputs constant while a new sequence is coming along.
 
Top