Reply to topic  [ 1 post ] 
MAX6675 K-type Thermocouple Module & Sensor (HCSENS0038) 
Author Message
Site Admin

Joined: Sun Aug 05, 2012 4:02 pm
Posts: 622
Post MAX6675 K-type Thermocouple Module & Sensor (HCSENS0038)
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 ~100cm.



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:

Code:
/* FILE:    MAX6675_Example.cpp
   DATE:    27/02/17
   VERSION: 0.1
   AUTHOR:  Andrew Davies

   Library created by Hobby Components Ltd (HOBBYCOMPONENTS.COM)
   
27/02/17 version 0.1: Original version
   
This example sketch has been written to work with the Maxim MAX6675 K-Type
thermocouple to digital converter IC. In particular this sketch has been written
for our MAX6675 K-type Thermocouple Module & Temperature Sensor (HCSENS0038).
The sketch will read the current temperature from the MAX6675 (with connected
K-Type thermocouple sensor) and display it via the Arduinos serial interface.

The module should be connected to your Arduino as follows:

Arduino..........MAX6675 (HCSENS0038)
GND..............GND
VCC..............+5V (3.3V for 3.3V Arduinos)
13...............SCK
10...............CS
11...............SO


You may copy, alter and reuse this code in any way you like, but please leave
reference to HobbyComponents.com in your comments if you redistribute this code.
This software may not be used directly for the purpose of selling products that
directly compete with Hobby Components Ltd's own range of products.

THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER
EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
REASON WHATSOEVER.
*/

/* Define the digital pins used to communicate with the MAX6675 */
#define CS_PIN 10
#define SO_PIN 11
#define SCK_PIN 13


void setup()
{
  Serial.begin(9600);
  pinMode(CS_PIN, OUTPUT);
  pinMode(SO_PIN, INPUT);
  pinMode(SCK_PIN, OUTPUT);
}


void loop()
{
  /* Read the current temperature */
  float Temp = ReadTemp();

  /* Check there is a thermocouple connected */
  if(Temp != -1)
    Serial.println(ReadTemp()); //If so then output the temperature in oC
  else
    Serial.println("Thermocouple disconnected!"); //If no sensor is connected then display a warning

  /* Wait 1 second before making another measurement */ 
  delay(1000);
}


/* Read the current temperature. Returns a floating point value representing the current temperature in oC */
float ReadTemp()
{
  float Result = 0;

  /* Read the 16 bit data from the MAX6675 to get the current temperature */
  digitalWrite(CS_PIN, LOW);
  int Data = shiftIn(SO_PIN, SCK_PIN, MSBFIRST) << 8;
  Data |= shiftIn(SO_PIN, SCK_PIN, MSBFIRST);
  digitalWrite(CS_PIN, HIGH);

  /* Check bit 3 to make sure the thermocouple is connected */
  if(Data & 0x4)
  {
    Result = -1; /* If not then return -1 */
  }else
  {
    /* If so then convert the data into oC. Temperature data is in bits 3 to 14 so discard lower 3 bits */
    Data = Data >> 3;
    /* Each bit represents 0.25oC */
    Result = Data * 0.25;
  }

  return Result;
}



Image

Attachment:
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.


Mon Feb 27, 2017 2:02 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Thank you to phpBB.com & phpBB.ro.
Design created by Florea Cosmin Ionut.
© 2011 All contents of this site are © Hobby Components LTD