2 Thermocouple (MAX6675) on one board
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 1
- Joined: Sun Dec 12, 2010 3:47 pm
2 Thermocouple (MAX6675) on one board
Can you use 2 MAX6675 thermocouples with one Arduino Uno board? I'm curious if the code library for the thermocouple will support 2 MAX6675 sensors. Thanks.
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: 2 Thermocouple (MAX6675) on one board
Yes, the library lets you specify which pins each one is connected to.
- jchristensen
- Posts: 111
- Joined: Mon Jan 03, 2011 11:45 am
Re: 2 Thermocouple (MAX6675) on one board
Since the MAX6675 is an SPI device, you can connect any number together on the bus, just wire all the SCK pins together and all the SO pins together and use a separate CS line to each. Just be sure to only select one at a time. I have two wired like this and they work fine. I wrote a very simple library that handles multiple thermocouples and works in conjunction with the standard SPI library, if you'd like to try it let me know.
-
- Posts: 1
- Joined: Sat Nov 26, 2011 3:38 pm
Re: 2 Thermocouple (MAX6675) on one board
I am in the process of setting up a 9-thermocouple lab system, and I am in need of help! I purchased an Arduino Uno and 9 thin-wire (E-type) thermocouples, as well as 9 free samples of the MAX31855 ADCs. JChristensen, will your advice regarding attaching 2 thermocouples be valid for more? I realize I likely won't be able to read 9 on a single Arduino, but I want to attach the maximum number of thermocouples. Any help would be much appreciated!
Austin
Austin
-
- Posts: 29
- Joined: Tue Nov 29, 2011 1:25 pm
Re: 2 Thermocouple (MAX6675) on one board
I've just completed a build using Arduino Mega, Ethernet Shield, and, so far, two Max 6675 K-class thermocouples. I connected the Gnd pins to one of the unnumbered GND pins below pins 52/53 and the VCC pins to one of the two unnumbered 5v pins above 22/23. I then ran the Do, Cs, and Clk to 24, 26, 28 and 26, 27, 29. This works beautifully, and issues the results as a web page formatted:
92-A2-D-A0B-00-00.01: 22.75°c ±2.20 / 72.95°f
92-A2-DA-0B-00-00.02: 23.50°c ±2.20 / 74.30°f
(That's the Ethernet MAC address with a number appended, so I can uniquely identify which MAX I'm reading.)
As I understand it, the Ethernet shield eats pin 4, 10, and 50 - 52 on the Mega, which still leaves enough digital pins to run up to 12 devices. With JChristensen's post about sharing the Clk and Do pins, you should be able to run quite a few!
The margin-of-error values I calculate that using:
92-A2-D-A0B-00-00.01: 22.75°c ±2.20 / 72.95°f
92-A2-DA-0B-00-00.02: 23.50°c ±2.20 / 74.30°f
(That's the Ethernet MAC address with a number appended, so I can uniquely identify which MAX I'm reading.)
As I understand it, the Ethernet shield eats pin 4, 10, and 50 - 52 on the Mega, which still leaves enough digital pins to run up to 12 devices. With JChristensen's post about sharing the Clk and Do pins, you should be able to run quite a few!
The margin-of-error values I calculate that using:
Code: Select all
float marginError(float c) {
//calculate margin/error.
//whichever is greater of:
//if >0 this is 2.2c or 0.75%
//if <0 This is 2.2c or 2%
//per NIST monograph 176: http://www.adafruit.com/datasheets/kthermotable.pdf
if (c == 0) {
return 1.1;
} else if (c < 0) {
if (abs(c * .02) > 2.2) {
return abs(c*.02);
} else {
return 2.2;
}
} else { // > 0
if ((c * .0075) > 2.2) {
return c * .0075;
} else {
return 2.2;
}
}
}
-
- Posts: 1
- Joined: Tue Jan 21, 2014 5:01 pm
Re: 2 Thermocouple (MAX6675) on one board
hello i want to use also 2 max6675 on a arduino uno , and JChristensen you have written a little lib for that , may i use it from you and where i can find it , or want you to mail it to me , thanks for the helps .
- teo_91bws
- Posts: 1
- Joined: Wed Nov 23, 2016 1:04 pm
Re: 2 Thermocouple (MAX6675) on one board
jchristensen wrote:Since the MAX6675 is an SPI device, you can connect any number together on the bus, just wire all the SCK pins together and all the SO pins together and use a separate CS line to each. Just be sure to only select one at a time. I have two wired like this and they work fine. I wrote a very simple library that handles multiple thermocouples and works in conjunction with the standard SPI library, if you'd like to try it let me know.
Hello jchristensen,
I am trying to use two max6675 and I've seen you have already written a working code. Could I have your code please?
Thank you in advance!
- pyr0ball
- Posts: 1
- Joined: Wed Nov 23, 2016 10:13 pm
Re: 2 Thermocouple (MAX6675) on one board
Hello jchristensen,
I'm also trying to use a setup with two MAX6675's on a single board simultaneously, and would greatly appreciate access to the library you built.
Thanks in advance!
I'm also trying to use a setup with two MAX6675's on a single board simultaneously, and would greatly appreciate access to the library you built.
Thanks in advance!
Please be positive and constructive with your questions and comments.