# Low power design - switch out voltage divider using transistor?

I have a very simple voltage divider circuit for measuring the resistance of a platinum 100 Ohm resistor.

I want to be able to switch out the voltage divider circuit from the power supply in order to save power.

Is this possible?

---------------------------+3.3v
|
|
Transistor----low/high
|
|
R1
|
|-------to A/D pin
|
R2
|
|
----------------------------GND

-
 Silly question: doesn't your microcontroller (if any) have a temperature sensor? Or why don't you use an integrated one, since you have low power requirements? – clabacchio♦ Jun 8 '12 at 11:52 Yes, it's measuring soil temperature. So I have to stick it in the ground... – Eamorr Jun 8 '12 at 11:58 Well then, although you could find 3-pin digital sensors that you can wire externally... – clabacchio♦ Jun 8 '12 at 12:00

What you suggest is possible, but you have to be aware of some gotchas. The biggest issue is for the transistor to not distort the measurement. You didn't give any accuracy requirements, but let's say it's a 10 bit A/D and you don't want the transistor to add more than 1 count of error. On the 3.3 V scale, one count of a 10 bit A/D is 3.2 mV. With the two resistors equal, the transistor therefore can't drop more than 6.5 mV. That completely rules out a bipolar transistor.

A P channel FET can do this. Again, if you want the transistor to not add more than .1% error it needs to be under 200 mΩ when the two resistors are equal, and half that in the worst case.

100 mΩ P channel FETs can be found, but N channel FETs are more plentiful and have better characteristics, especially at these low voltages. I would use a N channel low side switch instead:

The IRLML2502 is guaranteed to 80 mΩ max at only 2.5 V gate drive, so will add very little error. If much lower error is required, then you can measure the bottom of R2 in addition to the voltage divider and then the drop accross the switch can be accounted for in firmware.

You have now changed the question by saying you are really using a bridge circuit. This made sense when the measurement was to be displayed with a analog meter movement, but is unnecessary when using a modern microcontroller. With a normal microcontroller A/D you already have a bridge since the A/D result is ratiometric to the power supply range. In effect, the other side of the bridge is built into the micro. Using another external bridge and a second A/D input will only add error. If you're fine with .1% voltage accuracy coming out of the divider, then just use the circuit above.

Some microcontrollers have a separate negative A/D voltage reference line. This is called Vref- on Microchip PIC line, for example. You could drive Vref- from the bottom of R2 to ignore the voltage accross Q1. However, check the valid range of the the Vref- pin. This may not be allowed to go as high as Vdd. This is actually one case where you may be able to use the absolute maximum rating instead of the operating values. When the sensor circuit is off, you only care that the A/D not be damaged, not that it work correctly. Of course if you are using the A/D for other things this scheme won't work.

## More on bridges:

It has been suggested that a "bridge" circuit is better in this case and would cancel out any voltage dropped by Q1 in the circuit above. This is not the case, at least not with my interpretation of "bridge" circuit. Here is how I think the bridge is intended to be connected:

R1 is the variable resistance sensor being measured. R2, R3, and R4 are fixed resistors with known values. SW1 is the switch used to turn this circuit off when not in use to conserve power. When a measurement is being taken, SW1 is closed. In this schematic, SW1 is assumed to be a perfect switch with R5 shown separately to represent its on resistance.

The point of a bridge circuit is to provide a differential voltage between V1 and V2. This was useful in old analog meters when the meter required significant current and could be directly connected between V1 and V2. Note that the voltage V1-V2 is still proportional to Vdd. This circuit is not independent of Vdd, and therefore not independent of apparent error in the supply voltage caused by the current thru R5. Bridge circuits are independent of Vdd in only one case, and that is when V1-V2 is zero. This is why old analog meters that used bridge circuits combined them with a precision calibrated variable R3. You wouldn't use the measurement of V1-V2 displayed on the meter as a direct measurement, but rather as feedback of setting R3 such that V1-V2 was zero. In that singular case, Vdd then does not matter, and neither does the impedance of the meter between V1 and V2.

What we have here today with microcontroller A/D inputs is a totally different case. These A/Ds are not set up for differential measurement, and we don't have a calibrated reliable way of varying R3 anyway. However, we can make fairly accurate voltage measurements realtive to the GND to Vdd range.

If R5 were 0, then the voltage at V1 would a ratio of Vdd dependent only on R1. Since both the sensor circuit and the A/D in the microcontroller produce and measure the voltage relative to the GND to Vdd range, the exact value of that range cancels out.

The only problem is when R5 is non-zero and unknown over some range. This adds a unknown error to V1 even when it is considered relative to the Vdd range. In effect the sensor is producing a voltage a fixed fraction of the Vlow to Vdd range, while the micro is measuring it as a fixed fraction of GND to Vdd. The simplest way to deal with this is to guarantee that Vlow is a sufficiently small fraction of Vdd so that this error can be ignored.

The suggestion to use a bridge circuit is apparently so that measuring both V1 and V2 allows this error to be cancelled out. If R3 and R4 are well known, then the V2 is a direct function of Vlow, but attenuated by the R4,R3 divider. With high precision, V2 could be measured, Vlow inferred, and the result used to correct the V1 reading. However, there is no advantage to the R4,R3 divider. If you need to correct for Vlow, it is best to measure it directly. In no case is measuring V2 better than measuring Vlow directly. Since we are better off measuring Vlow and therefore have no need for V2, there is no point in producing V2. R3 and R4 can therefore be eliminated, leaving nothing that could be called a "bridge" circuit.

-
Yes, accuracy requirements are not too stringent - 0.5 degrees Celcius. Thank you very much for your useful post. I think it's exactly what I need. – Eamorr Jun 8 '12 at 11:33
Quick question: those IRLML2502's are rated to 4.2A. Do I really need this when my supply voltage battery powered to 3.3V? Could you recommend a lower current transistor? Or will I be fine with the IRLML2502? – Eamorr Jun 8 '12 at 11:37
@Eamorr - The 80m$\Omega$ goes with the current. High current FETs are designed to have a low $R_{DS(ON)}$ to minimize power losses. Low current FETs usually have higher $R_{DS(ON)}$. Don't worry about it. – stevenvh Jun 8 '12 at 11:39
@Eamorr: No, you don't need the full current capability of the IRLML2502, but it does you no harm. You will notice that most FETs with low on resistance have decent current capability for their size. This is because so little power is dissipated due to the low resistance. – Olin Lathrop Jun 8 '12 at 11:40
@Eamorr: then why bother about the resistance of the MOS? – clabacchio Jun 8 '12 at 12:05

The question shows a simple resistor voltage divider, but in comments you say you're using a Wheatstone bridge.

R5 is the resistance of the switching component. Measurements for both setups will be influenced by R5. For the resistor divider:

$\mathrm{ V_1 = \dfrac{R2 + R5}{R1 + R2 + R5}V_{DD} }$

and it's clear that a higher R5 will increase V1. For the Wheatstone bridge we have:

$\mathrm{ V_{OUT} = \left( \dfrac{R3}{R3 + R4} - \dfrac{R2}{R1 + R2} \right)(V_{DD} - V_{LOW}) }$

where

$\mathrm{ V_{LOW} = \dfrac{R5}{R5 + \dfrac{(R1 + R2)(R3 + R4)}{R1 + R2 +R3 + R4)}} V_{DD} }$

So also the Wheatstone bridge output changes when VLOW > 0. Taking the difference doesn't cancel out VLOW!, except in the trivial situation where V1 = V2.

If R1 is a Pt100 RTD (Resistance Temperature Detectors), which has a resistance of 100.0 $\Omega$ at 0 °C, and 138.5 $\Omega$ at 100 °C. We assume that's the required measuring range. If the other resistors in the bridge are all 100 $\Omega$ the output voltage will be 0 V at 0 °C, and highest at 100 °C. We can expect the error due to R5 to be the highest at 100 °C.

The graph shows the reading error in % due to an R5 resistance varying from 0 $\Omega$ to 1 $\Omega$. The purple graph is for the resistor divider, the blue graph for the Wheatstone bridge. Wheatstone has a higher error! This may be surprising at first look, but can easily be explained: the two branches of the bridge halve the 200 $\Omega$ of one branch, like the divider has one. That means that VLOW for the bridge will be twice as high.

The graph shows the error in output voltage reading, we have to calculate that back to a temperature value. This FET has an $\mathrm{R_{DS(ON)}}$ of 90 m$\Omega$ maximum. If we calculate our 100 °C reading back as if the resistance were zero, we'd get 99.90 °C. With this FET, with a 22 m$\Omega$ $\mathrm{R_{DS(ON)}}$ our reading would be 99.97 °C.

Conclusion
The resistance of the switch does influence the reading, but it will be less than 0.1 % when you use a FET with $\mathrm{R_{DS(ON)}}$ < 100 m$\Omega$.

(schematic images borrowed again from Olin. Thanks, Olin)

-

If you already use a Wheatstone bridge (as you say in the comment), then it's ok to use a MOSFET switch, since it will only affect the common mode voltage, and not the signal. Just make sure that it doesn't affect your eventual offset zeroing.

The circuit should be something like this:

Of course it's possible.

But surely it won't be appropriate for a measurement circuit. Depending on the $r_{DS}$ of your MOSFET, you will have a significant accuracy loss. Consider that the $r_{DS}$ is not a stable nor accurate value, and it's most often specified as a maximum value.

Now comes the question: why do you use a voltage divider to measure a resistor? You could achieve better accuracy (and also be able to use a MOSFET switch without accuracy loss) with a Wheatstone bridge.

Another side note: it's better to use an amplifier before sending the output signal to the ADC, otherwise you will greatly limit the dynamic range of the signal, and lose accuracy. Just a non-inverting amplifier with a precision Opamp (not 741 :)), rail-to-rail if you want to avoid the dual supply.

-
Hi, many thanks for your useful reply. Yes, I'm actually going to be using a wheatstone bridge connected to a unity gain op-amp. I just put in the voltage divider for simplicity's sake. You mentioned that if I use a wheatstone bridge, I could use a transistor to switch out the circuit. How to do this? – Eamorr Jun 8 '12 at 11:28
@Eamorr: But that makes things completely different, because the MOSFET unbalances the divider but not the bridge. I'd suggest you to refine the question with the real circuit. You can use CircuitLab, until we get a proper schematic editor – clabacchio Jun 8 '12 at 11:29
Mmmm. Perhaps I should just use very large resistances to minimise the leakage current. I only want to take a temperature measurement every 60 seconds. Many thanks for your response, – Eamorr Jun 8 '12 at 11:30
Thanks for the circuit diagram. I have something almost exactly the same... – Eamorr Jun 8 '12 at 12:55
@clabacchio doesn't using an active amplifier kind of defeat the "low power" aspect the OP's question? – vicatcu Jun 8 '12 at 17:12