Distance-measuring system using orthogonal magnetic field generators and orthogonal magnetic field sensors

The separation between first and second points is determined. At the first point are first, second and third mutually orthogonal coils that are excited in sequence, so that first, second and third magnetic fields are sequentially derived. At the second point are first, second and third mutually orthogonal magnetic field sensors that respond to the first, second and third magnetic fields, respectively to derive responses indicative of the magnetic fields coupled to them. The derived responses are combined in accordance with: ##EQU1## to derive the separation magnitude, where: PA1 V11, V12 and V13 are responses of the first, second and third sensors while the first coil is excited; PA1 V21, V22 and V23 are responses of the first, second and third sensors while the second coil is excited; PA1 V31, V32 and V33 are responses of the first, second and third sensors while the third coil is excited. A variable gain element responds to the responses derived from the sensors for selectively modifying the amplitude of signals transduced by the sensors. An analog to digital converter responds to the selectively modified signals as derived by the variable gain element for deriving a multi-bit digital output signal having a predetermined optimum range. In response to the magnitude of the multi-bit digital output signal the gain of the variable gain element is controlled to maintain the multi-bit digital output signal in the range.

BACKGROUND ART 
The present invention relates to a device for measuring the distance 
between two points and, more particularly, a sensor capable of measuring 
the distance by magnetic field means. 
Various sensors have been developed along with the progress of 
micro-computers. Among these sensors are included the one for measuring 
the distance between two points. 
The distance is conventionally measured by the angle of a rotary encoder 
arranged, as a distance-measuring sensor, so it is turned at a point where 
two sides of a triangle intersect. Assuming that the length of one side of 
the triangle is l, the distance can be obtained from 2 l sin .theta./2 
wherein .theta. represents the angle formed by two sides of the triangle. 
The distance is also measured using the capacitance of electrodes arranged 
at both ends of the distance to be measured. Assuming that the area of 
each electrode is s and that the distance between them is d, the capacity 
c is equal to .epsilon.s/d, where .epsilon. represents the dielectric 
constant of a dielectric present between the electrodes. The distance d 
can be obtained from this equation c=.epsilon.s/d. 
The rotary encoder is limited in use because it specifies two points 
mechanically. The capacitance structure is likely to be influenced by 
ambient circumstances, thus making errors because of humidity, position of 
measuring person and so on. 
DISCLOSURE OF INVENTION 
The present invention is therefore intended to eliminate the drawbacks and 
the object of the present invention is to provide a distance-measuring 
sensor capable of measuring the distance between two points through the 
degree of magnetic coupling. The invention comprises at least one magnetic 
field generator means for generating a magnetic field, first, second and 
third transformer means positioned in the vicinity of the magnetic field 
generator means to transform a magnetic field generated by the magnetic 
field generator means to voltage. An operational processor responds to 
outputs of the transformer means to derive distance data from the magnetic 
field generator means as well as from the transformer means.

BEST MODE FOR CARRYING OUT THE INVENTION 
FIG. 1 is a circuit diagram of a first embodiment according to the present 
invention. A magnetic field generator 1 includes coils for generating 
magnetic fields in three directions. FIG. 2 is a schematic diagram of the 
physical structure of coils which form the magnetic field generator 1. 
Each of coils L1-L3 is wound twice around a cube s to generate a magnetic 
field in three directions. Coils L1-L3 respectively generate magnetic 
fields along axes x, y and z. The magnetic field generator 1 is connected 
to a driver 2, which selects the coils L1-L3 through a signal line 4 
extending from a control circuit 3, to generate alternating signals 
derived from an oscillator 5. FIG. 3 is a circuit diagram of a driver. 
Inputs of analog switches 2-1-2-3 are connected to the oscillator 5 and 
control line 4 for switches 2-1--2-3 is connected to the control circuit 
3. Outputs of the analog switches 2-1-2-3 are connected to the coils L1, 
L2 and L3 of the magnetic field generator 1. The analog switches 2-1, 2-2 
and 2-3 selected by a signal on control line 4 are turned on to supply the 
alternating signals of the oscillator 5 to coils L1, L2 and L3, 
respectively, including coils SL1-SL3, having the same structure as coils 
L1, L2 and L3 of the magnetic field generator 1 shown in FIG. 2, detects a 
magnetic field in three directions. 
Output signals of the sensor 6 are applied to a detector adder 7, which 
serves to square-law detect and add signals obtained from the sensor 6. 
FIG. 4 is a circuit diagram of the detector adder 7. Signals transduced by 
coils SL1-SL3 of the sensor 6 are applied to square-law detectors 7-1-7-3 
which respectively derive signals representing the squares of the signals 
transduced by coils SL1-SL3. The output signals of the square-law 
detectors 7-1-7-3 are applied to and added together by adder 7-4, which 
derives an output proportional to a value obtained by squaring the peak 
magnitude quantity of the alternating-current magnetic field vector at the 
location of the sensor 6. Detector adder 7-4 derives several outputs in 
response to the magnetic fields generated by each of the magnetic field 
generating coils L1-L3. The outputs of the detector adder 7-4 are applied 
to and added together by operational process circuit 8. FIG. 5 is a 
circuit diagram of the operational process circuit 8. 
In response to the switching operation of each of analog switches 2-1-2-3 
of the driver 2, each of analog switches 8-1-8-3 is sequentially activated 
to an on condition. Outputs of the analog switches 8-1-8-3 are applied to 
analog memories 8-4-8-6. For example, in response to analog switches 8-1, 
8-2 and 8-3 respectively being turned on in response to the switching 
operations of analog switches 2-1, 2-2 and 2-3 of the driver 2, outputs of 
the detector adder 7-4 obtained from the magnetic field generated by 
magnetic field generating coils L1-L3 are stored in the analog memories 
8-4-8-6, respectively. 
Outputs of analog memories 8-4-8-6 are applied to and added in adder 8-7. 
Thus adder 8-7 derives signals having values proportional to the sum of 
the squares of each of scalar quantities, at the location of the sensor 6, 
of the magnetic field generated in three directions in response to the 
magnetic field generating coils L1-L3. 
The output of the adder 8-7 is applied to a sixth power root operation 8-8, 
which derives an output signal representing the reciprocal or inverse of 
the sixth power root of the input signal thereof. FIG. 6 is a 
characteristic curve relating the distance between the magnetic field 
generator 1 and the sensor 6 relative to the output voltage of the 
operator 8-8. The relation changes substantially linear. Namely, the 
output voltage of the operational process circuit 8 is proportional to the 
distance between the magnetic field generator 1 and the sensor 6 with 
oscillator 5 driving the generators at a frequency of 100 kHz. The sensor 
and the magnetic field generator are changed in direction at each of the 
points. 
Referring to the first embodiment of the present invention shown in FIG. 1, 
detailed description is now made of the signals derived by the system, 
assuming that the amplitudes of the alternating signals derived by sensor 
coils SL1, SL2 and SL3 are respectively V11, V12 and V13 and that output 
oscillator 5 drives coil L1 at a frequency of 100 kHz. The signals having 
amplitudes V11, V12 and V13 are applied to, detected, and then squared by 
square-law detectors 7-1, 7-2 and 7-3, which respectively derive DC 
signals having magnitudes represented by V11.sup.2, V12.sup.2 and 
V13.sup.2. The output signals of detectors 7-1, 7-2 and 7-3 are summed by 
the adder 7-4, which derives a DC output in accordance with V11.sup.2 
+V12.sup.2 +V13.sup.2. When the output of oscillator 5 is applied to the 
coil L1, the analog switch 8-1 is turned on, causing the data values 
V11.sup.2 +V12.sup.2 +V13.sup.2 to be stored in the analog memory 8-4. 
Next assume that sensor coils SL1, SL2 and SL3 respectively derive a.c. 
signals having amplitudes V21, V22 and V23 while the output of oscillator 
5 is applied to the coil L2 of the magnetic field generator. A.c. signals 
having amplitudes V21, V22 and V23 are similarly square-law detected by 
the square-law detectors 7-1, 7-2 and 7-3 and then added by the adder 7-4, 
which derives a D.C. output representing V21.sup.2 +V22.sup.2 +V23.sup.2. 
Since the analog switch 8-2 is turned on at this time, the data value 
V21.sup.2 +V22.sup.2 +V23.sup.2 is stored in the analog memory 8-5. Sensor 
coils SL1, SL2 and SL3 respectively derive a.c. signals having values of 
V31, V32 and V33 when the output of oscillator 5 is applied to the coil L3 
of the magnetic field generator; the data value V31.sup.2 +V32.sup.2 
+V33.sup.2 is stored in the analog memory 8-6 in response thereto. 
Outputs of the analog memories 8-4, 8-5 and 8-6 are applied to the adder 
8-7 so that output of the adder 8-7 is a signal having a magnitude 
representing V11.sup.2 +V12.sup.2 +V13.sup.2 +V21.sup.2 +V22.sup.2 
+V23.sup.2 +V31.sup.2 +V32.sup.2 +V33.sup.2. The output of adder 8-7 is 
processed by sixth power root operator 8-8 to derive a signal value 
representing the sixth power root thereof; the reciprocal or inverse of 
the sixth power is derived so adder 8-8 produces an output signal in 
accordance with: 
##EQU2## 
All of the above-described circuits are intended to operate on the inputs 
thereof to derive resultant output voltage values. These output voltage 
values are thus multiplied by specified constants, assumed to be one for 
clarity of description. Thus, the ordinate axis in FIG. 6 also represents 
voltage values. 
FIG. 7 is a circuit diagram of a second embodiment of the present 
invention. Oscillator 5, having an output frequency of 100 kHz, drives 
analog switches 2-1, 2-2 and 2-3, having outputs amplified by amplifiers 
AMP1, AMP2 and AMP3, which in turn drive coils L1, L2 and L3, having the 
same construction as coils L1-L3, FIG. 2. Control terminals of the analog 
switches 2-1, 2-2 and 2-3 are connected to a micro-processor unit MPU. 
Sensor coils SL1, SL2 and SL3, having the same construction as coils L1, 
L2 and L3, are respectively connected to analog switches 2-1, 2-2 and 2-3. 
Output signals of analog switches 9-1, 9-2 and 9-3 are applied to a gain 
controller GC. Control terminals of the analog switches 9-1, 9-2 and 9-3 
are connected to the micro-processor unit MPU, which also supplies control 
signals to gain controller GC, having an output signal that is coupled to 
detector 10. The output signal of gain controller GC is applied to 
detector 10, having a DC output signal representing the peak values of the 
gain controller a.c. output; the DC output of detector 10 is supplied to 
10-bit analog/digital converter A/D. Analog/digital converter A/D derives 
a digital data output signal that is applied to the micro-processor unit 
MPU. 
In operation, analog switch 2-1 is turned on by micro-processor unit MPU, 
causing an alternating-current magnetic field of 100 kHz to be generated 
by coil L1. This magnetic field is coupled to sensor coils SL1, SL2 and 
SL3, which respond to it to generate three separate alternating-current 
voltages. Micro-processor unit MPU turns on analog switch 9-1 to enable 
the a.c. voltage transduced by coil SL1 to be measured. The a.c. voltage 
generated by coil SL1 is amplified by gain controller GC, thence applied 
to the analog/digital converter A/D via detector 10. The converting 
process of analog/digital converter A/D starts when terminal C thereof 
receives a signal from the micro-processor unit MPU. When each conversion 
has been completed, converter A/D supplies a signal to micro-processor 
unit MPU via terminal R of the converter. 
When a 10-bit output signal analog/digital converter A/D is not in a 
specified range, the micro-processor unit MPU changes the gain of gain 
controller GC to bring the converter output into the specified range. Gain 
controller GC includes a three-stage amplifier and eight different gains 
that are multiples of 1-8.times.64 .times.512; the selected range of 
controller GC is determined by the value of control signals applied to the 
controller by micro-processor unit MPU. Namely, the gain is selected as 
one of 1, 8, 64, 512, 4096, 32768, 262144 and 2097152. When the data 
output signal D of analog/digital converter A/D is between the binary 
values "0001111111" and "1111111110", gain controller GC has an optimum 
gain. If the output of converter A/D is less than and greater than this 
range, the gain of controller GC is increased and decreased respectively. 
Assume, e.g., that the gain of controller GC is 512 and the output of the 
analog/digital converter A/D is "0001011010", a value less than the lower 
limit of the "0001111111". Micro-processor MPU responds to the 
"0001011010" value at the output of converter A/D to adjust the gain of 
controller GC so it is 4096. As a result, the output of analog/digital 
converter A/D becomes "1011010xxx" wherein the digit x represents either 
"0" or "1", depending on the output voltage of detector 10. If the output 
of converter A/D is "1111111111", the gain of controller GC is decreased 
from 512 to 64 and a measurement of the output of the selected sensor 
SL1-SL3 is made again by analog/digital converter A/D. If the output of 
converter A/D is still "1111111111", the gain of controller GC is 
decreased again, this time to 32, and operation similar to that already 
described above is repeated. When the resultant output of converter A/D 
obtained during the re-measurement is in the specified range, it is picked 
up by the micro-processor unit MPU. 
This operation enables the mantissa portion of the value associated with 
the signal at the input of gain controller GC to be obtained in response 
to the output of analog/digital converter A/D and index portion of the 
value to be obtained as a result of the magnitude of the signal 
controlling the gain of controller GC. 
The operations described above are similarly performed in connection with 
sensor coils SL2 and SL3. Also, analog switches 2-2 and 2-3 are 
sequentially closed to drive coils L2 and L3, causing similar operations 
to be performed. No more than two of the analog switches 2-1, 2-2 and 2-3 
are closed simultaneously. Similarly, no more than two of analog switches 
9-1, 9-2 and 9-3 are closed simultaneously. The operation described above 
enables nine digital data signals to be supplied to micro-processor unit 
MPU. The micro-processor unit MPU squares each of the nine digital data 
signals, adds them, calculates the sixth power root of the resultant, and 
derives the reciprical or inverse number, thus enabling the distance 
between the magnetic field generator 1 and the sensor 6 to be obtained. 
Since the derived data differs depending upon the number of turns and the 
bulkiness of coils of the magnetic field generator 1 and of the sensor 6, 
they must be multiplied by an appropriate proportionality constant. 
The micro-processor unit MPU derives a digital data signal representing the 
separation of coils L1-L3 from coils SL1-SL3. The separation representing 
signal is displayed using an eight-segment LED (not shown), for example. 
While the above-described embodiments of the present invention employ 
sensor coils, it is to be understood that Hall elements and the like may 
be used. When Hall elements are used, the magnetic field generator may 
generate a DC field. While air cores are illustrated on the drawing, cores 
having magnetic cores may be used to enhance sensitivity. 
Three magnetic field generators are employed in the present invention, to 
reduce the variable error which depending upon the direction of the 
magnetic field generators. If the magnetic field generators are increased 
in number, to, e.g., six or twelve, greater measurement accuracy is 
attained. 
As described above, the present invention enables the distance between two 
points in a three dimensional space to be obtained. The present invention 
further enables a certain value to be obtained independent of the 
directions in which the sensors and the generators are directed.