Proton BASIC Compiler - A thermocouple is created when certain alloys are mechanically joined with another alloy, the result is a junction that generates a specific voltage at a specific temperature.

  • Simple TC Temperature Control

    A thermocouple is created when certain alloys are mechanically joined with another alloy, the result is a junction that generates a specific voltage at a specific temperature.

    Another cool feature is that they all output 0V at 0oC, so there are no zero offsets to compensate for.

    Two drawbacks are that they output only a few mV / oC, so amplification is required, and the output is also not 100% linear. It will also unfortunatelly take quite a few thermocouple juctions to make up a usable power source, so it's easiest to measure temperature with them.

    Thermocouples however are capable of measuring high temperatures, Type S can measure up to 1760oC and is used widely in the iron and steel plants for measuring molten steel temperatures. For interest sake, with simple method it is possible to measure temperatures well beyond their melting point.

    Type J as well as type T can measure to -190oC, that is just below 0oC ;-).

    Thermocouple types are identified by their wire insulation colour pairs.

    Type K is probably the most common and cheaper thermocouple to use. You can buy simple temperature meters using them. A ready made thermocouple could be expensive, but to make one up yourself does not require special tools.

    It is recommended that you get the thermocouple wire with the stainless steel braid wrapping, as in the picture, because this will be part of the safety earth.

    From left to right -

    The cut piece of thermocouple wire. It is left at some length only because it can withstand high temperatures. At the point where you join it with normal wire the temperature won't melt the PVC wire insulation.
    The braid protection wire is unraveled (combed) for about 20mm and twisted together, trim off with a big sidecutter to about 15mm. Using your elegant PCB sidecutter for this is going to bugger it up.
    The easiest to unravel the braid strands is to comb it with a thin flat screw driver, starting right at the end and work your way towards the centre. These wires are tougher than you think, as you will see.

    The outer insulation is stripped by lightly notching it with a knife about 15mm from the end and then strip the outer insulation off. This will reveal the inner insulation which is red and yellow for type K thermocouples, and important to know, Yellow is Positive, Red is Negative. Notch these about 10mm from the end and strip the red and yellow insulation off. Twist them tightly together like in the 4th wire from left. Also slide the braid up so the red and yellow twist is still exposed from where the insulation begins. The bottom ends are now stripped by carefully notching with a knife and stripping with a sidecutter.
    Twist the exposed trands on the bottom together and crimp a small ferrule on each end. Remember YELLOW IS POSITIVE :-)). The red and yellow wire is soldered to the ferrules ends
    The twisted wire ends as well as the twisted braided is now crimped together in the O-lug.
    Crimp sleeving is schrinked over the two ferrules at the bottom to isolate them from one another and a piece of earth wire (yellow/green) is wrapped around the stainless steel wire braid. The coils it make is soldered together so the solder flows through it, and you now have a good earth wire. If you have access to a handpress, the O-lug can be pressed flat for better heat transfer from the heated object to the thermocouple wire ends.

    The thermocouple is now made up. The two inner core wires are the junction that will generate the mV output where they short together when you twisted them up.

    The red and yellow wires on the far left, can now be connected to your opp amp.

    The thermocouple is to the far left at the 'K'. As you can see there, the yellow wire is positive (did I mention that ?) It is important ok, if you have it the wrong way round, whatever you heat up is never going to be controlled and will surely overheat and can cause damage, injury or poisenous fumes.

    The 100k resistor is a safety measure. If for some reason one of the thermoucouple wires breaks off or goes open circuit, the 100k will pull the opp amp input up and the PICŪ will get an overtemperature signal (5V) and switch the heater components off. The circuit uses a 358 opp amp, hence the 8V supply. If a PICŪ A/D input gets an overvoltage the PICŪ tilts and the outputs goes off. A real crude way to do it, but hey, what did I know back then.

    A better component to use is Microchip's opp amps and work them off 5V, they work from rail to rail. The software can sense the over temperature signal and output an audible alarm if things go wrong.

    Take note that this is not a good circuit to use over the thermocouple's full temperature range. It is intended to work around 150oC to 350oC

    You will need another source of reference to compare the temperature input to if you are going to do control. This can be as simple as a pre-programmed value, it can be a pot connected to another A/D input, or it can be a keypad. I'm sure there are more ways also.

    The software is really basic (pun).

    Tin = ADIn 3                          ' read temperature from TC        
    Tin = Tin * 120
    Tin = Tin / 100
    This reads the thermocouple A/D and converts it to a calibrated value. To calibrate the thermocouple circuit, you would have another thermocouple but without the o-lug on it) that gets pressed against the heat source and you measure the mV from that. This mV is looked up in the conversion tables for the type K thermocouple and you know what the temperature is round about. Calculate what the correction should be in the above code and you should come quite close. Calibrate the thermocouple at about the center temperature you intend to use, say at 250oC

    Wether you intend to use this as an oven temperature control for the wife, or to control your hot plate (big hint !) for soldering your SMD PCB's on, a few degrees either way won't make a difference, hence, there is no temperature compensation provided for either. No, you really don't need it. If you are going to make a precision laboratory instrument then it is a different matter and you would have to use a different circuit to do that any way.

    If Tin > Coun Then Triac = 0           'setpoint temperature met, heater off
    If Tin < Coun Then Triac = 1           'too cold, heat up a bit
    If Tin > 340 Then                      'Audible alarm if temp > 340
    Sound Buz,[118,30]
    DelayMS 50
    Sound Buz,[120,30]
    The first 2 lines compare the reference value to the measured value. A triac in this case is set on or off. Control is done very accurate within the PICŪ. Variations between the reference value and the actual temperature will be a function of the thermal conductivity to the thermocouple.

    The same circuit can be used for low amp triacs ie BTA16's, or higer current triacs like BTA40's. The difference in driving them is the current required to switch the gate on. The 16A and lower amp triacs get one 470R resistor while the 40A gets two.
    The If...Endif code gives an audible over temperature warning. If for some reason the max of 340 (in this case) is exceeded, the PICŪ lets you know.

    That's it ! You can fancy your PICŪ control up by writing the temperature value to display, play a tune when it reaches control value, and put it in a nice enclosure.

    PLEASE - Most heater elements are capable of heating up to well beyond 600oC
    Exceeding 340 degrees in most any commercial heater is looking for serious trouble.
    You can solder most effectively at around 180 to 200oC

    Compliments Fanie