MAX31855x8 k-type thermocouple problem

I have built a simple datalogger with a Mega 2560, a MAX31855x8 board and 8 K-type thermocouples writing the data to a microSD card. It is measuring the temperatures on two mains powered (120VAC) devices that we are developing. The Mega is powered by a 9VDC wall wart which is plugged into the same power strip as the two devices. Everything works perfectly and the temperatures reported by the TCs are sensible... UNTIL I power up the two devices under test. As soon as I plug in the two devices, the recorded temperatures go crazy. I feel this might be a floating ground problem, but I don't know how to tie the grounds together.

Any insights would be greatly appreciated. Thanks.

A thermocouple is called “grounded” when the sensing junction is connected (physically and electrically) to the metal case. There are advantages and disadvantages but generally ungrounded thermocouples are preferable, providing a slower response time is acceptable. All the logic grounds must be connected. Not knowing what the DUTs are I can only speculate, that you are getting EMI conducted or radiated from them. Also are they on a different power supply, if not they must be. It is bad practice to use the same power supply to operate DUTs and your measurement instruments, they need to be separate. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil