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
Posted: Fri Jul 20, 2007 12:56 pm
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.
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