# How to analyze this thermistor resistance op-amp circuit?

Why would one use this circuit topology rather than a simpler Wheatstone bridge or one of the topologies commonly seen in the appnotes for PT100 thermistors?

What is the intuition behind the selection of the 2.8 kΩ, 4.7 kΩ, and 100 kΩ values in this amplifier circuit (beyond just being E96 values), and how would the designer of the circuit have determined the optimal values to use here? (This circuit is one that I reverse-engineered from the mainboard of a Cetus Mk3 3d printer; its function is to measure the temperature of the printer's hotend.)

It's clear from the circuit topology that this circuit essentially compares the resistances of RA7 and the PT100 thermistor, and the equation I've been able to derive (via Kirchoff's laws and the virtual short approximation) bears that out:

$$\frac{V_{out}}{V_{cc}} = A \frac{R_t - B}{R_t + C}$$

Where Vout/Vcc is the ADC output fraction, Rt is the thermistor's resistance, and the coefficients work out as A = 363.604, B = 100 Ω, C = 2727.07 Ω.

It's also apparent that there's a correspondence between the resistors in the upper and lower halves of the circuit. What's not apparent to me though, is the design intent behind this specific configuration or the selection of the values in use. I've attempted to work through the equations symbolically, but the resulting equations end up having a dozen terms and don't really make things any clearer.

What's the intuition behind this circuit?

• The rest of the schematic is probably quite important providing you have reverse engineered it correctly. Aug 30, 2022 at 17:15
• @Andyaka The HOTEND_TA / HOTEND_TB connections just connect (through a handful of connectors and some cabling) to the actual hotend PT100 (which I've included in the schematic just to make it clear since it didn't seem clear without the symbol there). HOTEND_TEMP connects back to an ADC input pin on the micro-controller. Aug 30, 2022 at 17:18
• @Andyaka Just removed the HOTEND_TA / HOTEND_TB net flags so it's less confusing. Aug 30, 2022 at 17:21
• No, the rest of the schematic to the left. Aug 30, 2022 at 17:23
• @Andyaka it's an unrelated circuit that's just using the other half of the dual op-amp LM358. The full schematic is available here if you want though: imgur.com/a/bw8auaU Aug 30, 2022 at 17:28

Why would one use the circuit topology rather than a simpler wheatstone bridge

It's still a Wheatstone bridge and, it's interfaced to a standard differential amplifier circuit: - simulate this circuit – Schematic created using CircuitLab

In other words; it's a standard way of doing it using an op-amp (configured as a differential amplifier) rather than an instrumentation amplifier.

The most important factor the designer considered was the current through the RTD. It should be around 1mA maximum as a rule of thumb for a Pt100 element (higher current means more self-heating, proportional to the square of the current, but lower current means less signal and more errors due to offset and drift, especially of a low grade op-amp). Also smaller signal level means less immunity to noise, all other things being equal.

He or she has chosen about 1.1mA which fixes the two 2.8K resistors. The common mode voltage range of the op-amp is okay for an LM358 up to about 3.3 - 2V = 1.3V so the RTD maximum temperature is not an issue on that account (even at 850°C the voltage will be less than 500mV).

Note that the designer has chosen a symmetrical (both legs nominally the same resistance) Wheatstone bridge configuration with the output loaded by the simple differential amplifier. That's a simple configuration but negatively affects the linearity a bit (adding to the inherent nonlinearity of the sensor and the nonlinearity of a resistor source rather than a current source). It could all be fixed with a whiff of positive feedback but that's outside the scope of this answer, and it can also be fixed with some math done in an MCU since the linearity effects are rather small and don't affect dynamic range.

The gain they chose is about 21 (100K/4.7K), so (very roughly) 1°C change in RTD temperature will result in about 0.385 ohms * 1.15mA * 21 ~= 9mV. Note that the RTD is not involved in the feedback, so the voltage gain is nominally constant. The ratio is set by the gain, the absolute values of the resistors are chosen to be high enough not to load the bridge much but not to be too high for the op-amp chosen.

You end up with this transfer function (assuming an ideal op-amp and DIN standard Pt100 sensor):

(you can see the slight curvature that results from the three sources of nonlinearity discussed above). It's ratiometric to the supply voltage, so if your ADC is using the supply voltage as a reference the supply voltage will nominally cancel out and the ADC reading will be dependent only on the resistor values and RTD value.

All-in-all it appears to me to be a good and efficient cost-constrained design for a wide range temperature sensor that is going to be a short and predictable distance from the electronics (because of lack of lead wire compensation which would be «de rigeur» in an industrial or scientific application).

I wouldn't claim that a differential amplifier applied to a Wheatstone bridge would be "simple". Making differential amplifiers out of 1% resistors, especially such amplifiers with gain, is a fool's errand, more-or-less. Unnecessary, and the circuit will have more error the more resistors you toss into the mix (unless you're very careful).

The original circuit is a Wheatstone bridge, and has about 1V/50ohm sensitivity on the output, around 100 ohms on the Pt100.

The circuit below does the same thing, with half as many resistors - 4 instead of 8, and sensitivity of about -1V/50ohm: simulate this circuit – Schematic created using CircuitLab

I claim that the designers of the printer just looked something up, and used the first result that came out of the search and seemed to work. If the output at 0C can be the upper supply rail (3.3V), then R3=R4=2.8k.

• I agree except the RTD is on the Vin+ side so it is a nonlinear positive or PTC voltage Aug 30, 2022 at 19:11
• This circuit requires an inverting output slope. Moving the RTD to Vin+ side will just saturate the output. The simplicity and increased accuracy comes at the cost of the output looking “unnatural” - but who cares, an MCU is consuming this stuff, so the slope can be whatever. Sep 1, 2022 at 2:24

The PT100 is a platinum PTC detector that can exceed 500'C The resistance is 100 ohms at 0'C and rises in ohms linearly by 0.392 Ohms/ 'C

Since the differential amp impedance is 4.7k the gain on the negative side is fixed at 100k/(4.7k+100) while the positive side with the PT100 can rise at 255'C to 255x0.392 +100 = 200 now the gain reduces to 100k/(4k7+200). (By ignoring 2k8 in || with 100 for brevity.)

This means the Op Amp output is not linear with temp as one would hope, but if you need a correction factor, it may be computed or simulated.

They could have made it more linear by scaling up the diff amp resistance like changing 4k7 to 50k and 100k to 1M.

• The output is fed into a CPU, so the transfer function can be arbitrary - as long as it’s monotonic and the ADC steps expressed in degrees are not too large, then it’s all good. It’s the case of software making life easier for a change, so we don’t have to build analog computers for everything, and can save the in-amps for people who desperately need them for strain gages (many excellent types from ADI have had awful leadtimes lately). Sep 1, 2022 at 2:27