PDA

View Full Version : Is this a K Type sensor?



jessey
- 9th March 2009, 06:33
Hello everyone,

A friend of mine just bought a used Crucible Furnace for melting metals. http://www.johnsongas.com/industrial/frn-crucible.asp The package deal came with a temperature probe connected to an analog meter to display the temperature of the metal being melted. The meter was left outside for some time and exposed to the elements and needless to say it doesn't work. I disconnected the wires from the probe (picture of the probe & meter are attached below) and connected them to a volt meter, when the sensor is cold the meter reads 0 volts and when heated up with a propane torch it produces a voltage in the milli volt range that continues to rise as the heat is applied to the sensor.

I was thinking that the sensor is a "K" type sensor (but not certain) and was wondering if anyone here could confirm that this is a "K" type sensor and possibly offer any advice as to how to approach writing code and interfacing the temperature sensor for this project. I'm assuming that I'd be using an ADC input to measure the voltage and do some math to print the temperature to my LCD. Any help in pointing me in the right direction would be greatly appreciated.

Thanks
jessey

Dave
- 9th March 2009, 11:13
jessey, If the wire colors are yellow and red for the sensor then it is a K type thermocouple. If the wire colors are white and red then the type is J. If the colors are blue and red then the type is T. K is good for over a thousand degrees F. and is made of Cromel/Alumel. Type J has a greater output voltage but a lower range and is made of iron/constantan. Type T is copper/constantan and is good for lower ranges and has a greater output voltage. Lookup OMEGA Temperature for more information...

Dave Purola,
N8NTA

Acetronics2
- 9th March 2009, 13:36
Hi, Jessey



I'm assuming that I'd be using an ADC input to measure the voltage and do some math to print the temperature to my LCD. Any help in pointing me in the right direction would be greatly appreciated.


I think you should first have a look to MAX 6675 or AD 595 chips ...

the Pic ADC's are way too weak to measure those sensors outputs ...

Alain

Byte_Butcher
- 9th March 2009, 16:38
Ditto on what Dave said about the wire colors. They will tell you what type of probe you have. Red/Yellow is type K.

The output from a type K probe is very low and you won't be able to use a PIC ADC to measure it directly.

I'm working on a project now that uses the MAX6675 sensor with a type K probe and it works very well and is super easy to read the MAX6675 and display to an LCD.


Steve

Byte_Butcher
- 9th March 2009, 16:44
I've never used the AD595, but from a quick look at the data sheet it appears that the AD595 is good for measuring up to 1250C (2285F), but the MAX675 is only good up to 1024C (1875F), so depending on what your temperature requirements are, the MAX6675 *might* not read high enough for you...

jessey
- 9th March 2009, 19:44
Thanks Everyone,

I just checked and the wires coming off the sensor are red and yellow confirming that it is indeed a "K" type sensor. The maximum temperature that we need to check for is approximately 1832 degrees Fahrenheit which is the melting point of Bronze. Thanks for the information and I'll be looking to purchase a MAX675 voltage reference chip as soon as possible. My friend was thinking to have me build the circuit with an LCD in a small box and mount it just ahead of the handle on the sensor and have it operate on batteries which sounds like a good idea to me. I'm assuming that the red and yellow wires coming off the sensor are Cromel/Alumel as Dave said and that it's not a good idea to put any other type of wires in-between the sensor and the micro, I seem to remember someone telling me that years ago. Sounds like an interesting project. So when I get the MAX675 chip I'll read the data sheet and connect it as per instructions to an ADC input and see what numbers I get displaying on my LCD. When using a K type sensor is there a set number of milli amps rise that would equal a one degree rise in temperature for either Celsius or Fahrenheit? I can't wait to fire up the furnace and start melting some aluminum. Is anyone else here into melting metals in a furnace and casting their own parts?

Thanks Again
jessey

b1arrk5
- 10th March 2009, 00:08
Jessey,

Take a look at STEVECHASTAIN.COM I have his book on building a small foundry, and highly recommend it. You might also take a look at Lindsay Books, they reproduce a lot of older technical manuals, and they carry the Dave and Vince Gingery books. I have the Gingery book on building a charcoal foundry, and they are easy to read, and inexpensive. Both books will give you ideas as to where to find materials and supplies for melting metal.

Jerry.

Byte_Butcher
- 10th March 2009, 00:20
The MAX6675 doesn't need a ADC to interface with a PIC.
You just shiftin the serial data and it reads pretty much directly in degrees C on an LCD without too much else.

This is pretty much all the code involved...




'Alias pins - MAX6675 temp sensor
MXSCLK var PORTB.5 'Clock
MXCS var PORTB.4 'Chip Select
MXSO Var PORTB.3 'Serial out


'Allocate MAX6875 Variables
MXTemp var word 'raw data from 6675/type K sensor
TempC var word 'converted to degrees C


'-----------Read and display temperature from MAX6675-----------
MXCS = 0 'Chip select low
shiftin MXSO, MXSCLK, 0, [MXTemp\16] 'read the data to MXTemp
MXCS = 1 'Chip select high
TempC = MXtemp >> 5 'right shift the data 5 places to get degrees C (Read the Data sheet)
LCDOUT $fe,2,"Temp = ", DEC TempC, "degrees C " ' Spit it out on an LCD



Works for me... :)

Steve

Byte_Butcher
- 10th March 2009, 01:47
Thanks for the information and I'll be looking to purchase a MAX675 voltage reference chip as soon as possible.


I just reread this part....

What you want is a MAX6675, which is designed to read a type K probe, NOT a MAX675, which is a precision voltage reference.

Totally different animals!

jessey
- 11th March 2009, 04:24
Jessey,

Take a look at STEVECHASTAIN.COM I have his book on building a small foundry, and highly recommend it. Jerry.

Hi Jerry,

Yes my friend did order some plans for a furnace then he found an advertisment on craigslist for a furnace and got a smoking deal on the one he bought. It's a manufactured unit made by Johnson Gas Appliance Company that runs on natural gas. Neither one of us has ever done any castings before so it's going to be very interesting to say the least. Have you been using your furnace much?

Thanks for the clarification on the MAX6675 Steve and the code to get it up and running, that's cool. I phoned Digi-Key and they have a 5 week waiting period for a back order for the MAX6675. I will still get some of the MAX6675's but I think I'll phone Digi-Key tomorrow and see if I can get a couple of the AD595's especially if I can get some without the long wait, as I can't wait to get this project up and running. I'll let you know how I make out.

Thanks
jessey

b1arrk5
- 11th March 2009, 23:19
Jessey,
I haven't done nearly as much casting as I would like, but I've had fun with aluminum. A friend rebuilds diesel engines, and saves me the bad pistons. The aluminum used in the pistons contains alloys that make it machine nicely, and I have a small lathe that doesn't get used as much as it should either! Got to save something to do for retirement right?

Anyway, if you go to Maxim's website they will let you order samples of the Max6675. You might be limited in the packages that they offer in samples. You can order parts direct from them too, but the shipping would cost more than one or two parts.

Jerry.

Byte_Butcher
- 12th March 2009, 00:26
I think with the MAX6675 you're pretty much limited in package selection anyway... 8 pin SOIC is all that's shown in the data sheet.

I don't know why DigiKey said they have a 5 week back order on the MAX6675. According to their website they have several 1000 in stock...
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=MAX6675ISA%2BTCT-ND

Sam
- 12th March 2009, 02:06
Is anyone else here into melting metals in a furnace and casting their own parts?

I'm just getting started and have built a spincaster machine and an electric radiant furnace. The furnace can melt chunks of 6106-T6 aluminum in about 40 minutes ! Although my main purpose will be for Zamack-27 zinc aluminum alloy, I have the first ingot on the way.

I was thinking of ordering a pyrometer with a K sensor off ebay but since you started this thread, I'm thinking I'll build one too. Please keep us informed on your progress.

Here's (http://www.cnczone.com/forums/showthread.php?t=72193) a link to a thread on my spincaster build.

Archangel
- 13th March 2009, 01:52
Hi jessey,
sorry this is so late, I knew I had it but couldn't find it.
http://srdata.nist.gov/its90/download/type_k.tab

jessey
- 22nd March 2009, 06:45
The MAX6675 doesn't need a ADC to interface with a PIC.
You just shiftin the serial data and it reads pretty much directly in degrees C on an LCD without too much else.

This is pretty much all the code involved...




'Alias pins - MAX6675 temp sensor
MXSCLK var PORTB.5 'Clock
MXCS var PORTB.4 'Chip Select
MXSO Var PORTB.3 'Serial out


'Allocate MAX6875 Variables
MXTemp var word 'raw data from 6675/type K sensor
TempC var word 'converted to degrees C


'-----------Read and display temperature from MAX6675-----------
MXCS = 0 'Chip select low
shiftin MXSO, MXSCLK, 0, [MXTemp\16] 'read the data to MXTemp
MXCS = 1 'Chip select high
TempC = MXtemp >> 5 'right shift the data 5 places to get degrees C (Read the Data sheet)
LCDOUT $fe,2,"Temp = ", DEC TempC, "degrees C " ' Spit it out on an LCD



Works for me... :)

Steve

Hi Steve,

I finally received 2 of each MAX6675's and AD595's and thought I'd use one of the 6675's first to try out your code. I found this article: http://emesystems.com/OL2therm.htm that shows a schematics for the 6675 and I have a couple of questions for you.

This article shows 200 ohm resistors on pins 5, 6 and 7 to the microprocessor for input protection which sounds like a good idea but are not shown in the data sheet. Do you think they could cause any problems in reading the higher temperatures?

Also in the same article the author dismisses grounding pin 2 as shown in the datasheet and I was wondering what you think of that?

Now that I have my pickit2 programmer working good on my laptop, I'll take a breadboard to my friends place next week sometime to try your code. Once again thanks for posting your code.

Thanks
jessey

Byte_Butcher
- 22nd March 2009, 14:42
Jessey,
I didn't use any series resistors on my MAX6675, but it's probably a good idea to use them. It shouldn't cause any accuracy problems... it's all serial data, not analog signals.

I grounded pin 2 on mine. If it's grounded, then the MAX6675 can tell when there's an open probe. (type K probes almost always fail "open") The data sheet explains it.

Have fun!


Steve

jessey
- 30th October 2009, 07:25
Hi Steve,

It took some time but I finally got around to trying to get the sensor up and running but I'm not having any success. I'm pretty sure I have everything configured ok with your code. Could you please have a look and see if there's something that you can see that I've done wrong here? Any help from anyone would be very much appreciated. I included the schematics I used in an attachment here.

Thanks
jessey



'************************************************* *************************
'* Name : Furnace Temperature Probe *
'* Author : Jessey Montgomery *
'* Includes: Byte_Butchers code to read temperature using a MAX6675 *
'* Date : April 24/th 2009 *
'* Version : Using PicBasic Pro Ver 2.50, MPASM Ver 5.20, Using MicroCode *
'* : Studio 3.0.0.5, PICkit 2 programmer - Application Version *
'* : 2.50.02 - Device File Version 1.5100 - OS Firmware Version *
'* : 2.30.01. Using a Pic16F688-I/P 04470AY. *
'************************************************* *************************

'(1) Comments & Objectives
' =====================
' this program is used to display the temperature from a K type sensor using a
' MAX6675 interface...

'------------------------------------------------------------------------------'

'Connections for the PICKIT 2 Programmer for a 16F688
'Pickit 2 pins 16f688 pins
'============= ===========
' 1 ...... Connect to ...... pin 4 RA3/MCLR/VPP
' 2 ...... Connect to ...... pin 1 VDD (positive)
' 3 ...... Connect to ...... pin 14 VSS (ground)
' 4 ...... Connect to ...... pin 13 RA0/AN0/C1IN+/ICSPDAT/ULPWU
' 5 ...... Connect to ...... pin 12 RA1/AN1/C1IN-/VREF/ICSPCLK
' 6......................................no connection
'*Note
'Put a 0.1mf capicator on pin 1 of 16f688 to ground

'------------------------------------------------------------------------------'

' --------------
' | 16f688 |
' VDD+ (--->) |1 14| (<---) VSS-
' | |
' RA5/TICKI/OSC1/CLKIN (<-->) |2 13| (<-->) RA0/AN0/C1IN+/ICSPDAT/ULPWU
' | |
'RA4/AN3/TIG/OSC2/CLKOUT (<-->) |3 12| (<-->) RA1/AN1/C1IN-/Vref/ICSPCLK
' | |
' RA3/MCLR/Vpp(--->) |4 11| (<-->) RA2/AN2/TOCKI/INT/C1OUT
' | |
' RC5/RX/DX (<-->) |5 10| (<-->) RC0/AN4/C2IN+
' | |
' RC4/C2OUT/TX/CX (<-->) |6 9| (<-->) RC1/AN5/C2IN-
' | |
' RC3/AN7 (<-->) |7 8| (<-->) RC2/AN6
' | |
' --------------

'------------------------------------------------------------------------------'
' --------------------------------------------------------------------------------


' Configuration Of Pins
' =====================
' ------------
' | 16f688 |
' VDD+ |1 14| VSS-
' | |
' Not Used |2 13| Clock output for 6675 to pin 5
' | |
' Not Used |3 12| Chip Select output for 6675 pin 6
' | |
' Not Used |4 11| Serial input from 6675 to pin 7
' | |
' Blue/White.........Enable bit |5 10| Data bit 4...............Blue
' | |
' Orange/Black..Register select |6 9| Data bit 5..............White
' | |
' Orange.............Data bit 7 |7 8| Data bit 6..............Green
' | |
' ------------

'------------------------------------------------------------------------------'

' --------------
' | MAX6675 |
' -5 VSS |1 8| No Connection
' | |
' T- Alumel Lead (Red) |2 7| Serial Output to 688 pin 11
' | |
' T+ Chromel Lead (yellow)|3 6| Chip Select input to 688 pin 12
' | |
' +5 VDD |4 5| Serial Clock in from 688 pin 13
' --------------


'(2) PIC Config Fuse Definitions for 16f688
' ======================================
@ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF & _BOD_ON
@ ERRORLEVEL -306; ' turns off cross page boundary message alerts after compile

'(3) PIC Hardware Definitions (ie Pin-Out & Port Assignments)
' ================================================== ======
DEFINE LCD_RSREG PORTC' LCD Register Select Port
DEFINE LCD_RSBIT 4 ' LCD Register Select
DEFINE LCD_EREG PORTC ' LCD Enable Port
DEFINE LCD_EBIT 5 ' LCD Enable
DEFINE LCD_DREG PORTC ' LCD Data Port
DEFINE LCD_DBIT 0 ' LCD data starting bit 0 or 4

'------------------------------------------------------------------------------'
'------------- Clear Each Port Before Setting The TRIS Registers --------------'
'------------------------------------------------------------------------------'

Clear ' Set all ram registers to zero
PORTA = 0
PORTC = 0

'--------------------------- VSS VDD MCLR Ect. Pins ---------------------------'

'VDD + '(pin 1)
'VSS - '(pin 14)

'------------------- SET THE TRIS ------------------'

'-------------------- PORTA PINS --------------------'

TRISA.0 = 0 '(pin 13) ...................................... MXSCLK VAR PORTA.0
TRISA.1 = 0 '(pin 12) .........................................MXCS VAR PORTA.1
TRISA.2 = 1 '(pin 11) .........................................MXSO VAR PORTA.2
TRISA.3 = 1 '(pin 4) ............... NOT USED VAR PORTA.3
TRISA.4 = 1 '(pin 3) ............... NOT USED VAR PORTA.4
TRISA.5 = 1 '(pin 2) ............... NOT USED VAR PORTA.5

'-------------------- PORTC PINS --------------------'
TRISC.0 = 0 '(pin 10) Blue........... Lcd Data bit 4
TRISC.1 = 0 '(pin 9) White.......... Lcd Data bit 5
TRISC.2 = 0 '(pin 8) Green.......... Lcd Data bit 6
TRISC.3 = 0 '(pin 7) Orange......... Lcd Data bit 7
TRISC.4 = 0 '(pin 6) Orange/Black... Lcd Register select
TRISC.5 = 0 '(pin 5) Blue/White..... Lcd Enable bit

ANSEL = %00000000 ' set all adc pins to digital
CMCON0 = 7 ' turn off comparators

'Alias pins - MAX6675 temp sensor
MXSCLK var PORTA.0 'pin 13 of 16f688 (Clock) to pin 5 of MAX6675
MXCS var PORTA.1 'pin 12 of 16f688 (Chip Select) to pin 6 of MAX6675
MXSO Var PORTA.2 'pin 11 of 16f688 (Serial) to pin 7 of MAX6675

'Allocate MAX6875 Variables
MXTemp var word 'raw data from 6675/type K sensor
TempC var word 'converted to degrees C
a VAR BIT ' a always equals zero, used in IF-THEN's instead of using GOTO's
a = 0

INCLUDE "modedefs.bas"

'5. Actual Program Start (usually a "Goto MainLoop" jump)
' ================================================== ===
Pause 1000 ' Pause for LCD to initialize

LCDOut $fe, 1, "Temp 6675 Laptop"
PAUSE 2500

IF a = 0 THEN MainLoop

'------------------------------------------------------------------------------'
MainLoop:

'-----------Read and display temperature from MAX6675-----------
MXCS = 0 'Chip select low
shiftin MXSO, MXSCLK, 0, [MXTemp\16] 'read the data to MXTemp
MXCS = 1 'Chip select high
TempC = MXtemp >> 5'right shift data 5 places to get degrees C (in data sheet)
LCDOut $fe, 1,"Temp = ", DEC TempC, " C " 'Spit it out on an LCD

PAUSE 100 'reduce lcd flicker

IF a = 0 THEN MainLoop ' a always equals zero, use instead of GOTO...

End

DocDingwall
- 30th October 2009, 15:35
I'm trying to do a similar thing just now with the MAX6675 and the breakout board from Sparkfun (at least I think it's the MAX6675, I'm at work now). It's not clear to me if the wires from the female thermocouple socket to the MAX6675 breakout also need to be K type or is copper OK? At what point is it OK to switch to copper? Could the thermocouple lead be soldered right to the breakout board for prototyping?

Thanks for your help. Sorry if I should be starting a new thread.

DD.

mackrackit
- 30th October 2009, 21:23
Anyplace the wire material changes you need a reference temperature and calcs. A couple exceptions here and there though.

ptig185
- 19th November 2009, 15:34
I'm writing some code for this device also. I'm wondering why the shift of 5 places to the right when in the data sheet it looks like only 3 shifts right should put the Temperatures lsb in the correct location.

At least that's how my initial coding is. I'll try it tonight.
I also use MSBPOST=2 :

Get6675_Raw:
LOW NCS:PAUSEUS 1
Shiftin SO, SCK, MSBPOST, [raw1\16] ' Read 16 bit temperature register
raw1 = raw1>>3
HIGH NCS
RETURN

Brian

ptig185
- 21st November 2009, 13:55
OK so I tried the code. Now I see you guys are right with the 5 bit shift.
The device is capable of 12bits or 0.25 deg resolution if shifted only 3 times.

Brian