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.
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.