# Thermocouple Software compensation

Previously, it was suggested that automatic compensation could be accomplished by intentionally inserting a temperature-dependent voltage source in series with the circuit, oriented in such a way as to oppose the reference junctionās voltage:

If the series voltage source Vrjc is exactly equal in magnitude to the reference junctionās voltage (VJ2), those two terms cancel out of the equation and lead to the voltmeter measuring only the voltage of the measurement junction J1:

• Vmeter = VJ1 + 0
• Vmeter = VJ1

This technique is known as hardware compensation, and is employed in analog thermocouple temperature transmitter designs.

Previously we saw an example of this called an ice point, the purpose of which was to electrically counter the reference junction voltage to render that junctionās voltage inconsequential as though that junction were immersed in a bath of ice-water.

A modern technique for reference junction compensation more suitable to digital transmitter designs is called software compensation:

Instead of canceling the effect of the reference junction electrically, we cancel the effect arithmetically inside the microprocessor-based transmitter. In other words, we let the receiving analog-digital converter circuit see the difference in voltage between the measurement and reference junctions (Vinput = VJ1 ā VJ2), but then after digitizing this voltage measurement we have the microprocessor add the equivalent voltage value corresponding to the ambient temperature sensed by the RTD or thermistor (Vrjc):

• Compensated total = Vinput + Vrjc
• Compensated total = (VJ1 ā VJ2) + Vrjc

Since we know the calculated value of Vrjc should be equal to the real reference junction voltage (VJ2), the result of this digital addition should be a compensated total equal only to the measurement junction voltage VJ1:

• Compensated total = VJ1 ā VJ2 + Vrjc
• Compensated total = VJ1 + 0
• Compensated total = VJ1

A block diagram of a thermocouple temperature transmitter with software compensation appears here:

Perhaps the greatest advantage of software compensation is the flexibility to easily switch between different thermocouple types with no hardware modification. So long as the microprocessor memory is programmed with look-up tables relating voltage values to temperature values, it may accurately measure (and compensate for the reference junction of) any thermocouple type.

Hardware-based compensation schemes (e.g. an analog āice pointā circuit) require re-wiring or replacement to accommodate different thermocouple types, since each ice-point circuit is built to generate a compensating voltage for a specific type of thermocouple.