From: PeteG on
Hi Everyone, first post and looking for a little advice or some
recommendations.

I'm looking to do a thermocouple (tc) project that has to be able to handle
types K, N or R. Each may be used from 0degC upto their maximum temps as
shown in the NIST tc tables.(1300-1600degC) My limited background is in
68hc05 assembly but I'd like to transition to using C.

If anyone is able to offer any opinions or recommendations regarding the
following points I'd be most grateful...

(1) After a bit of reading I'm currently leaning toward either TI's
MSP430F147 or Microchip's PIC18F2550 or close derivatives of either.
Microchip have a tc reference design based on the '2550'

(2) The TI part is 16bit with a 12bit ADC. Good enough for the tc input.
Not real happy with their leadtimes though...18+ weeks. I've even read some
posts questioning the long term availability of the MSP430 1xxx series.

(3) The Microchip part is 8bit with a 10bit ADC. Suitable for the cold
junction compensation input. It is much more readily available, has
seemingly more community support and is a bit easier to play with being
available in dip packaging. Microchip have a pretty good record for long
term avaialability.

(4) The Microchip part will need external ADC (minimum 12bit) plus an amp
for the front end. There's any number of suitable ADC's and AD have the
AD8628 op amp with 1uV offset and input offset drift of 0.002 μV/°C.

(5)I'd like to use the NIST polynomials to resolve temperature readings and
my reading indicates I'll need 32bit floating point support to do that.
I've seen numerous posts which use lookup tables to avoid the nist
equations, but these are usually examples where only one tc type is in use,
usually within a limited temperature range and sacrificing some accuracy. I
need multiple tc types, pretty much full temp range and good accuracy. Are
these nist equations THAT bad???

(6) I'd like to keep the cold junction compensation circuitry seperate
because of the multiple tc type requirement. That way the software can
handle the voltage differences between the various tc types and the pcb can
be left more or less unchanged for whatever tc type is used.

(7) TI's Code Composer Studio vs Microchip's C18 or Hi-Tech C??? Floating
point math support???

There may well be better choices than the above so please don't limit any
possible suggestions just to these. The aim is to make an informed decision
before laying out any major $$$.

Cheers,

Peter



---------------------------------------
Posted through http://www.EmbeddedRelated.com
From: Spehro Pefhany on
On Mon, 05 Apr 2010 14:47:12 -0500, "PeteG"
<syd(a)n_o_s_p_a_m.ozemail.com.au> wrote:

>Hi Everyone, first post and looking for a little advice or some
>recommendations.
>
>I'm looking to do a thermocouple (tc) project that has to be able to handle
>types K, N or R. Each may be used from 0degC upto their maximum temps as
>shown in the NIST tc tables.(1300-1600degC) My limited background is in
>68hc05 assembly but I'd like to transition to using C.

N and K are roughly the same mV at full scale but you'll need to do
some work to accomodate R, depending the specs you are shooting for.

>If anyone is able to offer any opinions or recommendations regarding the
>following points I'd be most grateful...
>
>(1) After a bit of reading I'm currently leaning toward either TI's
>MSP430F147 or Microchip's PIC18F2550 or close derivatives of either.
>Microchip have a tc reference design based on the '2550'
>
>(2) The TI part is 16bit with a 12bit ADC. Good enough for the tc input.
>Not real happy with their leadtimes though...18+ weeks. I've even read some
>posts questioning the long term availability of the MSP430 1xxx series.

>(3) The Microchip part is 8bit with a 10bit ADC. Suitable for the cold
>junction compensation input. It is much more readily available, has
>seemingly more community support and is a bit easier to play with being
>available in dip packaging. Microchip have a pretty good record for long
>term avaialability.
>
>(4) The Microchip part will need external ADC (minimum 12bit) plus an amp
>for the front end. There's any number of suitable ADC's and AD have the
>AD8628 op amp with 1uV offset and input offset drift of 0.002 μV/°C.
>
>(5)I'd like to use the NIST polynomials to resolve temperature readings and
>my reading indicates I'll need 32bit floating point support to do that.
>I've seen numerous posts which use lookup tables to avoid the nist
>equations, but these are usually examples where only one tc type is in use,
>usually within a limited temperature range and sacrificing some accuracy. I
>need multiple tc types, pretty much full temp range and good accuracy. Are
>these nist equations THAT bad???

No they're not that bad, provided you have the code space for the
floating point and your reading rate is not that high. You can't get
away with 24-bit floats because the polynomials are poorly
conditioned. It's also possible to implement similar polynomials in
fixed point math, but C does not lend itself to doing that sort of
thing efficiently, IME.

>(6) I'd like to keep the cold junction compensation circuitry seperate
>because of the multiple tc type requirement. That way the software can
>handle the voltage differences between the various tc types and the pcb can
>be left more or less unchanged for whatever tc type is used.
>
>(7) TI's Code Composer Studio vs Microchip's C18 or Hi-Tech C??? Floating
>point math support???
>
>There may well be better choices than the above so please don't limit any
>possible suggestions just to these. The aim is to make an informed decision
>before laying out any major $$$.

From: Ulf Samuelsson on
PeteG skrev:
> Hi Everyone, first post and looking for a little advice or some
> recommendations.
>
> I'm looking to do a thermocouple (tc) project that has to be able to handle
> types K, N or R. Each may be used from 0degC upto their maximum temps as
> shown in the NIST tc tables.(1300-1600degC) My limited background is in
> 68hc05 assembly but I'd like to transition to using C.
>
> If anyone is able to offer any opinions or recommendations regarding the
> following points I'd be most grateful...
>
> (1) After a bit of reading I'm currently leaning toward either TI's
> MSP430F147 or Microchip's PIC18F2550 or close derivatives of either.
> Microchip have a tc reference design based on the '2550'
>
> (2) The TI part is 16bit with a 12bit ADC. Good enough for the tc input.
> Not real happy with their leadtimes though...18+ weeks. I've even read some
> posts questioning the long term availability of the MSP430 1xxx series.
>
> (3) The Microchip part is 8bit with a 10bit ADC. Suitable for the cold
> junction compensation input. It is much more readily available, has
> seemingly more community support and is a bit easier to play with being
> available in dip packaging. Microchip have a pretty good record for long
> term avaialability.
>
> (4) The Microchip part will need external ADC (minimum 12bit) plus an amp
> for the front end. There's any number of suitable ADC's and AD have the
> AD8628 op amp with 1uV offset and input offset drift of 0.002 μV/°C.
>
> (5)I'd like to use the NIST polynomials to resolve temperature readings and
> my reading indicates I'll need 32bit floating point support to do that.
> I've seen numerous posts which use lookup tables to avoid the nist
> equations, but these are usually examples where only one tc type is in use,
> usually within a limited temperature range and sacrificing some accuracy. I
> need multiple tc types, pretty much full temp range and good accuracy. Are
> these nist equations THAT bad???
>
> (6) I'd like to keep the cold junction compensation circuitry seperate
> because of the multiple tc type requirement. That way the software can
> handle the voltage differences between the various tc types and the pcb can
> be left more or less unchanged for whatever tc type is used.
>
> (7) TI's Code Composer Studio vs Microchip's C18 or Hi-Tech C??? Floating
> point math support???
>

The ATXMEGA16A4 has 12 bit ADC + AMP and is supported by gcc (WinAVR),
which should be able to provide floating point emulation off the shelf.
No DIP packaging though.

BR
Ulf Samuelsson.


> There may well be better choices than the above so please don't limit any
> possible suggestions just to these. The aim is to make an informed decision
> before laying out any major $$$.
>
> Cheers,
>
> Peter
>
>
>
> ---------------------------------------
> Posted through http://www.EmbeddedRelated.com
From: Bob on
PeteG wrote:
> Hi Everyone, first post and looking for a little advice or some
> recommendations.
>
> I'm looking to do a thermocouple (tc) project that has to be able to handle
> types K, N or R. Each may be used from 0degC upto their maximum temps as
> shown in the NIST tc tables.(1300-1600degC) My limited background is in
> 68hc05 assembly but I'd like to transition to using C.
>
> If anyone is able to offer any opinions or recommendations regarding the
> following points I'd be most grateful...
>
> (1) After a bit of reading I'm currently leaning toward either TI's
> MSP430F147 or Microchip's PIC18F2550 or close derivatives of either.
> Microchip have a tc reference design based on the '2550'
>
> (2) The TI part is 16bit with a 12bit ADC. Good enough for the tc input.

If a 12bit on-uP ADC is good enough, then you certainly don't need
floating point. But without accuracy and data rate specs, it's
impossible to say what you might really need.

Integer math cubic splines have worked for me in a variety of
approximations. Results to 16 bit or better are usually available with a
couple of k of look-up table + code space, a handful of 16x16
multiplies, and a few 16 bit adds. There's always a trade-off between
table size and execution time. You could view the NIST polynomials as
the smallest table (coefficients only - not including the FP lib you'll
need) and the longest execution time.

Bob
From: Albert van der Horst on
In article <hPCdndCdvZmC9CbWnZ2dnUVZ_qednZ2d(a)giganews.com>,
Bob <SkiBoyBob(a)excite.com> wrote:
>PeteG wrote:
<SNIP>
>>
>> (2) The TI part is 16bit with a 12bit ADC. Good enough for the tc input.
>
>If a 12bit on-uP ADC is good enough, then you certainly don't need
>floating point. But without accuracy and data rate specs, it's
>impossible to say what you might really need.
>
>Integer math cubic splines have worked for me in a variety of
>approximations. Results to 16 bit or better are usually available with a
>couple of k of look-up table + code space, a handful of 16x16
>multiplies, and a few 16 bit adds. There's always a trade-off between
>table size and execution time. You could view the NIST polynomials as
>the smallest table (coefficients only - not including the FP lib you'll
>need) and the longest execution time.

Then there is the classical table interpolation technique.
As platinum resistors are linear plus slight deviation I guesstimate
a 32 entry table of 16-bit values and 4 point interpolation
to nearest points would do the job. Easy enough to increase
to required precision.

Floating point is good if you have no time or inclination to
go beyond copying the text book formula's.

>
>Bob


--
--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert(a)spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst