The code for this project can be downloaded from my GitHub page here.
In an earlier Blog I here used a MAX6675 Thermocouple board and used the Serial Monitor to display the results. I have now connected the board to an OLED display.
The output from the MAX6675 is very erratic (at least in my case) and to get a reasonably stable reading I read the output from the thermometer twenty five times to give an average reading. This slows down the screen update, but does not interfere with the thermocouple response. So, for example, put the probe into a hot cup of coffee and the display will jump in a number of steps to the final reading. This has not proved to be a problem in practice.
The OLED display is connected to 5 volts, Ground and SDA is connected Arduino pin A4 (on a UNO) with SCL connected to Arduino pin A5 (on a UNO). I have used the library from Adafruit for the MAX6675 and if pin2 and 3 are set as OUTPUTS they can be used to supply power to the MAX6675 and the board can be simply be plugged into header pins 2 to 6. Check that the connections on your board match the pins in the Sketch.
In particular check the OLED connections, I have had a number of these with various pin connections making it impossible to swap displays without changing the wiring. I have destroyed three displays this week by not paying enough attention. Reversing the power supplies kills the display immediately.
The MAX6675 library can be downloaded from the Adafruit GitHub here.
This thermometer can display in either Centigrade or Fahrenheit, a variable at the head of the code centigrade, if set to true will display temperature values in Centigrade. If set to false, values in Fahrenheit will be displayed. The line of code to change is
boolean centigrade = true; // set to false for readings in Fahrenheit
The maximum temperature reached is shown on the top left and the minimum temperature is shown on the top right.