Read a Pt100

Hello,

to acquire a Pt100 I set up a board with INA326. Full bridge: the upper resistors are 100k (say R1 and R2), the lower 100R (R(t) and R3). The INA326 is programmed to gain 10 (4k and 200k). Supply voltage is 3.3V.

The start equation is:

R(t) = R0(1 + At + Bt^2)

My output is:

Vo(t) = G(V+ - V-)

where G is the INA326 gain, V+ and V- both arms of the bridge. Thus:

Vo(t) = G[Vs*R(t)/(R1+R(t)) - k]

where k is the reference voltage from the fixed network divider.

Well, but I need t(Vo)! Inverting the formula leads to a quite complex expression, and I need to fit it into a small AVR.

This is the right way or there is something else that I'm missing?

Thanks! Marco

Reply to
Marco Trapanese
Loading thread data ...

Convert the equation into a polynomial in R instead of T.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510
845-480-2058

hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

.

Don't forget that you can cancel out the square term with a bit of feedback. IIRR, increasing the current through the Pt100 sensor - increasing with voltage drop across the bridge - with increasing temperature can save you from having to calculate the square term in the AVR.

I invented this for myself back in 1979, but the guy that took over the project claimed that any positive feedback would lead to oscillation (it won't if the positive feedback gain is less than one, and it really isn't anywhwere near it in this application). Honeywell are reputed to use it in their Pt100 sensing modules.

-- Bill Sloman, Nijmegen

Reply to
Bill Sloman

The traditional fix is to add a bit of v-squared to the voltage measurement value. I usually diddle it numerically, rather than doing all the algebra. The v-squared will pretty much fix up both the RTD curve and the small additional curvature caused by the bridge loading.

Of course, you don't really need a bridge, or a diffamp. If you want, you can excite, amplify, and linearize with just an opamp or two.

John

Reply to
John Larkin

Marco Trapanese schrieb:

Hello,

if the needed temperature range is small and the resolution is large, a small lookup table will do. You may use a stepwise linear aproximation of the formula for a larger temperature range and smaller resolution.

Bye

Reply to
Uwe Hercksen

Hi Marco,

Can you tell me, why you want to go such a complicated way to convert a resistor value to a voltage, that have to be measured via AD, when you have a µC that can very easy count timings? You just need a few low ohmic switches (power-Mosfets or simple relais will do a great job) and one capacitor, one digital input and three digital outputs and last not least one stable resistor (piece of constantan wire).

discharge the cap charge capacitor with reference resistor up to the voltage the input recognises 1 and count the timer ticks that are going by (time 1). discharge the cap again and charge your cap via PT100 counting timer ticks (time 2) The time 1 /time 2 = R1 / R2

The rest is simple mathematics ;-) Hint, AVRs dont like floating point aritmetic. It may be easier to do fixed pont artimetic with integers. Second hint. You may select a big cap or interlace the accumulating of time 1 and time 2 using smaller a capacitor.

Marte

Reply to
Marte Schwarz

Nice, if the Pt100 can be mounted in a well-shielded area, ideally inside a grounded screen.

Temperature sensors are often used to measure temperatures of places outside of the electronics, and an average voltage across the Pt100 which can be low-pass-filtered is generally more useful.

-- Bill Sloman, Nijmegen

Reply to
Bill Sloman

Thats quite complicated. What accuracy do you need? Better use a pt1000 element. Feed from 3.3V through a 2.2k resistor and read with an ADC.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
nico@nctdevpuntnl (punt=.)
--------------------------------------------------------------
Reply to
Nico Coesel

Assuming you're in no hurry for the results, you can do a binary search using the Callendar-Van Dusen equation and get EXTREMELY good results. Just loop the evaluations for a fixed number of iterations-- it really won't take much code at all.

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

--
Yay!!!
Reply to
John Fields

That's pretty cool, but what happens when you're between values? Is the temperature constant?

George H.

Reply to
George Herold

.

The mathematical expedients here apply to any method of measuring R(t)

formatting link
.pdf

Reply to
Fred Bloggs

Il 16/11/2011 21:04, Fred Bloggs ha scritto:

Very interesting! I thanks all other friends who wrote in the thread.

Marco

Reply to
Marco Trapanese

There is something weird that bugs me about those RTD equations.... How is it possible that a different equation applies to "positive" and "negative" temperatures?

--

John Devereux
Reply to
John Devereux

formatting link

The same equation is used in the Callendar-Van Dusen equations- but one of the coefficients is different. That's a bit odd, but it's not unusual to have different equations valid over different regions.

BTW, I don't think that ADC sample code could be written in a more inefficient way. Horrible, even considering it's free.

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

formatting link

The physics of the sensor does not have any discontinuities at 0 C. The different constants are used to keep the error funnel at its narrowest around zero C.

--

Tauno Voipio
Reply to
Tauno Voipio

formatting link

But the 0 degrees C point is totally artifical, and seems to bear no relation to anything physical - unless we are talking about water which we are not!

On the Kelvin scale one equation describing the resistance of platinum suddenly takes over from another when we get to 273.15K?

Seems a bit fishy...

--

John Devereux
Reply to
John Devereux

formatting link

Would you rather have the change made at 12.3456C? 0C seems to be a pretty good place to make a "fit" change, to me (as long as there isn't a discontinuity there). Easy on the algorithm, anyway.

That just shows how "fishy" the Kelvin scale is. ;-) It would look pretty messy on the Rankin scale, too.

Reply to
krw

formatting link

To be fair they do show the way the positive model function goes pearshaped at around -20C on their graph Fig4 of errors at negative T.

Their algebra is a bit ropey too. There is no need at all for Z4 it can be divided out of the numerator terms as a constant and the problem can with care be recast in fixed point arithmetic.

BTW if your hardware has a fast integer divide then it is worth considering rational approximations to the inverse function which have smaller errors than polynomials using the same number of coefficients.

--
Regards,
Martin Brown
Reply to
Martin Brown

formatting link

Perhaps it does seem so. It's a useful division point because many applications (eg. comfort heating) only need to work above 0°C, so the simpler version can be used. The reasons are historical and practical.

The RTD resistance is specified at 0°C and 100°C. Callendar came up with an equation that used measurements at an additional (higher) point (eg. freezing point of pure Zn). That agrees very well with actual resistance over the range of 0..600°C at least (and doesn't go all squirrely outside the optimal range like typical higher order least squares polynomial fits- it's still quite good at more than

800°C). Subsequently, Van Deusen added the higher order terms to reduce the error at very low temperatures, the determination of which involves using another convenient low temperature point such as the boiling point of pure O2.

The equations are written in terms of degrees C, so the effect of all three coefficients is zero at T = 0°C-- so it's a natural place to make a transition. Kind of arbitrary, but it fits really well and is convenient (and it matches the IEC standard exactly).

BTW, if T is constrained to be >= 0° it's possible to exactly solve for T (R) using the CvD equations (Actually just C's contribution-- it's just a quadratic in T)-- so multiplications, divisions and a square root. It's also pretty close at temperatures a bit below zero, if a fudge works for you. I never get that lucky, but others might..

Reply to
Spehro Pefhany

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.