I'm trying to use a thermocouple k type and a MAX6675 IC. I bought the MAX6675 chip and made the circuit (just a 1 nf capacitor on +5 V and GND near the IC) with the help of the datasheet

I used the library from adafruit and for the sake of avoiding errors, I used the Example from the same library (serialThermocouple) with 52 as CLK, pin 50 as SDO and pin 53 as CS.

The program is producing numbers and the sensor appears to stabilize around 104.0C and 105.0C, but why? that is not the real temp or even close to it? Is there any other conversion to get the real degree around me?

oh !! and Another question.. Why is the 8 bit shift here?

  v = spiread();
  v <<= 8;
  v |= spiread();

I saw it in many code. Also this one

digitalWrite(_ssPin, LOW);
tcData = SPI.transfer(0x00)<<8;
tcData |= SPI.transfer(0x00);
digitalWrite(_ssPin, HIGH);
temp = (tcData>>3)/4.0;

enter image description here

  • Comments are not for extended discussion; this conversation has been moved to chat. – Majenko Nov 26 '18 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.