For my project, the measurement of a machine temperature is required. A thermocouple is one of the best sensors for measuring the temperature of an electrical machine. Thanks to Omega for sending several K-type thermocouples as a part of the Challenger kit. These thermocouples are capable of measuring from -200°C to 1250°C. For measuring temperature using any microcontroller, we need to use an amplifier and signal conditioning circuit like MAX31855 or MAX6675. As the thermocouples came without any amplifier module, I managed a MAX6675 module to connect the thermocouple with the ESP32. The following image shows my connection of the thermocouple with the amplifier module.
Then I connected the ESP32 module with the amplifier module as shown in the following image.
The
ESP32 module was programmed using Arduino IDE. I installed the MAX6675 Arduino library.

Then uploaded the following test code to the ESP32 module:
#include "max6675.h"
int thermoDO = 19;
int thermoCS = 23;
int thermoCLK = 5;
MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
void setup() {
Serial.begin(9600);
Serial.println("MAX6675 test");
// wait for MAX chip to stabilize
delay(500);
}
void loop() {
// basic readout test, just print the current temp
Serial.print("C = ");
Serial.println(thermocouple.readCelsius());
Serial.print("F = ");
Serial.println(thermocouple.readFahrenheit());
// For the MAX6675 to update, you must delay AT LEAST 250ms between reads!
delay(1000);
}
At room temperature, without connecting anything, the thermocouple, I got the following response in the serial terminal:

I connected my hot soldering iron tip to the thermocouple and got the following data.

I noticed the temperature has increased, but I am not sure whether this is the correct temperature or if I need calibration. I will try to find it later.
