Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Input output multiplier

Not open for further replies.


Active Member
Howdy all,

It's been 10+ years since I've been on here, really stoked to see electro tech online is still around! This forum was so important to me growing up :D

I've got a project I need some advice on.. or at least a path forward. Surely I can figure out the rest. I'm familiar with Arduino so that's the route I'd like to take.

I need to measure the resistance of hundreds of electrodes. Then, i need to deliver varying voltages to each electrode so as to maintain uniform current based on the resistance each electrode sees when it measures resistance.

Voltage used shouldn't be more than 25 across the electrodes.
Can you recommend an IC that I could connect to Arduino that would allow me to effectively multiply it's inputs and outputs?
CMOS switches?.

The 74HC4051 is an 8 way CMOS switch, eight of those feeding eight input ports would give you 64 voltage readings, and sixteen feeding sixteen input ports would give you 128.

You could also use something like the PIC 18F57K42 which has 43 (12 bit) analogue inputs already, either use multiple ones of those, or add 74HC4051's to expand the inputs.

Varying voltage outputs aren't so easy!, and much more detail would help.
Last edited:
Are the currents only applied during testing, or do they need to each be maintained continuously, with regular testing to check and adjust the current setting?

I'm guessing they are just during testing, as continuous current for each electrode needs a lot more than an Arduino!

You can connect a current source, either a fixed value or voltage controlled (so settable via the Arduino PWM etc.), to the common of one analog multiplexer tree, to switch the current source to each electrode in turn.

At the same time, another multiplexer tree can be used (with the same selection address bits) to connect the electrode to a buffer amplifier which in turn scales the voltage to a range appropriate for the Arduino ADC.

You could use a single set of analog multiplexers for both, but that would add the voltage drop across the analog switch resistance due to the current, to the electrode voltage reading.

It depends of the level of accuracy you need, as to which is most appropriate.

If you do need continuous current to every electrode, you would need some form of controllable or programmable current source per electrode.

Note that either way, measuring resistance with electrodes using DC can be problematic, as it can cause electrolysis of the substance being measured - bubbles on the electrodes & corrosion of the electrodes affecting readings, and the production of possibly unwanted products in the substance being measured, due to breakdown of that and the electrodes.

Measurements are normally made using a capacitor coupled AC system, as that avoids or minimises the electrolytic breakdown.
One possibility, I checked this routes, single chip 12 bit solution, 48 channels,
use any of the interfaces I show to talk to host, or make one of these host (with
its own 48 channels), the others slave. Shown is single ended, diff would be 24
channels. Also shown is sar, could have done it (I think) with 20 bit delsig,
again all one chip. You might be able to get more channels to route, I tried 64
channels, that would not route. Maybe you might be able to achieve in the 50's.
ARM core in it. Family is PSOC 5LP.

The PSOC 6 family has BGA packages, might be able to get a lot more channels
squeezed into one chip. But I think 54LP family better way to go overall.


What you see above is one chip.

The right hand window shows resources used/left for other tasks.

This is what is onchip, multiple copies in many cases :


Compiler and IDE (PSOC Creator) free.

Regards, Dana.
Last edited:
Thank you all,

Yes a bit of explanation on what I'm trying to do might help. The idea is to sense human skin resistance at each electrode and then adjust the intensity of the signal that will flow through that particular electrode. The signal will be similar but less intense than those TENS unit machines.
The signal may vary in intensity, but on a scale determined by the skin resistance that each electrode sees.

On the output:
Since constant current will likely be a challenge, I think a similar effect could be achieved by using a high frequency PWM signal in it's place, the PWM width being modified by how much resistance each particular electrode sees. Does this make sense?

On the input/resistance sensing:
I think for now I'll pursue CMOS switching as Nigel mentioned, it seems like it might do the trick and be simple enough that I could combine with Arduino. Also since this is still very preliminary I don't think I'll need hundreds of electrodes yet. 64 would do the trick.

RJ, now that you know this is going to be sensing skin resistance do you think that corrosion, electrolytic breakdown, etc. might be an issue?
RJ, now that you know this is going to be sensing skin resistance do you think that corrosion, electrolytic breakdown, etc. might be an issue?
Not corrosion - but still no DC, to avoid electrolytic type effects that could be harmful.

1) TENS (transcutaneous electrical nerve stimulation) It is a group of prevalent currents substituting the standard applications of diadynamic currents. They are low-power and have zero DC components.16 Sept 2015

TENS & similar nerve stimulators do normally use pulses of alternating polarity, either directly or by having two outputs driven by an H-Bridge, so the relative polarity can be alternated - but the bridge output is only suitable if you just have two electrodes total.

With a multi-electrode system, each needs individual AC drive.

Also, I've found references to TENS type devices with output voltages up to 80V and 60mA, which are far beyond the capability of normal analog switches. Individual high voltage solid-state relays could work for power switching.
Voltage sensing could be done via high impedance voltage dividers before the switches & buffer amps after, but something else is needed for power signal routing.

I'd guess they normally use something like a half bridge output, either low voltage and a transformer or high voltage directly, with capacitive coupling in either case, from the waveforms I can find online.

Are the output electrodes only ever going to be used one at a time, or can they fire simultaneously? If simultaneously you will definitely need 64 individual power drivers with programmable voltage & current.
If never all simultaneous but several at a time, you could possibly use banks, eg. 16 power circuits each with four switches to select the electrodes they drive at any instant.
If they are one at a time this also routed, again a PSOC, single chip solution.

A programmable current source demuxed out to a pin, 48 channels.

If needed the current source can be source or sink, under program control.


Regards, Dana.
Further thought one could add the internal DelSig to the de-mux input and
under software control (so you both measure and stim pins in 1 chip) :

1) Turn off current source and measure pin V
2) Turn on current source, drive a pin with it, and measure V

The DelSig is good to 20 bits, has onchip Vref good to +/- .1% if memory serves me.

This works if you are only driving one pin at a time. However one can use up to 4
onchip current source/sinks so one could partition other ways.
48 single ended channels again routed. But you can do this differential if needed..
Even use the SAR and DelSig, to allow for some channels single ended, other diff.
Simple config. If you do diff to all you of course cut number channels to 1/2.


If you need to drive AC to the pins then replace current source with the onchip WaveDAC, that
can supply any arbitrary waveform, like sine, tri, ramp, whatever, and mux that out to a pin.
Drive to pin can be AC V or AC current. Freq programmable (up to about 100 Khz). In fact I
think you could config to drive AC or DC to a pin for architecture needs/cal.....

Regards, Dana.
Last edited:
Not open for further replies.

Latest threads