Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
VEHICLE COMPASS WITH ELECTRONIC SENSOR
Document Type and Number:
WIPO Patent Application WO/1993/013386
Kind Code:
A1
Abstract:
An electronic compass is described for use in vehicles. The compass employs a magnetoresistive sensor (10) for sensing the earth magnetic field and the sensor (10) is operated in alternate set/reset bias modes (16). The compass is provided with deviation compensation by a closed loop system including measurement of the sensor (10) output signals and an offset current strap (18) for nullifying the vehicle deviation field.

Inventors:
SCHIERBEEK KENNETH L (US)
SCHOFIELD KENNETH (US)
Application Number:
PCT/US1992/010472
Publication Date:
July 08, 1993
Filing Date:
December 04, 1992
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
DONNELLY CORP (US)
International Classes:
G01C17/32; B60K35/00; B60R1/08; B60R1/12; G01C17/28; G01C17/38; G01R33/025; (IPC1-7): G01C17/28; G01R33/06
Foreign References:
US4866627A1989-09-12
US4546550A1985-10-15
US4525671A1985-06-25
US4751783A1988-06-21
Other References:
See also references of EP 0617787A4
Download PDF:
Claims:
What is claimed is:
1. An electronic compass for use in a vehicle comprising: a magnetoresistive sensor for detecting an external magnetic field and developing an electronic signal corresponding to said external magnetic field, said external magnetic field being a combination of the earth magnetic field and a deviating field of the vehicle, an electronic circuit for determining the strength and direction of the vehicle deviating magnetic field, said sensor including means for nullifying said deviating magnetic field in said sensor, said nullifying means being coupled with said electronic circuit and energized thereby in accordance with the strength and direction of said deviating magnetic field whereby said sensor develops a deviation compensated signal corresponding to the earth field.
2. The invention as defined in Claim 1 wherein: said electronic circuit includes measurement means for measuring said electronic signal and determining the difference between the measured value and the value corresponding to the earth magnetic field, said electronic circuit including means for energizing said nullifying means in accordance with said difference.
3. For use with a magnetic field sensor which produces an output signal having a magnitude and polarity corresponding with the field strength and direction, respectively, of an external magnetic field impinging on said sensor, said external magnetic field having a component due to the earth magnetic field and a deviating magnetic field, the method of nullifying the effect of said deviating magnetic field comprising the steps of: determining whether the actual value of the signal is different from a reference value which would be produced by the earth magnetic field, if it is, generating an increment of compensating magnetic field impinging on said sensor in opposition to the deviating magnetic field, and repeating, alternately, the step of determining whether the actual value is different from the reference value and the step of generating an increment of compensating magnetic field until the actual value is substantially equal to the reference value.
Description:
VEHICLE COMPASS WITH ELECTRONIC SENSOR

FIELD OP THE INVENTION

This invention relates to magnetic compasses for vehicles. More particularly, it relates to compasses of the type which utilize an electronic magnetic field sensor.

BACKGROUND OP THE INVENTION

Magnetic compasses are commonly used in vehicles, including land vehicles, boats and aircraft, as an aid in direction finding and navigation. There is an increasing demand for magnetic compasses especially for use in passenger cars. In this field of use, there is an increasing requirement for a compass of low cost which exhibits a relatively high degree of accuracy with great reliability and which is of small size and weight.

Magnetic compasses for vehicles may be classified according to the type of the magnetic field sensor. One type is a magnetic rotor sensor which utilizes a magnetized element rotatably mounted to align itself with the ambient magnetic field. Examples of this type of vehicle compass are disclosed in Schierbeek et al U.S. patent 4,862,594 granted September 5, 1989 and in co-pending application Serial No. 07/597,854 filed October 15, 1990 by Schierbeek et al and assigned to the same assignee as this application.

Another type is a flux gate sensor which utilizes a saturable magnetic core with excitation and sense windings for sensing the direction and field strength of an ambient magnetic field. Examples of vehicle compasses with flux gate sensors are represented by Baker et al U.S. patent 3,683,668 granted August 15, 1972; Bower et al U.S. patent 4,733,179 granted March 22, 1988; Hormel U.S. patent 4,720,992 granted January 26, 1988; and Van Lente et al U.S. patent 4,953,305 granted September 4, 1990.

There is a need, especially in vehicle compasses for passenger cars, for an improved magnetic field sensor to achieve the goals of accuracy, reliability, small size and weight and low cost. However, one of the problems in meeting these goals is that of providing deviation compensation for the compass, which is required to provide a high degree of accuracy, without- a large cost penalty. It is known that a magnetic compass installed in a vehicle must be calibrated in the vehicle to account for the disturbing effect of the vehicle magnetic field. It is known that vehicles produce a magnetic field due to the presence of ferromagnetic materials, electric current carrying wires and the like and this magnetic field interferes with the earth field at locations within and adjacent the body of the vehicle. The magnetic field sensor of a compass responds to the localized magnetic field in which it is immersed for the purpose of direction finding with reference to.the earth magnetic field. The magnetic field vector produced by the vehicle,

herein referred to as the deviating magnetic field vector, combines with the earth magnetic field vector to produce a resultant or external magnetic field vector which, without calibration or 5 compensation is unsuitable for reliable and accurate direction finding. Fully automatic deviation compensation is needed to meet present-day demands for passenger cars.

10 It is known to provide deviation compensation in a magnetic compass with a rotor type sensor by use of a pair of compensation coils which are energized with current to generate a magnetic field which is equal and opposite to the deviating

15. magnetic field. This method of deviation compensation requires the vehicle to be oriented in certain cardinal directions relative to magnetic north and adjustments of coil current must be made. This adjustment may be carried out by the vehicle

20 driver or it may be automated in a computer controlled compass. It results in inaccuracy unless the vehicle heading is accurately aligned relative to magnetic north. Deviation compensation of this type is disclosed in the above cited Schierbeek 5 patent 4,862,594.

Another method of deviation compensation for vehicle compasses is referred to as the one hundred eighty degree compensation method. In this, the 0 resultant magnetic field is measured with the vehicle in any selected orientation relative to the magnetic north and then the resultant field is

measured with the vehicle in an orientation displaced one hundred eighty degrees from the first orientation. Using the measured values of the magnitude and directions of the resultant fields, the deviating field is calculated for both magnitude and direction. The calculated value is stored and subtracted from the magnetic field measurements subsequently taken by the compass in use for direction finding to thereby compensate it for deviation. The use of this method for a flux gate compass is disclosed in the above cited Bower patent 4,733,179, the Hor el patent 4,720,992 and the Baker et al patent 3,683,668.

Fully automatic deviation compensation systems for vehicle compasses have been proposed wherein no manual intervention is required. In the Tsushimo U.S. patent 4,445,279, granted May 1, 1984 an automatic system is disclosed using a flux gate sensor. An A-to-D converter and microprocessor are used to calculate an offset correction to compensate for the deviating field of the vehicle after driving the car in a full circle. A fully automatic compensation system is described in the Al-Attar U.S. patent 4,807,462 granted February 28, 1989. In the system of this patent, a flux gate sensor measures three headings with the car moving, and using the headings, the coordinates are derived for the center of the earth field circle and the directional offset values are computed by using the coordinates. Another fully automatic deviation compensation system is described in the Van Lente

patent 4,953,305 cited above. In this system, a flux gate sensor is used and the maximum and minimum signal values are recorded while the vehicle is driven through a closed loop. Then, the value of the deviating vehicle field is calculated from the recorded values. The compensating current is applied to the respective X and Y axis sense coils of the flux gate sensor to nullify the deviating field.

In the prior art, it is proposed to use magnetoresistive sensors in magnetic compasses. Such a compass is shown in the Picard U.S. patent 1,946,170 granted February 13, 1934 wherein the magnetoresistive elements are connected in a bridge circuit. A compass using thin film magnetoresistive sensors is described in the Stucki et al patent 3,942,258 granted March 9, 1976. In this system three magnetoresistive sensors are disposed in orthogonal relationship to develop a signal corresponding to the angular relationship between the compass platform and the magnetic north. The sensors are provided with a pumping coil and an output coil wound around the film at ninety degrees to each other. The pumping coil applies an alternating bias magnetic field to the magnetoresistive film. The Sansom U.S. patent 4,525,671 granted June 25, 1985 describes a magnetoresistive sensor with a single magnetoresistive element capable of sensing two components of a magnetic field. A current strap extends parallel to the magnetoresistive element and

other current strap extends at right angles to the magnetoresistive element. One of the current straps carries current in alternate directions during a periodic cycle while the other strap carries current in a single direction. Another magnetic compass comprising a magnetoresistive thin film is disclosed in UK patent application 8707218 published September 28, 1988.- Two pairs of magnetoresistive thin films are arranged at right angles to each other. Means are provided to produce a biasing magnetic field and to measure a change in electric resistivity of the magnetoresistive material. The Boord et al U.S. patent 4,533,872 granted August 6, 1985 describes a magnetoresistive thin film sensor of particular configuration for use as an electronic sensor in a compass.

As indicated above, the prior art is replete with vehicle compass technology in great detail. While the use of magnetoresistive sensors for compasses is suggested in the prior art, practical application requires an acceptable technique for fully automatic deviation compensation in a vehicle. Even though the prior art includes many different methods of deviation compensation for vehicle compasses, the art is lacking in respect to deviation compensation for magnetoresistive sensors.

A general object of this invention is to provide an improved vehicle compass using a magnetoresistive sensor which overcomes certain disadvantages of the prior art.

SUMMARY OP THE INVENTION

In accordance with this invention, a vehicle compass is provided which provides a high degree of accuracy and reliability with small size and weight and which is of low cost. This is accomplished using a thin film magnetoresistive sensor provided with a current conductor for providing switchable magnetic bias and a current conductor for nullifying a deviating field.

Further, in accordance with this invention, an electronic compass is provided which employs a closed loop system to nullify deviating magnetic fields.

A complete understanding of this invention may be obtained from the detailed description that follows taken with the accompanying drawings.

DESCRIPTION OF THE DRAWINGS

FIGURE 1 depicts a single-axis magnetoresistive sensor;

FIGURE 2 is a graphical representation of the operation of a single-axis magnetoresistive sensor;

FIGURE 3 is a diagram representing a typical relationship of the compass sensor and certain magnetic field vectors with the directional axis of

a vehicle in which the compass of this invention is installed;

FIGURE 4 is a block diagram of a compass embodying this invention;

FIGURES 5A and 5B are a graphical representation of the operation of the compass of FIGURE 4;

FIGURE 6 is a timing diagram to aid in explanation;

FIGURE 7 is a flow chart representing the program executed by the microcomputer of the compass;

FIGURE 8 is a schematic diagram of the Y-axis signal channel of the compass embodying this invention;

FIGURE 9 is a schematic diagram of the X-axis signal channel;

FIGURES 10A and 10B taken together form a schematic diagram of electronic circuits, including the microcomputer, which are coupled with the circuits of FIGURES 8, 9 and 10 of the compass; and

FIGURE 11 is a schematic diagram of the bias current circuit for set and reset of the sensor.

BEST MODE FOR CARRYING OUT THE INVENTION

Referring now to the drawings, there is shown an illustrative embodiment of the invention in a magnetic compass for vehicles which utilizes a magnetoresistive sensor. It will be appreciated as the description proceeds that the invention is useful in other applications and may be realized in different embodiments.

Before describing the compass of this invention, it will be helpful to consider the magnetoresistive sensor used in the compass. A single-axis magnetoresistive sensor is illustrated schematically in FIGURE 1. The sensor 10 comprises a bridge circuit 12 including a set of four magnetoresistive elements 14 connected in the bridge circuit. The magnetoresistive elements 14 are formed of a magnetic material which exhibits the magnetoresistive effect, such as permalloy, which changes its resistivity in the presence of an external magnetic field. The bridge circuit 12 is excited with a DC voltage across the input terminals and an output signal voltage V 0 is developed across the output terminals in response to an external magnetic field. The sensor 10 is provided with a bias current strap 16 which is energized by a set/reset voltage at its input terminal to produce a magnetic bias field M B which is of reversible polarity in accordance with the input voltage. Also, the sensor 10 is .provided with an offset current strap 18 which is energized by a reversible

polarity offset voltage applied to its input terminals. The current strap 18 produces an offset magnetic field M Q which is reversible polarity in accordance with the input signal voltage. The functions of the bias current strap 16 and the offset current strap 18 will be discussed subsequently.

Preferably, the sensor 10 is fabricated on a silicon substrate on which the magnetoresistive elements 14 are deposited as a thin film. In this construction, the bias current strap 16 is formed as a current conductive layer. It overlaps a soft magnetic layer which in turn overlays the elements 14. A pulse of current in one direction through the current strap 16 produces a magnetic field of sufficient strength to saturate the magnetic layer and provide a positive bias field. When the current is removed, the device remains in a biased condition under the influence of the magnetic layer. Similarly, a pulse of current in the opposite direction provides a negative bias. The offset current strap 18 is formed as a current conductive layer which overlays the magnetoresistive elements 14 and carries current in a direction perpendicular to the current carrying direction of the strap 16. The offset magnetic field MQ produced by the current strap 18 is effective to oppose an external magnetic field to which the magnetoresistive elements 14 are subjected. Magnetoresistive sensors constructed by the deposition of a thin film ferromagnetic material

- li ¬

on a silicon substrate are well-known in the art, as indicated by the Boord U.S. patent 4,533,872.

The operation of the sensor 10 will be described with reference to the graph of FIGURE 2. The curve V represents the output voltage of the sensor 10 as a function of magnetic field strength in a direction perpendicular to the current flow in the magnetoresistive elements 14. When the field strength is zero, the output voltage V has a maximum value and as the field strength is increased from zero in either direction, the output voltage decreases symmetrically. (The terms 'positive' and 'negative' and the symbols therefor are used in a relative sense to denote opposite directions or polarity of magnetization.) The voltage curve near the peak is highly non-linear and tends to become substantially linear in a mid-range of the voltage variation. In order to obtain directional information regarding an external magnetic field, a bias field having a field strength alternating between +M B and -M B is applied to the magnetoresistive elements 14. This is accomplished by the bias current strap 16 and the associated soft magnetic layer which is alternately driven into magnetic saturation by current pulses of alternate polarity through the current strap 16. When a current pulse is applied in one. direction the device will operate with a positive bias, +M B , which herein is called the "set mode" until the saturation of the soft iron magnetic layer is reversed. A current pulse in the opposite direction will reverse the

direction of saturation and the device will operate with a negative bias, -M B , herein called the "reset mode".

When the device is operated in the alternating set/reset modes and when subjected to zero field strength, the output voltage V will have a value V r in the set mode and also in the reset mode so that the output voltage remains constant at the V r level. When the sensor 10 is subjected to an external magnetic field M., the external field is combined with the bias field M B . As shown in FIGURE 2, if the external field is of positive polarity, i.e. +M., it will add to the bias field +M B to produce a resultant field strength M B + M e which results in an output voltage -V e . In the reset mode, the external field +M C decreases the bias field -M b to produce a net field strength of -M B + M e . This produces an output voltage in the reset mode of +V e . Thus, the output voltage of the sensor 10, when subjected to an external magnetic field of +M e , is an alternating square wave voltage of the same frequency as the alternating square wave voltage applied to the bias current strap 16. The output voltage varies from a positive peak value of +V C in the reset mode to a negative peak value of -V- in the set mode. As indicated in FIGURE 2, the peak-to- peak value of the output voltage V 0 represents the external field M.. As will be discussed subsequently, the voltage V r is an offset voltage which is removed from the output voltage V 0 by AC coupling. It is noted further that if the output

voltage V 0 is positive in the reset mode, the external field M j . is positive and if the output voltage V 0 is positive in the set mode the external field is negative. It is only necessary to measure the positive portion of the output voltage V 0 to determine the magnitude of the external field and the direction of the external field M e will be known from its polarity and whether it is in the set or reset mode.

Now consider the sensor 10 installed in a vehicle, such as a passenger car, as depicted in FIGURE 3. In order to determine the direction of the external field M e , it is necessary to use two single-axis sensors 10 and 10' which are orthogonally oriented relative to each other. The sensor 10 is mounted in the vehicle with its sensitive SA axis parallel to the direction reference axis, i.e. the longitudinal axis Y-Y of the vehicle 26. The sensor 10' is of the same construction as sensor 10 and is mounted adjacent the sensor 10 with its sensitive axis extending parallel to the X-X axis of the vehicle. In such an installation, the sensors are subject to the earth magnetic field M N which is stationary with reference to the earth and it is also subjected to the vehicle magnetic field My which is stationary with respect to the vehicle. The external field M e to which the sensor 10 is subjected is the vector sum of the earth field and the vehicle field. Accordingly, the sensor 10 responds to the Y-axis component of the vehicle field and the sensor 10' responds to the X-

axis component. The vehicle field M v remains constant regardless of the direction heading of the vehicle 26. However, the external magnetic field Mg includes a component due to the earth field M N and the output voltages of the sensor 10 and 10' vary with vehicle heading relative to the magnetic north direction, as will be discussed below.

The electronic compass of this invention is shown in block diagram in FIGURE 4. In general, the compass comprises a two-axis sensor 32 and a multiplexer 34 which are mounted on a sensor circuit board 36. It also comprises a microcomputer 38, an analog-to-digital converter 42 and a digital-to- analog converter 44 which are mounted on a mother board 46. The circuits of FIGURE 4 are operative to measure the X and Y-axis output signals and to process the signals to eliminate the DC voltage offset and to nullify the effect of the vehicle deviating magnetic field to obtain deviation compensation of the compass. The microcomputer 38 is operated under a control program to process the signals to achieve deviation compensation and to compute the magnetic heading of the vehicle, as will be described subsequently.

The circuit of FIGURE 4 will now be described in greater detail. The two-axis sensor 32 comprises the Y-axis sensor 10 and the X-axis sensor 10' mounted with respect to each other and the vehicle 26 as described above. A multiplexer 34 has an address select input 52 for selecting X or Y-axis

output signals. The output signal of the Y-axis sensor 10 is applied to an input 54 of the multiplexer and the X-axis output signal of the sensor 10' is applied to an input 56 of the multiplexer. The output signal of the multiplexer at output 58 is coupled through a capacitor 62 to the input 64 of the A/D converter 42. The capacitor 62 provides AC coupling between the multiplexer output 58 and the A/D converter input 64 to block the DC offset voltage V r discussed above with reference to FIGURE 2. Thus, the amplitude of the output voltages of the sensors 10 and 10' which must be measured by the A/D converter 42 is reduced by the value of the DC offset voltage.

The output of the A/D converter 42 is applied to inputs 62 of the microcomputer 38. The microcomputer 38 processes the digital signal outputs of the A/D converter 42 in accordance with an algorithm for determining the nullifying magnetic field for the respective X-axis and Y-axis sensors 10* and 10 to offset and nullify the effect of the deviating vehicle magnetic field on the sensors. This algorithm is embodied in the program 64 (see FIGURE 7) of the microcomputer 38 which will be described subsequently.

The manner in which the compass is compensated for deviation due to the vehicle magnetic field will be described, in general, with reference to FIGURES 5A and 5B. With the compass represented in FIGURE 4 installed in the vehicle 26,

as described with reference to FIGURE 3, the output signal of the sensor 10 as it is applied through AC coupling to the input of the A/D converter 42 is represented by the wave form V_, in FIGURE 5A. This signal V-, has an offset component D y , prior to deviation compensation, which is of constant value and produced by the Y-axis component of the vehicle field. The Y-axis output signal N_, has an alternating component E γ which is produced by the earth magnetic field in accordance with the direction heading of the vehicle 26. The component Ey varies in a sinusoidal manner as shown in FIGURE 5A relative to the signal level D y as the vehicle is driven through various directions relative to magnetic north. The waveform V_, of the Y-axis output signal may be produced over a relatively short time period or a long time period; it is depicted in FIGURE 5A without regard to time. The output signal, instead, is plotted as a function of vehicle direction. When the vehicle is headed in the direction of magnetic north, the output signal V_, is at its maximum value V-- ^ - and when it is headed in the magnetic south direction it is at a minimum value, V jyπjj ,,. When the heading is either west or east, the value of the Y-axis signal V-, is at the value of the deviation component D y which is half way between the maximum and minimum values.

It is required to determine the current in the deviation offset strap 18 for nullifying the Y- axis component of the deviating magnetic field. For this purpose, the A/D converter 42 is set with a

full-scale range of reading capability which is equal to or slightly greater than the maximum value of the earth field component E γ which occurs within the geographical range, such as the North American continent, in which the vehicle may be operated. This full scale range of the A/D converter 42 is represented by the signal voltage level designated A/D in FIGURE 5A. The operation of the compass circuit to achieve the deviation offset current in strap 18 of the sensor 10 will be described subsequently.

In a manner analogous to that described above for the Y-axis output signal of sensor 10, with reference FIGURE 5A, the X-axis sensor 10' produces an X-axis output signal V ex as depicted in FIGURE 5B. It is noted that this signal V ex has a component D x which is constant as a result of the X-axis component of the deviating vehicle field. It also has an alternating component E x due to the earth field which varies in accordance with the direction heading of the vehicle. However, the alternating component, while varying in a sinusoidal manner, is ninety degrees out-of-phase with the variable component E γ in the output signal of the Y-axis sensor 10. It is noted that the deviation component D x of the output signal V cx of the X-axis sensor 10• is typically different in magnitude from the deviation component D γ of the output signal V ey of the Y-axis sensor 10; the relative magnitudes depend upon the direction of the vehicle magnetic field vector My and they are equal to each other only when

the vector is at forty-five degrees or an odd multiple thereof relative to the longitudinal axis of the vehicle. On the other hand, the alternating component Ex in the X-axis sensor output signal V cx has the same amplitude as the alternating component E γ in the output signal Vgy of the Y-axis sensor 10. As indicated in FIGURE 5B, the full scale range of the A/D converter 42, designated by the signal level A/D, is the same for the sampling of both the Y-axis and X-axis output signals by the A/D converter 42.

The operation of the electronic compass will now be described with reference to FIGURES 4, 5A, 5B, 6 and 7. An accurate determination of the vehicle magnetic heading can be made only if the influence of the deviating magnetic field of the vehicle is nullified. When such nullification is achieved, the Y-axis and X-axis output signals correspond only to the components of the earth magnetic field and can be combined in a known functional relationship to determine the direction of the magnetic north vector. The operation of the magnetic compass for achieving nullification of the deviating magnetic field, for deviation compensation of the compass, will now be described.

A timing diagram depicting the operation for nullification of the deviating vehicle magnetic field and measurement of the earth magnetic field is shown in FIGURE 6. The sensors 10 and 10' are alternately operated in the set mode and the reset mode simultaneously with each other under timing

control signals from the microcomputer 38. In particular, the bias current straps 16 and 16' of sensors 10 and 10 » , respectively, are connected in series and are energized with the same current pulse in the reset direction for a reset period, say five milliseconds, and are energized with the same current pulse in the set direction for a set period, say five milliseconds. During the reset mode, as indicated in FIGURE 6, the output signal of the X- axis sensor 10' is measured by the A/D converter 42. Initially, as indicated in FIGURE 5B the amplitude of the output signal V EX is greater than the full scale of the A/D converter. As a result of such measurement, the microcomputer 38 produces an output signal to the D/A converter 44 which causes it to produce an increment of deviation offset current having a polarity, in the deviation offset current strap 18' of the sensor 10' , such that it nullifies an increment of the X-axis component of the vehicle deviating field. Further, as shown in FIGURE 6, during the set mode, the output signal of the Y-axis sensor 10 is measured by the A/D converter 42. Initially, as indicated in FIGURE 5A, the value of the output signal V will be greater than the full scale of the A/D converter. As a result of this measurement, the microcomputer 38 will provide a control signal to the D/A converter 44 to produce an increment of deviation offset current in the offset current strap 18 of the Y-axis sensor 10 with a polarity such that it nullifies an increment of the Y-axis component of the vehicle deviating field. Next, as indicated in FIGURE 6, the output signal of

the Y-axis sensor 10 is measured during the reset cycle. Following that, the output signal of the X- axis sensor 10' is measured during the set mode and then it is measured during the reset mode. For each output signal measurement which determines that the signal magnitude is greater than the full scale of the A/D converter 42, the current in the corresponding deviation offset current strap 18 or 18 r is incrementally increased. This process continues until the deviation offset current in the current strap 18 of the Y-axis sensor is at a level within the full scale of the A/D converter 42 which is of such value that the Y-axis component of the vehicle deviating field is substantially nullified. The same is done with respect to the X-axis sensor. In this condition, the values of the Y-axis output signal and the X-axis output signal correspond accurately to the earth magnetic field for the particular vehicle headings during which measurements are made. The deviation compensation process is continuous during vehicle operation; the first cycle of compensation is completed when the vehicle has turned through a full circle from any arbitrary starting point. Turning of a full circle is indicated by the occurrence of the peak values v e y π _ x anc * V e y___ corresponding to the maximum and minimum output signals of the Y-axis sensor and the occurrence of V exaax and V exmJa corresponding to the maximum and minimum values of the output signals of the X-axis sensor.

FIGURE 7 is a flow chart representing the program of the microcomputer 38. At block 100, the execution of the program is started and it proceeds to block 102 which reads output signal of the X-axis sensor 10'. In block 104 the program determines whether the value of the X-axis signal is within the full scale range of the A/D converter 42. If it is not, the program advances to block 106 which determines whether the value of X is greater than the full scale of the A/D converter 42. If it is, block 108 increases the nullifying field in the -X direction and the program loops back to block 102. If block 106 determines that X is not greater than the full scale, block 112 increases the nullifying field in the +X direction and the program loops back to block 102.

If at block 104 it is determined that the measured value of X-axis output signal is within the full scale range of the A/D converter 42, the program advances to block 114 which reads the measurement of the output signal of the Y-axis sensor 10. Then, block 116 determines whether the value of the Y-axis signal is within the full scale range of the A/D converter 42. If it is not, block 118 determines whether the value is greater than the full scale range. If it is, block 122 increases the nullifying field in the Y-axis sensor 10 in the -Y direction. Then, the program loops back to block 102. If at block 118 it is determined that the output signal of the Y-axis sensor is not greater than the full scale range of the A/D converter,

block 124 increases the nullifying field of the Y- axis sensor in the +Y direction and the program loops back to block 102. This program execution is continued until at block 104 it is determined that the X-axis output signal is within the full scale range of the A/D converter 42 and further it is determined at block 116 that the output signal of the Y-axis sensor is within the full scale range. Then, the program advances to block 126 which determines whether the maximum value or positive peak of the output signal of the X-axis sensor 10' has been identified. If it has not, the program loops back to block 102. If it has, the program advances to block 128 which determines whether the minimum value or negative peak of the output signal of the X-axis sensor has been identified. If it has not, the program loops back to block 102; if it has, the program advances to block 132. Block 132 determines whether the maximum value or positive peak of the output signal of the Y-axis sensor has been identified. If it has not, the program loops back to block 102. If it has, the program advances to block 134. Block 134 determines whether the minimum value or negative peak of the output signal of the Y-axis sensor has been identified. If not, the program loops back to block 102. If it has, it is determined that the deviation compensation procedure has completed a full cycle.

In this state, the X-axis and Y-axis output signals correspond substantially to the earth magnetic field and are suitable for computing the

magnetic heading of the vehicle. It will be understood that the process described is repeated continuously and adjusts the deviation compensation in accordance with changes in the vehicle magnetic field that may occur and to continually enhance the accuracy of the heading indication. When the block 134 determines that a full cycle of deviation compensation has been executed, the program advances to block 136 which computes the magnetic heading of the vehicle. Then, block 138 adds a stored value of variation compensation to obtain the true heading of the vehicle. The true heading is displayed for the information of the vehicle driver by block 142.

The circuit of the electronic compass is shown in the schematic diagrams of FIGURES 8, 9, 10A, 10B and 11. FIGURE 8 shows the Y-axis signal channel 202 for developing the output signal V ey from the output sensor 10. The bridge circuit of the sensor 10 is excited with a D/C voltage V cc . The output of the bridge circuit is supplied to the input of a first stage amplifier 204 which provides a voltage gain of about ten or twelve. The amplified output is applied through an AC coupling capacitor 206 to the input of a second stage amplifier 208 which provides a gain of about twenty. The output of the amplifier 208 is applied through an AC coupling capacitor 212 to a terminal 214 for application of the signal V cy to the circuit shown in FIGURE 10A which will be described presently.

The X-axis channel 222 for developing the output signal V cx from the output sensor 10* is shown in FIGURE 9 and is similar to that of FIGURE 8. The bridge circuit of the sensor 10' is excited with the DC voltage V cc . The output of the bridge circuit is supplied to the input of a first stage amplifier 224 which provides a voltage gain of about ten or twelve. The amplified output is applied through an AC coupling capacitor 226 to the input of a second stage amplifier 228 which provides a gain of about twenty. The output of the amplifier 228 is applied through an AC coupling capacitor 232 to a terminal 234 for application of the signal V ex to the circuit shown in FIGURE 10A which will be described presently.

FIGURES 10A and 10B taken together -form a schematic diagram of the electronic circuits, including the microcomputer 38, which are coupled with the circuits of FIGURES 8 and 9 described above and the circuit of FIGURE 11 which will be described below. The microcomputer 38 is, in the illustrative example, an eight bit microprocessor type COP881C available from National Semiconductor, Inc. of Palo Alto, California. As shown in FIGURE 10A, the microcomputer 38 is provided with a reset circuit 242 of conventional design coupled with the pins V, ; ,., Reset and Ground as indicated. The microcomputer is also provided with a clock circuit 244, also of conventional design, and connected with the pins CK1 and CK2. As shown in FIGURE 10B, the microcomputer 38 is coupled with an EEPROM 246 at pins Gl, G5, G4,

G6 and G2. The EEPROM 246 serves as a permanent memory for data to be stored when the power to the electronic circuit is interrupted. A compass heading display 248, such as a vacuum fluorescent display, is coupled to pins G5, G4 and G6. Referring again to FIGURE 10A, a manual switching circuit 252 is coupled with microcomputer pins 10, 11, 12 and 13. A manual switch 254 is provided for. use in connection with compensating the compass for variation. Also, a manual switch 255 is shown for changing the brightness of the display 248 but automatic means could be provided. The remaining circuits associated with the microcomputer 38, which will be described presently, are operative to control the sensors 10 and 10' and to process the output signals thereof to provide deviation compensation and to develop the heading direction signals. The heading is presented in alphanumeric form on the display 248 to indicate the cardinal and intercardinal compass points heading to the vehicle driver.

A driver circuit 282 for the set/reset current straps 16 and 16' of the sensors 10 and 10' is shown in FIGURE 11. The switching signal for the driver circuit 282 is produced by the microcomputer 38 at output pin DO and applied to the input terminal 284. The driver circuit 282 comprises a pair of Darlington transistors 286 and 288 which are alternately switched conductive and non-conductive in response to the switching signal on connector 284. Accordingly, the current straps 16 and 16' are

energized with current pulses as shown in the timing diagram of FIGURE 6 and described above to provide the set and reset modes for the sensors 10 and 10' for the measurement of the Y-axis sensor output signal and X-axis sensor output signal, respectively.

As shown in FIGURE 10A, the multiplexer circuit 52 receives the Y-axis sensor output signal at terminal 214 and receives the X-axis sensor output signal at terminal 234. The multiplexer 34 is provided with an address signal from the data output pins Dl and D2 of the microcomputer 38 which is applied to pins A and B of the multiplexer 52. Thus, output signals of the Y-axis and X-axis sensors 10 and 10* are accessed alternately in timed relation with the set and reset modes as described with reference to FIGURE 6. The sensor output signals are alternately outputted through pin 0/1 of the multiplexer to the A/D converter 42 shown in FIGURE 10A. The A/D converter includes a comparator 256 which has its inverting input connected with the 0/1 output pin of the multiplexer 52. The non- inverting input of the comparator 256 is connected with the output of a ramp generator 258 which receives a pulsed input from pin D3 of the microcomputer 34. A clamp circuit 262 is coupled with the ramp generator 258 and clamps the ramp generator output at a certain voltage level so that the output does not go all the way to ground after each ramp which would require a time delay on build¬ up to the ramp reference voltage. The comparator

256 is operated with a reference voltage, for example, of about 2.5 volts on the non-inverting input. The A/D converter has a full scale range of 2.0 volts above the reference and, for example, the clamp voltage is about 2.3 volts. The ramp voltage is incremented at the rate of one millivolt per microsecond and the pulse count required to reach the signal voltage level at comparator 256 is stored in a register and represents the measured value of the sensor voltage applied to the A/D converter at comparator 256. The pulse count register indicates when the signal measurement is greater than the full scale range of the A/D converter 42.

As shown in FIGURE 10B, the D/A converter 44 is coupled with output pins L0 through L7. The D/A converter 44 is a ladder network known as an R2R network and, for example, develops an output voltage of 2.5 volts at a register count of 127. The output of the D/A converter is applied through a voltage- to-current converter comprising amplifiers 264 and 266. The current amplifier 266 develops the offset current supply at connector 268 for the offset current straps 18 and 18• which are shown in FIGURE 10A. The offset current return circuit 272 of FIGURE 10A comprises an amplifier 274 which has its non-inverting input coupled with pin 2 of the multiplexer 52. The output of the amplifier 274 provides the offset current return at the terminal 276. The operation of the A/D converter 42 and the D/A converter 44 for developing the offset current

required to provide deviation compensation is described above with reference to FIGURES 5A and 5B.

Although the description of this invention has been given with reference to a particular embodiment, it is not to be construed in a limiting sense. Many variations and modifications will now occur to those skilled in the art. For a definition of the invention, reference is made to the appended claims.