Home  |  Contents 

Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: K-Type Thermocouple help Please Post ReplyPost New Topic
<< Prev Page of 3 Next >>
Author
Message << Prev Topic | Next Topic >>
Grogster
Guru
Guru
Avatar

Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 5619
Posted: 10 April 2018 at 10:41am | IP Logged Quote Grogster

Hey Mick.

I know you already have a thermocouple and SPI thing-y, but have you considdered using an AD595 K-type Thermocouple Amplifier - US$5.80

They connect to your K-type, and output a precise analog voltage representing the temperature. The one in the ceramic DIL package is VERY stable and accurate.

You simply read the analog voltage, and you have your temperature. The AD594 does the J-type thermocouple if needed.

I have used the 595 a few times, and they are SO EASY to use, and you don't need to do ANY conversion or SPI coms at all. Just connect the 595 to an analog pin on your MM, and read the voltage.

PDF attached.2018-04-10_104059_AD594_595_Thermocouple_Amplifier.pdf

__________________
Smoke makes things work. When the smoke gets out, it stops!


Back to Top View Grogster's Profile Search for other posts by Grogster Visit Grogster's Homepage
 
bigmik
Guru
Guru
Avatar

Joined: 20 June 2011
Location: Australia
Online Status: Offline
Posts: 2012
Posted: 10 April 2018 at 8:16pm | IP Logged Quote bigmik

Hi Grogster,

I have an AD595 somewhere from the days you were considering a SMD oven..

Where?? You have seen the pic of my desk... :)

Yes I know it would be easier but what is the fun in that?

I am curious to see why I cant get a simple read of a MAX31855 chip to work.. There has to be a reason..

I believe JMans code worked on an earlier version.. I could roll back a couple of decades and test my hardware..

@JMan, do you know what version would have been in vogue back then?

Kind Regards,

Mick

__________________
Mick's uMite Stuff can be found HERE

Back to Top View bigmik's Profile Search for other posts by bigmik
 
Grogster
Guru
Guru
Avatar

Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 5619
Posted: 11 April 2018 at 8:26am | IP Logged Quote Grogster

Understood. I just wanted to throw that idea out there. I am impressed with your memory. That SMD oven project was aborted, and I did not expect anyone to remember that, as it was a few years ago now. You can buy SMD ovens on eBay or Aliexpress quite cheaply these days anyway. But I digress........

__________________
Smoke makes things work. When the smoke gets out, it stops!
Back to Top View Grogster's Profile Search for other posts by Grogster Visit Grogster's Homepage
 
chronic
Guru
Guru


Joined: 21 January 2012
Location: Australia
Online Status: Offline
Posts: 555
Posted: 11 April 2018 at 6:06pm | IP Logged Quote chronic

Quote:
I had to cut the GND from the Thermocouple itself


The thermocouples I have seen, only have two connections, they would both be connected directly to the IC - unless there is a grounded shield of some sort (?)
Back to Top View chronic's Profile Search for other posts by chronic
 
jman
Guru
Guru
Avatar

Joined: 12 June 2011
Location: New Zealand
Online Status: Offline
Posts: 677
Posted: 11 April 2018 at 7:55pm | IP Logged Quote jman

@Mick

I pull out the unit i made and give it an update once done i will flick you the progress

Regards
Jman
Back to Top View jman's Profile Search for other posts by jman
 
bigmik
Guru
Guru
Avatar

Joined: 20 June 2011
Location: Australia
Online Status: Offline
Posts: 2012
Posted: 11 April 2018 at 10:06pm | IP Logged Quote bigmik

@Grogs,

Yes, I have one of the PCBs you made and all the parts including the oven sitting on a shelf.

Every time I see the oven I remember the project..

@Jman,

No probs, thanks..

@Chronic,,

The modules I bought are all the same I will post a link next time I am in front of a pc..

They had pin 1 and 2 shorted together on the pcb so I cut the track between them..

The circuit buzzed out to the data sheet sample cct.. but of course I may have missed something else

I might desolder everything and start from scratch..

Regards,

Mick

Edited by bigmik on 11 April 2018 at 10:07pm


__________________
Mick's uMite Stuff can be found HERE

Back to Top View bigmik's Profile Search for other posts by bigmik
 
jman
Guru
Guru
Avatar

Joined: 12 June 2011
Location: New Zealand
Online Status: Offline
Posts: 677
Posted: 14 April 2018 at 7:36pm | IP Logged Quote jman

@ Mick

Ok found the unit it is using an MX150 running Version 4.05 (A blast from the past)
I have tested it with no thermocouple connected and the internal temperature returns meaningfull results. Once I find the thermocouple I will post the result here


Dim temp(4)

Start:
''''''''''''''''''''''''''''
'Spi Read 32 bits
WatchDog 5000
SetPin 4, Dout
Pin(4) = 1
SPI Open 40000, 0, 8

Pin(4)=0
 Temp(0) = SPI(0)
 Temp(1) = SPI(0)
 Temp(2) = SPI(0)
 Temp(3) = SPI(0)
SPI CLose
Pin(4)=1

err = temp(3) And &B111         'Error check
If err <> 0 Then
  Print "Thermocouple Error"
  Pause 1000
EndIf

TempMSB = Temp(0)*16
TempLSB = ShiftR(Temp(1),4)
TempDP = (ShiftR(Temp(1),2) And &B00000011) * .25

Temperature = TempMSB + TempLSB + TempDP

Print "Temperature ";Temperature

TempIntMSB = Temp(2)
TempIntLSB = ShiftR(Temp(3),4)
TempIntDP = TempintLSB * 0.0625
TempInt = TempIntMSB + TempIntDP

Print "Internal Temperature ";TempInt

GoTo Start


Regards
Jman
Back to Top View jman's Profile Search for other posts by jman
 
bigmik
Guru
Guru
Avatar

Joined: 20 June 2011
Location: Australia
Online Status: Offline
Posts: 2012
Posted: 14 April 2018 at 8:34pm | IP Logged Quote bigmik

Thanks Jman,

I look forward to hearing if it works with a later version 170 28pinner

Mick

__________________
Mick's uMite Stuff can be found HERE

Back to Top View bigmik's Profile Search for other posts by bigmik
 
jman
Guru
Guru
Avatar

Joined: 12 June 2011
Location: New Zealand
Online Status: Offline
Posts: 677
Posted: 15 April 2018 at 5:00pm | IP Logged Quote jman

bigmik wrote:
Thanks Jman,

I look forward to hearing if it works with a later version 170 28pinner

Mick


Tested and working on a MX170 with V5.04.08

''''''''''''''''''''''''''''''''''''''''
'Max 31855
Dim temp(4)

Start:
''''''''''''''''''''''''''''
'Spi Read 32 bits
WatchDog 5000
SetPin 4, Dout
Pin(4) = 1
SPI Open 40000, 0, 8

Pin(4)=0
 Temp(0) = SPI(0)
 Temp(1) = SPI(0)
 Temp(2) = SPI(0)
 Temp(3) = SPI(0)
SPI CLose
Pin(4)=1

Err = temp(3) And &B111         'Error check
If err <> 0 Then
  Print "Thermocouple Error"
  Pause 1000
  GoTo Start
EndIf

TempMSB = Temp(0)*16
TempLSB = ShiftR(Temp(1),4)
TempDP = (ShiftR(Temp(1),2) And &B00000011) * .25

Temperature = TempMSB + TempLSB + TempDP

Print "Temperature ";Temperature

TempIntMSB = Temp(2)
TempIntLSB = ShiftR(Temp(3),4)
TempIntDP = TempintLSB * 0.0625
TempInt = TempIntMSB + TempIntDP

Print "Internal Temperature ";TempInt

Pause 1000
GoTo Start

Function ShiftR(byte_in, shift)
 If shift <1 Or Shift > 7 Then Error "Invalid shift value"
 ShiftR = (byte_in \ 2 ^ shift)
End Function


Regards
Jman
Back to Top View jman's Profile Search for other posts by jman
 
bigmik
Guru
Guru
Avatar

Joined: 20 June 2011
Location: Australia
Online Status: Offline
Posts: 2012
Posted: 16 April 2018 at 10:51pm | IP Logged Quote bigmik

Hi Jman,

Thanks for that,

I tried your code and itís the same..

I get 2048 for the hot end and 127.938 for the cold junction.

I even swapped the CS onto pin4 (min was on pin 15) but no change,

Remove the CS and I get thermocouple error..

Something is rotten in my setup for sure..

Regards,

Mick


__________________
Mick's uMite Stuff can be found HERE

Back to Top View bigmik's Profile Search for other posts by bigmik
 
bigmik
Guru
Guru
Avatar

Joined: 20 June 2011
Location: Australia
Online Status: Offline
Posts: 2012
Posted: 17 April 2018 at 2:19pm | IP Logged Quote bigmik

Hi All,

Well I bought a MAX6675 module which arrived today.



Using the code that Phil23 posted I get intelligible readings, seems a few degrees low but responds as expected, I havent compared to a thermometer yet but I reckon its about 15C in my room and the code returns about 10.5C, heating with a lighter increased the temperature rapidly till I stopped at about 70C..

I tested all of my Thermocouples and they read the same more or less.

At this stage all I can say is to stay clear of these MAX13855 Modules..



I bought 3 from different Chinese and Australian based sellers and not one returns sensible readings, they also have Pins 1&2 shorted which GNDs one of the Thermocouple's legs. I have of course tried with that GND short in and out of circuit.

My next step is to buy a MAX31855 fro RS (assuring a genuine chip) and trying with that.

Thank you all for your help.

Kind Regards,

Mick




__________________
Mick's uMite Stuff can be found HERE

Back to Top View bigmik's Profile Search for other posts by bigmik
 
CaptainBoing
Guru
Guru
Avatar

Joined: 07 September 2016
Location: United Kingdom
Online Status: Offline
Posts: 476
Posted: 17 April 2018 at 5:59pm | IP Logged Quote CaptainBoing

bigmik wrote:

Well I bought a MAX6675 module ...

seems a few degrees low but responds as expected


Agree with that. Played with these as a high-temp alternative to the 18B20 and I found the temperature was not as accurate as I expected. I put it down to the thermoelectric effect producing tiny voltages but offering quite a big range (1000c no problem). Putting a small capacitor across the cold end made no difference so it's not like the signal was getting swamped by noise. Also difficult to calibrate using the melting ice method due to the 0c cut-off.

In my eyes it's a trade off of precision over range - if you are looking at 600C a few degrees either way won't matter for most things I guess.

Edited by CaptainBoing on 17 April 2018 at 6:01pm
Back to Top View CaptainBoing's Profile Search for other posts by CaptainBoing
 


<< Prev Page of 3 Next >>
In the news...
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.0938 seconds.
Privacy Policy     Process times : 0, 0, 0, 0.09