I need to measure around 50 - 100 analog sensors (resistors). This poses two challenges:

  1. Arduino has fewer analog pins. I'm targeting something small like arduino Mini or Nano, which can have up to 8 analog pins. The solution for this could be several multiplexors like this one. Is there a better option? Is this the best way to read so many analog sensors with Arduino? I am thinking also in several arduino mini talking through wifi / bluetooth with the main one which would also aid with Problem #2.

  2. There would be a lot of cables for this setup, and I need to keep it all as flat and flexible as possible. So I was thinking of some kind of adesive copper conductor, paper printed circuit or plastic. The thing is that it would become difficult to create if I do it myself. What would be the easiest way to achieve a multi-track, flexible circuit for substituing Arduino cables?

  • Depending on your performance needs, you could look into a multi-channel ADC with an I2C interface. Then you can use a single I2C bus to read all of the analog signals. This may not work if you need to read the signals faster than the I2C bus would allow.
    – Craig
    Sep 2, 2014 at 15:28

2 Answers 2


Your question doesn't specify speed, cost, accuracy, or size, and it skimps on electrical and physical details (referring merely to 50–100 resistors and “a lot of cables”) so perhaps can't be properly answered.

ADC's (analog-digital converters) typically are high-impedance devices that measure voltages. A resistor may be measured in many ways, a few of which are:

  • Place a known voltage across it; measure current through it
  • Drive a known current through it; measure voltage across it
  • Drive some current through it; measure both voltage and current using four-terminal sensing
  • Measure how long it takes a given capacitor to charge to a trip point, using a known voltage through the resistor under test
  • Use known resistances to null a Kelvin bridge

For some of the techniques listed above, measurement accuracy is little affected by multiplexer resistance; others might need to use a low-resistance MUX made with relays instead of a MUX ic like the 74HC4067. Some of the techniques are suitable for wide ranges of resistance, others not; and some for high accuracy, others not.

Suggested Approach

Anyhow, those comments aside, circuits like the following might do the job. If you have eight analog inputs on your Arduino, you could use up to eight multiplexers to measure up to 128 resistors. resistor mux pdf

In Figures 1 and 2 above, Rx is a typical unknown resistance, and Rs is a known standard resistor. Both figures represent voltage divider circuits.

Effect of multiplexer transmission gate resistance

Let Rm denote multiplexer transmission gate resistance. Rm is unimportant if the circuit of Figure 1 is used because Rm is tiny compared to the input impedance of a unity-gain follower op amp stage.

Rm might or might not be important if the circuit of Figure 2 is used. (a) If Rm differs somewhat from one multiplexer channel to another, Figure 2 may be unsuitable because calibration will be cumbersome. (b) If Rm is comparable to Rx, Figure 2 is unlikely to produce high-accuracy results.

Whether unity-gain followers are necessary

Whether you need unity-gain followers depends mostly on the size of resistors you are measuring. Arduino analog inputs are high-impedance (10⁸Ω, but with about 14pF capacitance to Vcc/2). Atmel suggests analog source impedances of 10KΩ or less for best results. [See (1,2,3) for additional discussion.] Briefly: If Rs+Rx is likely to exceed 20-40KΩ and you wish to measure quickly, use unity-gain followers.

Resistance Formulas

Let Vt be the voltage at the lower end of Rs in either figure. Vt is the voltage that will be measured at an analog input Aj.

In Figure 1, because Vt = Vcc·Rx/(Rx+Rs), we have Rx = Vt·Rs/(Vcc-Vt).

For the circuit in Figure 2, an additional resistance Rm is in series with Rx, so Vt = Vcc·(Rx+Rm)/(Rx+Rm+Rs), whence Rx = Vt·Rs/(Vcc-Vt)-Rm. If Rs and Rx are large (eg 40KΩ and 10KΩ) then ignoring Rm may cause only a fraction of a percent of error. But if Rm is comparable to either of Rs or Rx, either use the circuit of Figure 1 or devote some inputs of each multiplexer to use as calibration inputs.

Analog input reference voltage

If Vcc is 5 V and we choose Rs four times as large as the largest resistance value that you intend to measure, then Vt will be between 0 and 1 V. You can use an analogReference() call like analogReference(INTERNAL) [or analogReference(INTERNAL1V1) on a Mega] to set the analog reference voltage at 1.1 V, to maximize accuracy of measurement and to minimize the amount of current required through Rx.

Advantages of Figure 2

Unless Rm is a problem (as discussed above) the following advantages of Figure 2 suggest its use:

  • Lower power requirements: In Figure 1, all the resistors under test always have current going through them. In Figure 2, only 1/16 of the resistors are powered at any given time. Also, by raising \EN to shut down the 4067's (or 74HC4067's if used) all the resistors can be powered off.
  • Less wiring and fewer parts: At most eight Rs parts are needed, rather than one Rs per Rx. Each Rx connects to ground and to one mux input, rather than to ground and to the junction of a mux input with an Rs.

Cable Note

For either figure, seven or eight wires run from the Arduino to each 4067 subcircuit. One wire from each subcircuit carries Vt back to an analog input. The other wires connect to all subcircuits in parallel: four channel select lines (A, B, C, D in figures, or S0-S4 in datasheets); Vcc; ground; and \EN unless that line is wired to ground. Each 4067 subcircuit should have a bypass capacitor, eg 10-100 nF, from Vcc to ground. Boards like the “Geeetech CD74HC4067 Analog Digital MUX Breakout Board” shown below (about $5 on ebay) might be used, or you could design a custom board and have it made at OSHPark or Seeedstudio. Geeetech CD74HC4067 Analog Digital MUX Breakout Board


As I read your question I was thinking of the 4067 chip as part of the solution.

You'd rig one 4067 as the anode and another as the cathode on a grid of 64 resistors. You'd then send select an anode channel and a cathode channel, feed +5 volts into the common for the anode channel, and then feed the common from the anode channel into an ADC input on your Arduino. You'd need to allow for the fact that those chips have an internal resistance of around 180 ohms, (at least the TI chip I looked up did. My CMOS cookbook lists 200 ohms resistance.) As long as you're measuring resistances that are substantially bigger than 400 ohms, that should work (or you could precisely measure the resistance of your 4067 chips at your operating temperature and then adjust your math to compensate.)

Mind you you'd have to sample these resistances one at a time, in round-robin fashion. It would be kinda slow.

If you want to test more than 64 resistances, you could use 2 4067s on either the anode side or the cathode side and use the inhibit pin to select the chip. That would give you the ability to sample 128 resistances.

I did find some 8 and 16-channel serial ADCs. You could use those and some select logic to do the same thing. Take a look at the AD7490. That's a 16 channel serial ADC. That and one of the 4067 16-channel MUX chips would give you 64 ADC inputs in banks of 16.

  • This will only work if you add diodes in series with all of the resistors and account for the added diode drop. Otherwise, all of the other resistors connected will significantly affect the measurement. Sep 3, 2014 at 7:27
  • Not true. With a row and column arrangement of MUX chips, you can connect +5 to one wire of the test resistor and then read the voltage through the other MUX chip.
    – Duncan C
    Sep 5, 2014 at 19:13
  • Let's call the wires drive wires and sense wires. The drive MUX drives one drive wire to 5v. The sense MUX then selects a wire to check the voltage. There is a test resistor that connects each sense wire to each drive wire. The problem is this: the sense wire is connected to other drive wires by other unknown resistors, so whatever you do with the other drive wires (grounded or floating) they will affect the measurement of the 'unknown' resistor you are trying to measure. Either you need one mux pin per resistor, or you need one diode per resistor to isolate a single resistor. Sep 6, 2014 at 3:15
  • 1
    Nope. No other resistor will have a DIRECT path. But there will be a large number of paths that pass through 3 resistors. Take a look at that figure I linked to. Replace all of the LEDs with unknown resistors. Leave all rows and columns disconnected, except for row 0 and col 0. Current will flow through the resistor at 0,0. However, it can also take a path through 1,0 then 1,1 then 0,1 and get to the same place. Or 2,0 then 2,2 then 0,2. You can come up with a great many paths like this that will all appear in parallel with the resistor you're trying to measure. Sep 7, 2014 at 3:35
  • 1
    You're right. I was wrong. My scheme would require a series diode on each unknown resistor to prevent current from flowing backwards through the resistors as you described.
    – Duncan C
    Sep 7, 2014 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.