Good afternoon,
i recently bought two 12-Channel I2C 0-10V Analog to Digital Converters with I2C Interface (MCP3428) and plan to use them with a raspberry pi. Now I wonder if it is possible to read a thermocouple type K with the MCP3428 without additional hardware.
To try it, I connected a type K thermocouple to one input of the ADC and tried to read the value with 16 bit resolution and gain 8.
To read the data I use Java and pi4j (the code looks like this)
I2CBus bus = I2CFactory.getInstance(I2CBus.BUS_1);
// TODO - I2CDevice mul = bus.getDevice(0x77);
I2CDevice adc1 = bus.getDevice(0x68);
while (true) {
// channel: 0 (1), res: 16, gain: 8 = 00011011 = 0x1B
adc1.write((byte)0x1B);
Thread.sleep(1000);
byte[] output = new byte[2];
adc1.read(output, 0, 2);
int h = b[0] & 0xff;
int l = b[1] & 0xff;
long step = h << 8 | l;
if (step >= 32768)
step = 65536L - step;
// print output...
}
The problem is that the readings hardly change at all. I checked the thermocouples and they’re fine.
But if I understood the datasheet of the MCP3428 correctly, it should give about 5 steps per degree Celsius
Another curiosity is that if you touch the thermocouple, which should not result in a big jump in temperature at room temperature, the value jumps 1000 steps upwards immediately.
Now my question: is this behaviour normal for the MCP3428 and if so, what additional hardware would be needed to get good readings.
Tanhk you!