0

I'm currently attempting to take readings from 10 thermocouples using an Arduino Mega. I've been using MAX31850 1Wire Thermocouple Modules (with the Adafruit breakout) to perform the readings, but their response time has been very slow (~500ms each). I'm not sure if most of this latency is coming from the IC, or from the communications protocol, or perhaps even the DallasTemperature library.

For my application, I need to be able to read all 10 thermocouples in at most 250 ms (and faster would be better) and so I can afford up to 25ms per thermocouple. I would also like to be measuring with a precision of about 1-2 F.

I assume I will probably have to use a different amplifier, and I've seen recommendations online of using an external ADC to achieve higher speeds, which I would be happy to do, but I don't understand why that would make a substantial difference on speed since the onboard ADC can already sample at about 1/10 ms.

I would greatly appreciate any recommendations on how to achieve these speeds.

1

From Table 6 on page 22 of the data sheet for MAX31850 1Wire Thermocouple Modules, it appears that about 30 bytes of data are sent per reading (5 command bytes, 9 scratchpad data bytes, 2 x 8 module-id bytes). At an apparent minimum of 60 μs per bit, those 30 bytes will take about 15 ms; at times of say 100 μs per bit, they would take about 24 ms.

Each reading also sends 3 each reset and presence-detect signals, adding up to a few milliseconds, and each reading requires a conversion time tCONV of typically 72 ms, per the last entry on page 4 in the Thermal Characteristics table.

Thus, it looks like the MAX31850 will take at least 87 ms per reading, if your units are all on the same 1Wire bus and you code things efficiently. (Single units on a bus can use a slightly simpler protocol, which might reduce communication times to perhaps a third as much, but the typical tCONV would still dominate the time per reading.)

You might consider attaching an inexpensive Arduino Nano, Micro, or Mini to each of your MAX31850 units. Each of those could communicate with its own MAX31850, allowing all the MAX31850s to convert simultaneously. The small Arduinos could send results to the Mega by I2C or serial, in assigned time slots or upon request from the Mega.

  • That's an interesting idea. A pro mini would only cost $10, and I could probably get away with 1 for every two thermocouples.I'm not sure why the reading is taking so long. I'm also looking into the idea of trying to take the reading asynchronously. – rp.beltran Jul 15 '17 at 2:27
1

1-wire transmission takes ~100us/1bit so 1ms/byte. so unless the adc is that slow, it shouldn't take you anywhere close to 500ms to take 1 reading, even if you factor in the overhead / reset.

there are dedicated chips but as you mentioned putting an amplifier (instrumentation amps for example) isn't that difficult. simpler with chips with built-in PGA + differential adc. My favorite here are some of the AVR chips (ATtiny85 or ATmega32U for example). But lots of Freescale / STM32F3 chips also work, so long as you are willing to dive into their and roll your own. Lots of fun.

  • Yeah, I was surprised by the latencies as well. I think that it's how long the module is taking to perform the reading, not the 1wire. Thanks – rp.beltran Jul 15 '17 at 2:36
1

The onboard ADC of the Arduino Mega 2560 is only 10 bits. An external ADC in a thermocouple chip with a fast SPI interface is probably the best solution.
The Adafruit MAX31855 module seems to be able to do that.

The MAX31855 has a 14 bit ADC and a 5 MHZ SPI interface.
It needs a conversion time of 70ms. I think that is normal for these chips. I did not read the datasheet well enough how to get a value without waiting for it.

  • Thanks for the find. Reading asynchronously without waiting would also help a lot. I'll look into the libraries I'm using now to see if I can implement that idea. Thanks. – rp.beltran Jul 15 '17 at 2:33

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.