MAX6675 K-type Thermocouple Module & Sensor (HCSENS0038)

Modules for various types of sensors including accelerometers. gyro's, IR motion, etc
Post Reply
admin
Site Admin
Posts: 880
Joined: Sun Aug 05, 2012 4:02 pm

MAX6675 K-type Thermocouple Module & Sensor (HCSENS0038)

Post by admin » Mon Feb 27, 2017 2:02 pm

Image




This temperature sensor and module makes use of the Maxim MAX6675 K-Thermocouple to digital converter IC to provide a microcontroller compatible digital serial interface (SPI compatible) to provide accurate temperature compensated measurement of the supplied K-Type thermocouple sensor. It has a 12 bit reolution providing temperature reading from 0oC to 1024oC (max temperature of supplied sensor is 450oC) with a resolution of 0.25oC. Screw terminals allow for connection to the thermocouples spade connectors and a 5 pin standard 0.1" header provides an interface to a microcontroller such as an Arduino development board.

Supplied thermocouple sensor has a diameter of 4.5mm with a 6mm threaded mounting bolt. Total length of sensor including cable and spade connectors is ~50cm.



Image


Specifications:

Thermocouple temperature range: 0 to 450oC
Module sensor temperature range (oC): 0 to 1024
Temperature resolution (oc): 0.25
Module supply voltage: 3 to 5.5V
Module current: 50mA
Module interface: Serial (SO, SCK, CS) 16 bit SPI compatible.
Termocouple accuracy (0-700oC): 8 LSBs
Termocouple disconnect detection.



Example Arduino sketch:
  1. /* FILE:    MAX6675_Example.cpp
  2.    DATE:    27/02/17
  3.    VERSION: 0.1
  4.    AUTHOR:  Andrew Davies
  5.  
  6.    Library created by Hobby Components Ltd (HOBBYCOMPONENTS.COM)
  7.    
  8. 27/02/17 version 0.1: Original version
  9.    
  10. This example sketch has been written to work with the Maxim MAX6675 K-Type
  11. thermocouple to digital converter IC. In particular this sketch has been written
  12. for our MAX6675 K-type Thermocouple Module & Temperature Sensor (HCSENS0038).
  13. The sketch will read the current temperature from the MAX6675 (with connected
  14. K-Type thermocouple sensor) and display it via the Arduinos serial interface.
  15.  
  16. The module should be connected to your Arduino as follows:
  17.  
  18. Arduino..........MAX6675 (HCSENS0038)
  19. GND..............GND
  20. VCC..............+5V (3.3V for 3.3V Arduinos)
  21. 13...............SCK
  22. 10...............CS
  23. 11...............SO
  24.  
  25.  
  26. You may copy, alter and reuse this code in any way you like, but please leave
  27. reference to HobbyComponents.com in your comments if you redistribute this code.
  28. This software may not be used directly for the purpose of selling products that
  29. directly compete with Hobby Components Ltd's own range of products.
  30.  
  31. THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER
  32. EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
  33. MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
  34. HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
  35. INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
  36. REASON WHATSOEVER.
  37. */
  38.  
  39. /* Define the digital pins used to communicate with the MAX6675 */
  40. #define CS_PIN 10
  41. #define SO_PIN 11
  42. #define SCK_PIN 13
  43.  
  44.  
  45. void setup()
  46. {
  47.   Serial.begin(9600);
  48.   pinMode(CS_PIN, OUTPUT);
  49.   pinMode(SO_PIN, INPUT);
  50.   pinMode(SCK_PIN, OUTPUT);
  51. }
  52.  
  53.  
  54. void loop()
  55. {
  56.   /* Read the current temperature */
  57.   float Temp = ReadTemp();
  58.  
  59.   /* Check there is a thermocouple connected */
  60.   if(Temp != -1)
  61.     Serial.println(ReadTemp()); //If so then output the temperature in oC
  62.   else
  63.     Serial.println("Thermocouple disconnected!"); //If no sensor is connected then display a warning
  64.  
  65.   /* Wait 1 second before making another measurement */  
  66.   delay(1000);
  67. }
  68.  
  69.  
  70. /* Read the current temperature. Returns a floating point value representing the current temperature in oC */
  71. float ReadTemp()
  72. {
  73.   float Result = 0;
  74.  
  75.   /* Read the 16 bit data from the MAX6675 to get the current temperature */
  76.   digitalWrite(CS_PIN, LOW);
  77.   int Data = shiftIn(SO_PIN, SCK_PIN, MSBFIRST) << 8;
  78.   Data |= shiftIn(SO_PIN, SCK_PIN, MSBFIRST);
  79.   digitalWrite(CS_PIN, HIGH);
  80.  
  81.   /* Check bit 2 to make sure the thermocouple is connected */
  82.   if(Data & 0x4)
  83.   {
  84.     Result = -1; /* If not then return -1 */
  85.   }else
  86.   {
  87.     /* If so then convert the data into oC. Temperature data is in bits 3 to 14 so discard lower 3 bits */
  88.     Data = Data >> 3;
  89.     /* Each bit represents 0.25oC */
  90.     Result = Data * 0.25;
  91.   }
  92.  
  93.   return Result;
  94. }

Image
MAX6675.pdf

Disclaimer: Libraries, example code, and diagrams are provided as an additional free service by Hobby Components and are not sold as part of this product. We do not provide any guarantees or warranties as to their accuracy or fitness for purpose.

Copyright notice: Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.
You do not have the required permissions to view the files attached to this post.

creast
Posts: 1
Joined: Thu Aug 19, 2021 5:46 pm

Re: MAX6675 K-type Thermocouple Module & Sensor (HCSENS0038)

Post by creast » Mon Aug 23, 2021 1:00 pm

Just a quick note to say how pleased I am with this module and Arduino sketch provided.
It works a treat!
I needed to log the temperature profile of my kiln/furnace and using this with Putty software to log the serial port I have succesfully achieved this.

Charles

andrew
Site Admin
Posts: 1416
Joined: Sun Aug 05, 2012 4:15 pm

Re: MAX6675 K-type Thermocouple Module & Sensor (HCSENS0038)

Post by andrew » Mon Aug 23, 2021 2:54 pm

Thanks for the feedback, it's much appreciated :-)
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Post Reply

Return to “Sensors”