Abstract:
The present invention relates to a permanent magnet suitable for a magnetic angle encoder. The permanent magnet has an annular cylindrical structure and comprises a first permanent magnet unit and a second permanent magnet unit. The first permanent magnet unit and the second permanent magnet unit are geometrically symmetrical with respect to a diametral cross section. The magnetisation intensity of the first permanent magnet unit and the magnetisation intensity of the second permanent magnet unit are parallel to the axial direction of the annular cylinder and are in opposite directions, or the magnetisation intensity of the first permanent magnet unit and the magnetisation intensity of the second permanent magnet unit are perpendicular to the diametral cross section and are parallel to one another and in the same direction.

Description:
TECHNICAL FIELD 
       [0001]    The present invention relates to a type of permanent magnet used for positional measurements, in particular, to a permanent magnet suitable for use in magnetic angle encoders, and instrumentation such as an electronic water meter that utilizes a magnetic angle encoder. 
       BACKGROUND 
       [0002]    With the rapid development of sensor technology, the traditional mechanical flow meter, such as a residential water meter, has been gradually transitioning to a new electronic form. To this end, various sensor technologies have been employed, including optical encoder technology, which can be used to build an absolute angle encoder to enable the production of a direct read or absolute encoder water meter, which does not require an incremental encoder, to measure the amount of liquid flowing through the water meter. Unfortunately this technology suffers from digital errors, resulting from bubbles, light, dirt, leakage and other factors. Compared with optical encoder technology, magnetic encoding technology has higher resolution, no digital error phenomenon, good stability, and can completely eliminate the faults inherent in photovoltaic technology. Magnetic angle encoder technology is a good choice for a direct read water meter, and a good implementation uses magnetoresistive sensors such as tunneling magnetoresistive angle sensors to sense the rotation angle of a magnetic field produced by a cylindrical ring permanent magnet mounted on the counting wheels, such that the angle of the field represents the value of the wheel, and the angle signal from the sensor is converted to a digital readout using simple electronic components. 
         [0003]    Magnetic angle measurement accuracy depends on the performance characteristics of two components of a magnetic angle encoder, and these are the magnetic sensor and the permanent magnet. Compared with Hall sensors, magnetoresistive sensors such as tunneling magnetoresistive sensors have better magnetic field sensitivity, lower power consumption, and smaller size. A tunneling magnetoresistive angular displacement sensor may comprise two mutually orthogonal tunneling magnetoresistive sensors. The tunneling magnetoresistive angle sensor produces two outputs from the magnetic field of the rotating permanent magnet, representing the sine and the cosine of the orientation angle φ of the magnetic field generated by the permanent magnet, and these components can be used to calculate the angle using the following relationships: 
         [0000]      OUT1=COS(φ)
 
         [0000]      OUT2=SIN(φ)
 
         [0004]    The inverse tangent function can then be used to calculate the angle φ of the rotating magnetic field from the magnetoresistive angle sensor outputs OUT1 and OUT2: 
         [0000]      φ= A TAN(OUT2/OUT1).
 
         [0005]    When the permanent magnet rotates by angle α, the magnetic field produced by the permanent magnet passes through and is detected by the tunneling magnetoresistive sensors located a point defined by r and an angle. When the angle of the magnet α and the angle of the magnetic field φ form a linear relationship in the range of 0˜360°, then the angle φ of the magnetic field detected by the tunneling magnetoresistive sensor represents the mechanical angle α of the permanent magnet. When for example, the 10 positions on a counting wheel are represented by numbers 0-9 on the circumference of the wheel and spaced in 10 equal angular increments, defined by dividing the range of α0 into 10 intervals, then each angular interval represents a specific digit. In this manner by combining a permanent magnet angle encoder with electronics to transform the signals into an appropriate output format, a direct read water meter may be realized. 
         [0006]    When tunneling magnetoresistive angle sensor encoder technology is applied to electronic water meter design there will be special performance and design requirements for the permanent magnets, which are difficult to meet with existing magnetic encoder technology due to the following issues:
       (1) Existing magnetic angle encoders mostly use Hall sensors to detect the magnetic field generated by the permanent magnet that is perpendicular to the surface of the sensor, and tunneling magnetoresistive sensors detect the magnetic field component parallel to the surface of the sensor, so existing permanent magnet designs are not compatible with the tunneling magnetoresistive sensors.   (2) The existing permanent magnets used for magnetic angle encoders are usually a solid cylindrical design, and this is not compatible with the counting wheels used in typical water meters since the counting wheels are mounted on an axle that needs to pass through the center of each wheel and thus through the magnets.       
 
       SUMMARY OF THE INVENTION 
       [0009]    The purpose of the present invention is to overcome the above drawbacks of the prior art in order to provide a suitable permanent magnet for a magnetic angle encoder, so that it can be installed within the counting wheel of an electronic water meter, while minimizing space and satisfying the requirements of tunneling magnetoresistive sensors, such that the rotating magnetic field component near the inner surface of the rotating permanent magnet has an angle φ that is linearly related to the physical rotation angle α of the permanent magnet, thus improving the angle measurement accuracy of the magnetic encoder. 
         [0010]    According to one aspect of the present invention, in order to provide a suitable permanent magnet for the magnetic angle encoder, the permanent magnet has an cylindrical ring structure, comprising a first permanent magnet unit and a second permanent magnet unit, the first permanent magnet unit and a second permanent unit are located on opposites sides of a diametral the cross-section, and the permanent magnet diametral cross-section is defined by the outer diameter and the axial length of the permanent magnet. 
         [0011]    The first permanent magnet unit&#39;s magnetization and said second permanent magnet&#39;s magnetization are polarized in a direction along the axial direction of the permanent magnet, but they are aligned in opposite directions, or, 
         [0012]    Said first and second permanent magnet units have their magnetization directions aligned perpendicular to a diametral cross-section of the permanent magnet in the same direction. 
         [0013]    Preferably, the magnetization magnitude of the first and second permanent magnet units is the same value. 
         [0014]    Preferably, the outer diameter of the cylindrical permanent magnet ring structure is 3-200 mm. 
         [0015]    Preferably, the inner diameter of the cylindrical permanent magnet ring structure is 1-100 mm. 
         [0016]    Preferably, the axial length of the columnar structure of the cylindrical ring permanent magnet is 1-50 mm. 
         [0017]    Preferably, the circular faces at the ends of the cylindrical ring permanent magnets are positioned parallel to a detection plane. 
         [0018]    Preferably, the distance between the detection plane and the circular end surface of the cylindrical ring permanent magnet is in the range of 1-5 mm. 
         [0019]    Preferably, the magnetic field of the permanent magnets has a component parallel to the detection plane. 
         [0020]    Preferably the detection plane is located at the inner surface of the permanent magnet at a radial distance from the rotational axis, such that the magnetic field components in this detection zone define an angle that is linearly proportional to the physical rotation angle of the permanent magnet. 
         [0021]    Preferably, the permanent magnet is composed of Alnico. 
         [0022]    Preferably, the composition of the material, the permanent magnet is a ferrite ceramic material MO6Fe 2 O 3 , where M is Ba, Sr or combinations of both. 
         [0023]    Preferably, the permanent magnet is composed one or more of the following materials categories including RECo 5 , where RE=Sm and/or Pr; RE 2 TM 17 , where RE=Sm, TM=Fe, Cu, Co, Zr and/or Hf; and RE 2 TM 14 B, where RE=Nd, Pr, and/or Dy, TM=Fe and/or Co. 
         [0024]    Preferably, the permanent magnet is composed of an alloy containing NbFeB or FeCrCo. 
         [0025]    More preferably, the permanent magnets are comprised of permanent magnet powder embedded in plastic, rubber, or a resin composite. 
         [0026]    The present invention has the following beneficial effects:
       1) the cylindrical ring permanent magnet structure is simple and can be embedded directly into existing counting wheel structures, saving space.   2) the cylindrical ring permanent magnets used in the present invention comprise two simple permanent magnet units, and the magnetization configuration is easy to implement.   3) the cylindrical ring permanent magnets used in the present invention produce a magnetic phase angle in the detection plane that is linearly related to the mechanical rotation angle of the permanent magnet, as required when using magnetoresistive sensors to detect the magnetic field orientation.   4) the cylindrical ring permanent magnets used in the present invention allow the distance from the end face of the permanent magnet to the detection plane within a specific area of the detection plane to vary over a wide range, so that the performance of the tunneling magnetoresistive sensor is less sensitive to the precise position of the sensor.   5) the magnetic angle encoder of the present invention implemented as a water meter permits smaller size and better measurement accuracy.       
 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0032]      FIG. 1  is a top view of the permanent magnet of Example 1 of the present invention. 
           [0033]      FIG. 2  is a Cross-sectional side view of the permanent magnet shown in  FIG. 1 . 
           [0034]      FIG. 3  is a top view of the permanent magnet of Example 2 of the present invention. 
           [0035]      FIG. 4  is a Cross-sectional side view of the permanent magnet shown in  FIG. 3 . 
           [0036]      FIG. 5  shows the relative position of a tunneling magnetoresistive sensor with respect to the permanent magnet of the present invention. 
           [0037]      FIG. 6  shows a side cross-sectional view of the relative position of a tunneling magnetoresistive sensor with respect to the permanent magnet of the present invention. 
           [0038]      FIG. 7  shows the vector magnetic field distribution in the sensing plane of the permanent magnet design given in Example 1. 
           [0039]      FIG. 8  shows the linear relationship between the magnetic angle φ detected in the detection plane and the rotational angle α permanent magnet for the rotating magnet of Example 1. 
           [0040]      FIG. 9  shows a case with non-linear relationship between the magnetic angle φ detected in the detection plane and the rotational angle α permanent magnet for the rotating magnet of Example 1. 
           [0041]      FIG. 10  shows another case with non-linear relationship between the magnetic angle φ detected in the detection plane and the rotational angle α permanent magnet for the rotating magnet of Example 1. 
           [0042]      FIG. 11  shows the Bxy magnetic field magnitude at the detection plane as a function of permanent magnet rotation phase angle α for example 1. 
           [0043]      FIG. 12  shows the fit parameter R 2  for the linear fit to the magnetic angle φ detected in the detection plane and the rotational angle α permanent magnet for the rotating magnet of Example 1 as a function of the relative position of the tunneling magnetoresistive sensor from the rotation axis, r/R o . 
           [0044]      FIG. 13  shows the normalized magnetic field component detected by the tunneling magnetoresistive sensor as a function of relative distance r/R o  from the rotation axis of the permanent magnet defined in example 1. 
           [0045]      FIG. 14  shows the vector magnetic field distribution in the sensing plane of the permanent magnet design given in Example 2. 
           [0046]      FIG. 15  shows the linear relationship between the magnetic angle φ detected in the detection plane and the rotational angle α permanent magnet for the rotating magnet of Example 2. 
           [0047]      FIG. 16  shows a case with non-linear relationship between the magnetic angle φ detected in the detection plane and the rotational angle α permanent magnet for the rotating magnet of Example 2. 
           [0048]      FIG. 17  shows another case with non-linear relationship between the magnetic angle φ detected in the detection plane and the rotational angle α permanent magnet for the rotating magnet of Example 2. 
           [0049]      FIG. 18  shows the Bxy magnetic field magnitude at the detection plane as a function of permanent magnet rotation phase angle α for example 2. 
           [0050]      FIG. 19  shows the fit parameter R 2  for the linear fit to the magnetic angle φ detected in the detection plane and the rotational angle α permanent magnet for the rotating magnet of Example 2 as a function of the relative position of the tunneling magnetoresistive sensor from the rotation axis, r/R o . 
           [0051]      FIG. 20  shows the normalized magnetic field component detected by the tunneling magnetoresistive sensor as a function of relative distance r/R o  from the rotation axis of the permanent magnet defined in example 2. 
           [0052]      FIG. 21  shows a schematic diagram of an implementation of an electronic water meter. 
       
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0053]    The figures and specific examples provided below will be used to describe detailed embodiments of the present invention. 
       Example 1 
       [0054]      FIGS. 1 and 2  show schematic drawings of an embodiment of the permanent magnet  100  according of the present invention. The permanent magnet  100  has cylindrical ring geometry, and it is comprised of a permanent unit  101  and a permanent magnet unit  102 , wherein permanent magnet unit  101  and permanent magnet unit  102  are symmetrically arranged about diametral cross-section  110 . The magnetization directions  103  and  104  of permanent magnet units  101  and  102  are oriented in antiparallel directions along the axis. Preferably, the magnetization  103  of the permanent magnet unit  101  and the magnetization  104  of permanent magnet unit  102  have the same magnitude. 
         [0055]    Those skilled in the art can design the permanent magnet  100  into any desired size. Preferably, the permanent magnet  100  is a cylindrical ring with inner diameter 1-100 mm, outer diameter of 3-200 mm, and has an axial length of 1-50 mm. 
         [0056]    The detection plane  120  is located adjacent and parallel to the end face or permanent magnet  100 . 
         [0057]    Preferably, the detection plane  120  is separated from the the end surface of the cylindrical ring by a distance of 1-5 mm. In this patent, the permanent magnet  100  produces a magnetic field component  121  in the detection plane  120 . Herein, the portion of the detection plane  120  corresponding to the particular detector region  122  located within a certain radial distance from the axis, in particular the magnetic field components  121  within this detection area will have an angle that varies linearly with respect to the angle of the permanent magnet  100 , which will be specifically described hereinafter. 
         [0058]    Preferably, the composition of the permanent magnet material  100  is Alnico. Alternatively, the composition of the permanent magnet  100  is a ferrite ceramic material such as MO.6Fe 2 O 3 , M is Ba, Sr or combinations of both. Alternatively, the composition of the permanent magnet  100  is RECo 5, RE=Sm and/or Pr; RE 2 TM 17 , RE=Sm, TM=Fe, Cu, Co, Zr and/or Hf; or RE 2 TM 14 B, RE=Nd, Pr, and/or Dy, TM=Fe and/or Co. Alternatively, the permanent magnet material  100  composed of an alloy of NbFeB or FeCrCo. Alternatively, the permanent magnet  100  is composed of the permanent magnet powder embedded in plastic, rubber, or resin composite. 
       Example 2 
       [0059]      FIGS. 3 and 4  show schematic drawings of another embodiment of the permanent magnet  300  of the present invention. The permanent magnet  300  has cylindrical ring geometry, and it is comprised of a permanent unit  301  and a permanent magnet unit  302 , wherein permanent magnet unit  301  and permanent magnet unit  302  are symmetrically arranged about diametral cross-section  310 . The magnetization directions  303  and  304  of permanent magnet units  301  and  302  are oriented along a diameter in the same direction. Preferably, the magnetization  303  of the permanent magnet unit  301  and the magnetization  304  of permanent magnet unit  302  have the same magnitude. 
         [0060]    Those skilled in the art can design the permanent magnet  300  into any desired size. Preferably, the permanent magnet  300  is a cylindrical ring with inner diameter 1-100 mm, outer diameter of 3-200 mm, and has an axial length of 1-50 mm. 
         [0061]    The detection plane  320  is located in front of and parallel to the end face or permanent magnet  300 . Preferably, the detection plane  320  is separated from the end surface of the cylindrical ring by a distance of 1-5 mm. In this patent, the permanent magnet  300  produces a magnetic field component  321  along the detection plane  320 . Herein, the detection plane  320  corresponding to the particular detector region  322  located within the cylindrical ring from the axial region specific radius, in particular the magnetic field components  321  within the detection area will have an angle that varies linearly with respect to the angle of the permanent magnet  100 , which will be specifically described hereinafter. 
         [0062]    Preferably, the composition of the permanent magnet material  300  is Alnico. Alternatively, the permanent magnet  300  is a ferrite ceramic material such as MO.6Fe 2 O 3 , M is Ba, Sr or combinations of both. Alternatively, the composition of the permanent magnet  100  is RECo 5 , RE=Sm and/or Pr; RE 2 TM 17 , RE=Sm, TM=Fe, Cu, Co, Zr and/or Hf; or RE 2 TM 14 B , RE=Nd, Pr, and/or Dy, TM=Fe and/or Co. Alternatively, the permanent magnet material  100  composed of an alloy of NbFeB or FeCrCo. Alternatively, the permanent magnet  300  is composed of the permanent magnet powder embedded in plastic, rubber, or resin composite. 
       Example 3 
       [0063]    Example 3 of the present invention is a magnetic angle encoder that includes a rotating counting wheel that rotates about an axis, a permanent magnet embedded in the counting wheel, magnetic tunnel junction sensors, and digital processing circuitry. Tunneling magnetoresistance sensors are located in the detection plane adjacent to the permanent magnet, for sensing the magnetic field from the permanent magnet and outputting a signal. The tunneling magnetoresistive sensors are disposed at a certain radial distance from rotation axis within the detection plane of the permanent magnets, in this particular radial region of the detection plane of the rotating permanent magnet the magnetic field components have an angle φ that varies linearly with the rotation angle α of said permanent magnet. A digital processing circuit uses the output signal from the tunneling magnetoresistive sensors to calculate and output a code representative of the rotational angle of the permanent magnet. 
         [0064]      FIGS. 5 and 6  are top and side views of the present invention, showing the detection plane of the permanent magnets  100 ,  300  and the tunneling magnetoresistive sensor mounting position  500  at a distance d from the end face  120 ,  320  of the permanent magnet. Here the permanent magnet detection plane  120  has the rotation axis of the permanent magnet  320  as the origin of an XY coordinate system, as shown in  FIG. 5 . The cylindrical ring permanent magnet  100 ,  300  has inner radius R i , outer radius R o , and thickness t; A tunneling magnetoresistive sensor  500  detects the direction of the vector magnetic field at a point r(x, y), in the plane  120 ,  320  with respect to X-axis, and this direction is defined by angle α. It is assumed that the magnetic field components at r are denoted Bxy (Bx, By) and define rotation angle β. The relationship necessary to calculate the angles α and β are as follows: 
         [0000]      α= a tan( y/x )
 
         [0000]      (x&gt;0) 
         [0000]      α= a tan( y/x )+π
 
         [0000]      (x&lt;0,y&gt;0) 
         [0000]      α= a tan( y/x )−π,
 
         [0000]      (x&lt;0,y&gt;0) 
         [0000]      β= a tan( By/Bx )
 
         [0000]      (Bx&gt;0) 
         [0000]      β= a tan( By/Bx )+π
 
         [0000]      (Bx&lt;0,By&gt;0) 
         [0000]      β= a tan( By/Bx )−π
 
         [0000]      (Bx&lt;0, By&lt;0), 
         [0065]    with α and β in the range of (−180°, 180°). 
         [0066]    Tunneling magnetoresistive sensor  500  detect the magnetic field Bxy in order to determine angle φ=β−α. 
         [0067]    In normal operation of the magnetic encoder, the angle the tunneling magnetoresistive sensor  500  remains fixed, while the permanent magnets  100 ,  300  rotate about the axis of rotation, the axis is the origin of the measurement plane, r is the radius from the origin to the tunneling magnetoresistive sensor  500 , the rotating magnet generates a rotating magnetic field the phase and amplitude of which are measured by a tunneling magnetoresistive sensor  500 . This is equivalent to the permanent magnets  100 ,  300  remaining fixed, and the tunneling magnetoresistive sensor  500  rotated around the circumference to measure the magnetic fields. In this case, the permanent magnet&#39;s angle is α, and the angle of the rotating magnetic field is φ. 
         [0068]      FIG. 7  shows the magnetic field vector distribution in the detection plane  120  for permanent magnet  100 . In this detection plane  120 , the two-dimensional magnetic field Bxy is calculated, here, r can be varied within the range (0, R o ) and the relationship between the phase angle φ of the magnetic field and the phase angle relationship a of the rotating permanent magnet can be obtained; the relationship between the angles can be linear or non-linear. For example,  FIG. 8  shows the curve  18  of the rotating magnetic field of the permanent magnet and illustrates that the angle φ of the magnetic field can be a linear function of α, whereas  FIG. 9  shows the phase curve  19  for the rotating magnetic field of the permanent magnet illustrates a case where the angle φ depends non-linearly and discontinuously on angle α. Also, as shown in  FIG. 10  the curve  20  representing the relationship between the permanent magnet angle α and the magnetic angle φ may have varying degrees of nonlinearity with or without discontinuity.  FIG. 11  is a plot illustrating the dependence of the magnitude of Bxy as a function of rotation angle α, which is denoted as curve  21 . As can be seen from the curve  21 , the magnitude of the rotating magnetic field has W-shaped angular variation, with maximum and minimum values corresponding to BH and BL. For a magnetoresistive angle sensor, it is preferred to have the variation in the magnetic field amplitude be as small as possible, in order to guarantee sensor signal accuracy. 
         [0069]    A linear fit may be applied to the φ and α curves shown in  FIGS. 8 ,  9 ,  10  in order to calculate the R 2  fitting parameter, where R 2  indicates stronger linear behavior as it approaches a value of 1. 
         [0070]    The degree of variation in the magnitude of B  21  can be characterized using the following relationship: 
         [0000]      NORMALIZED —   B=B   pp   /B   L =( B   H   −B   L )/ B   L    
         [0071]    where smaller values of NORMALIZED_B, indicate smaller magnetic field variation. 
         [0072]    To determine the degree of nonlinearity between the magnetic field angle φ and the rotating magnetic field α in the detection plane, a curve fit be performed on the φ versus a curves at various values of r between (0, Ro), and additionally magnetic field variation as a function a that is NORMALIZED_B can be plotted in the same way. 
         [0073]      FIG. 12  shows linear fit parameter R 2  plotted as a function of r/R o . As can be seen from the curve  22 , there is a region  23  with value is close to 1, indicating that in this region the angle φ of rotating magnetic field and the angle φ of the permanent magnet have near-linear relationship. A tunneling magnetoresistive sensor used in area  23  of the detection plane  120  corresponding to the inner surface of the magnet  100 . This region is well suited for the tunneling magnetoresistive sensor  500 , but region the region  24  is not well suited for the tunneling magnetoresistive sensor  500 . 
         [0074]      FIG. 13  shows a curve NORMALIZED_B as a function of the relative position r/R o  of the tunneling magnetoresistive sensor  500  within the detection plane  120 . As can be seen from the curve  25  for a portion of region  23  the magnetic field variation for the tunneling magnetoresistive sensor  500  is sufficiently small for good performance to be obtained. 
       Example 4 
       [0075]    Example 4 provides another implementation of the magnetic encoder of the present invention, including a permanent magnet structure that rotates about an axis of rotation as described in Example 2, a tunneling magnetoresistive sensor, and digital processing circuits. In addition to the permanent magnet, other features that are the same as those in Example 3 are omitted in the description of Example 4. 
         [0076]      FIG. 14  shows the magnetic field vector distribution in the detection plane  320  for permanent magnet  300 . In this detection plane  320 , the two-dimensional magnetic field Bxy is calculated. As shown in  FIGS. 15 ,  16 ,  17  within the detection plane  320  angle φ of the rotating magnetic field and angle α of the permanent magnet may have a linear relationship as in curve  26 , a non-linear discontinuous relationship as shown in curve  27 , and intermediate degrees of linearity as shown in curve  28 . There is a linearity of curve  26  indicates a linear relationship between the rotating magnetic field angle φ and angle α of the permanent magnets of the permanent magnet  300  in the detection plane, such that the angle of the permanent magnets can be determined usefully for application as a magnetic encoder. 
         [0077]      FIG. 18  shows the magnitude variation of the rotating magnetic field Bxy as a function of the permanent magnet rotation angle α. It can be seen from this curve  29 , that the rotating magnetic field Bxy has an M-shaped periodic variation as a function of the permanent magnet&#39;s angle α. 
         [0078]    Similarly, in order to determine the range of linear area within the test surface  320 , the φ-α curve fitting parameters can be obtained at different relative positions r/R o , as shown in  FIG. 19  the R 2  fit parameter which indicates linearity, is plotted as curve  30 , the portion  31  of the detection plane  320  is best suited for a tunneling magnetoresistive sensor  500 , whereas region  32  is not well suited for a tunneling magnetoresistive sensor  500 . Further, it can be seen from  FIG. 20 , which shows NORMALIZED_B as a function of the relative position r/R o  of the tunneling magnetoresistive sensor  500  identified as curve  33  coincides with region  31  is small compared to region  32  which is the non-ideal operating area. 
         [0079]    The above analysis shows that permanent magnets  100  and  300 , have a detection plane  120  and  320 , in which there is a specific detection zone  23  and  31 , suitable for using a tunneling magnetoresistive sensor  500  to measure the angle φ of the rotating magnetic field of a permanent magnet. In these regions, there is a linear relationship with permanent magnet angle α, and the variation of the magnetic field magnitude is small enough to meet the requirements of the sensor. Thus, the rotation angle of the magnetic field measured by a tunneling magnetoresistive sensor can be converted into the rotation angle of the permanent magnet by the digital processing circuit in order to calculate and output a code representing the rotational angle of the permanent magnet, suitable for use in magnetic angle encoders. Different implementations of the present invention may be used as magnetic angle encoders that can be applied to electronic water meters, and various other applications. 
       Example 5 
       [0080]      FIG. 21  shows the installation of permanent magnets  100  or  300  for a magnetic angle encoder configuration configured for use with an electronic water meter  21 . The following description combines the permanent magnet of example 1 with the magnetic encoder of example 4 in order to provide an electronic water meter of the present invention. The electronic water meter includes a central shaft and at least one magnetic angle encoder. When the electronic water meter magnetic encoder includes a plurality of angle encoders, the various angle encoders rotate a different number of revolutions compared to revolutions of the shaft with the number of revolutions being related to the priority of the angle encoder. 
         [0081]    For example, the permanent magnet  100  is a cylindrical ring structure, and the permanent magnet comprises permanent magnet units  101  and  102 , symmetrically placed with respect to diametral the cross-section  110 , and corresponding magnetization directions  103  and  104  aligned in the axial direction wherein the magnetizations of permanent units  101  and  102  are aligned antiparallel and have the same magnitude. 
         [0082]    Each magnetic angle encoder has permanent magnet  100  with an outer diameter of the 3-20 mm, an inner diameter of 1-15 mm, and an axial length of 1.5-10 mm, wherein the permanent magnets  100  are embedded in counting wheels  2001 , the counting wheels rotate around the central axis  2003 . Further they contain a tunneling magnetoresistive sensor  500  mounted in a detection plane  120  within 1-5 mm from the end surface of the permanent magnet  100  within a relative r/R o  corresponding to detection area  23 , and within this detection area, detecting the magnetic field components necessary to measure the angle φ of the rotating magnetic field linearly representative of the permanent magnet&#39;s angle. Vector  121  is a magnetic field component detected in the detection plane  120 . Tunneling magnetoresistive sensor  500  is located on a printed circuit board  2002 , which sends the signal output by the circuit board  2002 . Counting wheels  2001  are installed on central axis  2003 , and the printed circuit board  2002  is attached to the water meter frame  2004 . Utilizing magnetic field component  121  obtained with tunneling magnetoresistive sensor  500  and the linear relationship between magnetic field angle φ and permanent magnet rotation angle α, the angle α can be measured. The magnetic field angle measured using a tunneling magnetoresistive sensor can then be converted into the counting wheel rotation angle by the digital processing circuit, and a code characterizing this angle can be output. 
         [0083]    Several magnetic encoders are placed and counting wheels are placed on a shaft and used to read different digits, where neighboring wheels have a 10:1 gear ratio. Each wheel&#39;s angular displacement is related to the magnet rotation angle α, by using pairs of tunneling magnetoresistive sensors  5  to measure the rotating magnetic field of a magnet attached to a counting wheel the angle of the wheel may be calculated. Each counting wheel&#39;s range of 0˜360° is divided into ten equal increments representing the ten digits, such that it is possible to build a relationship between the angular displacement and the numbers, and then a printed circuit board  2002  may be used to convert these signals into a digital code. By reading the numbers on the different counting wheels, it is possible to directly get a reading of the value of the electronic water meter. 
         [0084]    An electronic water meter may be equipped with permanent magnets type  100  or  300 . When using cylindrical ring permanent magnet  300 , it may be comprised of permanent magnet units  301  and  302  each having the same magnetization magnitude, oriented along the direction perpendicular to the diametral cross-section  310 . Permanent magnet  300  has an outer radius of 5-20 mm, and inner radius of 1-5 mm, and a thickness along the axial direction of 1-5 mm. The tunneling magnetoresistive sensor  500  is placed a distance 1-5 mm along the axis from the permanent magnet  300  in the sensing plane, and spaced at a radial distance of r/R o  from the axis into inner detection area  31 , in this specific region, the magnetic field rotation angle φ is linearly related to the rotation angle α of the magnet. Magnetic field component  321  is measured in detection plane  320 . The remaining procedure is the same as that for an electronic water meter using permanent magnet  100 . 
         [0085]    The above described preferred embodiments of the present invention do not limit the possible variations of the invention, and those skilled in the art can make various modifications and changes that do not exceed the scope of the invention. Any modification made within the spirit and principle of the present invention by replacement with equivalent or improved features falls within the scope of the present invention.