Thermocouple Sensor v1.0

From RepRap
Jump to: navigation, search

Thermocouple Sensor v1.0

I am a part of both the Generation 2 Electronics and Generation 3 Electronics Systems.

Overview

<div class="thumb tright">
Cache-2379552521 e02d9a539a.jpg
</div>

Jump to the Table of Contents

This is a simple board for measuring temperature. It uses an AD595 chip to make thermocouple measurements easy. The AD595 amplifies the thermocouple signal and conditions it for easy use. Thermocouples are great due to their linearity over a large range, and their high temperature capability (up to 1300C!)

If you want to make your own thermocouples (a lot cheaper than buying them ready-made) then see this page.

Alternatives

There's an alternative to this design here.

Get It!

Full Kit

Raw Components



Files

You can download the electronics files from Sourceforge.

This file contains the following:

  • GERBER files for getting it manufactured
  • PDF files of the schematic, copper layers, and silkscreen
  • Eagle source files for modification
  • 3D rendered image as well as POVRay scene file
  • exerciser code to test your board.

Interface

Pin Function
+5 This is the pin to supply +5 volts on.
S This is the signal pin. It will output a voltage between 0 and 5 volts that correlates with the temperature.
G This is the ground pin.

Signal Values

The nice thing about the AD595 is that the signal it generates is linear with temperature. This means that it is really easy to convert from an analog reading to a real temperature. Secondly, the AD595 outputs 10mV/C which is simple to work with. at 1V, the temperature is 100C, at 2V, the temperature is 200C, etc. With a reference voltage of 5V, the sensor can make readings up to 500C.

The way to read the temperature is easy. First you convert an analog reading to voltage, then you multiply by 100 to get the temperature in celsius:

Voltage = analogRead(X) * 5.0 / 1024.0; //Note that 5.0 is the A/D reference voltage. Celsius = Voltage * 100;

Or, to simplify:

Celsius = ( 5.0 * analogRead(X) * 100.0) / 1024.0;

More information in the AD595 datasheet.

Thanks to an article on uC Hobby for info on reading values from a very similar sensor.

Thermocouple

This circuit is designed to use the very common Type K thermocouple. There are many other types of thermocouples, and it may be possible to use them as well. You'll get lots of mileage out of a Type K thermocouple though.

More about thermocouples on Wikipedia.

Alarm LED

This LED lights up if there is no thermocouple connected or some other error (like the thermocouple failing, melting, etc). It's a nice, easy way to help you debug things.

Accuracy

The circuit we have provided is very accurate, and will work well for our uses. We have made a few decisions to make the board simpler/easier to use that may slightly degrade its accuracy. However, its easy to build the board in a more accurate way:

  • Use the AD595C (accuracy of +/- 1C) - more expensive than recommended AD595A (accuracy of +/- 3C).
  • Solder the thermocouple directly to the board.
  • Solder the AD595 directly to the board.

By using a more expensive chip and mounting the components directly to the board itself, you will be able to slightly increase the accuracy.

Build It

Board Bugs

  • Oh no!! Silkscreen error. I messed up the +/- signs on the screw terminal for the thermocouple. Just swap them, or write over them with sharpie. Make sure you run the test code to make sure you have your thermocouple inserted correctly.
  • Please report any bugs you find to the forums.

Printed Circuit Board

<div class="thumb tright">
Cache-2380387556 41db59a9b5.jpg
</div>

You can either buy this PCB from the RepRap Research Foundation, or you can make your own. The image above shows the professionally manufactured PCB ready for soldering. Its also cheap, only $1.00 USD.


Components

<div class="thumb tright">
Cache-2380388476 b2f74d4958.jpg
</div>

<iframe src="http://parts.reprap.org/embed/module/Thermocouple+Sensor+v1.0" width="600" height="350" frameborder="0">Visit http://parts.reprap.org/embed/module/Thermocouple+Sensor+v1.0</iframe>

Soldering Instructions

<div class="thumb tright">
Cache-2379551837 78f2feabf7.jpg
</div>

R1

You can insert the resistor in any orientation. Pay attention to the color bands.

<div class="thumb tright">
Cache-2380388974 ec79f061f9.jpg
</div>

SOCKET

The socket has a notch on one end. Line that up with the semicircle on the silkscreen.

<div class="thumb tright">
Cache-2379552311 e9ee21a7d8.jpg
</div>

LED1

LEDs have a polarity, and need to be inserted in the proper direction. Your LED should have a flat side. Line that up with the flat side on the silkscreen and solder it in.


<div class="thumb tright">
Cache-2379552341 6b3bc7feaa.jpg
</div>

Thermocouple Terminal

Solder the screw terminals with the openings facing the outside.


<div class="thumb tright">
Cache-2383140194 a43f241c92.jpg
</div>

Wires

Trim 1/4" from the end of each wire. Insert that wire into the hole in the pad and solder the correct wire to the correct pad using the table below:

Pad Color
+5 Blue
S White/Blue
G Brown




<div class="thumb tright">
Cache-2379552521 e02d9a539a.jpg
</div>

Insert AD595

There is a semicircle on one end of the chip. Line this up with the silkscreen (and the socket). Take lots of care when inserting this chip, its the most expensive and delicate part of this whole circuit.

You may want to pre-bend the legs with a set of needle nose pliers beforehand to make insertion easier. Take it slow.


Test It

Now that you have your thermocouple sensor tested, you'll want to test it.

Wire it up!

<div class="thumb tright">
Cache-2380389494 06a23f1905.jpg
</div>

The wiring is very simple:

  1. Wire 5 to +5v on the Arduino
  2. G to GND on the Arduino
  3. S to Analog 0 on the Arduino
  4. Plug your Arduino into the computer.


<div class="thumb tright">
Cache-2380389662 ccac20f702.jpg
</div>

If you haven't wired up your thermocouple yet, the Alarm LED will light up, telling you that there is no thermocouple connected!


Connect Thermocouple

<div class="thumb tright">
Cache-2380389920 df8413f6f3.jpg
</div>

Wire up your thermocouple to the board. Thermocouples have polarity, so you need to insert it the right way to get a proper reading. If you insert it wrong, it will simply report the reverse of the real temperature.

Please note: the v1.0 board has a silkscreen error, and the +/- signs on the board are reversed. Sorry!!!

For thermocouple color codes, see wikipedia, or just experiment with the tester code below.


Upload firmware to Arduino

Create a new sketch and copy/paste the code below into it. Upload it to your Arduino.

void setup() { Serial.begin(9600); Serial.println("Start"); } void loop() { int raw = analogRead(0); int celsius = ( 5.0 * raw * 100.0) / 1024.0; Serial.print("Celsius: "); Serial.println(celsius); int fahrenheit = (((celsius * 9) / 5) + 32); Serial.print("Fahrenheit: "); Serial.println(fahrenheit); delay(1000); }

Try it out

<div class="thumb tright">
Cache-2380390130 1209d45ce4.jpg
</div>

Start up your Arduino, and open the serial monitor. The exerciser code reads the thermocouple every second and outputs the current temperature in Celsius and Fahrenheit.

Make sure it reports the proper temperature at room temp. Use your fingers and watch the heat rise nearly instantly (if it goes down, reverse the thermocouple connection)


<div class="thumb tright">
Cache-2379553649 57f030168b.jpg
</div>

Finally, use something hot to give it a run for its money. If you still have your soldering iron hot, use the barrel as a heat source.


<div class="thumb tright">
Cache-2379553851 45172f6da2.jpg
</div>

It should give you a high temperature reading. If so, congratulations, you have an awesome temperature sensor now!


++ Index