0

I am using a MAX6675 board and a k-type thermal couple to measure temp. The problem is even when running the example the temp value keeps climbing.

MAX6675 test
27.25
C = 27.25
F = 130.10
109.00
C = 218.00
F = 816.80
872.00
C = 1744.00
F = 2624.00
832.00
C = nan
F = nan
512.75
C = nan
F = nan

I am using the max6675.h library. Is there a way to fix this?

#include "max6675.h"

int thermoDO = 4;
int thermoCS = 5;
int thermoCLK = 6;

MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
int vccPin = 3;
int gndPin = 2;

void setup() {
  Serial.begin(9600);
  // use Arduino pins 
  pinMode(vccPin, OUTPUT); digitalWrite(vccPin, HIGH);
  pinMode(gndPin, OUTPUT); digitalWrite(gndPin, LOW);

  Serial.println("MAX6675 test");
  // wait for MAX chip to stabilize
  delay(500);
}

void loop() {
  // basic readout test, just print the current temp

   Serial.print("C = "); 
   Serial.println(thermocouple.readCelsius());
   Serial.print("F = ");
   Serial.println(thermocouple.readFahrenheit());

   delay(1000);
}

edit: Added code (https://github.com/adafruit/MAX6675-library/blob/master/examples/serialthermocouple/serialthermocouple.pde)

8
  • 2
    Code? Wiring? ...?
    – Majenko
    Jul 3, 2018 at 18:03
  • I think your house is on fire. Or maybe your code is incorrect, but it's impossible to say when you haven't provided it to us.
    – Gerben
    Jul 3, 2018 at 18:52
  • The output does not look like it came from this sketch, quite apart from the values it prints. Your loop() function is coded to sample and print 2 lines every second: "C = .... \n" "F = .... \n", yet the output you showed has another line preceding each pair. Are you saying the sketch (or the library) is producing 3 lines where only 2 are coded?
    – JRobert
    Jul 3, 2018 at 20:48
  • I added a line that was just C= thermocouple.readCelsius() Serial.print (C)
    – Michael H.
    Jul 3, 2018 at 20:54
  • Please provide a picture of your wiring, or at the very least confirm that the pins GND, VCC, DO, CS and CLK do indeed go to data pins 2, 3, 4, 5 and 6 respectively - as declared in your code. I assume this is AdaFruit's version of the library? If this all checks out, then it's almost certainly hardware: the thermocouple, the MAX6675, or the Arduino itself. Jul 4, 2018 at 9:48

1 Answer 1

1

After test some other K-type thermal couples on this I am now thinking I just got a bad board. I was able to order a new one and it worked without issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.