METHOD OF DETERMINING THE AXIAL DISPLACEMENT OR AXIAL POSITION OF A SHAFT OF AN ELECTRONIC CONTROL DEVICE

20250244148 · 2025-07-31

Assignee

Inventors

Cpc classification

International classification

Abstract

A method of determining the axial displacement or axial position of a magnetised shaft, such as a setting stem (3) of a timepiece, of an electronic control device (1). The method includes obtaining a new function by multiplying the norm of the magnetic field generated by the magnetised shaft by a selected compensation function, which depends only on the rotation angle of the shaft in a plane orthogonal to the rotation axis of the shaft. This allows to simplify the processing of measurement and to strongly minimise the necessary memory resources as there is no need to store a high number of different curves corresponding to different angular positions. By applying the proposed method using said new function, it is possible to detect in a sufficiently precise manner axial displacements/positions of the shaft, by using preferably a single magnetic sensor.

Claims

1. A method of determining an axial displacement or axial position, along a displacement axis, of a shaft, provided with a permanent magnetized part and rotating about the displacement axis, or a control value, for a given function or operation, depending on the axial displacement or axial position of the shaft by means of a magnetic sensor arrangement and a processing unit collectively forming an electronic control module, the method comprising the following steps carried out by the electronic control module: measuring with the magnetic sensor arrangement first, second and third magnetic field components of a magnetic field, generated by the permanent magnetized part, respectively along orthogonal first, second and third axes linked to the magnetic sensor arrangement, the third axis being parallel to the displacement axis; and compensating these first, second and third magnetic field components for hard iron coefficients; determining a current rotation angle value (.sub.c) of the shaft in a plane orthogonal to the displacement axis of the shaft based on the first and second compensated magnetic field components; calculating a norm (N.sub.c) of the magnetic field, as squared or non-squared, based on the first, second and third compensated magnetic field components, the norm depending on the axial position of the shaft, along the displacement axis, and on the rotation angle of the shaft; selecting a compensation function F(), depending on the rotation angle () of the shaft but not on the axial displacement or axial position (z) of the shaft; determining a first value (V.sub.c), referred to as a compensation function value, for the current rotation angle value (.sub.c) by applying the current rotation angle value to the compensation function; calculating a second value (g.sub.c) by multiplying the calculated norm (N.sub.c) of the magnetic field and the determined compensation function value (V.sub.c), the compensation function being selected so that the second value depends predominantly on the axial position of the shaft and less or not on the rotation angle of the shaft; selecting a relationship between a first set of possible second values and a second set of possible axial displacements or axial positions or/and control values, depending on the possible axial displacements or axial positions, establishing for each second value of the first set a corresponding axial displacement or axial position of the shaft or a corresponding range of axial displacements or positions of the shaft or a corresponding control value; and determining the axial displacement or axial position of the shaft, with respect to the sensor arrangement, or the control value by applying the calculated second value (g.sub.c) to the selected relationship between the first set and the second set.

2. A method according to claim 1, wherein the step of selecting a relationship between the first set and the second set establishes for each stable axial position of possible stable axial positions of the shaft a corresponding range of second values.

3. A method according to claim 2, wherein the ranges of second values are distinct such that no range of second values overlaps another one.

4. A method according to claim 1, wherein the step of selecting a relationship comprises defining a threshold value (g.sub.Th) for the second value, and the step of determining the axial displacement or axial position or the control value comprises disabling or disregarding a determination of the rotation angle of the shaft when the second value is less than or equal to the threshold value.

5. A method according to claim 1, wherein said control values in the step of selecting a relationship provides an intensity adjustment, depending on the axial displacement or axial position of the shaft, for a function of a timepiece incorporating an electronic control device comprising the shaft and the electronic control module.

6. A method according to claim 1, wherein the compensation function is selected based on how the axial displacement or position of the shaft is used.

7. A method according to claim 3, wherein the compensation function F() is as follows: F ( ) = mean over z of ( max over of ( .Math. B .fwdarw. ( z , ) .Math. ) .Math. B .fwdarw. ( z , ) .Math. ) , wherein z denotes the axial displacement or axial position along the rotation axis of the shaft, denotes the rotation angle of the shaft (3) in a plane orthogonal to the rotation axis, and {right arrow over (B)}(z, ) denotes the magnetic field.

8. A method according to claim 4, wherein the compensation function F() is as follows: F ( ) = ( max over of ( .Math. B .fwdarw. ( z = P , ) .Math. ) .Math. B .fwdarw. ( z = P , ) .Math. ) , wherein denotes the rotation angle of the shaft in a plane orthogonal to the rotation axis, z=P denotes a given axial displacement or axial position along the rotation axis of the shaft from which an axial displacement is to be detected, and {right arrow over (B)}(z, ) denotes the magnetic field.

9. A method according to claim 8, wherein the axial position P=0.

10. A method according to claim 1, wherein the sensor arrangement is a three-axis magnetometer, or is formed by three sensors, each configured to determine different one of the magnetic field components.

11. A method according to claim 1, wherein the electronic control module is incorporated in a timepiece, wherein the shaft is a setting stem associated with a crown of the timepiece, and wherein the permanent magnetized part of the shaft is a bipolar magnet fixed to the shaft and having a diametral magnetisation.

12. An electronic control device for determining an axial displacement or axial position, along a displacement axis, of a shaft or a control value, for a given function or operation, depending on the axial displacement or axial position of the shaft, the shaft being provided with a permanent magnetised part and configured to rotate about a displacement axis, the electronic control device including a control module comprising a magnetic sensor arrangement and a processing unit, the electronic control module comprising means for: measuring with the magnetic sensor arrangement first, second and third magnetic field components of a magnetic field, generated by the permanent magnetized part, respectively along orthogonal first, second and third axes linked to the magnetic sensor arrangement, the third axis being parallel to the displacement axis; and compensating these first, second and third magnetic field components for hard iron coefficients; determining a current rotation angle value (.sub.c) of the shaft in a plane orthogonal to the displacement axis of the shaft based on the first and second compensated magnetic field components; calculating a norm (N.sub.c) of the magnetic field, as squared or non-squared, based on the first, second and third compensated magnetic field components, the norm depending on the axial position of the shaft along the displacement axis, and on the rotation angle of the shaft; selecting a compensation function F(), depending on the rotation angle () of the shaft but not on the axial displacement or axial position (z) of the shaft; determining a first value (V.sub.c), referred to as a compensation function value, for the current rotation angle value (.sub.c) by applying the current rotation angle value to the compensation function; calculating a second value (g.sub.c) by multiplying the calculated norm of the magnetic field and the determined compensation function value, the compensation function being selected so that the second value depends predominantly on the axial position of the shaft and less or not on the rotation angle of the shaft; selecting a relationship between a first set of possible second values and a second set of possible axial displacements or axial positions or/and control values, depending on the possible axial displacements or axial positions, establishing for each second value of the first set a corresponding axial displacement or axial position of the shaft or a corresponding range of axial displacements or positions of the shaft or a corresponding control value; and determining the axial displacement or axial position of the shaft, with respect to the sensor arrangement, or the control value by applying the calculated second value to the selected relationship between the first set and the second set.

13. A timepiece comprising the electronic control device according to claim 12.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Other features and advantages of the invention will become apparent from the following description of a non-limiting example embodiment, with reference to the appended drawings, in which:

[0014] FIG. 1, already described, shows measurements of 3D components of a magnetic field as a function of the angle of rotation of a bipolar magnet, which has a diametral magnetization axis (the two magnetic poles being diametrically opposed), and an axial position of this magnet according to EP 3210083 B1;

[0015] FIG. 2, already described, shows measurements of 2D components of the magnetic field as a function of the angle of rotation of the bipolar magnet and the axial position of this magnet according to EP 3210083 B1;

[0016] FIG. 3, already described, shows 2D components of the magnetic field projected onto the X-Y plane, by using a transformation matrix in order to have in this plane a circle for z=0.0, as a function of the angle of rotation of the bipolar magnet and the axial position of this magnet according to EP 3210083 B1;

[0017] FIG. 4 illustrates, in an isometric view, an example of an electronic control device according to the present invention;

[0018] FIG. 5 shows values for component x of the magnetic field as a function of the angle of rotation of a setting stem and the axial displacement/position of this setting stem in the electronic control device of FIG. 4;

[0019] FIG. 6 shows values for component y of the magnetic field as a function of the angle of rotation of the setting stem and the axial displacement/position of this setting stem in the electronic control device of FIG. 4;

[0020] FIG. 7 shows values for component z of the magnetic field as a function of the angle of rotation of the setting stem and the axial displacement/position of this setting stem in the electronic control device of FIG. 4;

[0021] FIG. 8 shows values for the norm of the magnetic field as a function of the axial displacement/position and the angle of rotation of the setting stem in the electronic control device of FIG. 4;

[0022] FIG. 9 shows compensation functions, each depending on the angle of rotation of the setting stem, compensating the dependence of the magnetic field norm on the angle of rotation for three different axial positions;

[0023] FIG. 10 shows values for functions G(z, ), equal to the magnetic field norm multiplied by a single selected compensation function, used in a first mode of the present invention for selecting a relationship between possible values of these functions and corresponding axial displacements/positions of the setting stem for all possible angles of rotation of this setting stem in the electronic control device of FIG. 4;

[0024] FIG. 11 shows values for functions G(z, ), equal to the magnetic field norm multiplied by another single selected compensation function, used in a second mode of the present invention for selecting a relationship between possible values of these functions and corresponding axial displacements/positions of the setting stem for all possible angles of rotation of this setting stem in the electronic control device of FIG. 4; and

[0025] FIG. 12 is a flow chart summarising the steps of the proposed method.

DETAILED DESCRIPTION OF THE INVENTION

[0026] An embodiment of the present invention will next be described in detail with reference to the attached figures. The invention will be described in the context of an axial displacement or axial position detection of a shaft of an electronic control device of a timepiece, where the shaft in the present example is a setting stem, associated with an external crown, of the electronic control device. The electronic control device as described below comprises at least a crown, a setting stem, a magnetic element mounted integrally on the stem, and an electronic control module formed by a magnetometer and a signal processor. In this configuration, a magnetic field is generated by the magnetic element of the rotating stem. However, the teachings of the invention are not limited to this environment or application.

[0027] Identical or corresponding functional and structural elements, which appear in different drawings, are assigned with the same reference numerals. As utilised herein, and/or means any one or more of the items in the list joined by and/or. As an example, x and/or y means any element of the three-element set {(x), (y), (x, y)}. In other words, x and/or y means one or both of x and y. As another example, x, y, and/or z means any element of the seven-element set {(x), (y), (z), (x, y), (x, z), (y, z), (x, y, z)}. In other words, x, y and/or z means one or more of x, y, and z. Furthermore, the term comprise is used herein as an open-ended term. This means that the object encompasses all the elements listed, but may also include additional, unnamed elements. Thus, the word comprise is interpreted by the broader meaning include, contain or comprehend.

[0028] In the present description, a magnetic field is a vector field that describes the magnetic influence of electrical currents and magnetised materials. The term magnetic field is sometimes used for two distinct, but closely related fields denoted by symbols B and H. H is measured in units of amperes per meter while B is measured in teslas, which are equivalent to newtons per meter per ampere. H and B differ in how they account for magnetisation. In a vacuum, B and H are the same apart from units, but in a magnetised material, they differ by the magnetisation M of the material. In the following description, the magnetic field is expressed as B but H could be used interchangeably.

[0029] FIG. 4 shows an example of an electronic control device 1 where the teachings of the present invention may be applied. There is shown a rotatable element or shaft 3, which in this example is a setting stem of a timepiece, such as a wristwatch. The stem 3 defines a rotation axis 5, which coincides with a central or longitudinal axis of the stem 3. Such a setting stem is also known as a crown stem. Thus, the rotatable element 3 (i.e., the stem) of this example would be a small elongate piece, with a diameter in the range of 0.5 mm to 1 mm, for example. The stem 3 is provided with a magnet 7, assembled with the stem so that it is integral in rotation and axial displacement with this stem, at its internal end region (i.e., in the case of the setting stem being terminated by a crown, at the end of the setting stem opposite to the crown and located in the timepiece case). The magnet is in this example configured as a ring in which the stem passes through. The magnet 7 is preferably a bipolar permanent magnet with diametral magnetization, the two magnetic poles being diametrically opposed relatively to the rotation axis 5, named hereafter bipolar magnet or simply magnet.

[0030] The stem 3 and thus the magnet 7 have only two degrees of freedom, one in rotation with respect to the rotation axis 5, and the other one in translation along this rotation axis 5. The angle of rotation of the magnet and thus of the stem is denoted by and the axial displacement/position of the magnet and thus of the stem is denoted by z along the rotation axis.

[0031] A magnetometer 9, mounted on a circuit board 11 in particular a printed circuit board (PCB), measures the magnetic induction fields of the magnet along the three orthogonal axes X, Y and Z, forming a reference frame of this magnetometer, respectively B.sub.x, B.sub.y and B.sub.z. The Z axis is parallel to the rotation axis 5 of the stem and thus of the magnet, so that the plane X-Y is perpendicular to the rotation axis 5. In the present example, the centre of the magnetometer, located at the origin of the reference frame, defines a zero position (z=0) for the bipolar magnet 7 and thus for the stem along the rotation axis; that is, the crossing of the X-Y plane by the rotation axis 5 defines the axial position zero (z=0) for the magnet and thus for the stem 3. An optional switch 13 is also provided, which in this example is used to selectively enable and disable the magnetometer and/or to activate a selected function of the timepiece.

[0032] Magnetic field lines generated by the magnet 7 impinge on the magnetometer 9, which is a three-axis sensor device measuring the incident magnetic field along three measurement axes, namely the X, Y and Z axes. The magnetometer 9 may for example be a miniature surface-mount device (SMD) fitted to the PCB 11 and connected to the PCB via SMD connections.

[0033] In this example, the magnetometer 9 is a Hall effect sensor device, which is a device used to measure the magnitude or intensity of a magnetic field. The output voltage of a Hall sensor is directly proportional to the magnetic field strength through it. The magnetometer 9 is arranged to determine the intensity of a first magnetic field component B.sub.x along a first axis, which in this case is the X axis, the intensity of a second magnetic field component B.sub.y along a second axis, which in this case is the Y axis, and the intensity of a third magnetic field component B.sub.z along a third axis, which in this case is the Z axis. In this example, these three axes are orthogonal to each other. A temperature sensor (not shown in the figures) may additionally be provided in order to measure the temperature. The temperature sensor if provided may for instance be integrated in the magnetometer 9. The behaviour of the Hall sensors typically depends on the temperature at which they operate. It is to be noted that instead of the system comprising one three-axis magnetometer, it may for example comprise three independent magnetic field sensors, each configured to measure different one of the magnetic field components B.sub.x, B.sub.y and B.sub.z. In this case, all the three sensors may or may not be in the same plane.

[0034] The method of determining the axial displacement or axial position of the magnet 7 and thus of the stem 3 along the rotation axis 5, according to the present invention, is based on the measurement of the components B.sub.x, B.sub.y and B.sub.z of the magnetic induction field. These magnetic field components depend on the angle of rotation of the bipolar magnet but also on the position of this magnet along the rotation axis 5, which is parallel to the Z axis but distant from the rotation axis. It is to be noted that the symbol is used in the present description interchangeably for both the angle of rotation of the magnetic field (and thus of the magnet 7) and for the angle of rotation of the stem 3. The values of the magnetic field components B.sub.x, B.sub.y and B.sub.z as a function of the angle of rotation of the magnet, each for three different axial displacements/positions, z=0.0 mm, z=0.5 mm and z=1.0 mm, are visible in FIGS. 5, FIG. 6, and FIG. 7. The magnetic field components are compensated for hard iron coefficients in order to remove effects due to parasitic magnetic fields and possibly due to temperature variations. In other words, the main operations of the compensation are the following: Eliminate offset due to the fabrication of the Hall sensors; remove distortions due to the presence of parasitic fields generated in particular by the circuit board that hosts the magnetometer; and possibly further eliminate the impact of the temperature. FIGS. 5, 6, and 7 show the values of the compensated magnetic field components.

[0035] Taken independently, these components are not sufficient to detect the axial displacement or axial position of the magnet. In addition, the component B.sub.z has two zero crossings per rotation of the magnet. However, if we take the norm of the magnetic field (in this example the Euclidean norm), i.e.,

[00001] .Math. B .fwdarw. ( z , ) .Math. = B x ( z , ) 2 + B y ( z , ) 2 + B z ( z , ) 2 ,

[0036] we obtain an interesting behaviour, namely that its value decreases as the magnet 7 moves away from the magnetometer 9 along the rotation axis. Furthermore, the value of the norm is never zero. This is shown in FIG. 8. In practice, and for computational saving reasons, the square root is often not calculated, and the square of the norm is used. However, in this example, the the norm is calculated and used.

[0037] It can be seen in FIG. 8 that the value of the norm depends not only on the axial displacement/position but also strongly on the rotation angle . To avoid or minimize this angle dependence, the method introduces a first function F(), which is also referred to as a compensation function and which only depends on the rotation angle/angular position . In other words, the value of the selected compensation function does not depend on the axial displacement/position. The compensation function is selected so that, when the norm of the magnetic field is multiplied by the compensation function, we obtain a second function G(z, ), which depends predominantly on the axial position of the shaft (stem) and less or not on the rotation angle of the shaft:

[00002] G ( z , ) = .Math. B .fwdarw. ( z , ) .Math. .Math. F ( )

[0038] This second function G(z, ) is represented in FIGS. 10 and 11, along the rotation axis 5 (z being used as the variable along the rotation axis, which is parallel to the Z axis), respectively for two different specific compensation functions, where the inferior and superior curves, defined by the second function G(z, ) for all angular positions , or in other words the envelope of all possible curves of G(z, ), resulting from the dependency on the angular position for this second function, are shown. The two different specific compensation functions will still be described later in this description. On these figures, we can see that the dispersion of the second function G(z, ) for all rotation angles/angular positions is much smaller than the corresponding dispersion for the norm.

[0039] The method further continues with the second function G(z, ) because it allows to determine the axial displacement or position z of the magnet 7/stem 3 with a sufficient precision for several applications by selecting only one specific compensation function F() (named compensation function) for each particular application. A main advantage of introducing the compensation function is that it allows to simplify the processing of measurement and to strongly minimise the necessary memory resources as there is no need to store a high number of different curves corresponding to different rotation angles/angular positions, as this would have be needed by using directly the norm for determining the axial displacement/position (see FIG. 8).

[0040] Preferred individual compensation functions F.sub.z () are represented graphically in FIG. 9 for axial positions z from 0.0 mm (individual compensation function with the highest amplitude) to 1.0 mm (individual compensation function with the lowest amplitude), where we can see that these individual compensation functions somewhat depend on the axial position. Between the two extreme compensation functions (corresponding respectively to z=0.0 mm and z=1.0 mm) is represented a specific compensation function F.sub.m () corresponding for each angular position to an average/middle of all individual compensation functions over the axial position z, for the given position range 0.0 mm to 1.0 mm. Thus, the function F.sub.m () corresponds either to an average compensation function or to a middle compensation function.

[0041] The preferred individual compensation functions are all defined by a general compensation function F.sub.G(z, ) depending on the axial position z and the angular position :

[00003] F G ( z , ) = ( max over of ( .Math. B .fwdarw. ( z , ) .Math. ) .Math. B .fwdarw. ( z , ) .Math. )

[0042] However, the axial position is per definition not known before the method is performed, the method being indeed implemented for determining the axial displacement/position of the magnet/stem. Thus, the method of the present invention selects a single specific compensation function F(), advantageously based on the preferred general compensation functions F.sub.G (z, ) represented in FIG. 9 (the two extreme compensation functions F.sub.z () for z=0.0 mm and z=1.0 mm being represented, all other preferred individual compensation functions being located between these).

[0043] The single specific compensation function (named compensation function), namely its amplitude, is specific to each electronic control device of the invention. According to a preferred implementation of the invention, the single specific compensation function F() is selected in relation to the application for which the axial displacement/position determination method is implemented. For instance, if the method is used to detect distinct axial displacements/positions of the stem according to a first mode, such as stable positions T1, T2 and T3, then the average/middle compensation function F.sub.m () may advantageously be selected. This compensation function is:

[00004] F m ( ) = average or middle over z of ( max over of ( .Math. B .fwdarw. ( z , ) .Math. ) .Math. B .fwdarw. ( z , ) .Math. )

[0044] This means that, for the first mode, we take the average or middle value (shown with a solid line in FIG. 9) in order to minimise the deviation over the entire displacement/position range (z=0.0 to 1.0 mm) in the corresponding second function G (z, ) due to the angular position, as can be seen in FIG. 10. In this FIG. 10, the curve UC1 is the upper limit and the curve LC1 is the lower limit for the second function G(z, ) as a function of the axial position z by selecting for the compensation function F() the average/middle compensation function F.sub.m (). Based on these upper and lower limit curves UC1 and LC1, the method establishes/selects a relationship, based on all angular positions , between values g of G(z, ) and axial positions z. In general, the method selects a relationship between a first set of possible second values and a second set of possible axial displacements or axial positions or/and control values establishing for each second value of the first set a corresponding axial displacement or axial position of the shaft or a corresponding range of axial displacements or positions of the shaft or a corresponding control value.

[0045] In the example provided in FIG. 10, three position ranges R1, R2 and R3 are defined for the positive values of the axial positions z of the stem around three corresponding distinct stable axial positions T1, T2 and T3 that the stem can have. The position ranges R1, R2 and R3 are chosen to cover all possible positions, with sufficient margin and without overlapping, for the respective axial positions T1, T2 and T3 by taking into account manufacturing tolerances of the diverse elements forming the electronic control device and also tolerances resulting from the assembling of these elements. It is to be noted that to each range Rn, n=1, 2, 3 corresponds a range Pn, n=1, 2, 3 comprising all possible values g of the second function G (z, ) for this range Rn. On the contrary, a range Rn, n=1, 2, 3 does not include all possible values z for the respective range Pn of G (z, ). The selected relationship advantageously defines distinct non overlapping ranges Pn of g values for corresponding axial position range Rn of axial positions. In other words, the ranges of second values Pn are distinct such that no range of second values overlaps another one. This is represented in FIG. 10. Thus, there is only one position range Rn and a corresponding axial position Tn for any possible second value.

[0046] On the other hand, if the displacement/position determination method is used, according to a second mode, to detect an axial displacement of the stem 3, for example in the sense of position T0 from the position T1, in order to disable the determination of the rotation angle of the stem 3 or to disregard the determination of the rotation angle of the stem 3 when the stem is pressed by a user, then a different compensation function may be selected. This kind of operation is particularly useful if in a given position of the stem (which would typically be a non-pressed position of the stem) different menus are displayed by rotating the stem, while in a second position of the stem (which would typically be a pressed position of the stem) pressing of the stem would be used to select a given function or enter a menu, for example. In this example, the user upon pressing the stem could inadvertently simultaneously rotate the stem, which would then lead to a different menu unless the rotation detection is disabled or disregarded. In this scenario, the compensation function F() could be defined as follows, where we take the value z=P to be more accurate at the beginning of the displacement from the axial position P, so as to be able to determine the pressing of the stem in its initial phase:

[00005] F P ( ) = ( max over of ( .Math. B .fwdarw. ( z = P , ) .Math. ) .Math. B .fwdarw. ( z = P , ) .Math. )

[0047] If the pressing function is intended from the axial position T1 (around z=0), then we introduce z=0 in the compensation function hereabove, as represented in FIG. 11. The curve UC2 is the upper limit and the curve LC2 is the lower limit for the second function G(z, ) as a function of the axial position z by selecting for the compensation function F() the compensation function F.sub.P() with P=0. We may choose a threshold value g.sub.Th for G(z, ) below which the detection of the rotation of the stem must no longer be taken into consideration. This is illustrated in FIG. 11, where the negative position values along the rotation axis are shown. In other words, a threshold value g.sub.Th is defined for G(z, ), and the method comprises disabling or disregarding a determination of the rotation angle of the shaft/stem 3, when the value g of G(z, ) is less than or equal to the threshold value.

[0048] Thus, as explained, the compensation function may advantageously be made dependent on the use case or application of the displacement or position determination method.

[0049] Once the compensation function F() has been selected, and once the current rotation angle of the stem has been measured, then the value of the second function G(z, ) can be calculated. It is to be noted that the rotation angle may be measured or determined by following the teachings of EP3705902A1. As explained in EP3705902A1, the current rotation angle value of the stem in a plane orthogonal to the rotation axis of the shaft is determined based on two of the magnetic field components which are orthogonal to the rotation axis, i.e., components B.sub.x, B.sub.y. The value of G(z, ) can then be calculated by multiplying the measured norm N.sub.c of the magnetic field by the value g.sub.c of the compensation function when the current rotation angle .sub.c has been first applied to the compensation function F().

[0050] The compensation function is selected so that the values g of G(z, ) depend predominantly on the axial position z of the shaft and relatively less or not on the angle of rotation of the shaft. The upper and lower curves represent the uncertainty for any value g on the axial displacement/position.

[0051] In summary, if the proposed method is used to detect stable mechanical positions (first mode), such as positions T1, T2 and/or T3, then a set of non-overlapping ranges of values P1, P2 and P3 for the second function G(z, ), corresponding to these stable positions of the stem including a possible error/mispositioning, may be defined as is further shown in FIG. 10. In the case of preventing rotation detection (second mode), we choose a threshold value g.sub.Th for G(z, ) below which the value of the angle must no longer be taken into consideration. This is illustrated in FIG. 11.

[0052] The flow chart of FIG. 12 summarises the above method of determining the axial displacement or axial position of an at least partially magnetised stem of an electronic control device. In step 101, the first, second and third magnetic field components of a magnetic field, which are in this case orthogonal to each other, are measured by the magnetometer 9. This step normally comprises the step of compensating the magnetic field components to take into account the hard iron coefficients. In step 102, the current rotation angle value .sub.c (current angular position) of the stem 3 in a plane orthogonal to the rotation axis 5 of this stem is determined based on at least two of the magnetic field components which are orthogonal to the rotation axis. In step 103, the current norm N.sub.c as squared or non-squared of the magnetic field is calculated based on the first, second and third magnetic field components: N.sub.c={right arrow over (B)}(z, ). The norm depends on the axial displacement of the shaft along the rotation axis, and on the rotation angle of the shaft.

[0053] In step 104, a first function F(), referred to as compensation function, is selected for at least a mode/application, for example for the first and second modes described before, and in such a case the appropriate one is selected for the current mode (detection of the axial position among a set of possible stable axial positions or detection of the activation of the press button function). The selected compensation function depends on the rotation angle of the shaft but not on the axial displacement of the shaft. In step 105, a first value V.sub.c, referred to as a compensation function value, is determined for the current rotation angle value .sub.c by applying this current rotation angle value to the selected compensation function: V.sub.c=F(.sub.c). The obtained value V.sub.c is saved in a memory of the electronic crown module.

[0054] In step 106, a second value of the second function described before, is calculated by multiplying the calculated norm of the magnetic field and the determined compensation function value: g.sub.c=N.sub.cV.sub.c. According to the invention, the compensation function is selected so that the second function depends predominantly on the axial position of the shaft and relatively less or not on the rotation angle of the shaft. In particular, the compensation function is defined so that the bundle of second functions G(z, ), for example as shown on FIGS. 10 and 11, is sufficiently narrow so that G(z, ) can provide a relatively good approximation for the axial position z for all and therefore allowing a determination of a position z with a margin of error relatively low, so that it is in particular possible to unequivocally differentiate between given distinct positions (T1, T2, T3), or to determine whether the stem 3 has been pressed beyond a certain threshold value D.sub.Th allowing activation of a function, for example to prevent a untimely selection of a function in a menu via a rotation of the stem. In practice, the invention relies on the extreme curves, i.e. the upper and lower curves, for positions T1, T2 and T3 with their margin of error. For the detection of pressure, the invention relies generally on the lower curve, given that for a value of g less than a given threshold value g.sub.Tn, it can be concluded that the stem is pressed by at least the corresponding displacement value D.sub.Th given by this lower curve.

[0055] In step 107, a relationship is selected between a first set of possible second values and a second set of possible axial displacements or axial positions or/and control values establishing for each second value of the first set a corresponding axial displacement or axial position of the shaft or a corresponding range of axial displacements or positions of the shaft or a corresponding control value. The control values relate to an adjustment of a function or operation of the timepiece. More specifically, the control values in this example can provide an intensity adjustment, depending on the axial displacement or axial position of the shaft, for a function of the timepiece. It is to be noted that the second function G(z) may not be directly used, but rather the invention may simply use the ranges defined by the lower and upper curves (the envelope), that is g->Rz, Rz being a range of possible axial positions for a given value g of the second function G(z). A relationship is thus selected between g and z, but not necessarily a function which by definition gives for each g a single value of z. Furthermore, for the mode linked to the detection of pressure on the stem with at least a certain displacement thereof, the algorithm does not determine an axial displacement z from the value of g.sub.c obtained, but instead it directly determines a command of a function based on the current value g.sub.c. There is an implicit link with the axial position of the stem, but in this case the algorithm operates so that there is no specific step of determining an axial displacement z before an action.

[0056] In step 108, the axial displacement or axial position z.sub.c of the shaft, with respect to the sensor arrangement (9), or the control value is determined by applying the calculated second value g.sub.c to the selected relationship between the first set and the second set.

[0057] The data processing steps of the above-described method may be carried out by a digital signal processor (DSP), and which are thus computer-implemented processing steps. The DSP which may be part of the magnetometer, or it may be a stand-alone device. The DSP may also comprise the memory, or a stand-alone memory unit may be used for storing for instance the different functions and measurement values.

[0058] The solution proposed by the present invention thus makes it possible to detect the axial displacement or axial position of the stem without electrical contacts, and in an analogue manner. If the magnetometer 9 and the angle determination algorithm operate during the movement of the stem 3, the angle of the crown and then the axial position can be known precisely enough to unequivocally determine specific axial positions or axial position ranges determined using a single electronic component configured to carry out the necessary computations. It is then possible in particular to detect the adjustment positions T1, T2 and T3 (for the first mode) by eliminating the mechanical complexity of the electrical contacts. Regarding the second mode, it may happen that, when pressing the crown to reach T0 to thereby validate an operation or to enter a menu, a slight rotation of the crown generates an increment of angle sufficient to produce an involuntary change of menu in the watch. By monitoring the axial position of the crown according to the method of the invention, it is possible to prevent or disregard rotation detection once a given axial displacement or axial position value has been reached to avoid an involuntary menu change.

[0059] In view of the above, at least the following use cases are possible application scenarios of the present invention: detection of distinct positions of the stem (e.g., T1 to T3) according to the first mode, preventing or disregarding angular detection during axial movement of the stem in particular when selecting a function (menu) by pressing the crown (second mode 2), and intensity adjustment of an electronic watch function (third mode). The intensity adjustment function may involve moving slower or more rapidly the hands of the watch when setting the time, or it may be served for example as an interface for a game.

[0060] While the invention has been illustrated and described in detail in the drawings and foregoing description, such illustration and description are to be considered illustrative or exemplary and not restrictive, the invention being not limited to the disclosed embodiment. Other embodiments and variants are understood, and can be achieved by those skilled in the art when carrying out the claimed invention, based on a study of the drawings, the disclosure and the appended claims.

[0061] In the claims, the word comprising does not exclude other elements or steps, and the indefinite article a or an does not exclude a plurality. The mere fact that different features are recited in mutually different dependent claims does not indicate that a combination of these features cannot be advantageously used. Any reference signs in the claims should not be construed as limiting the scope of the invention.