Hello, So I have been working on an Electrical Impedance tomography System with 8 electrodes. I managed to built my voltage controlled current source as shown in the circuit.
However for the next step, I need to connec the output of the current source to input of demux ( I chose to go with CD4051). My setup is that basically with one demux I choose one of the electrodes and with another multiplexer ,I ground another adjacent electrode such that current flows through them . How ever, as soon as I make the connections, all the channels of mux and demux are showing output and I am not able channel anything. Why is that? I am using same ground for all.
This is the circuit for mux basically .
It seems you're trying to switch positive and negative going signals, up to 24volt peak/peak.
The signals must stay within the supply limits of the (obsolete) 4051,
so between 0 and 5volt if you use a 5volt supply for the 4051 (assuming 5volt Arduino).
Note that the 4051 also has a VEE pin, for a negative supply.
I also don't see any supply decoupling in your diagrams.
No switch code or either.
Hey, Sorry I forgot to mention. My current signal is 4V peak to peak.As soon as I connect the current source to the input port of mux, all the channels are giving the output. I am not able to choose which channel to use. Could this be because I grounded the Vee?
Can't be negative-going (ground biased) if you have VEE grounded.
On a single 5volt supply, you must bias the signal on 2.5volt.
I assume you are using the A/D of a 5volt Arduino, so you must bias mid-voltage anyway.
The 74HC4051 could have been a better choice.
If... your signal is 4volt P/P, with 2volt positive peak and 2volt negative peak,
then you must use a positive supply on VCC and a negative supply on VEE, to keep signal within the supply limits of the 4051. That could be +5volt and -5volt.
Input and supply limits are in the datasheet of the 4051.
Then you still have the problem of matching the signal to and A/D (assuming you use one),
which can only handle positive-going signals.
Can you please post your code?
Can you please post a circuit diagram showing connections to your controller?
A hand drawn picture would be fine.
To add code please click this link;
It looks like you have a sinewave that is symmetrical about gnd.
This means you have positive and negative current.
Check that the mux ICs are happy with pure AC, also the the controller will not like -ve voltage analog input.
What model Arduino are you using?
PS, How much current are you aiming to measure?
Right now, I am not measuring voltage. I still haven't reached that part.
That is the problem, I am unable to change the channels. As soon as I give my mux the current source, all the channels starts giving same output which is a distorted sine wave. I couldnt understand why.
My inhibit pin is grounded and even if I pull it high, nothing changes, all channels still show output
My aim is to first get my electrode switching module to work which is first a demux should select one electode and give current to it and other mux should connect an adjacent electode to the ground so that current flows between them
Your original schematic is almost worthless. All it shows is how two multiplex chips are connected to an Arduino. Where as what you are trying to do is to wire these in a matrix and we have no idea how you have wired them.
Most of the time you need a diode in each matrix intersection to make sure you don't short out your matrix. It sounds like this is happening but we can't be sure because no schematic for that part of the circuit is supplied.
You also don't show how your voltage amplifier is wired into the multiplexers.
So we are waiting for the things Tom asked for in reply #12.
Your current source can generate any voltage in the range of the output of your opamps, so it can swing out of the range of the multiplexers and Arduino and force current through their protection diodes. Bad news, don't do that.
Current sources will use whatever voltage possible to push the programmed current out (here limited by the output swing of the opamps and their supply voltages). You have to ensure that either the voltage compliance of the source is limited to the 0..5V range, or that you have Schottky clamps to divert the current away from the logic chips protection diodes. Its possible to send CMOS chips into a latch-up state if you force current through the protection diodes - google "CMOS latch-up"