(Last Updated On: )

Table of Contents:

Introduction:

Interfacing MAX6675 with Arduino and LCD | High-Temperature Thermometer for Industries

Welcome to a series of Articles on Sensors. From now onwards, I will select a sensor and try to interface with a different type of Microcontrollers like Arduino, ESP32, ESP8266, and Print data on Displays like 16×2 LCD and OLED display. Also, post data to a simple web server and display the same data on both mobile screens and Computers. At last, I will perform the Durability or capability test for the Selected sensor and will give a review of the testing.

In this article, we are going to see all about K type thermocouple sensor with the MAX6675 Breakout Board. We will interface this sensor with Arduino and Display the data on 16×2 LCD,
In the next articles, we will print the same data on OLED Display. Then we will perform Durability or Capability testing.
we will also interface this sensor with ESP32 and ESP8266 and display the sensor data on the webserver.

So without wasting time lets get started.

PCBWay:

PCBWay is a famous brand for PCB Manufacturing. With more than a decade in the field of PCB prototype and fabrication, PCBWay is committed to meeting the needs of Techies from different industries in terms of quality, delivery, cost-effectiveness. As one of the most experienced PCB manufacturers, PCBWay provides the top class PCB manufacturing, PCB assembly, SMD Stencil services.

PCBWay is popular for its Flexible PCB Service. They are offering 1-8 layers of Flexible PCBs with 3-5 Working days build time. Currently, PCBWay is giving an extra 15% discount on Flex PCBs and Flex-rigid PCBs. So use this opportunity and get your Flex PCBs manufactured by the Top Class PCB Manufacture in the current industry.

Flexible PCBs

At PCBway.com we can get 10 pieces of 2 layered PCBs at just $5 with 24 hours build time & also PCB way offering PCB assembly services at just $30 along with Free shipping. PCBway is also offering services like PCB prototype, SMD Stencil, PCB assembly, Flexible PCBs & Advanced PCBs. The best part of PCBway is the Instant quote feature, just enter the PCB size, choose the quantity, layers, and thickness. That’s it, we will get the instant quote. place an order by clicking on saving to cart. check out their website for more details.

PCBway.com

 

Video Tutorial: Interfacing MAX6675 with Arduino and LCD

This tutorial is also available in the video format, you can watch the below videos or continue reading this article.

Required Components:

1. Breadboard,                   (Buy from Amazon)
2. Arduino Uno Board,       (Buy from Amazon)
3. 16×2 LCD Screen,           (Buy from Amazon)
4. OLED DIsplay,                (Buy from Amazon)
5. MAX6675 Sensor           (Buy from Amazon)
6. Screwdriver                    (Buy from Amazon)
7. connecting wires            (Buy from Amazon)

Overview: MAX6675

Before jumping into the Hardware connection and programming, Let’s understand the facts and Capabilities of this sensor.

MAX6675

The MAX6675 performs cold-junction compensation and digitizes the signal from a K-type thermocouple. The output data in a 12-bit resolution, SPI compatible, read-only format. This converter resolves temperatures to 0.25°C, allows readings as high as +1024°C, and exhibits thermocouple accuracy of 8LSBs for temperatures ranging from 0°C to +700°C.
Direct digital conversion of Type -K thermocouple output
Cold-junction compensation
Simple SPI-compatible serial interface
Open thermocouple detection

Applications
Consumer Electronics, Industrial, Automotive

Absolute Maximum Ratings
Supply Voltage (VCC to GND) …………………………. -0.3V to +6V
Operating Temperature Range …………………….. -20°C to +85°C
Storage Temperature Range ……………………… -65°C to +150°C

Circuit Diagram: Interfacing MAX6675 with Arduino and LCD

Here is the circuit diagram to interface MAX6675 and LCD screen with Arduino Uno Board. Arduino Uno will read data from the sensor, and print the same on LCD Screen.

Interfacing MAX6675 with arduino and LCD

Source code: Interfacing MAX6675 with Arduino and LCD

Coming to the programming part, here is the code to interface max6675 with Arduino and print sensor data on the LCD screen.

#include <LiquidCrystal.h>
#include "max6675.h" //https://github.com/adafruit/MAX6675-library

// Creates an LCD object. Parameters: (rs, enable, d4, d5, d6, d7)
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int thermoDO = 8; // SO of  MAX6675 module to D8
int thermoCS = 9; // CS of MAX6675 module to D9
int thermoCLK = 10; // SCK of MAX6675 module to D10

MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
void setup()
{
  Serial.begin(9600);
  lcd.begin(16, 2);
  lcd.clear();
}

void loop()
{
  float t = thermocouple.readCelsius();
  float tF = thermocouple.readFahrenheit();
  // current temperature readout
  Serial.print("Deg C = ");
  Serial.println(t);
  Serial.print("\t Deg F = ");
  Serial.println(tF);
  Serial.println();
  delay(1000);
  //Celsius
  lcd.setCursor(0, 0);
  lcd.print("Temp_C:");
  lcd.setCursor(8, 0);
  lcd.print(t);
  lcd.print((char)223);
  lcd.print("C");
  // Fahrenheit
  lcd.setCursor(0, 1);
  lcd.print("Temp_F:");
  lcd.setCursor(8, 1);
  lcd.print(tF);
  lcd.print((char)223);
  lcd.print("F");
  delay(500);
}

 

Code Detailed Explanation:

These are the libraries we are using, These libraries can be installed directly from the Arduino Library manager itself. Go to the library manager, type Liquid crystal, install the first one, repeat the same process for MAX6675 also. I have also given the GitHub link of the library, you can download it using the link and install it.

#include <LiquidCrystal.h>
#include "max6675.h" //https://github.com/adafruit/MAX6675-library

Creating an LCD object and passing pin no as parameters. Declaration of sensor pins, Data output as 8, Chipselect as 9, Clock as 10. Creating a max6675 object and passing pin no as parameters.

// Creates an LCD object. Parameters: (rs, enable, d4, d5, d6, d7)
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int thermoDO = 8; // SO of  MAX6675 module to D8
int thermoCS = 9; // CS of MAX6675 module to D9
int thermoCLK = 10; // SCK of MAX6675 module to D10
MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);

coming to the void setup, initializing serial monitor at 9600 baudrate, begin LCD with an object, and clearing the LCD screen.

void setup()
{
  Serial.begin(9600);
  lcd.begin(16, 2);
  lcd.clear();
}

coming to the void setup, initializing serial monitor at 9600 baudrate, begin LCD with an object, and clearing the LCD screen. Coming to the void loop, reading sensor data, and storing into the variables. The temperature in Celcius format is being stored in the variable t, and Fahrenheit is being stored on the “tf”, then printing same data on the serial monitor. Then printing temperature in Celcius format on the LCD screen, this line will print the degree symbol on the LCD screen. The printing temperature in Fahrenheit format on the LCD screen.

void loop()
{
  float t = thermocouple.readCelsius();
  float tF = thermocouple.readFahrenheit();
  // current temperature readout
  Serial.print("Deg C = ");
  Serial.println(t);
  Serial.print("\t Deg F = ");
  Serial.println(tF);
  Serial.println();
  delay(1000);
  //Celsius
  lcd.setCursor(0, 0);
  lcd.print("Temp_C:");
  lcd.setCursor(8, 0);
  lcd.print(t);
  lcd.print((char)223);
  lcd.print("C");
  // Fahrenheit
  lcd.setCursor(0, 1);
  lcd.print("Temp_F:");
  lcd.setCursor(8, 1);
  lcd.print(tF);
  lcd.print((char)223);
  lcd.print("F");
  delay(500);
}

Uploading code to Arduino UNO:

Connect Arduino Uno with a laptop, check uploading configurations of Board Arduino UNO, and select the right port.

If everything is okay Upload the code. After successful uploading open serial monitor. If the sensor is working, you can see the temperature data on the Serial monitor. You can also see the Temperature data in both Celcius and Fahrenheit format on the LCD screen. The temperature will be updated for every 500 milliseconds.

Interfacing MAX6675 with arduino and LCD

 

Video Tutorial: Interfacing MAX6675 with Arduino and LCD

This tutorial is also available in the video format, you can watch the below videos or continue reading this article.

By Veeru

4 thoughts on “S1 A1 Interfacing MAX6675 with Arduino and LCD | High Temperature Thermometer for Industries”

Leave a Reply