Thermocouple with free ends