Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Thermocouple Amplifier (MAX6675)
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Thermocouple Amplifier (MAX6675)

by rj44319 on Wed Jul 28, 2010 8:33 am

Can the Thermocouple Amplifier (MAX6675) breakout board allow for multiple
boards to use the same Do and Clk lines? Then you modify the code to use
different CS for each board?
rj44319
 
Posts: 130
Joined: Wed Feb 25, 2009 10:27 pm

Re: Thermocouple Amplifier (MAX6675)

by adafruit on Wed Jul 28, 2010 1:07 pm

yes you can do that no problem

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: Thermocouple Amplifier (MAX6675)

by rj44319 on Wed Jul 28, 2010 3:25 pm

Great! thanks!
rj44319
 
Posts: 130
Joined: Wed Feb 25, 2009 10:27 pm

Re: Thermocouple Amplifier (MAX6675)

by Volkemon on Sun Aug 15, 2010 12:12 pm

Just got two of the MAX6675 boards and I was wanting to use them both on one Duemilanove. (Searched 'MAX6675' and got here.)

I was going to connect all the GND and VCC to 5V on the Arduino. All CS to one digital pin, and all CLK to another.

Then use a different digital pin for each DO, and write code to conform.

My guide for doing it that way was the direction of the little arrows on the silkscreen, so if there are other considerations I welcome them.

(A re-read of the datasheet may be in order. RTFM, right?)
Livin' , learnin' , lovin' and laffin'. Thanks for the help!
Image
User avatar
Volkemon
 
Posts: 127
Joined: Mon May 10, 2010 8:24 pm
Location: Melbourne FL USA

Re: Thermocouple Amplifier (MAX6675)

by adafruit on Sun Aug 15, 2010 3:05 pm

that would probably work just fine

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: Thermocouple Amplifier (MAX6675)

by Volkemon on Sun Aug 15, 2010 3:35 pm

Code: Select all | TOGGLE FULL SIZE
// this example is public domain. enjoy!
// www.ladyada.net/learn/sensors/thermocouple

#include "max6675.h"

int thermoDO = 4;
int thermoCS = 5;
int thermoCLK = 6;

MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);



establishes DO to digital pin 4, CS=5, and CLK=6.

Then the statement "MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);" sets the parameters for the MAX6675 library use.

Can I declare this statement again inside later parts of the sketch to modify which pin CS is set to?

Or would changing the value of 'thermoCS' later in the sketch make this happen?

Thanks!
Livin' , learnin' , lovin' and laffin'. Thanks for the help!
Image
User avatar
Volkemon
 
Posts: 127
Joined: Mon May 10, 2010 8:24 pm
Location: Melbourne FL USA

Re: Thermocouple Amplifier (MAX6675)

by Volkemon on Sun Aug 15, 2010 4:05 pm

Code: Select all | TOGGLE FULL SIZE
// this example is public domain. enjoy!
//

#include "max6675.h"

int thermoDO = 2;
int thermoCS = 4;
int thermoCLK = 3;

//MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);

 
void setup() {
  Serial.begin(9600);
 

 
  Serial.println("MAX6675 test");
  // wait for MAX chip to stabilize
  delay(500);
}

void loop() {
  // basic readout test, just print the current temp
 
   MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
   
   Serial.print("Sensor "); Serial.print(thermoCS - 3);
   Serial.print(" C = ");
   Serial.print(thermocouple.readCelsius());
   Serial.print("F = ");
   Serial.println(thermocouple.readFarenheit());
   
   thermoCS ++;
   if (thermoCS > 5 ){
    thermoCS = 4;
   }
 
   delay(1000);
}




This compiles ok...and works with two sensors. This could easily be expanded to 4 or more sensors.
Livin' , learnin' , lovin' and laffin'. Thanks for the help!
Image
User avatar
Volkemon
 
Posts: 127
Joined: Mon May 10, 2010 8:24 pm
Location: Melbourne FL USA

Please be positive and constructive with your questions and comments.