Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
A METHOD AND A SYSTEM OF DIAGNOSING CORROSION RISK OF A PIPE OR A PIPELINE IN SOIL
Document Type and Number:
WIPO Patent Application WO/2005/083392
Kind Code:
A1
Abstract:
The invention relates to a method of diagnosing corrosion risk of a pipe or a pipeline buried in soil due to DC stray currents and/or AC voltages induced in the soil. The method comprises the provision of a two-part metal probe including a first probe part having a first metal element of a first size and a first specific resistivity, the first probe part constituting an exposed element, and a second probe part having a second metal element of a second size and a second specific resistivity, the second probe part being hermetically sealed and constituting a reference element, burying the two-part metal probe in the soil, measuring the AC current flowing between the pipe or the pipeline and the two-part metal probe, measuring the AC voltage between the pipe or the pipeline and the two-part metal probe, and measuring the spread resistance based on the AC current and the AC voltage according to Ohm’s Law. The method further comprises passing a first excitation current through the first probe part and determining the voltage generated by the first excitation current across the first probe part for measuring the resistance of the first probe part according to Ohm’s Law, passing a second excitation current through the second probe part and determining the voltage generated by the second excitation current across the second probe part for measuring the resistance of the second probe part according to Ohm’s Law, storing the measurements and repeating the steps periodically. Even further, the method comprises the determination of the corrosion of the first probe part based on the measurements performed according to a mathematical corrosion algorithm, and diagnosing the risk of corrosion of the pipe or pipeline based on an empirical combination of the actual corrosion of the first probe part, the spread resistance and the AC voltage measured.

Inventors:
NIELSEN LARS VENDELBO (DK)
GALSGAARD FOLKE (DK)
Application Number:
PCT/DK2005/000142
Publication Date:
September 09, 2005
Filing Date:
March 01, 2005
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
METRICORR APS (DK)
NIELSEN LARS VENDELBO (DK)
GALSGAARD FOLKE (DK)
International Classes:
G01N17/02; G01N17/04; G01N27/04; (IPC1-7): G01N17/00
Foreign References:
US20030006148A12003-01-09
GB2064124A1981-06-10
EP0882975A11998-12-09
EP0560443A11993-09-15
EP1152235A12001-11-07
Attorney, Agent or Firm:
Nielsen, Henrik Sten (Schou & Ostenfeld A/S Vester Søgade 10, Copenhagen V, DK)
Download PDF:
Claims:
CLAIMS
1. A method of diagnosing corrosion risk of a pipe or a pipeline buried in soil due to DC stray currents and/or AC voltages induced in the soil, comprising: i) providing a twopart metal probe including a first probe part having a first metal element of a first size and a first specific resistivity, said first probe part constituting an exposed element, and a second probe part having a second metal element of a second size and a second specific resistivity, said second probe part being hermetically sealed and constituting a reference element, ii) burying said twopart metal probe in said soil, iii) measuring the AC current flowing between said pipe or said pipeline and said twopart metal probe, iv) measuring the AC voltage between said pipe or said pipeline and said twopart metal probe, v) measuring the spread resistance based on said AC current determined in step iii) and said AC voltage measured in step iv) according to Ohm's Law, vi) passing a first excitation current through said first probe part and determining the voltage generated by said first excitation current across said first probe part for measuring the resistance of said first probe part according to Ohm's Law, vii) passing a second excitation current through said second probe part and determining the voltage generated by said second excitation current across said second probe part for measuring the resistance of said second probe part according to Ohm's Law, viii) storing said measurements provided in steps iii), iv), v), vi) and vii), ix) repeating said steps iii), iv), v), vi), vii) and viii) periodically, x) determining the corrosion of said first probe part based on the measurements performed in steps vi) and vii) according to a mathematical corrosion algorithm, and xi) diagnosing the risk of corrosion of said pipe or pipeline based on an empirical combination of the actual corrosion of said first probe part, said spread resistance determined in step v) and said AC voltage measured in step iv).
2. The method according to claim 1, said first probe part and said second probe part having identical metal elements.
3. The method according to claims 1 or 2, said step x being performed in accordance with the following equation: a (t = 0)#RR(t)#RC(t=0) RC (t) RR (t=0).
4. The method according to any of the claims 13, said diagnosing of step xi) being performed in accordance with the following table : Event Active corrosion Spread resistance AC voltage Diagnose 1 no high (110Qm2) low (below No risk approx. 10V) 2 no high (110#m2) high (above No critical condition approx. but monitor spread 10V) resistance further 3 no low (0. 0010. 1Dm2) low (below No critical condition approx. but be aware of 10V) increased AC voltage 4 no low (0. 0010. 1 Dm2) high (above Risk of AC corrosion approx. incubation period 1 OV) 5 yes low (0. 0010. 1 #m2) high (above AC corrosiontake approx. mitigation actions 10V) 6 yes low (0. 0010. 1Dm2) low (below Corrosion may arise approx. from DC stray 10V) current 7 yes high (110f2mz) low (below Corrosion may arise approx. from DC stray 10V) current 8 yes high (11 ohm2) high (above Corrosion may arise approx. from DC stray 10V) current.
5. The method according to claim 4, said spread resistance being high provided the value of said spread resistance being above 0.11 Ohm and being low provided the value of said spread resistance being below 0.11 Ohm.
6. The method according to any of the claims 4 or 5, said AC voltage being high provided said voltage being higher than approximately 10V.
7. The method according to any of the claims 16, said steps 3,4, 5,6 and 7 being repeated with a frequency of one or more days.
8. A system of diagnosing corrosion risk of a pipe or a pipeline buried in soil due to DC stray currents and/or AC voltages induced in the soil, comprising: i) a twopart metal probe including a first probe part having a first metal element of a first size and a first specific resistivity, said first probe part constituting an exposed element, and a second probe part having a second metal element of a second size and a second specific resistivity, said second probe part being hermetically sealed and constituting a reference element, and having a cable for connection to an external measuring apparatus, ii) a measuring apparatus including : a housing, a cable connector for the connection of said cable of said twopart metal probe to said external measuring apparatus included within said housing, an AC current measuring circuit for measuring the AC current flowing between a pipe or pipeline and the twopart metal probe when said probe is buried in said soil, an AC voltage measuring circuit for measuring the AC voltage between said pipe or said pipeline and said twopart metal probe when said twopart metal probe is buried within said soil, a resistance measuring circuit connected to said AC current measuring circuit and said AC voltage measuring circuit for determining the spread resistance based on Ohm's Law, a current excitation circuit for passing through said cable a first excitation current to said first probe part and for measuring the voltage generated by said first excitation current across said first probe part for measuring the resistance of said first probe part according to Ohm's Law and for passing a second excitation current through said cable to said second probe part and for determining the voltage generated by said second excitation current across said second probe part for measuring the resistance of said second probe part according to Ohm's Law, storage means for storing the measurements made by said AC current measuring circuit, said AC voltage measuring circuit, said spread resistance measuring circuit and said current excitation circuit, and a diagnosing circuit for diagnosing the risk of corrosion of said pipe or pipeline based on an empirical combination of the actual corrosion of said first probe part, said spread resistance and said AC voltage.
9. The system according to claim 8, wherein said measuring apparatus including a micro processor constituting part of said AC current measuring circuit, said AC voltage measuring circuit said spread resistance measuring circuit, said current excitation circuit, said storing circuit and said diagnosing circuit and controlling the overall operation of the apparatus for periodically repeating the measurements.
10. The system according to any of the claims 8 or 9, wherein said measuring apparatus includes two or more cable connectors for establishing connections to two or more twopart metal probes.
11. The system according to any of the claims 810, wherein said measuring apparatus further includes a data connector for connecting to an external device, said external device receiving information regarding said twopart metal probe or in the alternative said two or more twopart metal probes.
12. The system according to any of the claims 811 further adapted for the performance of the method according to any of the claims 27.
13. A twopart metal probe for use in carrying out the method according to any of the claims 17 and for use in the system according to any of the claims 812 and including a first probe part having a first metal element of a first size and a first specific resistivity, said first probe part constituting an exposed element, and a second probe part having a second metal element of a second size and a second specific resistivity, said second probe part being hermetically sealed and constituting a reference element.
14. A measuring apparatus for use in carrying out the method according to any of the claims 17 and constituting a part of the system according to any of the claims 812.
Description:
A method and a system of diagnosing corrosion risk of a pipe or a pipeline in soil The present invention relates to detection of corrosion of cathodically protected, CP, buried pipelines by use of probes buried in the soil adjacent to the pipelines and electrically connected to the pipelines. More specific, the invention relates to detection of corrosion caused by the combined effect of specific soil parameters and electric fields such as DC stray current or AC voltage induced as a result of paralleling the pipeline with high voltage power lines. Such corrosion is sometimes found to proceed although measures have been taken to eliminate the corrosion effects, e. g. by imposing DC current to the pipeline by an extemal electrode and a rectifier system, or by sacrificial anodes coupled to the pipe. Usual acceptance criteria (safe/not safe with regard to corrosion) are built upon the DC potential of the pipeline, but specifically in the case of AC induced corrosion, these criteria are not reliable.

Related apparatuses and techniques are described in publications such as US 2003/006148, GB 2 064 124, EP 0 882 975, EP 0 560 443 and EP 1 152 235.

Reference is made to all of the above mentioned patent publications and all is hereby incorporated in the present specification by reference.

In a first aspect, the present invention relates to a method of diagnosing corrosion risk of a pipe or a pipeline buried in soil due to DC stray currents and/or AC voltages induced in the soil, the method may comprise: i) providing a two-part metal probe including a first probe part having a first metal element of a first size and a first specific resistivity, the first probe part constituting an exposed element, and a second probe part having a second metal element of a second size and a second specific resistivity, the second probe part being hermetically sealed and constituting a reference element, ii) burying the two-part metal probe in the soil, iii) measuring the AC current flowing between the pipe or the pipeline and the two-part metal probe, iv) measuring the AC voltage between the pipe or the pipeline and the two- part metal probe,

v) measuring the spread resistance based on the AC current determined in step iii) and the AC voltage measured in step iv) according to Ohm's Law, vi) passing a first excitation current through the first probe part and determining the voltage generated by the first excitation current across the first probe part for measuring the resistance of the first probe part according to Ohm's Law, vii) passing a second excitation current through the second probe part and determining the voltage generated by the second excitation current across the second probe part for measuring the resistance of the second probe part according to Ohm's Law, viii) storing the measurements provided in steps iii), iv), v), vi) and vii), ix) repeating the steps iii), iv), v), vi), vii) and viii) periodically, x) determining the corrosion of the first probe part based on the measurements performed in steps vi) and vii) according to a mathematical corrosion algorithm, and xi) diagnosing the risk of corrosion of the pipe or pipeline based on an empirical combination of the actual corrosion of the first probe part, the spread resistance determined in step v) and the AC voltage measured in step iv).

The two-part metal probe may be buried in the soil at or near the pipe or pipeline.

A second aspect of the present invention relates to a system of diagnosing corrosion risk of a pipe or a pipeline buried in soil due to DC stray currents and/or AC voltages induced in the soil, comprising: i) a two-part metal probe including a first probe part having a first metal element of a first size and a first specific resistivity, the first probe part constituting an exposed element, and a second probe part having a second metal element of a second size and a second specific resistivity, the second probe part being hermetically sealed and constituting a reference element, and having a cable for connection to an external measuring apparatus, ii) a measuring apparatus including : a housing, a cable connector for the connection of the cable of the two-part

metal probe to the external measuring apparatus included within the housing, an AC current measuring circuit for measuring the AC current flowing between a pipe or pipeline and the two-part metal probe when the probe is buried in the soil, an AC voltage measuring circuit for measuring the AC voltage between the pipe or the pipeline and the two-part metal probe when the two-part metal probe is buried within the soil, a resistance measuring circuit connected to the AC current measuring circuit and the AC voltage measuring circuit for determining the spread resistance based on Ohm's Law, a current excitation circuit for passing through the cable a first excitation current to the first probe part and for measuring the voltage generated by the first excitation current across the first probe part for measuring the resistance of the first probe part according to Ohm's Law and for passing a second excitation current through the cable to the second probe part and for determining the voltage generated by the second excitation current across the second probe part for measuring the resistance of the second probe part according to Ohm's Law, storage means for storing the measurements made by the AC current measuring circuit, the AC voltage measuring circuit, the spread resistance measuring circuit and the current excitation circuit, and a diagnosing circuit for diagnosing the risk of corrosion of the pipe or pipeline based on an empirical combination of the actual corrosion of the first probe part, the spread resistance and the AC voltage.

A path of communication may be established between the probe and the apparatus for enabling the apparatus to conduct measurements. The two-part metal probe and the apparatus are preferably inter-connected by a cable. The cable may be of a multi-lead type, such as a cable having two or more wires.

A third aspect of the present invention relates to a two-part metal probe for use in carrying out the method according to the first aspect and for use in the system according to the second aspect and including a first probe part having a first metal element of a first size and a first specific resistivity, the first probe part constituting

an exposed element, and a second probe part having a second metal element of a second size and a second specific resistivity, the second probe part being hermetically sealed and constituting a reference element.

A fourth aspect of the present invention relates to a measuring apparatus for use in carrying out the method according to the first aspect and constituting a part of the system according to the second aspect. The measuring apparatus according to the fourth aspect of the present invention preferably at least constitutes the entire measurement apparatus part of the system according to the second aspect of the present invention but may also constitute a limited part thereof.

Generally, instant corrosion rates are determined by applying electrochemical techniques such as electrochemical impedance spectroscopy (EIS), linear polarisation resistance (LPR) or electrochemical noise (EN) measurements.

However, since these techniques require a conducting electrolyte system e. g. a stable water phase they are not applicable in a corrosion process when water is not continuously present. Further, even though the requirements for performing electrochemical measurements are present inaccurate results may occur induced by additional current responses from redox-processes other than those involved in the particular corrosion process, which additional current responses may superimpose on the current response from the corrosion process and cause inaccurate or misleading results. In addition, the interpretation of the results of a measurement performed using one of the generally applied electrochemical techniques often require a specific expertise and knowledge of the user.

Accumulated corrosion is generally quantified by, weight loss measurements, ultra- sonic based thickness measurements, eddy-current techniques in near field and far field, magnetic flux leakage techniques or visual inspections (microscopy). In addition, a monitoring of accumulated corrosion in process plants commonly utilizes measurements of electrical resistance (ER) of a corroding metal wire placed in a probe, ER technique. All of the above mentioned techniques for determining accumulated corrosion generally require a series of measurements to be performed with regular time intervals (years, months, weeks or days) after which the individual measurements may

be compared and translated into a degree of accumulated corrosion. None of the techniques provide a fast measurement of instant rate of corrosion or in other words the resolution of these techniques is insufficient. However, thin metal plates have been incorporated in commercial ER-probes and applied in process plants to follow the efficiency of corrosion inhibitor dosage with a fairly quick response (days, weeks or months depending on the actual corrosion rate).

The electrical resistance (ER) technique often utilizes a Wheatstone bridge circuit for the comparison of the electrical resistance of a test section or coupon exposed to a hostile environment and the electrical resistance of a reference coupon protected against the hostile environment. By repeating measurement at regular time intervals, e. g. on a weekly or monthly basis, the accumulated corrosion may be followed throughout time. To achieve acceptable results from a series of measurements reflecting the degree of accumulated corrosion, the applied ER-technique must measure the resistance of the test coupon and the resistance of the reference coupon accurately. However, the resistance of the test coupon and the resistance of the reference coupon are highly temperature dependent. Consequently, the effect of temperature variations from one measurement to another will cause unwanted inaccuracies in the measurements and decreases the comparability of the individual measurements included in a series of measurements.

The probability of corrosion of buried metallic structures may be assessed from formula's found in standards such as the German standard DIN 929 or similar standards. According to the German standard, the soil aggressiveness is based on a type of soil, the soil homogeneity, the resistivity of the soil, the water content of the soil, the pH value, the buffer capacity, the sulfide concentration, the neutral salt contents, the sulfate content, as well as the location of the metallic structure with respect to ground water. A rating is assigned each of these parameters and a total rating is calculated and used for assessment of the probability of corrosion.

Since pipelines are running long distance and through a variety of soil conditions, the protection of the pipe from corrosion is necessary in order to prevent or at least delay the generation of leaks. Typically, this protection is made primarily by coating the

pipeline, which insulates the pipeline from the adjacent environment. Since coating faults and defects, such as coating pinholes or coating imperfections, are unavoidable, the pipe or pipeline is usually further protected from corrosion by applied cathodic protection. The CP or cathodic protection may be obtained either by impressed current using a rectifier and an anode bed system or by use of sacrificial anodes. The cathodic protection controls the pipe to soil potential to a safe region.

An exchange of alternating current is possible between the soil and the bare metal at coating defects on metallic structures. This applies particularly to carbon steel pipelines for which the level of AC can be significant in the proximity of high voltage electrical power lines, power stations, or traction systems.

A preliminary European Standard prEN 50162 on protection against corrosion by stray current from direct current systems is intended to offer guidance for design of direct current systems which may produce stray currents; for design of metal structures, which are to be buried or immersed, and which may be subject to stray current corrosion; and for the selection of appropriate protection measures.

Table 1 gives the criteria that should be met in order to keep the structure protected from corrosion (the protection potential describes the maximum potential, i. e. in order to keep the structure from corroding, the potential should be kept more negative than the protection potential. Medium Free corrosion Protection potential, potential V CSE (off), V CSE Water and soil Normal condition-0,65 to-0,40-0, 85 Aerobic conditions Aerated sandy soil-0, 50 to-0,30-0, 75 100<p<1000Qm Aerated sandy soil-0, 40 to-0,20-0, 65 p>1000Qm Water and soil-0, 80 to-0,65-0, 95 Anaerobic conditions

Table 1. Free corrosion potentials and protection potentials of non-alloy and low alloy Fe-materials in soil and in fresh and salt water according to the EN 12954 standard on cathodic protection of buried or immersed structures. All measured against the Cu/CuS04 (CSE) reference electrode.

According to the EN 12954 standard, structures protected against corrosion by cathodic protection should be deemed to be exposed to unacceptable stray currents if the IR free potential (off potential) is outside the protective potential range defined by EN 12954. Further, to evaluate the acceptability of stray current interference the installation of test probes and coupons should be considered. In situations with fluctuating interference current probe measurements can be used to evaluate the acceptability of interference.

It is suggested that currents measured between the pipe and the hereto connected probe during a 24 hours period should be compared with current flowing in a well protected system without stray current. Accept criteria are based on time at bad condition and the degree of the bad condition. No direct corrosion rate is measured; however weight loss coupons can be used to further verify the well-functioning of the CP system or the degree to which corrosion occurs due to DC stray current interference. Weight loss coupons are coupons that are electrically coupled to the pipe and exposed in the adjacent soil. The coupon is weighed before such exposure. After an adequate period of time (typically one year or more) the coupons is excavated and brought to the laboratory for cleaning and weighing once again. The weight loss can be used to describe the corrosion. The procedure is rather time consuming and the corrosion condition cannot be detected during the period of exposure, i. e. one has to excavate, bring coupons to the lab and analyse before the result is evident.

The American National Association of Corrosion Engineers, NACE, also provide standards that are very well respected throughout the world. NACE Standard RP0169 on control of extemal corrosion on underground or submerged metallic piping systems deals with design, installation and operation and maintenance of anticorrosion measures covering both external coating systems and cathodic protection systems.

NACE Standard TM0497 is dealing with measurement techniques related to criteria for cathodic protection on underground or submerged metallic piping systems. The cathodic protection criteria are slightly different from the EN standards defined in table 1, since three acceptance criteria can be used.

No Criterion Additional conditions and (potentials versus CSE electrode) remarks 1-850 mV or more negative on-potential Significance of the voltage drop shall be considered, e. g. by comparing historical levels of cathodic protection or soil corrosiveness with physical evidence from the pipeline to determine whether corrosion has occurred. 2-850 mV or more negative off-potential Most commonly used 3 100 mV cathodic polarization Especially useful for bare or ineffectively coated pipe and where corrosion potentials may be low (for example 500 mV or less negative) and/or the current needed to meet the negative 850 mV or more negative polarized potential would be considered excessive.

Table 2. Cathodic protection acceptance criteria according to NACE standard procedures.

A NACE standard recommended practice RP0177 on mitigation of alternating current and lightning effects on metallic structures and corrosion control systems covers personnel safety and protection of equipment rather than deals with the corrosion problem itself. This standard is therefore not considered to be relevant for the detection of AC induced corrosion, but may be useful when the problem has been encountered and measures for mitigation of the problem should be implemented.

However neither the NACE or the EN standards covers satisfactorily the AC corrosion problem. CP criteria are based on potential measurements and these are inadequate for coping with AC interference effects on corrosion.

A set of papers and guidelines that most directly focuses on the AC corrosion problem is the so-called CeoCor Booklet on AC corrosion on cathodically protected pipelines (guidelines for risk assessment and mitigation measures). In this publication, various terms and parameters are discussed regarding their applicability for the AC corrosion detection. In chapter 4 on evaluation of the corrosion risk, it is stated that the likelihood of AC corrosion can be evaluated according to either calculating the induced AC level on the pipelines (guidelines are given) or by measurements on site. According to the teachings of the invention, measurements on site are not avoided by making calculations on the level of AC induced on the pipeline, however, these calculations may come prior to the establishment of test points and equipment.

Regarding the measurements on site, the CeoCor booklet guide suggest a range of simple preliminary indicative measurements, and three specific measurements to be carried out for the purpose of evaluating AC corrosion risk. The specific measurement techniques include three methods as described in table 3. No. Parameter Method Evaluation of AC corrosion risk 1 Pipe to soil A steel coupon with known imperfect Using this measuring potential surface is installed into the soil close to technique, the pipeline the pipeline, and electrically connected is considered to the pipeline to undergo the cathodic protected from AC protection current and the AC corrosion if the interference as the pipeline under coupon to soil off investigation. The coupon will allow to potential is at any polarize. A reference electrode will be moment more placed into the soil as close as negative than the possible to the coupon, preferably protective potential integrated with the coupon. For range (table 1). measuring purposes the instant off potential (coupon to soil) may be measured by disconnecting the coupon from the pipeline, measuring the potential without IR drop. To perform the measurement automatically a measuring system may be used. This measuring system consists of an electronic recording device that reads and stores data periodically and desynchronized from the AC interferences. The devise measures the potential when the coupon is connected to the pipeline (on potential), disconnects the coupon from the pipeline then measures the off potential 1 ms after disconnecting, and connects the coupon to the pipeline again. Together with the on potential the current to the coupon is measured and recorded. Approximately 20 ms afterwards, the cycle is repeated. Due to the desynchronization of the measuring cycle from the AC interference, the measurements will be taken at any time within the AC interference period, including peak values. 2 AC current A steel coupon with known imperfect Using this measuring density surface is installed into the soil close to technique the pipeline the pipeline, and electrically connected is considered to the pipeline to undergo the cathodic protected from AC protection current and the AC corrosion if the RMS interference as the pipeline under AC current density is investigation lower than 30 A/m2. An ammeter is introduced in the connecting wire to measure the RMS value of the AC current. Small currents should be measured as the voltage drop on a resistor (1 ohm or less) or by using a zero resistance am-meter. The RMS current density is then calculated. 3 Current A steel coupon with known imperfect Using this measuring density surface is installed into the soil close to technique, if the RMS ratio the pipeline, and electrically connected AC current density to (JAC/JDC) to the pipeline to undergo the cathodic DC current density protection current and the AC ratio: interference as the pipeline under-is lower than 3 then investigation the AC corrosion risk An ammeter is introduced in the is considered to be connecting wire to measure the DC low and the RMS value of the AC current. -is between 3 and 10 Small currents should be measured as the AC corrosion risk the voltage drop on a resistor (1 ohm is considered to be or less) or by using a zero resistance medium, and further am-meter. investigation is From these values, the ratio JAc/JDc is advised. calculated.-is higher than 10 the AC corrosion risk is considered to be high and immediate mitigation measures should be taken.

Table 3. The specific measuring techniques and their interpretation according to the CeoCor AC corrosion booklet.

However, these methods are insufficient and may give false indications.

Methods 1 and 3 indicate that AC induced corrosion can be avoided by further increasing the CP dosage of the rectifier system, and this may lead directly to a worsening of the situation. Method 2 may have some reason, however, since most interference patterns involve large variations of the induced AC voltage throughout the day, the method require a logging of the data over at least a 24h period.

All three methods agree that external coupons are necessary for the evaluation procedure, but none of the methods actually measure the actual corrosion rate on said coupon.

It is further worth noticing that a term known as the spread (or spreading) resistance is defined in the CeoCor booklet. This indicates the Ohmic resistance from pipe via a coating defect to soil or alternatively the Ohmic resistance from a coupon surface to soil. It depends on the area of the coating defect (or active area of the coupon), and the resistivity of the soil present very close to the surface. Since electrolysis occurs right at the surface, the spread resistance is usually very different from the general soil resistivity further away from the surface. The spread resistance of a coupon is normally measured by inserting a large auxiliary electrode into the soil and using a modification of the Wenner four-pin method using a device as described in ASTM G 57-95A standard on soil resistivity measurements. This method provide an excitation current between the auxiliary electrode and the coupon and measures the voltage such created in the measuring circuit. The frequency of the excitation voltage is large enough to avoid polarization of the electrodes, which normally means > 90 Hz.

It is contemplated that this parameter is a very important one, and incorporates a modification of this into the invention as described below.

It is an object of the present invention to provide a novel technique of improved diagnosing corrosion risk of pipes or pipelines buried in soil to specific soil parameters, and electrical fields such as a DC stray current and/or AC voltages induced as a result of paralleling the pipeline with high voltage power lines.

It is an advantage of the present invention that the technique of diagnosing corrosion risk of a pipe or e pipeline buried in soil due to DC stray currents and/or AC voltages induced in the soil may be carried out based on a simple combination of current and voltage measurements and calculating specific resistances in accordance with Ohms's Law for determining reproducible parameters readily combinable according to an empirical scheme for diagnosing the corrosion risk.

The technique according to the present invention involves probes electrically connected to the pipeline, and an instrumentation to be installed in a standard measuring post. In a presently preferred embodiment, the instrumentation may control and store data from three such probes. The probes are buried in the soil and the electrical connection to the pipe is made in the instrumentation positioned (for instance) in the standard measuring post.

The probes constitute typically two (or more) metal elements, most often initially identical, built into an ER (electrical resistance) probe. One element (denoted hereafter the coupon element, C) is exposed in the hostile environment and diminishes in thickness due to corrosion. The resistance of the coupon element (RC) changes primarily with thickness and temperature. A second element (denoted hereafter the reference element, R) is shielded from the hostile environment, e. g. by coating. The resistance of the reference element (RR) changes primarily with temperature and the element is used for compensation of this effect. The probe is used for measurements of the corrosion rate and degree of accumulated corrosion according to procedures e. g. described in previous patent application publication number WO 01/42764.

According to a pre-programmed time schdule, the instrument wakes up and performs a series of measurements on the probe (s). Firstly, the AC current (Iclosed) flowing between the pipe and the individual probe is measured.

Secondly, one probe at a time is disconnected from the pipe, and the AC voltage between the pipe and the probe is measured (Vopen).

Thirdly, in the disconnected condition, the instrumentation measures the resistance of the (two) elements of an ER probe. Excitation current is passed through the elements, and a data acquisition system picks up the voltages generated across the elements and scales this properly into a measure of the element resistances, RC and RR. The electrical connection between the pipe and the probe is then re-established, and the instrumentation continues to address the remaining probes.

For each measurement the following data are stored: Time stamp (t), Vopen (1 to 3) (AC voltage between pipe and probe), closed (1 to 3) (AC current resulting for the AC voltage), RR (t) (channel 1 to 3), RC (t) (channel 1 to 3) All data are saved in a build-in data logging facility or transferred to a control centre.

By data processing means, the resistance values of the ER probe elements are then used to calculate element thickness at time t by a mathematical algorithm, for instance: <BR> <BR> <BR> RR (t) RC(t = 0)<BR> #(t) = #(t=0)#<BR> RC(t) RR(t = 0) where (t = 0) refers to initial probe conditions. By comparison with initial element thickness, the degree of accumulated corrosion can be calculated and from the slope of a series of measurements the corrosion rate of the element can be calculated.

Temperature drift is eliminated since both elements have the same temperature.

A specific feature of the present invention is therefore to measure corrosion on the probes directly, and not just indicative by selecting electrical parameters (as in the identified standards) that are descriptive of the potential corrosion risk.

The frequency of the electrical parameters Vopen and Iclosed are identical to the frequency AC voltage induced on the pipeline e. g. 50Hz. These parameters are used in

a diagnostic manner to determine if experienced corrosion can be attributed to induced AC voltage or DC stray currents.

The spread resistance (Rspread) of the probe is calculated simply by dividing AC voltage (Vopen) by AC current (closed). The spread resistance is a function of the probe element area, the soil conditions, and the electrolysis occurring directly at the probe surfaces due to electrochemical processes. Multiplying by area of the element, a universal diagnostic parameter can be used to characterise the local conditions at the probe surface. A very high spread resistance is indicative of either dry soil conditions or precipitations of resistive films on the surface. Both these conditions are inhibiting AC induced corrosion. A very low spread resistance is a pre-requisite for AC induced corrosion, and-in combination with high AC voltage and a measurable corrosion rate- can be used to diagnose AC induced corrosion.

A specific feature of the present invention is therefore to compare the corrosion condition or corrosion rate as measured by the ER method with the spread resistance of the probe. This spread resistance is normally measured by insertion of auxiliary electrodes and using separate instrumentation for creating an excitation current between the auxiliary electrode and the probe as described in standard ASTM G 57- 95A10 for soil resistivity measurements.

In the present invention, the spread resistance is measured simply by making use of the pipe as the auxiliary electrode and using the (on pipe) induced AC voltage for measuring the AC current and consequently determining the spread resistance in accordance with Ohm's law. The frequency is lower (here 50 Hz, 16 2/3 Hz or whatever the frequency of the actually induced AC voltage) than as used in the standard four pin Wenner concept, however, for the purpose of assessing the spread resistance in the region of interest (ranges throughout say 4 decades), a slight polarisation is allowable.

Using the frequency actually arising from the voltage on pipe, this version of the spread resistance may even become more relevant than a spread resistance measured according to standard procedures.

Accordingly, the combination of the above-mentioned parameters is very helpful and powerful in diagnosing corrosion risk on one hand and the cause of the corrosion risk on the other hand. The table gives one presently preferred guideline for diagnosing risk of AC induced corrosion. Event Active corrosion Spread AC voltage Diagnose resistance 1 no high (1-10#m2) low (below No risk approx. 1 ou) 2 no high (1-10#m2) high (above No critical condition approx. but monitor spread 10V) resistance further 3 no low (0. 001- low (below No critical condition 0.1 #m2) approx. but be aware of 10V) increased AC voltage 4 no low (0. 001- high (above Risk of AC corrosion 0. 1#m2) approx. incubation period 1 OV) 5 yes low (0. 001- high (above AC corrosion-take 0. 1#m2) approx. mitigation actions 1 OV) 6 yes low (0. 001 - low (below Corrosion may arise 0. 1dom2) approx. from DC stray 10V) current 7 yes high (1-100m2) low (below Corrosion may arise approx. from DC stray 10V) current 8 yes high (1-10dom2) high (above Corrosion may arise approx. from DC stray 10V) current Table 4.

The spread resistance values may be in the region 0. 01Q (0. 001Q) to 10Q (100Q), and the AC voltage in between 0 and several hundred volts, however, in the Danish sector, the voltage should be kept below 50 V for human safety reasons. A"high"AC voltage may be as low as e. g. 10 V.

The logging of data should be made so as to detect daily variations in the induced AC voltage, whether this is realised by logging once every hour or by logging e. g. every 24 + dt hour, where dt is an amount of time ensuring that measurements eventually are taken and stored for time stamps representing the entire day.

The signal from each of the probes may be converted from analogue to digital signals using a analogue-to-digital converter (ADC) for processing the signals in a digital processing unit such as micro controller or micro processor. ADC's are well known to persons skilled in the art and will not be discussed further.

The present invention will now be described with reference to the appended figures, wherein: Fig. 1 is a schematic representation of a measurement system according to the present invention, Fig. 2a is a schematic representation of the electrical connections in a measuring system according to the present invention, Fig. 2b is a schematic representation of the current excitation circuit in a measuring system according to the present invention, Fig. 3 illustrates a graphical user interface for displaying status of a measuring system according to the present invention, Fig. 4 illustrates a graphical user interfaces for probe configuration, Fig. 5 illustrates a graphical user interface including a summary of the set-up for each of the probes, Fig. 6 illustrates a graphical user interface displaying a summary of measured and calculated data.

Fig. 1 illustrates the schematic set-up of the measurement system according to the present invention. The measurement system 10 is placed inside a measuring post 12. Measuring posts are placed along high pressure pipelines such as illustrated by a piece of a pipeline 14 buried beneath the surface of the ground 16. As the pipelines are usually placed along high voltage power lines, the measuring post 12 may also comprise measuring instruments for measuring and monitoring the performers of the high voltage power lines.

The measurement system 10 has at least one electrical connection to the buried pipeline 14 constituted by an electrical wire 18. Buried in the ground, preferably parallel to the pipeline 14 are at least one probe and preferably three probes designated the numerals 20,22, 24.

The measuring system 10 may also be placed in a specialised post separate from the standard measuring post 12.

Fig. 2a is a schematic representation of the measurement system 10. In the presently preferred embodiment of the present invention, the measurement system 10 is electrically connected to three separate probes 20,22 and 24, each connected to a processing unit 26. In the presently preferred embodiment of the present invention, each of the sensors 20,22, 24 is not directly coupled to the processing unit 26. Each of the sensors 20,22, 24 is connected to a corresponding two wire balanced wire 28,30, 32, which ensures that external electrical noise only has a minimal influence on the electrical signal travelling through each of the wires 28,30, 32.

Each of the wires 28,30, 32 is coupled to a corresponding differential analogue to a digital converter 34,36, 38. The AD converter converts the analogue signal representing the voltage measured from each of the probes 20,22 and 24.

Each of the probes 20,22, 24 is supplied with 5 volt through a 20 ohm reference resistor 40,42, 44. The common mode current of the probe will be approximately 2.5 volt, which is within the AD converter's common mode region.

The wires 28,30, 32 may be constituted by wires having a diameter of 0.14 mm2, alternatively a diameter of 0.25 mm2. In the presently perferred embodiment of the present invention, the cables are made from a material having a specific resistance of 0.01725 ohm x mm2/m. Having a wire of the length of 30 m results in a total resistance of 7.4 ohm using a cable with a diameter of 0.14 mm2 and 4.74 ohm using a wire having a diameter of 0.25 mm2.

The circuitry shown in Fig. 2a further includes a current excitation block 46 connected to each of the AD converters 34,36, 38 through a respective high value resistor 48,50 and 52, respectively. The current excitation block 46 is further connected to a voltage reference 54.

The circuitry shown in Fig. 2a also includes a central processor constituted by a CPU designated the reference numeral 56, which is connectable to an external data logger such as a computer through an RS-232 port.

In Fig. 2b, an electronic circuitry is shown illustrating in greater details the current excitation circuit and includes identification of the various components in terms of type and value. No detailed description of the circuitry is given, as the circuitry is believed to be entirely self-explanatory.

In the presently preferred embodiment of the present invention, the measurement system 10 does not include a user interface such as a screen or display for outputting measurement results to a user. However, the system 10 includes, in the presently preferred embodiment of the present invention, a serial RS-232 port for reading out stored results from the memory of the system to an external data collecting source such as a computer.

Alternatively, the system may include other means for establishing communication between the measurement system 10 and an external data collecting source, such as a centralised surveillance system constituted by a server having a graphical user

interface with the option of surveying and controlling several measuring posts in real time or near real time.

The communication between the measurement system 10 and the data collecting source may be constituted by a GSM module, wireless or wired LAN, satellite networks or a direct connection to a publicly switch telephone network, such as a digital subscriber line or the like.

The establishment of a centralised computer network may eliminate the need for sending out personnel to each of the measurement posts. However, establishing a large data network may be more expensive depending on the existing infrastructure.

The measurement system 10 may be pre-configured from the factory, but may preferably be configured for the individual need at the specific measuring post, wherein the system is installed. For easing the configuration of the system, a graphical user interface may be installed on an external computer such as a laptop operated by a technician installing the system at a specific measuring post.

As previously discussed, the connection between the external computer, e. g. laptop, may be constituted by wires or wireless connections, such as LAN, USB, fire wire (IEEE 1394), Bluetooth, RS-232 or similar connectors and connecting methods and communication protocols obvious to those skilled in the art.

Fig. 3 illustrates a graphical user interface for displacing the status of the data logging system of the measuring system 10. The logger status window 100 displays the serial number 102 for identifying the measuring system. Also displayed is a firmware version number 104 for the technician to ensure that the latest firmware version is installed on the system.

The technician also needs to ensure that the logger time, i. e. the time registered in the embedded system in the measuring device, is correct compared to the actual time. The technician may verify this by inspecting the logger time and the PC time as indicated at the numerals 106 and 108, respectively, of Fig. 3. The window also

displays the number of data sets 110 recorded in the logger. The maximum number of data sets that may be recorded in the system at one time is limited by the amount of memory installed in the system. Presenting to the technician a number representing either the amount of free memory in kilobytes or number of data sets is displayed in the field 112 of the window 100.

As the measuring system may be powered by a battery source, an indication of the voltage available from the battery 114 is displayed. The technician may force the numbers displayed in the window 100 to be updated or refreshed by operating the button 116.

The technician operating the system may define how often the measuring system 10 should sample the probes 20,22, 24 by setting a number in the box 118 corresponding to either a number of minutes, hours, days or weeks or months. The period being selected from a drop down box 120. The technician may further choose the time when the measuring system 10 should conduct the first sampling by choosing either of the radio buttons 122 or 124.

As the system has a limited amount of memory, the technician may choose to override old data or stop logging new data when the memory has been filled with data sets. The choice may be constituted by choosing a corresponding radio button 126 or 128. In the presently preferred embodiment of the present invention, the measuring system 10 comprises 3 probes, i. e. 3 connectors for receiving signals from at least 3 probes, and the technician has an option of choosing which of the 3 connectors/probes to sample data from. The choice may be made by checking a corresponding check box 130,132 or 134.

Each of the probes selected or activated by clicking either of the check boxes 130.

132,134 may be set up in a corresponding set-up window 136,138, 140, illustrated in Fig. 4. Each of the windows 136,138, 140 comprises a probe serial number 142 indication and a probe type indication 144. The probe type 144 may determine the initial data to be filled into the boxes 146,148, 150,152 presenting respectively area, initial thickness, certificate Rr and certificate Rc. Each of the set-up windows

136,138, 140 further comprises an initial resistance data section 154 comprising data collected from each of the probes at the initiation of the system 10.

During configuration of the system, the user/technician may choose in which condition the probes are placed and on which conditions the system should conduct the calculations and determine the state of the pipe. As indicated in the box 156, the probe may be a new probe 158 possibly placed above ground and the initial resistance data may be recorded. Alternatively, the probe may be exposed to the environment and the radio button 160 should be selected. The program then uses the initial resistance data collected when the system was first configured. If no initial resistance data is available the radio button 162 may be chosen, the programme then utilise the factory data available from the prototype indication.

As the technician has configured the system using the graphical user interface of Fig. 3 and Fig. 4, the set-up may be downloaded to the system 10.

In Fig. 5, a summary of the set-up is displayed for each of the probes in the boxes 164,166, 168. As illustrated in box 168, it is indicated to the technician that no probe has been selected. In the box 170, a summary of the frequency of the logging is displayed, also an estimation of how long the system is able to log information before the memory is full is displayed.

Fig. 6 illustrates a window 172 displaying data collected from a number of probes showing the time and date in a column 174 indicating when the event occurred.

Also displayed are columns comprising the voltage 176, current 178, spread resistance 180, resistance of the two parts of the electrical resistance probe named Rr 182, Rc 184 and the remaining element thickness D 186.

The thickness of the probe is determined according to the following equation: <BR> <BR> <BR> Rc (to) RR (t)<BR> <BR> <BR> RR (to) RC (t)

The embedded software in the system 10 controls the data logging and the power control of the system as well as sampling from each of the channels each representing a probe. In the presently preferred embodiment of the present invention, the user software is implemented on a windows platform and is used for setting up the data logger by setting the sampling interval and the clock. The user software uploads data from the data logger and calculates the element thickness, i. e. the decay of the probe. The user software also exports the uploaded data into a spread sheet compatible format, so that the data may be investigated or processed in such a spreadsheet.

The user software may include calibration software for downloading embedded software into the data logger and run specific tests and calibration routines and subsequently printing out or delivering a calibration certificate.

The user software may further include test software for viewing and configuring registers in the data logger for test purposes and reading out the raw and/or calculated data contained in the data logger. It is obvious to a technician skilled in the art that the calibration and test software may be supplied in one, two or three separate software packages with different user access rights if this may be more convenient or safe.

When powered up, the datalogger (ESW) will run with the saved settings.

On power up the ESW wakes up and reads settings. If a new probe is installed no values for RR (to) and Rc (to) exist, and they first have to be measured and saved.

They are not used in the logger, but will be used later, when data are uploaded for thickness calculations.

If RR (to) and Rc (to) already exist in the setting, they will be saved with this.

On the user specified intervals the ESW wakes up by an interrupt from the Real Time Clock, performs a measurement on each of the user specified channels and measures Spread Resistance parameters (Vopen and closed).

For each measurement the following data are stored: Time stamp (t) Vopen (1 to 3) (AC voltage between pipe and probe) ''dosed (1 tO 3) RR (t) (ch. 1 to 3) Rc (t) (ch. 1 to 3) All data are saved in Non Volatile memory and ESW is returning to sleep mode.

In case of power off ESW will stop logging as long as the power is off, but the logging will continue when it is reestablished.

The logger is connected to a PC and powered up. UPSW is started and used to set up the datalogger.

The user can enter data for the each probe: Datatype Range default Channel no. (1-3) Flag in 1-3 Sequence menu Probe type name (16 Characters) Ascii blank Initial RR (to) Rc (to) (from certificate) Num 1.00-640. 00 0 Initial thickness do (gm) Num 1-1000 100 Surface area A (cm2) Num 0. 1-10 Probe serial no. (10 characters) Ascii/Num AAOOOOOOOO ZZ99999999 Probe tag. no. (8 characters) Ascii blank Probe text (80 characters) Ascii blank The probe data also includes Datatype Range de- fault Initial RR (to) Rc (to) (measured) (mo) Num 1, 00-640,00 20,00 Measurement data See paragraph on data representation Serial no. of the logger used Ascii/Num AAOOOOOOOO blank ZZ99999999 Record Date DD-MM-YYYY,-------- HH: MM

Each probe channel is set up with the parameters Log this probe (Yes or No) New probe (Yes or No). o If Yes, the no data for initial RR (to) and Rc (to) are downloaded. o If No the user can choose between RR (to) Rc (to) are copied from certificate to measured RR (to) Rc (to) Enter new initial RR (to) and Rc (to) Measurement Settings (all probes) Action on overflow (Overwrite old data or stop sampling) Start time (On next power up or specific Time) Sampling interval (1 hour to 1 month) When set up is finished, the user is given the total logging period, until memory will be full.

The Real Time Clock in the datalogger is syncronized with the PC clock when the sequence is downloaded to the logger.

Before disconnecting the datalogger from PC a"Measurement Check"can be performed to ensure that the logger is running correctly. This measurement is performed as fast as possible and is not saved as a result in the logging series.

The datalogger can now be powered off and installed on location.

The probe data are saved in a file identified by the probe serial number (probe file).

ESW can be waked up by connecting a PC to the RS232 interface. The data can be uploaded to the UPSW.

In normal upload, only one datalogging series can be uploaded.

Data can uploaded while the logging sequence is still running or in"pause"mode, but data in logger will still be labeled as"not uploaded", as soon as 1 new measurement has been performed.

On upload from a stopped logger, data will be labeled as"uploaded". Same data can be uploaded again until a new sequence is started.

A"Status"request gives the condition of the datalogger and doesn't affect the logging.

Data representation.

UPSW presents the data tabulated (and graphical).

From the raw values, that are uploaded UPSW calculates thickness (d) and Spread Resistance (Rs) for each probe. d is the remaining element thickness at time t: RC(t0) RR(t) d(t) = (#)#d0) [µm] RR(t0) RC(t) Ranges: Rc & RR : 0-640mQ d: 1-1000 im or disconnected Resolution Rc & RR: 0, 01 mQ d: 0, 1µm When the pipe has an induced AC-voltage, the resistance between the pipe and each probe (Rs) can be calculated : l 2 .. M 10. 000 c jclosed L J Ranges: Uopen : 1V-180V (RMS) Iclosed: 3µA-600mA A: 0,1-50 cm2 (Entered value) Rs : 0, 0003Q m2-1500Q m2 (R=30Q-300kQ) Resolution : Uopen : 1 mVpMS closed: µA A: 0,1 cm2 Rs : Logarithmic with 3 significant numbers (dependent on the levels of Uopen and Iclosed & A).

Logging interval: Data are as default measured and logged once every week.

Interval be set from 1 minute to 99 weeks.

Data storage: 1800 sets of data from 3 probes.

UPSW can export data in a tabulator-separated format for use in spreadsheets.

The Calibration software (CPSW) runs through a number of specific tests to verify the datalogger hardware and to certify the measurement performance.

The following tasks are to be performed

Load embedded software Test memory access Test RTC access Calibrate RR and R for Channel 1 to 3. Wait for change of reference probe by operator.

Calibrate Rs measurement for each channel.

If calibration results are within limits, save and print certificate.

All measurement data are logged in a file and can be retrieved for evaluation.

The graphical user interface, as illustrated in the figures 3-5 may be implemented on any platform such as Windows, Unix, Linux or alternatively a proprietary operating system. Further alternatively, the graphical user interface may be implemented using HTML, dHTML, XML, CGI, JAVA or any other programming language.

Annex 1 1. DIN 50 929 part 3, Probability of corrosion of metallic materials when subjected to corrosion from the outside.

2. EN 12954, Cathodic protection of buried or immersed metallic structures-General principles and application for pipelines.

3. EN 13509, Cathodic protection measurements techniques.

4. prEN 50162, Protection against corrosion by stray current from direct current systems.

5. NACE Standard RP0169-96. Standard Recommended Practice: Control of External Corrosion on Underground or Submerged Metallic Piping Systems.

6. NACE Standard TM0497-97, Standard Test Method : Measurement Techniques Related to Criteria for Cathodic Protection on Underground or Submerged Metallic Piping Systems.

7. NACE Standard RP0177-2000, Standard Recommended Practice: Mitigation of Alternating Current and Lightning Effects on Metallic Structures and Corrosion Control Systems.

8. CeoCor Booklet, AC Corrosion on Cathodically Protected Pipelines-Guidelines for Risk Assessment and Mitigation Measures. (Proc 5h International Congress, Bruxelles 2000).

9. ASTM G 57-95A (Reapproved 2001) : Standard Test Method for Field Measurement of Soil Resistivity Using the Wenner Four-Electrode Method.

10. International Patent Application, PCT/DK00/00689, publication number WO 01/42764, Method and Apparatus for Measuring Accumulated and Instant Rate of Material Loss or Material Gain, 11. General reference: Handbook of Cathodic Corrosion Protection, Theory and Practice of Electrochemical Protection Processes, 3Td edition, W. Von Baeclanann, W. Schwenk, and W.

Prinz, Editors, Gulf Publishing (1997).

Annex 2 Requirement Specification Corrosion Detector 1. Table of Contents 1. Table of Contents, 2 2. Revisions 2 3. Corrosion Detector 3 3. 1. Functional requirements 3 3. 2. User interface................................................... ..................................................... 3 3. 3. Design reQuirements................................................ ............................................. 3 3. 4. Specifications.............................................. .......................................................... 3 3.4. 1. Element thickness measurement 3 3.4. 2. Spread Resistance.................................................. ....................................... 4 3. 4. 3. Data storage..................................................... ............................................. 4 3.4. 4. Communication............................................... ............................................... 4 3.4. 5. Environment conditions 4 3. 5. Approvals 5 2. Revisions V010: 170603: Draft edition by Folke Galsgaard V020: 190603: Reviewed by Lars Vendelbo Nielsen V030: 120903: No. of probes changed to 3 Spread Resistance specifications changed.

3. Corrosion Detector "Corrosion Detector"is a datalogger for measuring the environmental corrosivity.

3. 1. Functional requirements Connection of 1 to 3 HSER (High Sensitive Electrical Resistance) probes.

Corrosion Detector is measuring the resistance of the two parts of a HSER probe named RR and Rc. A value of the remaining element thickness is calculated.

The potential between the pipe and the probes is equalized through the instrument. The spread resistances between the pipe and each probe (Rs) are regularly measured and logged.

3.2. User interface The Corrosion Detector works as a data logger. Data can be uploaded to a computer and saved as a tabulator separated file. Data analysis can be done in a spreadsheet (e. g.

Excel).

The unit of the data is % of the initial value of Rc. The values are paired with a timestamp.

3.3. Design requirements The instrument is cased in a cabinet with the dimensions LXWXH = 165X80X32mm.

The 3 probe connectors are placed in one end of the case and the power inlet and communication connector in the other.

3.4. Specificafions 3.4. 1. Element thickness measurement Remaining element thickness (d): Range: 100%-20% Resolution: 0, 1 % (1 ppt) Accuracy: 1 % (10 ppt) <BR> <BR> <BR> <BR> <BR> Specified for a probe with Rc (to) =100mQ<BR> <BR> <BR> <BR> <BR> <BR> d is the remaining element thickness compared with the initial value.<BR> <P>RC(t0) RR(t)<BR> <BR> d = (#)#100) [%]<BR> <BR> <BR> <BR> RR(t0) RC(t) Cable lenght: max. 30n 3.4. 2. Spread Resistance When the pipe has an induced AC-voltage, the resistance between the pipe and each probe (Rs) is calculated and logged with every thickness measurement.

Rs is calculated as R Uopen short Ranges: Uopen : 1V-180V (RMS) Ishort: 3µA-600mA Rs : 300#-300k# Resolution : Uopen : 1 MVRMS Isholt : 3pA Rs : Depending on the levels of Uopen and snort Examples : Uopen = 1 V, Ishort = 3µA : Rs = 333k#, ARg = 167k# Uopen = 1 V, Ishort = 6µA : Rs = 167kQ, ARs = 111k# Vopen = 1 V, snort = 100µA: Rs = lOkQ, ARs = 300# Uopen = 1 V, Ishort = 1 mA: Rs = 1 kQ, ARs = 3Q Uopen = 1 V, Ishort = 3, 3mA : Rs = 300Q. ARs = 2Q Uopen = 20 V, snort = 67 µA : Rs = 300k#, ARs = 15kQ Uopen = 20 V, Ishort = 67mA : Rs = 300D, ARs = 15mQ 3.4. 3. Data storage Update rate: Data are measured and logged once every week.

Data storage: 100 set of data from 3 probes giving approximately 2 years monitoring period.

Power supply The instrument is supplied from an external 12VDc supply, either from an adaptor or a lead battery.

Power consumption: 1W (Average) 3.4. 4. Communication RS232 interface.

3.4. 5. Environment conditions Operation temperature :-30°C to 50°C (-86°F to 122°F) Humidity: 0 to 90% RH Enclosure :) IP50 3.5. Approvals The following directives and standards will be met: EMC-requirements CE marking in accordance to EMC-directive 89/336/EEC Following the standards EN61326-1 : 1997 Electrical equipment for measuring, process confrol and laborafory use.

# Amendment A1 : 1998 to EN 61326: 1997 Amendment A2: 2001 to EN 61326: 1997 Electrical safety Low voltage directive 73/23/E#F Following the standard EN61010-1: Electrical safety When powered from a 12Vp supply no requirements in EN61010 are required.

Annex 3 Software Requirement Specification AC Corrosion Detector 1. Table of Contents 1. Table of Contents 2 Revisions 2 3. Introduction 3 4. General software specifications 3 5. Embedded software (ESW),., 4 5.1. Datalogging ............................................................ ..................................................... 4 5. 1. 1. LED indication.................................................. .............................................. 4 5. 2. Data upload ............................................................ ..................................................... 5 5. 3. Hardware description................................................. ........................................... 5 6. User PC Software (UPSW) 5 6. 1. Setting up and starting the dataloaqer 5 6. 2. Data upload...................................................... ..................................................... 6 6. 3. Data presentation 7 6.3. 1. Probe element thickness................................................... ............................. 7 6.3. 2. Spread Resistance.................................................. ....................................... 7 6.3. 3. Data storage..................................................... ............................................. 8 7. Calibration software PC software (CPSW)...................................................... .......... 8 8. Test software (TPSW) ............................................................ ........................................... 8 2. Revisions V010: 021203: Draft edition by Folke Galsgaard V020: 031203: Reviewed by LVN V030: 041203: Several changes V040: 091203: Changes after initial meeting with Ramtex V100 : 110104: Document release 3. Introduction "AC Corrosion Detector" (ACD) is a data logger for assessment of the corrosion risk along buried high-pressure gas transmission pipelines due to a combined effect of soil chemistry and electrical parameters (induced AC voltage-DC stray currents).

Connection of 1 to 3 ER (Electrical Resistance) probes.

ACD is measuring the resistance of the two parts of an ER probe named RR and Rc. A value of the remaining element thickness is calculated.

The potential between the pipe and the probes is equalized through the instrument. The spread resistances between the pipe and each probe (RS) are regularly measured and logged.

4. General software specifications The software for the AC Corrosion Detector consists of the following 4 parts.

Embedded software (ESW) Control of the datalogging including power control and sampling from each channel using a downloaded setup.

Saving"raw"data in the logger memory Upload of data via RS232 Syncronizing Real Time clock with PC.

User PC software (UPSW) 'Windows platform 'Setting up the datalogger (sampling interval, clock) Uploading data from datalogger and calculate element thickness (decay).

Exporting data in a spreadsheet compatible format.

Calibration software PC software (CPSW) Windows platform Download ESW software to datalogger Run through a specific production test and calibration Printout a calibration certificate.

Test software (TPSW) 'Windows platform Viewing and setting registers in the datalogger for test purposes.

'Readout of"raw"and cafcufated data.

Download the ESW software to datalogger The 3 PC software parts could be part of the same"package"and separated with different user access rights, if this is the most convenient.

5. Embedded software (ESW) The embedded software (ESW) shall control the data logging functions, calculate the probe data and on command transmit data to the PC. The data logging functions includes power management of the data acquisition and the CPU.

5. 1. Datalogging When powered up, the datalogger (ESW) will run with the saved settings.

On power up the ESW wakes up and reads settings. If a new probe is installed no values for RR (t0) and Rc (to) exist, and they first have to be measured and saved. They are not used in the logger, but will be used later, when data are uploaded for thickness calculations.

If RR (to) and Rc (to) already exist in the setting, they will be saved with this.

On the user specified intervals the ESW wakes up by an interrupt from the Real Time Clock, performs a measurement on each of the user specified channels and measures Spread Resistance parameters (VOpen and ldosed).

For each measurement the following data are stored: Time stamp (t) 'Vopen (1 to 3) (AC voltage between pipe and probe) ''dosed (1 tO 3) # RR (t) (ch. 1 to 3) Rc (t) (ch. 1 to 3) All data are saved in Non Volatile memory and ESW is returning to sleep mode.

In case of power off ESW will stop logging as long as the power is off, but the logging will continue when it is reestablished.

5. 1. 1. LED indication The LED indicator shall give information of the logger mode. Power up and no logging 5s 5s Power up and no logging 5 s 5 s sequence activated : RS232 connection 20 s 20 s or detected communication started Upload or download 2 s 1 s On communication Performing"Fast 0, 5 s 100 ms Until data is sent to measurement"PC Start logging 2 s 500 ms 2 min. then constant off.

5.2. Data upload ESW can be waked up by connecting a PC to the RS232 interface. The data can be uploaded to the UPSW.

5.3. Hardware description The data logger hardware is built around the Processor Renesas H8S/2239.

Detailed description of the hardware is found in the document HYPERLINK.. \Hardware\AC Corrosion Detector hardware description V100. doc 6. User PC Software (UPSW) 6. 1. Setting up and starting the datalogger The logger is connected to a PC and powered up. UPSW is started and used to set up the datalogger.

The user can enter data for the each probe: Datatype Range default Channel no. (1-3) Flag in 1-3 Sequence menu Probe type name (16 Characters) Ascii blank Initial RR (to) Rc (to) (from certificate) Num 1. 00- 0 640.00 Initial thickness do m Num 1-1000 100 Surface area A (cm) Num 0. 1-10 Probe serial no. (10 characters) Ascii/Num AA00000000 ZZ99999999 Probe tag. no. (8 characters) Ascii blank Probe text (80 characters) | Ascii | | blank The probe data also includes Datatype Range defauit Initial RR (to) Rc (to) (measured) (m#) Num 1, 00-20, 00 640, 00 Measurement data See 6.3 Data presentation Serial no. of the logger used Ascii/Num AA00000000 blank zz99999999 Record Date DD-MM-YYYY, HH: MM Each probe channel is set up with the parameters Log this probe (Yes or No) New probe (Yes or No). o If Yes, the no data for initial RR (to) and Rc (to) are downloaded. o If No the user can choose between RR (to) Rc (to) are copied from certificate to measured RR (to) Rc (to) Enter new initial RR (to) and Rc (to) Measurement Settings (all probes) Action on overflow (Overwrite old data or stop sampling) Start time (On next power up or specific Time) Sampling interval (1 hour to 1 month) When set up is finished, the user is given the total logging period, until memory will be full.

The Real Time Clock in the datalogger is syncronized with the PC clock when the sequence is downloaded to the logger.

Before disconnecting the datalogger from PC a"Measurement Check"can be performed to ensure that the logger is running correctly. This measurement is performed as fast as possible and is not saved as a result in the logging series.

The datalogger can now be powered off and installed on location.

The probe data are saved in a file identified by the probe serial number (probe file).

6.2. Data upload ESW can be waked up by connecting a PC to the RS232 interface. The data can be uploaded to the UPSW.

In normal upload, only one datalogging series can be uploaded.

Data can uploaded while the logging sequence is still running or in"pause"mode, but data in logger will still be labeled as"not uploaded", as soon as 1 new measurement has been performed.

On upload from a stopped logger, data will be labeled as"uploaded". Same data can be uploaded again until a new sequence is started.

A"Status"request gives the condition of the datalogger and doesn't affect the logging.

6.3. Data presentation UPSW presents the data tabulated (and graphical).

From the raw values, that are uploaded UPSW calculates thickness (d) and Spread Resistance (Rs) for each probe.

6.3. 1. Probe element thickness d is the remaining element thickness d(t) = RC(t0) RR(t) # d0) [µm] RR(t0) Rc (t) Ranges: R & RR : 0-640mQ d: 1-1000 um or disconnected Resolution RC & RR : 0, 01 mQ d: 0, 1µm 6.3. 2. Spread Resistance When the pipe has an induced AC-voltage, the resistance between the pipe and each probe (Rs) can be calculated : Ranges: Uopen : 1V - 180V (RMS) Iclosed 3pLA600mA A: 0,1-50 cm2 (Entered value) Rs : 0, 00032 m2-1500S2 m2 (R=30Q-300kQ) Resolution : Uopen 1 mVRMs fc) osed : 1pA µA A: 0,1 cm2 Rs : Logarithmic with 3 significant numbers (dependent on the levels of Uopen and inclosed & A).

6.3. 3. Data storage Logging interval : Data are as default measured and logged once every week. Interval be set from 1 minute to 99 weeks.

Data storage: 1800 sets2 of data from 3 probes.

UPSW can export data in a tabulator separated format for use in spreadsheets.

7. Calibration software PC software (CPSW) The Calibration software (CPSW) runs through a number of specific tests to verify the datalogger hardware and to certify the measurement performance.

The following tasks are to be performed Load embedded software Test memory access Test RTC access Calibrate RR and R for Channel 1 to 3. Wait for change of reference probe by operator.

Calibrate Rs measurement for each channel.

If calibration results are within limits, save and print certificate.

All measurement data are logged in a file and can be retrieved for evaluation.

8. Test software (TPSW) The test software shall run as the user software (UPSW) but with access to more data (raw data) and with access to setting up the some of the parameters in the datalogger.

Set up parameters ADC (1-3) set up as o Data Rate, o Input Range, 2 TBD o Delay time, o TARE DAC, o AC excitation, o number of samples (1 to 2000) o Perform Internal Zero scale o Perform Internal Full Scale calibration o Perform Externat Full scale calibration ADC (0) o Data Rate o Input Range o number of samples (1 to 5000) Force power on channel 0-3 Measurements Raw Data Vopen o ADCO (Channel 1 to 3) closed o ADCO channel 0 RR (t) o ADC 1 to 3 Rc Rc(t) o ADC 1 to 3 The logger can be set to Single step measurement sequence.

Continuously measuring as fast as possible Annex 4 AC Corrosion Detector Hardware description 1. Contents 1. Contents.................................................... ............................................................ ...... 2 2. Revisions 2 3. introduction................................................ ............................................................ .... 3 4. CPU......................................................... ............................................................ ................. 3 4 1. Memory 3 4. 2. Jumper Settings.................................................... ................................................ 3 43. Communication 4 4. 4. 1/0 ports....................................................... ......................................................... 4 5. RTC......................................................... ............................................................ .................. 9 6. AD-Converters............................................... ............................................................ ...... 10 6. 1. Setting ADC1 to ADC3 (AD7730).................................................... ........................ 10 6. 2. Measure ADC 1 - ADC 3........................................................... ............................... 11 6. 3. Settina ADCO (AD7734).................................................... .................................. 11 6. 4. Measure ADCO........................................................ ........................................... 12 6.4. 1. Channel 0 ............................................................ .............................................. 12 6. 4. 2. Channel 1-3 12 7. Power Supplies 12 71. Control of SuPplies 13 7.2. Potentials ............................................................ ....................................................... 14 7. 3. Power Monitor..................................................... ................................................ 14 8. Measurement sequence 15 9. Related documents 18 2. Revisions 090104: V100 : First issue made by Folke Galsgaard 290104: V110 : Com_Power on CPU port 72.

Memory allocation updated 3. Introduction This document describes the hardware in the AC Corrosion Detector and how it is accessed by the embedded software.

4. CPU The CPU is a Renesas H8S/2239 Operating Frequency = 8MHz 4. 1. Memory 384kB on chip Flash memory 32 kB on chip Static RAM 64 kB E2PROM (M24512) H8S/2239 normally runs in single chip operating mode (7) using on chip memory, but for emulation and debugging on chip ROM can be disabled and instead 512kB external memory addressed by setting operating mode 5.

Probe Setup and calibration data: 124 Bytes x 3 probes = 372 Bytes Measurements: R : 0, 0 to 600, 0 mQ 2Bytes RR : 0, 0 to 600,0 mQ 2Bytes 'dosed : 0, 000-700, 000mARMS 4 Bytes Uopen : 0, 00-195, OOVRMS : 4 Bytes Memory per measurement 1 probe: 12 Bytes Time stamp: 2 Bytes Power measurement 2 Bytes 1 Byte Common data 5 Bytes 1500 measurements memory space = (12x3+5) 1500 = 61500 Bytes Extra memory space: 65536-372-61500 = 3664 Bytes 4.2. Jumper Settings 0 (Jumper) 1 (No Jumper) JP1, Download/debug (FWE) See. H8S2239 manual Flash Protected section 19 0 (Jumper) 1 (No Jumper) JP2, Reset Reset (rising edge) | Release JP3 (MD2) JP4 (MD1) Boot mode Ext. PROM 0 0- 0 1 Boot mode 1 0 Mode 5, On chip ROM disabled 1 1 Mode 7, Single chip mode Table 1. JP3 and JP4 settings 4.3. Communication The E2PROM is addressed on the 12C interface and has the slave address 1010111 followed by the direction bit (R/W_).

The CPU communicates with the ADCs with SPI interface. The required transfer rates are: ADCO samples with 1008Hz giving a bitrate of 24. 2kb/s.

ADC1-3 samples with up to 400 Hz giving of bitrate of 9.6kb/s The interface is a"Clocked Synchronous Mode". The Bit Rate Register (BBR) is set to 50kb/s. For #=8MHz : n=0 og N=39.

4.4. I/O ports :, : CPU un :'>.'. . : <,.. _ : FuncfioiilSeftiri. 1 PE5/D5 O Relay2 open Opens Relay2 (H) PE5DDR=1 PE5DR=1 2 PE/D6 0 Relay3 open Opens Relay3 (H) PE6DDR=1 . PE6DR=1 3 PE7/D7 O RTS PE7DDR=1 PE7DR=1 4 PDO/D8 Data DO 5 PD1/D9 Data D1 6 PD2/D10 Data D2 7 PD3/D11 Data D3 8 PD4/D 12 Data D4 9 PD5/D13 Data D5 10 PD6/D14 Data D6 11 PD7/D 1 Data D7 12 CVCC 13 PCO/AO Address AO 14 VSS .." : ;., _,....... : :. _ . , ; .. w :.. y :'...", : i : _,.", : c :. :' : : j'. v. ; : . w.'. 4i^, ?.. . ; : : . :'. v.. :. w .. : yi :. ; 4.'-".. : ^ : : ; : ; ,' ;. -y_ ; . i. .,-_. : : : ,. w. :. :, y ; :. . 15 PC1/A1 Address A1 16 PC2/A2 Address A2 17 PC3/A3 Address A3 18 PC4/A4 Address A4 19 PC5/A5 Address A5 20 PC6/A6 Address A6 21 PC7/A7 Address A7 22 PBO/A8/TIOCA3 Address A8 23 PBl/A9/TIOCB3 Address A9 24 PB2/A10/TIOCC3 Address A10 25 PB3/A11/TIOCD3 Address A11 26 PB4/A12/TIOCA4 Address A12 27 PB5/A13/TIOCB4 Address A13 28 PB6/A14/TIOCA5 Address A14 29 PB7/A15/TIOCB5 Address A15 30 PAO/A16 Address A16 31 PA1/Al7/TxD2 Address A17 32 PA2/A18/RxD2 Address A18 33 PA3/A19/SCK2 Open Drain Power3-EN Enables Power for PA3DDR=1 ADC3 PA30DR=1 CKEO=0 CKE1=0 Cula=0 34 P10/TIOCAOIDACKO/A20 Out RESETADC Resets setected P1 ODDR=1 ADC SAEO=0 35 P11/TIOCBOIDACK1/A21 In P11DDR=0 SAE 1 =0 36 P12/TIOCCO/TCLKA/A22 Out P12DDR=1 37 P13/TIOCDOITCLKB/A23 Out P13DDR=1 38 P14/TIOCA1/lRQ0_ Out SDA SDA (I2C) P14DDR=1 In P14DDR=0 39 P15lTIOCB1/TCLKC Out SCL SCL (I C) P15DDR=1 40 P16/TIOCA2/I\R\Q\1\ Out EE-WC-E2PROM write P16DDR=1 Operations disabled (H) 41 P17lT10CB2/TCLKD Out P17DDR=1 42 AVSS 43 P97/DA1 In ., :,.-- :.., :-,, _,....., ;. : r : :. >. . :. : :. :. : : ;.... : : : : _, :. : >., : : :. : :- :. :.., :., :.,,-_ ; , : :.-.. : i ;, : : ;.....-..... :. u,..,.cti;. /Se i :.. :. : :. Pm-, :., , . CPU : ort. . : r,, r . i/. O ; <.. . Name-i, - : Function/Settrn.. 44 P96/DA0 In 45 P47/AN7 In VCC 46 P46/AN6 In 47 P45/AN5 In Input Voltage Input on ADC 0, 154 X Vinput (FS=21, 4V) 48 P44/AN4 In. 49 P43/AN3 In 50 P42/AN2 In 51 P41/AN1 In 52 P40/ANO In 53 Vref. Reference : 3, 3V 54 AVCC 55 MDO I 1 Operating mode = 56 MD1 I 1 (0 for mode 7 : Single chip 5) mode. 67 MD2 1 (0 for boot mode) 57 32. 768KHz X-tal 58 32. 768KHz X-tal 59 RESENT 60 NMI 61 STBY -62 vac 63 XTAL 64 VSS 65 EXTAL 66 FWE 68 PF7/+ Out PF7 NC PF7DDR=1 69 AS/PF6 Out AS NC Mode7 : PF6DDR=1 70 PF5/RD Out RD-Read Mode7 : PF5DDR=1 71 PF4/HWR_ Out HWR-HighWrite Mode7 : PF4DDR=1 72 PF3/L\W\RVADTRG/IRQ3-In PGOOD Interrupt when 8bit bus power stable mode (rising edge) PF3DDR=0 IRQ3SCB = 10 73 PF2/WAIT Out NC PF2DDR=1 >" :..... Name ., unc ' : llO : v : ° Narne : :'tt n Rin,.... : CPU : ort : : w,. . :-.. :' ; <v FunctioNSe Mode5 : WAITE=0 74 PF1/BACK/BUZ Out NC BUZZE=0 PF1DDR=1 Mode5 : BRLE=0 75 PF0/BREQ_\IRQ2_ In RDY_ADC Data from ADC PFODDR=0 ready IRQ2SCB = 01 76 P30/TxDO Out RS232TxD TE=1 P300DR=0 (push-pull) 77 P31/RxDO In RS232RxD RE=1 P31 ODR=0 (push-pull) 78 P32/SCK0/SDA1/IRQ4.. DTR 79 P33/TxD1/SCL1 TE=0 PowerO EN Enables Power for ICE=0 ADCO P33DDR=1 P330DR=1 (Open Drain) 80 P34/RxD1/SDAO RE=0 Power1 EN Enables Power for ICE=0 ADC1 P34DDR=1 P340DR=1 (Open Drain) 81 P35/SCK1/SLO/IRQ5 ICE=0 Power2 EN Enables Power for CKE1=0 ADC2 P33DDR=1 P330DR=1 (Open Drain) 82 P36 Power Shut D Disables VCC3V P36DDR=1 own and VCC5V (L). P360DR=1 Starts (Open automatically at Drain) power up. 83 P77/TxD3 TE=1 DIN ADC SPI data to ADC 84 P76/RxD3 RE=1 DOUT_DATA SPI data from ADC 85 P75/TMO3/SCK3 CKE1=0 SCLK SPI CLK P'ir'1-,. :. _, : po i, t.. n. u_a'...."S-. o. F'. iri : ;. : Cf ? U : : 170z. : _ : a., N 6rn cita 1 86 P74/TM02/MRES_ Out Front_LED OS3 til OSO=O P74DDR=1 87 P73/TM01/TEND1 ICS7 Out Measure DC I Control measure TEE1=0 N of DC Input OS3 til Voltage. OSO=O 0 when not P73DDR=1 measuring. 88 P72/TMOO/TENDO/CS6 Out ComPower Sets Power on TEEO=O RS232 OS3 til Communication OSO=O (L) P72DDR=1 89 P71/MRI23/TMC123/DREQ1/C Out S5 P71 DDR=1 90 P70/MRI01/TMCI01/DREQO_/C Out S4 P70DDR=1 91 PGO/IRQ6_ In RTC interrupt When this pin is PGODDR= used as an 0 external interrupt pin, do not specify other functions. 92 PG1/C\S\3) RQ7"PG1DDR= 1 93 PG2/CS2_ PG2DE) R- 1 94 PG3/CS1 PG3DDR= 1 95 PG4/CSO-Out CSO-Chip Setect PG4DDR= Extern Flash 1 96 PEO/DO 0 CS ADCO Enables ADCO PEODDR=1 and isolator (L) PEODR=1 97 PE1/D1 O CS_ADC1 Enables ADC1 PE1 DDR=1 and isolator (L) PE1 DR=1 98 PE2/D2 CS_ADC2 Enables ADC2 PE2DDR=1 and isolator (L) PE2DR=1 99 PE3/D3 O CS_ADC3 Enables ADC3 PE3DDR=1 and isolator (L) PE3DR=1 100 PE4/D4 O Relay1 open Opens Relay1 (H) PE4DDR=1 . y.. Z"-. s 1. '. ... :. np..,.., 1.. jr Pn. C ( ? U ort..' : ; I10 E ,. ;- : Name"Fuiiction7Settn'' : PE4DR=1 Table 2. Pins og Port settings on H8S/2239 5. RTC The Real Time Clock is used for making time stamps on the measurements. A Maxim/Dallas DS1339 is used.

The RTC is addressed on the 12C interface and has the slave address 1101000 followed by the direction bit (R/W_).

DS1339 can switch between the power supply and the battery back up. It can also trickle charge the battery, if a rechargeable battery is used, however in this case a Li battery is used, and this must not be charged.

The tricklecharge select (TCS) bits (bits 4-7) control the selection of the trickle charger. In order to prevent accidental enabling, only a pattern on 1010 enables the trickle charger. All other patterns disable the trickle charger. The trickle charger is disabled when power is first applied. BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 TCS3 TCS2 TCS1 TCSO DS1 DSO ROUT1 ROUTO FUNCTION X X X X 0 0 X X Disabled X X X X 1 1 X X Disabled X X X X X X 0 0 Disabled 1 0 10 0 1 0 1 No diode, 250_ resistor 1 0 1 0 1 0 0 1 One diode, 250_ resistor 1 0 1 0 0 1 1 0 No diode, 2k resistor 1 0 1 0 1 0 1 0 One diode, 2k resistor 1 0 1 0 0 1 1 1 No diode, 4k_ resistor 1 0 1 0 1 0 1 1 One diode, 4k resistor Figure 1. Trickle charge register (10h) bit values CONTROL REGISTER (OEh) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name EOSC 0 BBSQ RS2 RS1 INTCN A2IE A1IE Setting 00J00JJ Table 3. Control Register EOSC To keep the power consumption from the battery down, the Oscillator is not running until the EOSC register is set to logic 0.

BBSQI This bit must be set to a logic 1 to enable the interrupt output when Vcc is absent and the DS1339 is being powered by the VBACKUP pin.

INTCN (Interrupt Control)-This bit controls the relationship between the two alarms and the interrupt output pins. The INTCN bit must be set to logic 1, so that a match between the timekeeping registers and the Alarm 1 or Alarm 2 registers will activate the SQW/INT pin (provided that the alarms are enabled).

A1 IE (Alarm 1 Interrupt Enable)-When set to logic 1, this bit permits the A1 F bit in the status register to assert SQW/INT (when INTCN = 1). When the A1 IE bit is set to logic 0 or INTCN is set to logic 0, the A1 F bit does not initiate the an interrupt signal. The A1 IE bit is disabled (logic 0) when power is first applied.

Alarm 1 Interrupt is used for the time for next measurement.

A21E (Alarm 2 Interrupt Enable)-When set to a logic 1, this bit permits the A2F bit in the status register to assert SQW/INT (when INTCN = 1). When the A21E bit is set to logic 0 or NTCN is set to logic 0, the A2F bit does not initiate an interrupt signal. The A21E bit is disabled (logic 0) when power is first applied.

Alarm 2 is used for the regular status wake up.

6. AD-Converters 6. 1. Setting ADC1 to ADC3 (AD7730) MCLK = 4. 1952MHz Mode Register MD2 MD1 MDO Mode of Operation = 0 0 1 Continuous Conversion Mode MR12 (B/U) =1: Unipolar mode MR7 (HIREF) = 0: 2, 5V reference (nominal) M R6=0 MR5 MR4 (RN1 RNO) = 1 1 : Input Range OmV to +80 mV MR3 (CLKDIS) = 0 MR2 (BO) = 0 Filter Register FR23-FR12 (SF11-SFO) = 0111 0000 0011 (704H): Default Update Rate = 57 Hz FR11 FR10 (Zero) = 0 0 FR9 (SKIP) =0 FR8 (FAST) = 0 FR7 FR6 (ZERO) = 0 0 FR5 (AC) = 1 FR4 (CHP) = 1 FR3 FR2 FR2 FRO (DL3-DLO) = 1 1 1 1: Default Delay = 48,75µs DAC Register DR7-DR6=00 DR5-DRO=0000000 6.2. Measure ADC I-ADC 3 For both RC and RR on ADC1 to ADC3 Readout Scaling is: <BR> <BR> <BR> <BR> <BR> <BR> VIN[V]<BR> R (1LSB = 38, 147n# @ 80mV range)<BR> <BR> <BR> <BR> 0, 125A Sample 1000 dataset (17, 5s). Calculate Average value 6.3. Setting ADCO (AD7734) MCLK = 6.144MHz t/0 Port Register 107 106 (PO P1) : Read PO and P1 levels IO5 IO4 (P0DIR P1DIR) = 1 0: PO output and P1 input 103 (RDYFN) = 1 : RDY on enabled channels 102 101 = 0 0 100 (SYNC) = 0: No SYNC operation Channel Conversion Time Register CT7 (Chop) = 0: Chopping Disabled CT6-CTO (FW) = 5Ch: Default Update Rate = 1008Hz Mode Register MD7 MD6 MD5 Mode of Operation = 0 0 1: Continuous Conversion Mode MD4 = 0 (CLKDIS) MD1 (24/16 BIT) = 1: 24 bit mode MDO (CLAMP) = 0: Channel Setup Register CH7 CH6 CH 5 = 0 0 0 CH4 (Stat OPT) = 0: Status register of RDY CH3 (ENABLE) = 1: Channel in continuous conversion mode CH3 = 0 CH1 CHO (RNG1 RNGO) =0 0: Range 10V 6.4. Measure ADCO 6.4. 1. Channel 0 For Iclosed on ADC0 channel 0 Readout Scaling is: <BR> <BR> <BR> <BR> Vin[V]<BR> <BR> <BR> Iclosed = ; (LSB = 238nA @ ~10V range)<BR> 5[#] Sample 4000 dataset (4s).

Calculate RMS Value.

6.4. 2. Channel 1-3 For Uopen on ADCO channel 1-3 Readout Scaling is: = 27. 6#Vin ; (LSB = 32, 92µV @ ~10V range) Sample 4000 dataset (4s).

Calculate RMS Value.

7. Power Supplies The board is supplied from an external 12V DC. Except from 3. 3VAllways (and 5Vallways) all the supplies can be controlled by the CPU.

The supplies interacts as follows : --R-' :- 1. n ; 4 :'_. uq, F. : ?'7'4 : t. :, S'v. u ;. -''. i. .. _3. : :-r : _ ; . -,. -7 : va- : . Nameeiw : CPU : IF ;. Characteritics : Su^ lies. :. : _ 4 ; :. :, : ; _ 12Vdc in 12V, Status . Externai DC 5Vcom 3, 3Vcom 5Vallways'3, 3Vallways (In) input 3, 3V Linear regulator CPU RS232 EEPROM aiways in IPM6220 5V Linear regulator always in IPM6220 :. 3, 3Vcom Power-Shut Non-isolated Digital Down switched DC/DC Isolation1 converter (Buck)-4 (P36) (primary side) 5Vcom Non-isolated 7Vo-7V3 Probe switched DC/DC relays # converter (Buck) 1-3 7Vo PowerO EN Isolated non-5Vo regulated switched DC/DC converter 7V1 Power1 EN As 7Vo 5V1 7V2 Power2 EN As 7Vo 5V2 7V3 Power3 EN As 7Vo 5V3 5Vo PowerO_EN Linear regulator Digital ADCO IsolationO (AD7734) (seconda ry side) 5V Power1_EN Linear regulator Digital ADC1 Excitation Isolation1 (AD7730) probe 1 (seconda ry side) 5V2 Power2 EN Linear regulator Digital ADC1 2 Excitation Isolation (AD7730) probe 2 2 (seconda side 5V3 Power3 EN Linear regulator Digital ADC3 Excitation Isolation (AD7730) probe 3 3 (seconda ry side) Table 4. Interactions between supplies 7. 1. Control of Supplies The CPU is supplied from 3,3V always supply. This is present as long as the DC input is powered. The CPU can control the other supplies.

Main Power Main Power (3,3Vcom and 5Vcom) can be turned off setting the"Powershutdown"port to a 0. Setting the port to a 1 turns on Main Power.

The main power gives a PGOOD (IRQ3) when it is ready. Start time for this power is approximately 25ms.

Isolated Power supplies The Main Power must be turned on before any of the Isolated Power supplies are turned on.

Only one of the isolated power supplies must be turned on at a time.

Setting Power3 EN to a 1 turn on the power to the ADC3. Setting Power3_EN to a 0 turn off the power to the ADC3 Setting Power2 EN to a 1 turn on the power to the ADC2. Setting Power2_EN to a 0 turn off the power to the ADC2 Setting Power1_EN to a 1 turn on the power to the ADC1. Setting Power1EN to a 0 turn off the power to the ADC1 Setting PowerOEN to a 1 turn on the power to the ADCO. Setting PowerO_EN to a 0 turn off the power to the ADCO After start of each power supply, and delay time of 100 ms must be kept to ensure that the supply is stable, before a measurement starts.

The measurement sequence including power control is listed in Chapter 8.

7.2. Potentials In order to have a corrosion that is representative to the corrosion in the pin holes of the gas pipe, the 3 probes must be kept at the same potential as the pipe most of the time.

This is done by 3 relays when they are not asserted (Normally Closed). When measuring the resistance of the 2 elements in each probe, the relay is opened, and the input channel (ADC1-4) is floating.

Spread Resistance is measured by ADCO, and this is referring to the potential of the pipe.

Measuring the 2 parameters Vopen and) dosed is done on each probe by opening the relay to the probe and measuring Vopen for this probe on the ADCO channel 1 to 4. c ! osad ! s measured on ADCO channel 0. The relays decides on which probe Idosed is measured. The 2 other relays must be open at this stage.

The CPU and RS232 are at all times isolated from all the 4 ADC channels and the pipe.

7. 3. Power Monitor The Input power can be measured at the AN5 ADC on the CPU. In order to reduce power consumption, this input has to enabled for reading and disabled again. Setting "Measure_DC IN"at P73 to a 1, enables the monitor. Setting the port to a 0 disables the monitor.

The Inputsignal on AN5 must be scaled to: VDC in = 6. 49 x VAN5 8. Measurement sequence The normal measuring sequence is as follows : Wake from sleep mode on interrupt from RTC.

Enable Power monitor Wait 1 ms Read Power Monitor Disable Power Monitor Enable Main Power Wait for PGOOD (25 ms) Open Relay1 Open Relay2 Open Relay3 Enable PowerO Wait 100 ms Setup ADCO Measure ADCO channel 1 (open) Close Relay1 Wait 100 ms Setup ADCO -Measure ADCO channel 0 () 1 dosed) Open Relay1 Wait 100 ms Measure ADCO channel 2 (V2open) Close Relay2 Wait 100 ms Setup ADCO Measure ADCO channel 0 (12dosed) Open Relay2 Wait 100 ms Measure ADCO channel 3 (V3ppen) Close Relay3 Wait 100 ms Setup ADCO Measure ADCO channel 0 (I3closed) Open Relay3 Disable PowerO Enable Power1 Wait 100 ms Setup ADC1 Internal Full scale calibration ADC1 Internal Zero scale calibration ADC1 Measure ADC1 channel 2 (R1R) Measure ADC1 channel 1 (R1c) Disable Power) Enable Power2 Wait 100 ms Setup ADC2 Internal Full scale calibration ADC2 Internal Zero scale calibration ADC2 Measure ADC2 channel 2 (R2R) Measure ADC2 channel 1 (R2c) Disable Power2 Enable Power3 Wait 100 ms Setup ADC3 Internal Full scale calibration ADC3 Internal Zero scale calibration ADC3 Measure ADC3 channel 2 (R3R) Measure ADC3 channel 1 (R3c) Disable Power3 Close Relay1 Close Relay2 Close Relay3 Save data Set RTC Alarm register Enable RTC Interrupt (IRQ6) Shut down Main Power Go to sleep mode 9. Related documents .. \Software\Software Requirement Specification V010. doc .. \Requirement specification V030. doc .. ..\Design specifikation V031. doc Calculations\Dimensionering Corrosion Detector V040. doc Annex 5 Translation into English of text in screen printout of Fig. 4 : This is an ER probe which is suitable for measurings on gas pipes (77 chr)