Overview
In this project, will make an Industrial Thermometer with MAX6675 Thermocouple & Arduino Interface & display the temperature in 16×2 LCD Display. Using the MAX6675 Breakout Board and a K-Type thermocouple, we can easily measure temperature ranging from 0°C to 1024°C using any microcontroller. The chip output data is sent via an SPI interface. Here we are going to use it, SPI Pins, with the Arduino Nano Board.
Earlier we used the temperature sensors like DS18B20 & LM35, but they can only measure the temperature below 125°C. When its come to high-temperature measurement, the MAX6675 is the best option. The great advantage of the thermocouple is its ease of use when measuring high temperatures. The only other way of measuring such high temperature is by using non-contact thermal temperature gun. But the disadvantage of non-contact IR Temperature Sensor is that it is very expensive.
This MAX6675 chip is designed specifically for use with the K-Type thermocouple which is the most popular chip. The chip has internal functionalities for temperature measurement, all need is to connect up the thermocouple and read the output from the SPI pins. So, let’s make an Industrial Thermometer with MAX6675 Thermocouple, Arduino & LCD Display. You can also use MAX6675 with ESP8266.
Bill of Materials
The following are the list of components for making Industrial Thermometer with the Amazon purchase link.
| S.N. | Components Name | Quantity | Purchase Links |
|---|---|---|---|
| 1 | Arduino UNO Board | 1 | Amazon | AliExpress |
| 2 | 16x2 I2C LCD Display | 1 | Amazon | AliExpress |
| 3 | MAX6675 Thermocouple Sensor | 1 | Amazon | AliExpress |
| 4 | Connecting Wires | 10 | Amazon | AliExpress |
| 5 | Breadboard | 1 | Amazon | AliExpress |
MAX7765 K-Type Thermocouple Temperature Sensor
This MAX6675 Module + K Type Thermocouple Sensor makes use of the Maxim MAX6675 K-Thermocouple to digital converter IC. It provides a microcontroller compatible digital serial interface (SPI compatible) for giving an accurate temperature-compensated measurement of the temperature.
It has a 12-bit resolution. This converter resolves temperatures to 0.25°C, allows readings as high as +1024°C, and exhibits thermocouple accuracy of 8 LSBs for temperatures ranging from 0°C to +700°C. Screw terminals allow for connection to the thermocouples spade connectors and a 5 pin standard 0.1″ header provides an interface to a microcontroller.
Specifications
1. Working Voltage: DC 5V
2. Operating Current: 50mA
3. Test Temperature Range: 0°C – 1024°C
4. Measurement Accuracy: +/-1.5C
5. Resolution : 0.25C
6. Output mode: SPI digital signal
Thermocouple Designing (Seebeck Effect)
A thermocouple measures the difference in potential across a hot and cold end for two dissimilar metals. One end of the metal is kept at high temperature and other end at cold ice. If this is done then the temperature difference across the thermocouple wire from end-to-end causes a voltage to be generated (Seebeck effect) that is proportional to the temperature difference.
The voltages produced by the Seebeck effect are small, usually only a few microvolts (millionths of a volt) per kelvin of temperature difference at the junction. If the temperature difference is large enough, some Seebeck-effect devices can produce a few millivolts (thousandths of a volt). To learn about the different types of Metal that can be used in Thermcouple desiging you can check this post: Metal & Alloys.
Cold Junction Compensation & MAX6675 IC
The generated voltage is extremely small so an amplifier is required to turn the reading into a usable form. So a technique called Cold-Junction-Compensation (CJC) is used.
This is where the MAX6675 comes in as it has everything built-in like an in-built amplifier, Cold -Junction-Compensator (CJC) and an ADC. In fact, the chip makes using a Type-K thermocouple trivial and you don’t even have to retrieve the analogue value the ADC generates a digital output which is transmitted as a 12-bit serial sequence.
Interfacing MAX6675 Thermocouple & LCD Display with Arduino
Now let us interface the MAX6675 Thermocouple Temperature Sensor with Arduino & Display the Temperature reading on 16×2 LCD Display. The connection diagram is given below.
The connection between Arduino UNO/Nano Board & MAX6675 is simple as given below.
Similarly, connect the 16X2 LCD as per circuit diagram. Connect the LCD 1, 5, 16 to GND & 2, 15 to VCC 5V. Use 10K Potentiometer at pin 3 to adjust the LCD Contrast. Connect the pin 4, 6, 11, 12, 13, 14 to Arduino 7, 6, 5, 4, 3, 2 pin. You can also use a breadboard for Arduino max6675 thermocouple & LCD interface.
Source Code/Program for Arduino MAX6675
The source code/program to interface MAX6675 with Arduino is given below. The code doesn’t require any library to compile. Simply copy the code & paste it to the Arduino IDE. Then upload to the Arduino Board that you are using.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
#include <SPI.h> #include <LiquidCrystal.h> LiquidCrystal lcd(7, 6, 5, 4, 3, 2); #define MAX6675_CS 10 #define MAX6675_SO 12 #define MAX6675_SCK 13 void setup() { lcd.begin(16,2); } void loop() { float temperature_read = readThermocouple(); lcd.setCursor(0,0); lcd.print(" TEMPERATURE"); lcd.setCursor(4,1); lcd.print(temperature_read,2); delay(1000); } double readThermocouple() { uint16_t v; pinMode(MAX6675_CS, OUTPUT); pinMode(MAX6675_SO, INPUT); pinMode(MAX6675_SCK, OUTPUT); digitalWrite(MAX6675_CS, LOW); delay(1); // Read in 16 bits, // 15 = 0 always // 14..2 = 0.25 degree counts MSB First // 2 = 1 if thermocouple is open circuit // 1..0 = uninteresting status v = shiftIn(MAX6675_SO, MAX6675_SCK, MSBFIRST); v <<= 8; v |= shiftIn(MAX6675_SO, MAX6675_SCK, MSBFIRST); digitalWrite(MAX6675_CS, HIGH); if (v & 0x4) { // Bit 2 indicates if the thermocouple is disconnected return NAN; } // The lower three bits (0,1,2) are discarded status bits v >>= 3; // The remaining bits are the number of 0.25 degree (C) counts return v*0.25; } |
Testing & Measurement of Temperature
As soon as the code is uploaded, the LCD will start displaying the room temperature in degree Celcius. You can convert the temperature value to degree Fahrenheit. The temperature will be updated on LCD after every 1 seconds.
To test the working and ability of the sensor to detect the high temperature, you can start heating the sensor with Soldering Iron or a simple gas lighter. In my case, I used a gas lighter flame and heated the sensor rod.















5 Comments
Very good. Really like this tutorial.
I was also planning to write arduino, 6675 and LCD combination tutorial . I just started a blog like and wants your comment on it.
Very useful tutorial. However I noticed two more things:
1) I had to use the statement pinMode(MAX6675_SO, INPUT_PULLUP) in order to make the program operational. Otherwise the MAX 6675 doesn’t convert and I always got the value 0.
2) The conversion time is greater than 220 ms (typically 170 ms, see MAX6675 datasheet). So the program should not loop too fast.
if the module wire broken means it shows the value as “nan”,
How can i get the value in arduino code for cutoff my power supply of heater coil.
#include “max6675.h”
int ktcSO = 7;
int ktcCS = 6;
int ktcCLK = 5;
MAX6675 ktc(ktcCLK, ktcCS, ktcSO);
void setup() {
Serial.begin(9600);
// give the MAX a little time to settle
delay(500);
}
void loop() {
// basic readout test
Serial.print(“Deg C = “);
Serial.print(ktc.readCelsius());
Serial.print(“\t Deg F = “);
Serial.println(ktc.readFahrenheit());
delay(500);
}
por casualidad tienen el codigo para max6675 para labview? gracias