I have been using an arduino nano esp32 and max6675 module for temperature measurement. The board is 2.0.13 version.
It was working perfectly for temperature measuring three weeks back but now all of a sudden, it has stopped working in fact the code is just giving 0.0 deg (error response). we changed the arduino, cables, the sensor and the module but it still does not work.
The power is 3.25V verified by multimeter. We have already triple checked all the connections (also with the multimeter) and the pin arrangement. The shared GND between the board and the module is correct. Everything is firmly connected.
The code I am using is completely basic and is basically only creating a connection and starting the module. The arduino is reacting as it should. There is no difference when i take the sensor off, so it's like it can't even see whether one is connected.
The last time it worked was three weeks back and it accurately measured the temperature. I have no more ideas on what could be possibly wrong.
OK, the zero status seems to indicate that all bits clocked in are zero.
That points possible to grounding of the data-pin.
So triple check the hardware connections.
If you have access to a logic analyzer, you might be able to confirm there is no data on the data-pin.
what was the output of the code in the first post (1) with the Adafruit library?
It's not exactly the same code. The last version was much more complicated and was built on this. But everything else in the last working version has nothing to do with the measurement of the heat.
We were measuring the temperature of the room to test wether it works. Same as now.
Both. It is the version i tried first because i have never done anything with arduino before. I than kept adding to the code and in the end everything worked. Than it stopped (without changing it) and since I could not figure out why I used the first version again to see wether this would work. And it didn't.
It is getting power through a usb cable which is connected to my laptop. I tried the same cable and the same laptop but also multiple other cables and one other laptop. Also: the arduino is getting power. I can see the light and the communication is working (at least i am getting output that changes if i change the code).
Try this code, it should print out a "1" if the SO wire is connected or not.
If you get 0 in both cases then something is wrong with the ESP.
If you get 0 when connected and 1 when not, then there is something wrong with the MAX6675
const int thermoSCK = 13;
const int thermoCS = 10;
const int thermoSO = 12;
void setup()
{
Serial.begin(115200);
while (!Serial) { ; }
delay(2000);
Serial.println("MAX6675 test");
pinMode(thermoSCK, OUTPUT);
pinMode(thermoCS, OUTPUT);
pinMode(thermoSO, INPUT_PULLUP);
digitalWrite(thermoSCK, HIGH);
digitalWrite(thermoCS, HIGH);
}
void loop()
{
int SOdata = digitalRead(thermoSO);
Serial.print(SOdata);
Serial.println();
delay(1000);
}