CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC and Thermocouples Polynomials

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Inkwaterman



Joined: 28 Apr 2004
Posts: 14

View user's profile Send private message

PIC and Thermocouples Polynomials
PostPosted: Fri Jul 20, 2007 9:59 am     Reply with quote

Hi to All !

Did someone write a functions for the conversion from millivolt of a thermocouple signal to celsius degree and viceversa ?

I used the coefficients from the NIST but the conversion is not good, usually I have and error for K type of about 10 degree.

It's possible that the error is caused because I use a 4 byte float type for the coefficients ?

thanx
Bill Boucher



Joined: 04 Feb 2005
Posts: 34
Location: Chatham,ON,CA

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Fri Jul 20, 2007 12:56 pm     Reply with quote

I have found through experience that to achieve any decent accuracy over a relatively wide temperature range that you need at least 5 terms in your polynomial. That's a hell of an equation to crunch for a PIC. My own solution was to generate a lookup table in Windows Excel and then use the simple lookup table values to do the conversion in the PIC. The idea being that the hard math work is already done. There are also some 8-pin IC's on the market that connect directly to the thermocouple, apply an on-chip temperature compensation, and then output a digital value in degrees as a signed integer. A PIC could do this but it would require a local temperature sensor and an opamp between itself and the thermocouple. You might get away without the local temperature compensation if you code a hard value for room temperature and if the local thermocouple junction block is always pretty close to room temperature anyway.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group