I'm using a K-type thermocouple to read the temperature of a 3D printer hot-end. To amplify the thermocouple voltage I am using the Analog Devices AD8495 chip. This chip is mounted on a custom-made board, I've included the schematic and layout of the parts below.
I have discovered experimentally that the temperature measurements produced by my firmware from reading the ADC the AD8495 is attached to are off by a factor of between 20-30% of the "actual" temperature as measured by a commercial IR thermometer that I have.
I have tried swapping out different thermocouples, different thermocouple extension wires (and I checked the polarity of the extension wire is correct and that there are no shorts in the extension wire), and multiple different versions of my board to check that it wasn't an error in the particular AD8495 on the first board.
Across all of these equipment changes I'm still seeing a consistent discrepancy in temperature measured by the thermocouple and temperature reported by the IR thermometer. Not only that, but the error seems to be proportional to the actual temperature of the device, so at temperatures near 25°C there is a small error of only a few degrees, but at temperatures around 150°C the error is as much as nearly 60°s!
My experimental data (and some derived error calculations) are available here: https://pastebin.com/Qq9Fj7cb
I have validated that the firmware is correctly calculating the temperature from the ADC reading by taking measurements of the output voltage of the AD8495 and calculating the temperature by hand using the supplied reference voltage of 1.24V and the transfer function described in the AD8495 datasheet.
From my reading of the data sheet, the measurement error I am seeing most closely resembles a gain error, however the actual measurement error is nearly 100 times greater than what I would expect given the maximum gain error specified in the data sheet.
I'm stumped at this point, and any further troubleshooting steps or measurements to take to help clarify what the issue is would be much appreciated.