# Measuring Resistance of a Wire With an ADC

I'm trying to design a circuit which can measure small resistances down to 0.1 Ohm and a max. of 10 Ohms. I won't be measuring actual resistors but rather large coil of wires, upto 500 m (as you can imagine, these wires are quite thick).

Here's the circuit I came up with: The circuit works by maintaining a constant current through the device under test, R2. With a current of 100 mA, R2 would develop a voltage between 10 mV to 50 mV.

I think in an ideal world this would work but in practice I may have a hard time measuring 0.1 Ohms with this - mainly due to the ADC. Let's assume the ADC is 10-bit with VREF of 5V. This translates to 5mV per step. If R2 = 0.1 and Iout = 100 mA, then the voltage present at the ADC would be 50 mV - but I'm not sure how buried under noise this would be.

My question is, should I increase the gain to, say, 50. If the gain is 50, then the voltage present at the ADC would be 500 mV - but the max. measurable resistance would be 1 Ohms. To measure 10 Ohms, I would need to lower the current to 10 mA instead of 100 mA. A way to do that would be use an FET to switch out R1 and connect a 20 Ohm resistor at Iout.

I don't need the circuit to measure the resistance precisely - a tolerance of +/- 10% is fine.

Please, don't use an LM324 if you want to do precision measurements.

Your opamp has a gain of 5, but you're not using that: Your output is the inverting input, where you have the same signal as the non-inverting, so that's gain x 1.

The best choice would be an instrumentation amplifier, where you connect the cable's ends to the two inputs. Use a series resistor to ground to create an offset, because InAmps can't go to the rails (at least the 3-opamp types can't). You can use that resistor as a sense resistor for the current source: $V_{IN}$ sets the current of the current source: 100 mA/V. Suppose the cable's resistance is 5 Ω, then the InAmp will see a 500 mV difference on its input. A gain of 10 (gain resistor isn't shown; CircuitLab doesn't have a symbol for InAmps) will give you 5 V out, or 1 V/Ω. By changing $V_{IN}$ you can change the total gain. Note that Q1 may need a heatsink, especially if Vcc is rather high.

If you expect high resistances you can make a resistor divider with 1 precision resistor to Vref, and one to ground: The voltage across the cable will be

$V_{CABLE} = \dfrac{R_{CABLE}}{R_{CABLE} + 2 R} V_{REF}$

but if $R_{CABLE}$ << $2 R$ the voltage may be too low for an accurate measurement. A low value for $R$ helps, but will draw much current.

The MCP6N11 has Rail-to-Rail output and exists in different types for different gains, among which one for a gain of minimum 100.

edit
markrages comments that we don't need an InAmp, and he's right. Here's the solution with a differential amplifier using an opamp: The gain is determined by R1 through R4, and if R1 = R3 and R2 = R4 will be

$G = \dfrac{R2}{R1}$

An InAmp will give you more precision though, and it won't cost you an arm and a leg, so why not?

• Thanks stevenh. I'm guessing I won't need a constant current source with an instrumentation amp? Since I'll have a resistor to V+ and another to ground and the wire in between, the ratio of how the voltage divides itself should tell us how big the resistance of the wire is. Am I correct? – Saad Sep 2 '12 at 17:11
• @Saad - Yes, you'll need the current source, I made an error, I'll fix it. – stevenvh Sep 2 '12 at 17:13
• Steven, sorry to be so thick but I still don't see where the current source comes in. – Saad Sep 2 '12 at 17:28
• @Saad - You either use a voltage divider with a reference voltage and two precision resistors, like in the equation. Or you use a known current which will create a voltage drop across the cable due to Ohm's Law. A series resistor to ground is needed to get the lower voltage away from the rails. The exact value is not that important; if it drops for instance 0.5 V you'll be fine. – stevenvh Sep 2 '12 at 17:34
• @Saad - a major difference between the InAmp and the differential amplifier is input impedance. For the Inamp that very high, and it doesn't load the circuit. In this case not so important, since we have low resistances. But in many situations the load of the differential amplifier needs some attention. Note that a 3-opamp InAmp is actually two buffers followed by a differential amplifier. The differential amplifier is not better, just a few cents cheaper maybe. – stevenvh Sep 2 '12 at 18:35

First of all, this setup will not allow you to get a range of 0÷5V at the ADC input. Simply because the LM324 cannot swing up to its positive rail. It will also introduce potential offset voltages that will most certainly be able to ruin a 10 to 50mV measurement.

I suggest getting an instrumentation amplifier or a selectable gain amplifier such as the MCP6G01. With a selectable gain from 1 to 100 you'll be able to maintain some accuracy within 2 orders of magnitude (e.g. from 0.1 to 10 Ohms).

• What's the advantage of a fixed gain amplifier, especially if it's limited to x 50? – stevenvh Sep 2 '12 at 17:29
• Well, this chip is extremely cheap. I wouldn't call this a true dynamic range, but it's not entirely fixed - when Vin is in the range of millivolts, choose K=50, when it's in the range of volts choose K=1. This particular chip is also a great solution for lazy designers who don't want to be bothered with finding the best combination of precision resistors. It guarantees a certain level of accuracy. If OP wanted to make an amplifier with a very large gain, he would have to take care of all the offset voltages etc. I assumed he wouldn't want to, considering his initial solution. – Christoph B Sep 2 '12 at 18:45

Ok, you asked for my version of the circuit. • This uses an opamp+BJT current source with a three-decade range. The range of the current source is selected by grounding one of three resistors. You can probably achieve your accuracy goals by using AVR outputs to switch the three resistors. Switch between output low (for enable) or input (for disable). Analog input is better, but the voltage will be an unambigious high, so digital input is OK. For better accuracy, connect the 4K to resistor to two pins. The output resistance of an AVR digital out is about 25 ohms: .

• The +5V line is used for the reference of both the current source and ADC. Variations in supply voltage will cancel. The alternative would be to have a reference in the current source and a reference in the ADC... not necessary here. Microcontroller ADCs are generally happy to use the supply rails as reference.

• You must make four connections to the device under test. Two of the connections deliver the current, and two of the connections present the voltage across the device under test to the measurement circuit. Four-wire connection is necessary to measure low resistances ( < 1 ohm )! Otherwise you are measuring your probe resistance by accident.

• The opamp's offset voltage is the most important parameter. Use a chopper amp and don't worry about it. I've spec'd OPA2333, which is a nice slow amplifier that's always worked well for me.

• If your probe resistance is higher than about an ohm, you should go for the full instrumentation amplifier. But with reasonable probes this should meet spec as-is.