multiplexer in between MAX6675 and multiple thermocouples

Go To Last Post
19 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi team, I know *nothing* about multiplex circuits, and my searching isn't coming up with anything that I can easily understand. In my multiple thermocouple to PC serial port project post I had someone suggest using a single MAX6675 and multiplex the inputs. Wondering if anyone can point me to some circuit info and possible multiplexer chips to start my research? I am a newbie, for sure.... any pointers appreciated ! (also if anyone's seen a code posting that would help drive that chip I'd appreciate it).

What I *think* I'm looking for is a chip that has 4+ sets of input lines (maybe only need one line per input, and a common ground) that allows you to select a particular input and connects that to set of output lines. I don't really know how many "address" lines it would use or have, in theory I only need 2 address bits to select between my projected 4 inputs.

thanks in advance.
Brett

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In theory, a 405x (x=1,2,3) should work. Or 74HC405x.

However, I would be REALLY uneasy about using a mux with a thermocouple. The signal levels are so low (that is, all the voltages are very near ground) and every change in metal that the signal goes through degrades the accuracy. It would take a lot of verification to be comfortable with this use of a mux for me.

There OUGHT to be multiple input thermocouple interface chips. OR Maxim ought to have an app-note on multiplexing thermocouples. Try, also, google search for multiplex thermocouples or something like that.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey Jim, thanks for that. I too am worried about that, and since I have multiple MAX6675's and enough spare lines on the ATMEGA32, I think I'll just array them as multiple SPI devices (I am thinking I won't connect them as a large shift-register set, but with individual CS lines)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

from an electrical perspective, can someone explain briefly why the MAX6675 circuits would all show a 0.1uF capacitor across VCC and GND? I suspect it's a filtering capacitor? I'm currently without such a cap (obviously a trip to Jaycar is coming up!) but just wondering whether it's something I need to worry about - the controller board has a 10uF across the supply, and I'm using power from the board for the MAX chip, would that suffice?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, you need it. They won't show one unless performance requires it.

Now, whether or not you need one in addition to the 10uf already on your board is a different matter. That will depend on wire/trace length, among other things. Me, I would include one and spare the possibility of a redesign. Also, if your 10uf is electrolytic, it might not do as well filtering fast clock spikes as a 0.1uf ceramic.

Jim

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

An extra multiplexer is not really good with the small thermocoulpe signals. IF you can't find a thermocouple chip für more inputs, consider using a normal high resolution AD with integrated multiplexer. You than just need one more input to measure the cold junction temperature and a littel software in the controller. Dependeing on the AD one input should be just a short.

If you use the external MUX, you have to avoid temperature gradients. A small chip makes this easier.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm intimately familiar with the 6675.... it looks like a magic box doesnt it? Well, you STILL need to read the MAX app notes on cold junction compensation to see how the thing works... there is a temperature sensor on the chip that helps with the temp compensation... BUT here's the trick... it measures the difference between the tc tip and the 'cold junction' which is where the chromel and alumel wires attach to the wires that run to the chip. The chip and the cold junction have to be at the same temperature. Dont put the chip in a box and the wires outside on a terminal strip, because the chip thinks the temp in the box is the cold juction temp, and readings are off. Bummer.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've used some DG508 muxes in some audio designs, but the signal levels were generally larger than what you'll get with the thermocouples, and the variation in channel series resistance can throw you off - I agree with the others that you generally don't want to try to mux these TC type signals. Maybe if you have some sort of precision, compensated amplifier ahead of it to give you more voltage to work with, but then you'll have to carefully characterize the amplifier and its effective error being added in.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
However, I would be REALLY uneasy about using a mux with a thermocouple. The signal levels are so low (that is, all the voltages are very near ground) and every change in metal that the signal goes through degrades the accuracy

Quote:
An extra multiplexer is not really good with the small thermocoulpe signals.

Quote:
I agree with the others that you generally don't want to try to mux these TC type signals. Maybe if you have some sort of precision, compensated amplifier ahead of it to give you more voltage to work with, but then you'll have to carefully characterize the amplifier and its effective error being added in.

Oh come on people! There is no reason not to use multiplexers with thermocouples. What is a mux? It is a group of switches that are either on or off. When on, there is a certain amount of resistance placed in series with the signal source and whatever signal processing circuit you are using. If the processor (MAX6675) has a relatively high input impedance this series resistance will have a negligible effect. When the mux switches are off, there are some tiny leakage currents that could affect accuracy if the signal source impedance was high. In the case of thermocouples (and rtds, too) the source impedance is low so for the most part, leakage current errors are negligible. The OP's main concern is that the cold junction compensation is done inside the chip, but the actual cold junction(s) will be the terminal block(s). To preserve accuracy the MAX6675 should be mounted as *thermally* close to the terminal blocks as practical. Thermocouple voltages generated by the various solder joints on the circuit board will be of little consequence if you avoid causing temperature gradients in the analog area of the board. That is about all there is to it. I have *thousands* of muxes scattered from the hottest to the coldest locations on the planet, and all have been happily doing their jobs over the last 20 years.

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:
I'm intimately familiar with the 6675.... it looks like a magic box doesnt it? the 'cold junction' which is where the chromel and alumel wires attach to the wires that run to the chip. The chip and the cold junction have to be at the same temperature. Dont put the chip in a box and the wires outside on a terminal strip, because the chip thinks the temp in the box is the cold juction temp, and readings are off. Bummer.

Bob, thanks for that advice ! Um, well, that was my initial plan, having banana plugs on a TC and sockets mounted on the front panel of a box - I am thinking that this will be "close" but not the same, not sure how I might deal with that (I do want some way to relatively simply "disconnect" the TCs from the "unit" because I'll need to transport the unit between locations, but I won't be taking the TCs)

I have a "repeatability" question. I have my MAX6675 (SOIC) soldered (by me) onto a DIL board, plugged into a breadboard for the prototype. I have jumpered IO pins appropriately to CLK/SO/CS, I have +5 and GND connected to the +5 and GND lines of the controller board (yet to get a capacitor for that), and finally I have a wire from GND to pin2 (for TC not connected discovery). I have ~3" jumpers soldered to banana plug sockets and connected into pins 2&3 on the MAX, and I have the banana plugs soldered to the TC wires. [yes, many things here I probably will have to rethink!] When I do several conversions, a second or more apart, I am getting widely varied returned data - in fact it varies from returned values from ~100 to over 2000 (which scaled back to degrees C is 25 to 500) even though the TC is sitting next to the board in ambient, approx 25degC. I also occasionally get spurious TC not connected status errors, even though the connections haven't been changed (and I'm not touching anything - I trigger "take reading" thru a keypress in Bray Terminal via the USART, so I'm at least 2' away from the board!). Is this expected, or am I seeing unusual? Should I be working on averaging multiple readings (8-16?) - given the huge variation and TC errors, I still think there's something going wrong - any thoughts what that might be?

Now, stepping back into the AVR world for a sec (yes I know this is the general electronics part of the board)... I am running a 16mhz clock on my Mega (yes I know it's operating at that frequency, my LED toggle tells me so :) ). I am bit-toggling the CLK/CS lines as needed, not using the ATMEGA's SPI. Does anyone have suggestions on "best practices" on how to get close to the 100ns timing cycles that datasheet for the MAX6675 discusses? I know it's not critical, because I am clocking the data in and out through bit-toggle, and as long as I'm waiting a couple of cycles between the toggle and the read I should get the correct data showing up. I initially was doing 16-cycle (1uSec) wait with a macro, but have now moved back (but not tested) to a 2-cycle (125nSec) interval to save time. There are some points where the interval is longer because there are steps to read values and bit-shift and add to the total, so I won't add waits there. Is this how most of you more knowledgeable folk would handle this?

cheers
Brett

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tpappano wrote:
There is no reason not to use multiplexers with thermocouples.

Could you suggest appropriate Muxes and circuits for my implementation (4x 2-wire switching to 2x input)? I'm still progressing down the multiple MAX6675's path, but it'd be a good learning experience for me I'm sure.

tpappano wrote:
The OP's main concern is that the cold junction compensation is done inside the chip, but the actual cold junction(s) will be the terminal block(s).

Maybe that was an indirect concern, my main concern was signal degradation with a mux in place. I now see I do have the potential for significant error in CJC that might mean I re-think the solution, but at the moment I'm going to consider this "close enough to the same place/temperature" at least for testing purposes.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I couldnt figure out why the heck the readings were all over the place until I saw the small print in the datasheet that says it takes the thing takes 220ms to complete a reading once you start one. Obviously, it was going bonkers when I was asking for a reading every 30ms or so.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mmmm. yes, I can understand the 220ms being an issue - I'll see if that's a possible cause of my issue. The sheet says forcing CS low stops the in-progress sample, which to me shouldn't leave the current value inconsistent - but what do I know! The datasheet says it commences the conversion when CS is high, which is, in my program, the default setting except when I'm in my "take a sample" routine. In my case, I had the keypress detection in a loop that only triggered once every second, and then read the temp.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had used succesfully AD7708 to read up to 10 thermocouples, while doing thermal compensation reading an NTC with the ATmega128 internal ADC. Quite acurate.

But, I had experienced problems with muxes (DG407/408, IIRC) and Pt100, due the low current flowing through the RTD, that was drained by off muxes to ground. This was a big issue, since the current leakage to ground in off state exhibit a high thermal variation, so that system only worked fine in the range from 17 to 22 ºC :S

Edit: Spelling

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
But, I had experienced problems with muxes (DG407/408, IIRC) and Pt100, due the low current flowing through the RTD, that was drained by off muxes to ground.

The systems I referred to above all use DG508s, and I have never observed any actual measurable leakage currents in the muxes. These systems are accurate over the full standard rtd temp range. Do you use separate muxes for supplying the current to the rtd and reading the voltage from it? DG508s do not have a very low on resistance.

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The AD converters with multiple inputs usually also have a mux at there inputs. The advantage they have, is that they don't need the extra protective ciruit in between and there als also less connections from the typical aluminum conductors on the chip to the copper on the PCB. An external mux has the advantage of having near zero power requirements and thus less self heating.

Leakage currents are probaly the larger difficulty with a mux. One probably has to keep leakage down to about 1 nA, which would cause 1µV at 1 K of source resistance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
One probably has to keep leakage down to about 1 nA, which would cause 1µV at 1 K of source resistance.

Even then, with a 100 ohm (long leads!) type K thermocouple, that would be one four hundredth of a degree C 8-)

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My actual problem was in fact that I used 2V5 as supply, and 10K as load resistor. On a Pt100, the current flowing trhoug it is in the 250uA range. Althoug I had used a trhee wire schema that does a pretty good job compensating for long wires, the leakage current could change the readings more than the requested 0.3ºC accuracy (with NIST calibrated RTD simulator). Simply reducing the load resistor to 470 or 1K the results would be much better. Or changing the muxes by optorelays from agilent (with about 0.6 ohms resistance).

With thermocouples I never had problems with muxes, even with 'low quality' 74HC4051. Problems appeared with terminal blocs of different material for + and -, and even this doesn't give too much troubles if temperature is homogeneous over the PCB.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, hopefully the next question will get me a little further down the path......

For the DATA line out of a MAX6675, should I enable the ATMEGA's internal pull-up or not? I *think* that I should NOT, right?

I have the DATA pin of the MAX direct connected to the input pin I'm using to read the value. I can successfully read values when I connect to GND/VCC, but I can't really confirm that I'm reading the correct output from the chip.

When I'm just testing against VCC/GND and connected to VCC and disconnect, there's latent capacitance that means I get a few false high readings, obviously, and when I enable pull-up or connect a LED/resistor that I was using to test things with, I instantly get the drop to low.

Actually, maybe a better question is - how do you debug the value from a chip like this? Given my "newbie" status I can't figure out whether it's my code or my hardware, or what! All suggestions gratefully accepted!