Thermocouples with reference junction