2
\$\begingroup\$

I have a simple circuit swapping eight thermocouples through a MAX31855 analog-temperature-to-digital converter with two CD74HC4067 multiplexers. The MAX31855 is wired to the SPI pins on a raspberry pi.

I can poll the temperatures without issue, but I'm surprised that I need a ~125 ms delay between each poll for reliable data. If I shorten this, I end up polling the same thermocouple twice. For my own education, I'm trying to figure out why this is the case.

In my current understanding, almost everything should have a microsecond response time. The thermocouples' Seeback effect is near-instantaneous, and SPI communication is 32 bits at 500 kbps = 64 us. The system is behaving like the multiplexers are slow, but nothing in the datasheet suggests that this is the case.

What am I missing?

Edit Here's a sketch of the circuit. I'm using the Adafruit and Sparkfun breakout boards, and the red and yellow stubs are thermocouple hookups. The signal outputs are attached to the screw terminal block of the Adafruit board.

muxed thermocouples

\$\endgroup\$
  • 1
    \$\begingroup\$ Please show us your circuit. We are not, for the most part, psychic. The more detail, the better. \$\endgroup\$ – WhatRoughBeast Jul 31 '15 at 14:18
  • \$\begingroup\$ @WhatRoughBeast done. \$\endgroup\$ – PattimusPrime Jul 31 '15 at 14:41
4
\$\begingroup\$

If you read the datasheet, the conversion time of that chip is 100ms maximum. It effectively samples the input voltage then goes off and does a conversion and cold-junction compensation.

enter image description here

Offhand, I don't see any number indicating how long the valid voltage must be present at the inputs before doing a conversion. You may be able to overlap acquisition and conversion to some degree (perhaps start a conversion, wait 50ms then switch to the next channel, then you could immediately start a new conversion after 100ms for 10 channels/second), but that's not entirely clear from my skimming of the datasheet. In any case you can't do any better than 100msec/channel (reliably) though some samples of the chip may be a fair bit faster.

\$\endgroup\$
  • 1
    \$\begingroup\$ This is it. Page 4 of the MAX31855 data sheet - don't know how I missed it. Thanks for the help! \$\endgroup\$ – PattimusPrime Jul 31 '15 at 14:53
3
\$\begingroup\$

I use multiplexers for 16 thermocouples and to reduce noise I have a 10nF capacitor on the multiplexed output - this then feeds an instrumentation amplifier and then an ADC. I can run round all 16 channels at a rate of about 100Hz - that's a timeslot of 625 us for each thermocouple and, that includes doing a zero in between. One of the 16 channels is the cold junction using an RTD.

So that's a poll time of about 300 us for a measurement. The multiplexr has about 200 ohms resistance and, with 10nF it means I have to wait at least 5*RC = 50 us to get an accurate result (<1% error due to charging).

That's how mine works and maybe you've made the classical error of having too-big a capacitor on the output? Maybe the other error is trying to sample the measurment right after the multiplexer changes to the next thermocouple - if so you need to wait and sample right before you change the address to the multiplexer or you will get the previous measurement due to the cap holding onto the voltage.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the comment! I'm sleeping between toggling the mux and reading the digital chip, so I don't think that's the issue. I'm going to emulate your circuit and replace the MAX chip with an standard ADC and a reference junction and see if that does the trick. \$\endgroup\$ – PattimusPrime Jul 31 '15 at 14:49
  • \$\begingroup\$ You may be sleeping in the period you mention but at what point does the ADC sample the signal - it wouldn't surprise me to find it's straight after address change. \$\endgroup\$ – Andy aka Jul 31 '15 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.