I am developing a control system using the Portenta Machine Control but I have an issue reading thermocouples using the built-in MAX31855 chip.
I have connected a K-type, unshielded thermocouple across the TP0 and TN0 inputs and I have tried running the example Arduino_PortentaMachineControl/Temp_probes_Thermocouples.ino sketch, but the serial monitor returns "nan" for all three TC channels.
Modifying the code to read the internal reference voltage of the MAX31855, the serial monitor prints a temperature value which increases when I hold my finger on the chip, which implies that the chip is working and communicating with the Arduino.
The TC I am using is working on a dedicated thermocouple reader and I have tried another K-type with the same results.
A modified version of the example sketch is below.
You may try using the deprecated Arduino_MachineControl library with its example code to get your thermocouple setup to work. I tried and it worked for me but the next issue would be how can we get the setup to work using the new Arduino_PortentaMachineControl library. I will try using V1.0.0 of the new library and see if that works. Hopefully someone from Arduino support can help on this.
Hi,
had the exact same problem and the latest version of the old library also does the trick for me, thanks for the suggestion.
I am in contact with Arduino Support with this problem and made them aware of this forum entry when I found it, hopefully there will be a reply from Support soon. I would also prefer to use the new library instead of the old one, so a fix would be greatly appreciated.
I just got a reply from Arduino support team and their response is that they’re aware of the issue most users face with the new library. A fix should be coming in the new release so for the time being, we should continue using the deprecated library to get our setup to work.