Wednesday, May 22, 2013

Resistance Temperature Detectors for outside temperature probe


Check our Free and Open source Android App in this link.

Looking for a sensor to use within a OAT probe I've chose a duplex PT 1000.


Figure 1 My DIY Outside Temperature Probe fitted on my DIY air data boom
The resistance of this components is dependent of the temperature, commonly is called a resistance temperature detector or briefly RTD.
Usually this sensor is capable to achieve better accuracy than thermocouples and is more stable of thermistors(look standard precision classes ), a common type of sensor is the PT1000. Pt stand for platinum that is/was the main component of the sensor, 1000 state the resistance in ohm that the sensor have at 0°C. The temperature range that can be covered with RTD is a subset of that achievable with thermocouples for example -200°C to 650°C.
The aspect that convinced my was the good time stability and the wide availability, and of course low cost.
Usually the sensing element is packed into a stainless steel sheath filled with magnesium oxide, that is a very rugged construction and also waterproof; see the following picture for my implementation.


Figure 2  Thermoelement stainless stell sheath, extension wires and magnesium oxide exposed

Common commercial sheath diameters are 3,6 and 8 mm, in the same sheath also a backup sensing element can be included, it's commonly called duplex configuration; it's less used but there is also a tripple sensor configuration.
For my application I've selected a duplex PT1000 element with a 6 mm stainless steel sheath, the sensing element was rated IEC 60751 class A (also DIN 43760) so uncertainty(only for the sensor) will be assumed, referring to IEC60751 standard, to be ±(0,15+0,002T)

The non trivial part of the usage of RTD is to have a good interface circuit, in the industry are often utilized head mount temperature transmitters or similar rail mounted devices. This devices can have really good performancesr but they are a little oversized and not customizable for our typical DIY application. The point here is to use a circuit that can compensate for unknown, and temperature dependent, connection resistance caused by connection leads wires; neglecting this resistances will lead to errors than can easly have a magnitude greater than 1 °C.
Wheatstone bridge circuit can do the job, however is not so easy to implement in a typical low cost microcontroller layout. After doing some research I found this rtd drive integrated circuit in a single chip is present almost everything you need for a good insulated interface, the application circuit have a really low part count and a SPI digital interface;many different products are available from different producers. Final accuracy of my assembled measure chain is assessed to be around 0,6°C in the range -10°C to 50°C; this accuracy can be increased by calibration of the whole system. Calibration consist in comparing the readings of our system with another reference system and correct the theoretical correlation between resistance and temperature, this procedure is usually carried out by calibration laboratories but if we have a reference PT100/PT1000 can be carried out also in a DIY manner.

An important aspect to check is the current that flows in the measuring element, this current dissipate a power equal to i^2R; currents that exceed 10mA can seriously affect the measure, I advise to keep the current below 0.5mA. Integrated circuit designer have already considerated this kind of problems. It's wise to provide an insulation mechanism.
I've chose a PT1000 to have a higher sensitivity, respect to PT100,  thereby a variation of 1°C in temperature induce a change of approx 3,9 ohms in the PT1000; this choice have also a drawback, the PT1000 is more sensitive to thermalnoise and self heating. To have some reference value you can find a datasheet for a precision RTD at this link
Quoting the datasheet
"The combination of the right measurement method and the excellent physical properties of platinum enables the achievement of an excellent accuracy (which can be less than 0,03°C, depending on the sensor used. In addition Platinum sensors have an excellent long-time stability, reproducibility and inter- exchangeability.
Working to the level described here above is not typical, and exceed every typical DIY project requirements, anyway it report the RTD potential.

The correlation between RTD resistance and temperature is not linear but follows the Callendar-Van Dusen equation. In many industrial applications the curve is linearized to avoid the need for equation inversion, although this approach lead to increased reading error for some type of applications and temperature ranges can be aceptable.
You can find a Callendar-Van Dusen scilab implementation here , for resistance values less than 1000 ohm it's used an iterative Newton method.
This implementation can be easly ported to many microcontrollers, I've used that routine on a Fox Board G20
If you are interested on the probe body you can get a 3D print here

JLJ
www.basicaridata.eu

Monday, May 6, 2013

Pneumatic lag issues


Have a look to this pitot simulation block


Some time ago at the airfield playing around with a pressure sensor  with sample rate of 50 Hz I noticed a really poor unexpected performance of my carbon fiber Pitot. You know, the measure system is quite simple, one digital pressure sensor connected to an Arduino board, two pressure lines , the static pressure port and the total pressure port. I ended the post fly analysis with a sole sure fact, I haven't a math model for the pneumatic transmission line. I needed such a model to calculate the relationship between the amplitude of the port pressure and the pressure at sensor at different frequencies, syntetically I needed the transfer function. With a transfer function it is straightforward to determinate the overall measurement system performance and even compensate for undesired transmission line behavior. Refer to the below figure 1 for the schematics of a pneumatic line.


Figure 1 Pneumatic line layout

Input pressure cannot be present at the very same time at the pressure port and at the sensor port, it take some time for the pressure wave to propagate trough the transmission line.
At last I found a text where the authors integrated the Navier-Stokes equations to achieve a closed form solution, from now on I will proceed according to reference [7] that you find at this link.
Is very important to considerate the model assumptions, here below  the list from [7] pag 7

Length/Radius >> 1
Variable nominal values variations are small
Laminar flow inside the tubing

To get a numeric example let's pretend we have the following, possible,  parameters values

Internal radius R of line [1 ; 2 ; 3] mm
Length of pressure line L 0,6 m
Volume of the sensor Vu 50e-9 mm^3

Let's consider now three different cases from the same base design, only variable is the line internal radius R, results plotted in the decimal scaled graphic below.



Figure 2 Frequency response of pneumatic line

You can download the scilab source here

By inspection of the figure it's correct to assert that if the radius increase the frequency of resonance is increased too, with a wider transmission line volume the pressure transmission and the resonance have a higher magnitude. Without correcting our sensor readings we can use only frequencies that have a gain equal to unity, so it's clear that transmission lines can have a heavy impact on the performance, according to figure 2 we can use safetly frequencies under 15 Hz.
During the use of an instrument in non steady conditions the frequency of pressure variation at pressure ports should be considerate, if not you probably will waste resources using better sensors of pressure and have poor results. Operating with a wider bandwidth may have some drawback, the first of all is some degree of increased vulnerability with respect to unwanted pressure oscillations due to buffeting or eddies.
In figure 1 schematics the transmission line have a constant diameter, by experience, that it's more common to have at last one variation in the line diameter, this case is well covered by papers and maybe worth a future post.
Reference [7] have a plethora of figures that illustrate different cases, also the conclusion section is quite clear and concise, of course it worth the time to read through it.
So at the end the problems that I've got in the past can be explained, and some times avoided, taking into account the dynamic of the pneumatic line.

JLJ

www.basicairdata.eu