Arduino Mega 2560, multiple sensors, different readings

Hello,

I have a Mega setup with 2 MKR Therm's and a MAX6675.

All 3 are connected to high-grade thermal couplers. I have tested each one on the ktype electrical sensor I have and they are all spot on +-.01 degree.

When I wire them up that is not the case. I have them all going directly into the Mega and am using a capacitor between the +-.

All three are in a Gatorade bottle with room temp water that has sat for 2 days.

Here are the results, can you please give me any insight as to why they are not the same readings.

These are 1 second apart.

Therm Sheild, Therm Sheild, MAX6675
F = 75.20, F2 = 72.95, F3 = 65.75
F = 75.20, F2 = 73.40, F3 = 66.65
F = 75.20, F2 = 72.95, F3 = 66.65
F = 75.20, F2 = 73.40, F3 = 66.65
F = 75.20, F2 = 72.95, F3 = 67.10
F = 75.20, F2 = 73.40, F3 = 67.10
F = 74.75, F2 = 72.95, F3 = 67.10
F = 75.20, F2 = 72.95, F3 = 65.75
F = 75.20, F2 = 73.40, F3 = 67.10
F = 75.20, F2 = 72.95, F3 = 66.65
F = 75.20, F2 = 72.50, F3 = 67.55
F = 75.20, F2 = 72.95, F3 = 66.65
F = 75.20, F2 = 72.50, F3 = 67.55
F = 75.20, F2 = 72.50, F3 = 67.10
F = 74.75, F2 = 72.95, F3 = 67.10
F = 75.20, F2 = 72.95, F3 = 67.10
F = 74.75, F2 = 72.95, F3 = 66.65
F = 74.75, F2 = 72.95, F3 = 67.10
F = 75.20, F2 = 72.95, F3 = 67.10
F = 75.20, F2 = 72.95, F3 = 66.65
F = 75.20, F2 = 72.95, F3 = 67.10
F = 75.20, F2 = 73.40, F3 = 66.20
F = 75.20, F2 = 72.95, F3 = 65.30
F = 75.20, F2 = 72.95, F3 = 67.10
F = 75.20, F2 = 72.50, F3 = 66.65
F = 75.20, F2 = 72.50, F3 = 67.10
F = 74.75, F2 = 72.50, F3 = 67.10
F = 75.20, F2 = 72.50, F3 = 67.10
F = 75.20, F2 = 72.50, F3 = 67.55
F = 75.20, F2 = 72.50, F3 = 66.65

April first is over two weeks away.

I am not tracking what you are saying.

I assumed this is some kind of (very poor) joke?

Why?

URL TO IMG: Imgur: The magic of the Internet

I scrapped the MRK shields and am just using the MAX6675.

If anyone has any knowledge that could help that would be awesome.

#include <SPI.h>
#include "max6675.h"

//Pressure transducer
#define sensor A0
float adc;

//ambient sensors
int maxSO = 41;
int maxCS = 39;
int maxSCK = 43;
MAX6675 thermocouple1(maxSCK, maxCS, maxSO);

int maxSO2 = 40;
int maxCS2 = 38;
int maxSCK2 = 42;
MAX6675 thermocouple2(maxSCK2, maxCS2, maxSO2);

//thermal sensors
int maxSO3 = 31;
int maxCS3 = 29;
int maxSCK3 = 33;

MAX6675 thermocouple3(maxSCK3, maxCS3, maxSO3);

int maxSO4 = 30;
int maxCS4 = 28;
int maxSCK4 = 32;

MAX6675 thermocouple4(maxSCK4, maxCS4, maxSO4);

void setup() {
  Serial.begin(9600);
  delay(1500);
}

void loop() {   
  adc = analogRead(sensor);
  Serial.print("Ambient 1 = ");
  Serial.print(thermocouple1.readFahrenheit());
  Serial.print(", Ambient 2 = ");
  Serial.print(thermocouple2.readFahrenheit());
  Serial.print(", Therm 1 = ");
  Serial.print(thermocouple3.readFahrenheit());
  Serial.print(", Therm 2 = ");
  Serial.print(thermocouple4.readFahrenheit());
  Serial.print(", Pressure = ");
  Serial.print(adc);
  Serial.println(' ');
  delay(5000);
}

Results
Ambient 1 = 69.35, Ambient 2 = 71.15, Therm 1 = 68.90, Therm 2 = 73.40, Pressure = 0.00
Ambient 1 = 68.45, Ambient 2 = 70.70, Therm 1 = 69.35, Therm 2 = 74.30, Pressure = 1.00
Ambient 1 = 69.80, Ambient 2 = 71.15, Therm 1 = 68.90, Therm 2 = 74.75, Pressure = 1.00
Ambient 1 = 69.80, Ambient 2 = 71.15, Therm 1 = 68.00, Therm 2 = 74.75, Pressure = 2.00
Ambient 1 = 69.35, Ambient 2 = 71.15, Therm 1 = 68.90, Therm 2 = 74.75, Pressure = 1.00
Ambient 1 = 69.80, Ambient 2 = 70.70, Therm 1 = 68.45, Therm 2 = 74.30, Pressure = 0.00
Ambient 1 = 69.80, Ambient 2 = 70.25, Therm 1 = 68.90, Therm 2 = 73.40, Pressure = 1.00
Ambient 1 = 70.25, Ambient 2 = 71.15, Therm 1 = 68.45, Therm 2 = 74.30, Pressure = 1.00
Ambient 1 = 69.80, Ambient 2 = 71.15, Therm 1 = 68.90, Therm 2 = 74.30, Pressure = 1.00
Ambient 1 = 69.80, Ambient 2 = 70.70, Therm 1 = 68.45, Therm 2 = 74.30, Pressure = 1.00
Ambient 1 = 69.80, Ambient 2 = 71.15, Therm 1 = 68.90, Therm 2 = 73.85, Pressure = 0.00
Ambient 1 = 69.80, Ambient 2 = 71.15, Therm 1 = 68.90, Therm 2 = 74.30, Pressure = 1.00
Ambient 1 = 69.35, Ambient 2 = 70.70, Therm 1 = 68.45, Therm 2 = 73.40, Pressure = 1.00
Ambient 1 = 69.80, Ambient 2 = 70.70, Therm 1 = 68.00, Therm 2 = 73.40, Pressure = 1.00
Ambient 1 = 68.90, Ambient 2 = 70.70, Therm 1 = 68.90, Therm 2 = 73.85, Pressure = 0.00
Ambient 1 = 69.80, Ambient 2 = 69.80, Therm 1 = 68.45, Therm 2 = 74.30, Pressure = 1.00
Ambient 1 = 69.35, Ambient 2 = 71.15, Therm 1 = 68.90, Therm 2 = 74.30, Pressure = 1.00
Ambient 1 = 69.80, Ambient 2 = 70.25, Therm 1 = 68.45, Therm 2 = 73.85, Pressure = 1.00

It would be helpful if you give links to the things that you use.

Which max6675 library do you use ?

Can you give a link to those thermocouples ? (a link to where you bought them). It is almost as if the red and yellow wires are normal wires :o Did you alter them in any way ?

That seems to be a plastic box. Is the metal shielding of the thermocouple wires connected to something ? Can you do a test and connect them to GND ?

I assume that I should read the 2 MKR Therm's as Arduino MKR Therm shields: Arduino MKR Therm Shield | Arduino Official Store. They use the MAX31855.

The MAX6675 thermocouple modules that you use seems to be these: MAX6675 Temperature Sensor | Open ImpulseOpen Impulse or these: MAX6675 Module + K Type Thermocouple Thermocouple Sensor Temperature 0 – SainSmart.com.

When you add a capacitor, then I'm not sure how the metals make contact. It is safer to remove them. Let the MAX6675 or MAX31855 take care of noise and in the Arduino you can use the average of many samples.

I'm not happy with that MAX6675 module. There is some distance between the connector and the MAX6675 chip. The MAX6675 chip has cold junction compensation. You need that. When the connector has a different temperature, some accuracy is lost.

A thermocouple is accurate to a few degrees. If you do everything right, they are accurate to 1 or 2 degrees.
Your temperatures are not very bad, but they should be better.

I would start by removing the caps at the CJC point. If noise is a concern I would average as mentioned. I can't say the caps are a problem but can't see a reason for their presence right where you are concerned with CJC.

Next I would just measure a single thermocouple and then add one at a time.

Also consider the allowable error of the MAX 6675 modules. I can appreciate your claim the thermocouples are calibrated but there is thermocouple error for Type K unless you have traceability to a known standard, there is the error of the extension wire and lastly the MAX 6675 error which is +/- 3 degrees.

Ron

A thermocouple works by giving a voltage dependant upon the temperature DIFFERENCE between its two junctions ( the connector block and the measurement point) , so another sensor is needed to measure the connector block temperature and add it to the measured temperature difference .
At low temperature difference the voltage output is tiny and the whole setup becomes liable to errors , mainly dependant on the “ cold junction” (terminal block).

So ... thermocouples are not gods at low temperatures ( a type k gives around 40microvolts output per degree C difference).
Measuring any temperature to better than 0.5C consistently and accurately is very hard.