Temperature register with MAX 31856 and thermocouple type S

Hello,

I'm a learner engeener and i have to do a temperature register for our fournace. I have to register the maintening time wich the parts will be on and the heated temperature.

For this, i'm using an Arduino uno wifi R2 for get the data and sell it on the web page. I have also a SD card shield for save the data when the server are not available.

I use two relay which they recupe the informations of the start minuterie button and of the door contactor.

For the temperature i use a Max 31856 by adafruit for get the thermocouple information.( i use a S type).

When i want to caliprate de S type for the MAX 31856, it detect a N type and print N type in serial port. I don't really understand that because i tell him in the programme which type i'm using.
But, when i test my system, it work, the temperature are really low but it's normal with the N type detection. So i put a coefficient for correct this and it work.

At this time it will more difficulte, so when i power my system with my PC usb, it work. I have all the temperature without miss.
But, when i power it with an extarnal alimentation i have a thermocouple issue only when i'm uper than 1000°C.
and print me a "nan" value. And i don't understand why it doesn't work with the external alimentation, because it work fine with my PC.

If somoene have an idea for help me :slight_smile: .

Thanks,

Programme_stockage_SD_VPubli_e.ino (25.2 KB)