User Tools

Site Tools


tutorials:learn:sensors:thermocouple.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:learn:sensors:thermocouple.html [2010/10/07 20:06]
daigo
tutorials:learn:sensors:thermocouple.html [2016/01/28 18:05] (current)
Line 8: Line 8:
  
  
-Unlike [[tmp36.html|semiconductor temperature sensors such as the TMP36]], thermocouples have no electronics inside them, they are simply made by welding together two metal wires. Because of a physical effect of two joined metals, there is a slight but measurable voltage across the wires that increases with temperature. The type of metals used affect the voltage range, cost and sensitivity,​ which is why we have a few different kinds of thermocouples. The main improvement of using a thermocouple over a semiconductor sensor or thermistor is that the temperature range is very much increased. For example, the TMP36 can go from -50 to 150°C, after that the chip itself can be damaged. Common thermocouples on the other hand, can go from -200°C to 1350°C (K type) and there are ones that can go above 2300°C! ​+Unlike [[http://​www.ladyada.net/​learn/​sensors/​tmp36.html|semiconductor temperature sensors such as the TMP36]], thermocouples have no electronics inside them, they are simply made by welding together two metal wires. Because of a physical effect of two joined metals, there is a slight but measurable voltage across the wires that increases with temperature. The type of metals used affect the voltage range, cost and sensitivity,​ which is why we have a few different kinds of thermocouples. The main improvement of using a thermocouple over a semiconductor sensor or thermistor is that the temperature range is very much increased. For example, the TMP36 can go from -50 to 150°C, after that the chip itself can be damaged. Common thermocouples on the other hand, can go from -200°C to 1350°C (K type) and there are ones that can go above 2300°C! ​
  
  
Line 33: Line 33:
   ***[[http://​www.adafruit.com/​datasheets/​kthermotable.pdf|K Thermocouple Datasheet]]**   ***[[http://​www.adafruit.com/​datasheets/​kthermotable.pdf|K Thermocouple Datasheet]]**
   ***[[http://​www.adafruit.com/​datasheets/​MAX6675.pdf|MAX6675 Datasheet]]** ​   ***[[http://​www.adafruit.com/​datasheets/​MAX6675.pdf|MAX6675 Datasheet]]** ​
 +  ***[[http://​www.adafruit.com/​datasheets/​MAX31855.pdf|MAX31855 Datasheet]]** ​
 ==== Files  ==== ==== Files  ====
  
  
-[[http://​github.com/​adafruit/​MAX6675-breakout-board|Schematic and layout files can be found at GitHub - click Download Source to get the zip!]]+[[http://​github.com/​adafruit/​Adafruit-MAX6675-breakout-board|MAX6675 ​Schematic and layout files can be found at GitHub - click Download Source to get the zip!]]
  
 +[[http://​github.com/​adafruit/​Adafruit-MAX31855-breakout-board|MAX31855 Schematic and layout files can be found at GitHub - click Download Source to get the zip!]]
  
-==== Wiring ​ ==== 
  
 +==== Wiring ​ ====
  
-As we mentioned before, trying to actually measure the voltage across the wires will be very difficult for most people, which is why we strongly suggest using a thermocouple interface chip. The nicest one we've seen so far is the MAX6675, which unfortunately is only available in SOIC package. While not too difficult to solder, [[http://​www.adafruit.com/​index.php?​main_page=product_info&​products_id=269|we nevertheless have in the shop a breakout board that is ready to go]]. [[http://​ryanjmclaughlin.com/​shop/​|We also suggest the breakout boards from Ryan McLaughlin]] 
  
 +As we mentioned before, trying to actually measure the voltage across the wires will be very difficult for most people, which is why we strongly suggest using a thermocouple interface chip. The nicest one we've seen so far is the MAX6675 (and its newest version called the MAX31855) which unfortunately is only available in SOIC package. While not too difficult to solder, [[http://​www.adafruit.com/​products/​269|we nevertheless have in the shop a breakout board that is ready to go]]. 
  
  
Line 66: Line 68:
  
  
-If you're planning to use the MAX6675, there'​s a little more work to be done. First off, VCC and GND must connect to a 3-5V supply. Then the three data pins must connect to digital IO pins: +If you're planning to use the MAX6675/MAX31855, there'​s a little more work to be done. First off, VCC and GND must connect to a 3-5V supply. Then the three data pins must connect to digital IO pins: 
  
  
-  ***CLK **(clock) is an input to the MAX6675 (output from microcontroller) which indicates when to present another bit of data +  ***CLK **(clock) is an input to the MAX6675/​MAX31855 ​(output from microcontroller) which indicates when to present another bit of data 
-  ***DO **(data out) is an output from the  MAX6675 (input to the microcontroller) which carries each bit of data +  ***DO **(data out) is an output from the  MAX6675/​MAX31855 ​(input to the microcontroller) which carries each bit of data 
-  ***CS **(chip select) is an input to the MAX6675 (output from the microcontroller) which tells the chip when its time to read the thermocouple and output more data.+  ***CS **(chip select) is an input to the MAX6675/​MAX31855 ​(output from the microcontroller) which tells the chip when its time to read the thermocouple and output more data.
  
 If you're using an Arduino, you can make a little shortcut and simply plug in the pins into the first digital port, from Digital Pin 2 thru 6. (Remember pins 0 and 1 are used by the FTDI chip for uploading) If you're using an Arduino, you can make a little shortcut and simply plug in the pins into the first digital port, from Digital Pin 2 thru 6. (Remember pins 0 and 1 are used by the FTDI chip for uploading)
Line 77: Line 79:
 [[http://​www.ladyada.net/​images/​thermocouple/​maxplugged.jpg|{{ ​ http://​www.ladyada.net/​images/​thermocouple/​maxplugged_t.jpg?​nolink&​500x385 ​ |}}]] [[http://​www.ladyada.net/​images/​thermocouple/​maxplugged.jpg|{{ ​ http://​www.ladyada.net/​images/​thermocouple/​maxplugged_t.jpg?​nolink&​500x385 ​ |}}]]
  
-Then [[http://​github.com/​adafruit/​MAX6675-library|download the MAX6675 Arduino library code]] by going to the github page and clicking Download Source. Then uncompress the folder and rename it **MAX6675** and [[http://​www.ladyada.net/learn/../​library/​arduino/​libraries.html|install it into the library folder according to our handy tutorial]].+If you have an older MAX6675 breakout, ​[[http://​github.com/​adafruit/​MAX6675-library|download the MAX6675 Arduino library code]] by going to the github page and clicking Download Source. Then uncompress the folder and rename it **MAX6675** and [[http://​www.ladyada.net/​library/​arduino/​libraries.html|install it into the library folder according to our handy tutorial]].
  
-Restart the Arduino IDE and open up the **File->​Examples->​MAX6675->​serialthermocouple** sketch and upload it to your Arduino. Once uploaded, open up the serial port monitor to display the current temperatures in both celsius and farenheit 
  
-{{  ​http://​www.ladyada.net/​images/thermocouple/maxtest.gif?​nolink&​478x308  ​|}}+If you have the newer MAX31855 breakout, ​ [[https://​github.com/​adafruit/​Adafruit-MAX31855-library|download the MAX31855 Arduino library code]] by going to the github page and clicking Download Source. Then uncompress the folder and rename it **Adafruit_MAX31855** and [[http://​www.ladyada.net/​library/arduino/libraries.html|install it into the library folder according to our handy tutorial]].
  
-Here is the code<​code C> +Restart ​the Arduino IDE and open up the **File->Examples->​MAX6675/Adafruit_MAX31855->​serialthermocouple** sketch and upload it to your ArduinoOnce uploaded, open up the serial port monitor to display the current temperatures in both Celsius and Fahrenheit
-// this example is public domainenjoy! +
-// www.ladyada.net/​learn/​sensors/​thermocouple+
  
-#include "​max6675.h"​ +{ http://www.ladyada.net/images/thermocouple/maxtest.gif?​nolink&​478x308 ​ |}}
- +
-int thermoDO = 4; +
-int thermoCS = 5; +
-int thermoCLK = 6; +
- +
-MAX6675 thermocouple(thermoCLK,​ thermoCS, thermoDO);​ +
-int vccPin = 3; +
-int gndPin = 2; +
-   +
-void setup() ​{ +
-  Serial.begin(9600);​ +
-  // ​use Arduino pins  +
-  pinMode(vccPin,​ OUTPUT); digitalWrite(vccPin,​ HIGH); +
-  pinMode(gndPin,​ OUTPUT); digitalWrite(gndPin,​ LOW); +
-   +
-  Serial.println("​MAX6675 test"​);​ +
-  ​// wait for MAX chip to stabilize +
-  delay(500);​ +
-+
- +
-void loop() { +
-  ​// basic readout test, just print the current temp +
-   +
-   ​Serial.print("​C = ");  +
-   ​Serial.println(thermocouple.readCelsius());​ +
-   ​Serial.print("​F = "); +
-   ​Serial.println(thermocouple.readFarenheit());​ +
- +
-   ​delay(1000);​ +
-} +
- +
-</​code>​+
  
-As you can see, its pretty simple to use the library, simply tell the MAX6675 ​object what the clock, chip select and data pins are, then call **readCelsius()**or **readFarenheit()** to get a floating point result. In this example we provide power to the MAX chip via pins 2 and 3 but if you're not just plugging it in as above, you can take out those lines. ​+As you can see, its pretty simple to use the library, simply tell the sensor ​object what the clock, chip select and data pins are, then call **readCelsius()**or **readFahrenheit()** to get a floating point result. In this example we provide power to the MAX chip via pins 2 and 3 but if you're not just plugging it in as above, you can take out those lines. ​
 ==== Adding a display ​ ==== ==== Adding a display ​ ====
  
Line 137: Line 104:
 Need ideas? Check out these projects! Need ideas? Check out these projects!
  
-[[http://​news.jeelabs.org/​tag/​reflow/​|{{ ​ http://​www.ladyada.net/​images/​thermocouple/​screen_shot_2010_05_13_at_001050.png?​nolink&​604x380 ​ |}} \\ //Jeelabs has a detailed walkthrough for a reflow controller (uses an AD595-type chip)//]] +[[http://​news.jeelabs.org/​tag/​reflow/​|{{ ​ http://​www.ladyada.net/​images/​thermocouple/​screen_shot_2010_05_13_at_001050.png?​nolink&​604x380 ​ |}}]] 
 +[[http://news.jeelabs.org/​tag/​reflow/​|Jeelabs has a detailed walkthrough for a reflow controller (uses an AD595-type chip)]]
  
-<object width="​640"​ height="​385"​><param name="​movie"​ value="​http://​www.youtube.com/​v/​Sb1nvKYYTdc&​hl=en_US&​fs=1"></​param><​param name="​allowFullScreen"​ value="​true"></​param><​param name="​allowscriptaccess"​ value="​always"></​param></​object>​ \\ //Thermocouple to RGB LED//+{{ youtube>​Sb1nvKYYTdc ​}} 
 +Thermocouple to RGB LED//
  
-{{  http://​www.ladyada.net/​images/​thermocouple/​cr_frontview_full.jpg?​nolink ​ |}} \\ [[http://​www.consistent.org/​terran/​2009/​coffeeroaster.shtml|//Terran'​s PI conntrolled coffee roaster//]]+{{  http://​www.ladyada.net/​images/​thermocouple/​cr_frontview_full.jpg?​nolink ​ |}} \\ [[http://​www.consistent.org/​terran/​2009/​coffeeroaster.shtml|Terran'​s PI conntrolled coffee roaster]]
  
-//[[http://​www.rocketnumbernine.com/​2009/​06/​03/​smt-table-top-reflow-oven-part-1/​|{{ http://​www.ladyada.net/​images/​thermocouple/​3591683079_f16a63a79a.jpg?​nolink&​500x334 |}} \\ ]]//[[http://​www.rocketnumbernine.com/​2009/​06/​03/​smt-table-top-reflow-oven-part-1/​|//RocketNumberNine'​s reflow toaster project//]]+[[http://​www.rocketnumbernine.com/​2009/​06/​03/​smt-table-top-reflow-oven-part-1/​|{{ http://​www.ladyada.net/​images/​thermocouple/​3591683079_f16a63a79a.jpg?​nolink&​500x334 |}}]] 
 +[[http://​www.rocketnumbernine.com/​2009/​06/​03/​smt-table-top-reflow-oven-part-1/​|RocketNumberNine'​s reflow toaster project]]
  
  
/home/ladyada/public_html/wiki/data/attic/tutorials/learn/sensors/thermocouple.html.1286481994.txt.gz · Last modified: 2016/01/28 18:05 (external edit)