Proximity sensor circuit and distance detection method

文档序号:779347 发布日期:2021-04-09 浏览:13次 中文

阅读说明:本技术 一种接近传感器电路及检测距离的方法 (Proximity sensor circuit and distance detection method ) 是由 邓志才 陈坤速 于 2020-12-04 设计创作,主要内容包括:本发明公开的一种接近传感器电路及检测距离的方法,包括:LC振荡电路:当检测金属体靠近或远离线圈时,用于产生特定频率的振荡信号;采样电路:用于采集阈值电压内LC振荡电路产生的振荡信号;转换电路:用于将采样电路采集到的振荡信号转换为高频脉冲信号;信号处理电路:用于将转换电路产生的高频脉冲信号进行运算处理后再根据控制电路的指令执行不同操作;控制电路:用于接收电路外部控制指令;输入输出控制电路:用于将控制电路发送的数据通过输出驱动端OUT输出;本发明在加工上减少人工提高良率,产品上外围简单体积小,满足客户小型化需要,性能上一致性好精度高并且参数可设置,满足产品升级的需求,具有极强的实用性。(The invention discloses a proximity sensor circuit and a method for detecting distance, comprising the following steps: an LC oscillation circuit: when the metal body is detected to be close to or far away from the coil, the coil is used for generating an oscillating signal with a specific frequency; a sampling circuit: the circuit is used for acquiring oscillation signals generated by an LC oscillation circuit in a threshold voltage; a conversion circuit: the sampling circuit is used for sampling an oscillation signal acquired by the sampling circuit; a signal processing circuit: the high-frequency pulse signal processing circuit is used for carrying out operation processing on the high-frequency pulse signal generated by the conversion circuit and then executing different operations according to the instruction of the control circuit; the control circuit: the control circuit is used for receiving a circuit external control instruction; an input/output control circuit: the output driving end OUT is used for outputting the data sent by the control circuit; the invention reduces manpower in processing to improve yield, has simple upper periphery and small volume of the product, meets the miniaturization requirement of customers, has good consistency and high precision in performance, can set parameters, meets the requirement of upgrading the product, and has strong practicability.)

1. A proximity sensor circuit, characterized by: the method comprises the following steps:

an LC oscillation circuit: the circuit comprises an external wiring coil and a capacitor, and is used for generating an oscillating signal with a specific frequency when a metal body is detected to be close to or far away from the coil;

a sampling circuit: the circuit is used for acquiring oscillation signals generated by an LC oscillation circuit in a threshold voltage;

a conversion circuit: the sampling circuit is used for sampling an oscillation signal acquired by the sampling circuit;

a signal processing circuit: the high-frequency pulse signal processing circuit is used for carrying out operation processing on the high-frequency pulse signal generated by the conversion circuit and then executing different operations according to the instruction of the control circuit;

the control circuit: the detection circuit is used for receiving a circuit external control instruction, sending the instruction to the circuit, completing the distance detection from the coil to the position of the detection metal body, and sending the result to the input and output control circuit;

an input/output control circuit: the output driving end OUT is used for outputting the data sent by the control circuit.

2. A proximity sensor circuit as claimed in claim 1, wherein: the LC oscillation circuit further includes:

an oscillation amplitude control circuit: for controlling the amplitude of the LC oscillator circuit and for correcting the amplitude in response to changes in the circuit of the external temperature sensor.

3. A proximity sensor circuit as claimed in claim 2, wherein: the method comprises the following steps:

a filter circuit: the device is used for processing the oscillation signal generated by the LC oscillation circuit through a band-pass filter and removing the jittering high-low frequency interference signal.

4. A proximity sensor circuit according to claim 3, wherein: the method comprises the following steps:

a high-frequency oscillation circuit: the circuit is used for generating frequency signals required by an LC oscillating circuit, a sampling circuit, a conversion circuit, a signal processing circuit, a control circuit, an input and output control circuit, an oscillation amplitude control circuit and a filter circuit.

5. A proximity sensor circuit as claimed in claim 1, wherein: further comprising:

a storage circuit: for storing the amplitude value and frequency value of the LC oscillating circuit; collecting a threshold voltage value of an oscillation signal in a sampling circuit; the proximity sensor circuit comprises a voltage reference value and an initial frequency inside the proximity sensor circuit, a correction value for ensuring circuit consistency, a set value in an initial state and a set value for detecting a distance.

6. A distance detection method is characterized in that: the method using the proximity sensor circuit of any of claims 1 to 5, the method comprising the steps of:

s101, when the metal body is detected to be close to or far away from the coil, the LC oscillating circuit generates an oscillating signal with specific frequency;

s102, a sampling circuit collects oscillation signals in a threshold voltage;

s103, converting the acquired oscillation signals into high-frequency pulse signals by a conversion circuit;

s104, the signal processing circuit performs digital filtering operation on the high-frequency pulse signal to obtain a digital signal which can be read by the control circuit;

s105, the control circuit receives an external control instruction of the circuit and completes the detection of the distance between the proximity sensor and the position of the detected metal body;

and S106, the input and output control circuit outputs the distance detection through the output driving end OUT.

7. The distance detection method according to claim 6, characterized in that: before the metal body is close to or far away from the coil, the method further comprises the following steps:

setting and storing an amplitude value and a frequency value of the LC oscillating circuit;

setting and storing a threshold voltage value of an oscillation signal collected in a sampling circuit;

setting and storing a reference value of voltage inside the proximity sensor circuit, an initial frequency, a correction value for ensuring circuit consistency, a set value in an initial state and a set value of a detection distance;

frequency signals required by the LC oscillating circuit, the sampling circuit, the conversion circuit, the signal processing circuit, the control circuit and the input and output control circuit are set and stored.

8. A distance detection method according to claim 7, characterized in that: further comprising:

the amplitude is corrected according to the variation of the circuit of the external temperature sensor.

9. A distance detection method according to claim 8, characterized in that: before the sampling circuit collects the oscillation signal within the threshold voltage, the method further comprises the following steps:

and (3) processing an oscillation signal generated by the LC oscillation circuit through a band-pass filter to remove the jittering high-low frequency interference signal.

Technical Field

The invention belongs to the technical field of proximity sensors, and particularly relates to a proximity sensor circuit and a distance detection method.

Background

LC proximity sensors are widely applied to the fields of industrial equipment, automobile electronics and the like, and most of proximity sensors in the market at present adopt discrete devices or analog circuits such as a general amplifier comparator and the like to realize distance identification, and adopt external devices such as external resistors or capacitors to adjust distance setting and other parameters.

The traditional production process of the proximity sensor comprises the steps of circuit board surface mounting processing, discrete device welding, circuit board debugging, assembling, glue pouring and aging testing; due to the influences of factors such as parameter differences of discrete devices such as a coil (L) and a capacitor, peripheral environments such as a processing technology assembly technology and the like, the consistency of products is poor, the detection precision is not high, glue pouring and assembly are required to be carried out on a circuit board after debugging is finished, product performance can be changed in the processing process, and the assembled products can not be repaired, so that the yield of finished products is lost; and because every product all needs the debugging before the assembly, needs a large amount of manual works, and inefficiency is slow, along with the increase of the human cost in recent years to and the terminal customer promotes to the performance requirement of product, still a majority of products need miniaturize, and traditional LC proximity sensor can't satisfy the demand of terminal more and more. Therefore, it is necessary to develop an asic to overcome the above drawbacks, thereby improving the product quality.

Disclosure of Invention

The invention overcomes the defects of the prior art, and solves the technical problems that: provided are a proximity sensor circuit and a method for detecting a distance, which can improve the yield of proximity sensors and improve the detection accuracy.

In order to solve the technical problems, the invention adopts the technical scheme that: a proximity sensor circuit comprising: an LC oscillation circuit: the circuit comprises an external wiring coil and a capacitor, and is used for generating an oscillating signal with a specific frequency when a metal body is detected to be close to or far away from the coil; a sampling circuit: the circuit is used for acquiring oscillation signals generated by an LC oscillation circuit in a threshold voltage; a conversion circuit: the sampling circuit is used for sampling an oscillation signal acquired by the sampling circuit; a signal processing circuit: the high-frequency pulse signal processing circuit is used for carrying out operation processing on the high-frequency pulse signal generated by the conversion circuit and then executing different operations according to the instruction of the control circuit; the control circuit: the detection circuit is used for receiving a circuit external control instruction, sending the instruction to the circuit, completing the distance detection from the coil to the position of the detection metal body, and sending the result to the input and output control circuit; an input/output control circuit: the output driving end OUT is used for outputting the data sent by the control circuit.

Preferably, the LC oscillating circuit further includes: an oscillation amplitude control circuit: for controlling the amplitude of the LC oscillator circuit and for correcting the amplitude in response to changes in the circuit of the external temperature sensor.

Preferably, the proximity sensor circuit comprises: a filter circuit: the device is used for processing the oscillation signal generated by the LC oscillation circuit through a band-pass filter and removing the jittering high-low frequency interference signal.

Preferably, the proximity sensor circuit comprises: a high-frequency oscillation circuit: the circuit is used for generating frequency signals required by an LC oscillating circuit, a sampling circuit, a conversion circuit, a signal processing circuit, a control circuit, an input and output control circuit, an oscillation amplitude control circuit and a filter circuit.

Preferably, the proximity sensor circuit further includes: a storage circuit: for storing the amplitude value and frequency value of the LC oscillating circuit; collecting a threshold voltage value of an oscillation signal in a sampling circuit; the proximity sensor circuit comprises a voltage reference value and an initial frequency inside the proximity sensor circuit, a correction value for ensuring circuit consistency, a set value in an initial state and a set value for detecting a distance.

Accordingly, a distance detection method utilizing a proximity sensor circuit as described above, comprising the steps of: s101, when the metal body is detected to be close to or far away from the coil, the LC oscillating circuit generates an oscillating signal with specific frequency; s102, a sampling circuit collects oscillation signals in a threshold voltage; s103, converting the acquired oscillation signals into high-frequency pulse signals by a conversion circuit; s104, the signal processing circuit performs digital filtering operation on the high-frequency pulse signal to obtain a digital signal which can be read by the control circuit; s105, the control circuit receives an external control instruction of the circuit and completes the detection of the distance between the proximity sensor and the position of the detected metal body; and S106, the input and output control circuit outputs the distance detection through the output driving end OUT.

Preferably, before the detecting metal body approaches or moves away from the coil, the method further comprises: setting and storing an amplitude value and a frequency value of the LC oscillating circuit; setting and storing a threshold voltage value of an oscillation signal collected in a sampling circuit; setting and storing a reference value of voltage inside the proximity sensor circuit, an initial frequency, a correction value for ensuring circuit consistency, a set value in an initial state and a set value of a detection distance; frequency signals required by the LC oscillating circuit, the sampling circuit, the conversion circuit, the signal processing circuit, the control circuit and the input and output control circuit are set and stored.

Preferably, the distance detection method further includes: the amplitude is corrected according to the variation of the circuit of the external temperature sensor.

Preferably, before the sampling circuit collects the oscillation signal within the threshold voltage, the sampling circuit further includes: and (3) processing an oscillation signal generated by the LC oscillation circuit through a band-pass filter to remove the jittering high-low frequency interference signal.

Compared with the prior art, the invention has the following beneficial effects:

the invention discloses a proximity sensor circuit and a method for detecting distance, comprising the following steps: an LC oscillating circuit for generating an oscillating signal; the sampling circuit is used for acquiring an oscillation signal generated by the LC oscillation circuit within the threshold voltage; the conversion circuit is used for converting the oscillation signal acquired by the sampling circuit into a high-frequency pulse signal; the signal processing circuit is used for carrying out operation processing on the high-frequency pulse signal generated by the conversion circuit and then executing different operations according to the instruction of the control circuit; the input and output control circuit is used for receiving a circuit external control instruction, sending the instruction to the circuit, completing the distance detection between the coil and the position of the detected metal body, and sending the result to the input and output control circuit and the input and output control circuit for outputting the data sent by the control circuit through the output driving end OUT; the invention integrates the LC oscillating circuit, the oscillation amplitude control circuit, the filter circuit, the sampling circuit, the conversion circuit, the signal processing circuit, the control circuit, the input and output control circuit, the high-frequency oscillating circuit and the storage circuit, reduces manpower in processing, improves the yield, enables the production line to be more intelligent, has simple periphery and small volume on the product, meets the miniaturization requirement of customers, has good consistency and high precision in performance, can set parameters, meets the requirement of product upgrading, and has strong practicability.

Drawings

The present invention will be described in further detail with reference to the accompanying drawings;

FIG. 1 is a schematic diagram of a proximity sensor circuit and peripheral application of the present invention;

FIG. 2 is a diagram showing an oscillation waveform and an oscillation amplitude adjustment of the oscillation circuit according to the present invention;

FIG. 3 is a graph showing the relationship between the distance from the metal body to the detection coil and the oscillation amplitude in the present invention;

FIG. 4 is a graph of oscillation amplitude versus sampling circuit in the present invention;

FIG. 5 is a diagram of a relationship between a sampling signal and a converted pulse signal according to the present invention;

FIG. 6 is a flow chart of the circuit operation, i.e., distance detection, of the present invention;

FIG. 7 is a sampling circuit diagram for acquiring waveforms between two thresholds in the present invention;

FIG. 8 is a schematic flow chart of a distance detection method according to the present invention;

in the figure: an LC oscillation circuit 1, an oscillation amplitude control circuit 11, a sampling circuit 2, a conversion circuit 3, a signal processing circuit 4, a control circuit 5, an input/output control circuit 6, a filter circuit 7, a high-frequency oscillation circuit 8, and a storage circuit 9.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments, but not all embodiments, of the present invention; all other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

A complete proximity switch sensor generally comprises: an oscillation detection part consisting of an external coil 11A (L), a capacitor 11B (C) and a built-in circuit of the invention; an auxiliary circuit consisting of an external temperature sensor 10A, an LED indicator light 10C, a partial external discrete device 10B and the like; and housing and conductors (30A, 30B, 30C), some of the circuitry peripheral such as power supply regulation protection not being embodied in this schematic diagram, as shown in fig. 1, a proximity sensor circuit comprising:

LC oscillation circuit 1: the circuit comprises an external wiring coil and a capacitor, and is used for generating an oscillating signal with a specific frequency when a metal body is detected to be close to or far away from the coil; due to the difference of the assembling process and the influence of different environmental temperatures, the LC oscillating circuit 1 can be adjusted and set for the difference.

The sampling circuit 2: the circuit is used for collecting oscillation signals generated by the LC oscillation circuit 1 in the threshold voltage; specifically, one or more voltage thresholds are set by the sampling circuit 2, and as the detected metal body approaches the coil, the amplitude of the LC oscillation circuit 1 decreases, and the signal length above (or below) the threshold becomes shorter; when the product is tested, the control circuit 5 adjusts the threshold value of the sampling circuit 2 according to the instruction of the external circuit, and writes the adjusted threshold value into the storage circuit 9, the circuit calls out the stored threshold voltage when being powered on, the sampling circuit 2 samples according to the threshold voltage, and the sampling threshold value is kept unchanged in work unless the control circuit is newly set.

The conversion circuit 3: the oscillator is used for converting the oscillation signal collected by the sampling circuit 2 into a high-frequency pulse signal; the conversion circuit 3 converts the voltage signal above (or below) the threshold into a high-frequency pulse signal through high-frequency sampling processing; the frequency of the high-frequency pulse signal is set according to the frequency of the LC oscillating circuit 1, in principle, the higher the frequency of the high-frequency pulse signal is, the higher the sampling precision is, generally, the frequency of the LC oscillating circuit 1 is 100K-1M, the frequency of the high-frequency pulse signal is set to be 10-100 times of the frequency of the LC oscillating circuit 1, and a user with specific multiple can adjust and set according to the actual situation.

The signal processing circuit 4: for performing different operations according to the instruction of the control circuit 5 after performing operation processing on the high-frequency pulse signal generated by the conversion circuit 3.

The control circuit 5: and the detection circuit is used for receiving a circuit external control command, sending the command to the circuit, completing the detection of the distance between the coil and the detection metal body position, and sending the result to the input and output control circuit 6.

Input/output control circuit 6: the output driving end OUT is used for outputting the data sent by the control circuit 5; specifically, when the circuit is in a debugging state, the modulation and demodulation of the control signal are controlled through the transmission on the power line, the parameter of each circuit can be modulated according to the reading instruction of the control circuit 5 and then transmitted to the control circuit 5 through the power line, when the circuit is in a working state, the data or the state transmitted by the control circuit 5 is output through the output driving end OUT, and three different outputs of the distance switching value, the distance continuous digital value and the continuous analog value can be completed according to the working state set when the circuit is debugged.

Specifically, fig. 2 is an oscillation waveform diagram and an oscillation amplitude diagram of the LC oscillation circuit 1, and in fig. 2, If1, If2, and If3 are different amplitude waveform diagrams; fig. 3 is a graph showing the relationship between the distance from the detection metal body to the coil and the oscillation amplitude when the detection metal body is close to or far from the coil in the LC oscillation circuit 1, and in fig. 3, SA, SB, and SC represent the distances between the metal body and the proximity sensor SNR; vsa, Vsb, Vsc represent maximum amplitude values corresponding to different positions of the metal body, and Ifsa, Ifsb, Ifsc represent oscillation waveforms corresponding to different positions of the metal body, and as can be seen from fig. 2, as the distance between the metal body and the proximity sensor SNR becomes shorter, the amplitude value between the metal body and the proximity sensor SNR becomes smaller;

FIG. 4 is a graph of oscillation amplitude versus sampling circuit, where vft1 represents the threshold voltage in FIG. 4; vsa1, Vsb1, Vsc1 indicate the maximum amplitude value of the partial signal exceeding the threshold voltage; if Ifsa1, Ifsb1 and Ifsc1 represent the partial signal waveforms exceeding the threshold voltage Vft1, and if the sampling circuit 2 collects the oscillation signal of the threshold voltage vft1 or more, as can be seen from fig. 4, as the detection metal body approaches the coil, the oscillation amplitude becomes smaller, the width of the waveform of the threshold voltage or more becomes shorter, and the amplitude becomes smaller; fig. 3 shows the operating principle of the circuit under one threshold voltage, and the present invention includes that more than one different sampling threshold voltages can be set, as shown in fig. 7, the waveform between two threshold values can be selected to sample, or the combined sampling of different threshold values, so that different requirements such as improving the detection sensitivity, improving the anti-interference capability, or improving the corresponding speed can be realized, and the operating principles are the same, and are not described herein again; fig. 5 is a graph of a relationship between a sampling signal and a conversion pulse signal, and in fig. 5, Sa1, Sb1, and Sc1 represent distance values of the metal object from the sensor; VSA, VSB and VSC represent waveforms after signal processing exceeding threshold voltage, and as can be seen from FIG. 4, the closer the distance between the metal body and the proximity sensor, the fewer the number of the waveforms after signal processing exceeding threshold voltage; FIG. 6 is a schematic diagram of distance detection of the signal processing circuit, VFSA, VFSB, VFSC representing converted high-frequency carrier waveforms; VSA12, VSB12 and VSC12 represent partial signal waveforms between threshold voltages Vft2-Vft1, as can be seen from FIG. 6, high-frequency pulse signals are processed and converted into digital signals, the digital signals change along with the distance between a metal body and a coil, and the digital quantity representing the distance is compared with a set value, so that the detection of the proximity distance switching value can be completed; the digital quantity can be processed and then output to an external circuit, and continuous digital quantity distance detection can be realized; the digital quantity can be converted into analog quantity after passing through a digital-to-analog conversion circuit of the output circuit part, and continuous distance detection of analog quantity output can be realized.

Specifically, according to the characteristic that when a metal body approaches a coil, the amplitude of an LC oscillation circuit 1 changes, a sampling circuit 2 intercepts partial changed waveforms of the LC oscillation circuit 1, a conversion circuit 3 converts the amplitude change corresponding to the distance change into a high-frequency pulse signal which is easy to recognize, control and set, the high-frequency pulse signal is converted into a quantifiable digital signal after being subjected to digital filtering calculation by a signal processing circuit 4, a control circuit 5 receives a circuit external control instruction and sends the instruction to different control circuits, debugging and setting of the LC oscillation circuit amplitude, distance detection between the coil and a detected metal body position, detection response speed and the like are completed, adjusted circuit parameters and set variables inside each control circuit are sent to a storage circuit to be stored, and meanwhile, the detection value of the signal processing circuit 4 can be sent to an input and output control circuit 6, and finishing the real-time control and test of the circuit.

Further, the LC oscillation circuit 1 further includes: oscillation amplitude control circuit 11: for controlling the amplitude of the LC oscillation circuit 1 and correcting the amplitude according to the change of the circuit external temperature sensor circuit; the oscillation amplitude control circuit 11 adjusts and sets the amplitude of the LC oscillation circuit 1 according to the parameters of the control circuit 5, and corrects the oscillation amplitude in real time according to the change of an external temperature sensor; the initial value of the amplitude of the LC oscillating circuit 1 is set at the time of testing, and stored in the storage circuit 9 after setting, and the oscillation amplitude value is set after calling the setting parameter when the circuit is powered on, and the oscillation amplitude value will remain unchanged during operation unless the control circuit 5 has a new setting, and the influence of the change of the temperature sensor on the oscillation amplitude is real-time.

Further, the proximity sensor circuit includes: the filter circuit 7: the device is used for processing the oscillation signal generated by the LC oscillation circuit 1 through a band-pass filter and removing the jittering high-low frequency interference signal; the filter circuit 7 contains a band-pass filter, and can process sine wave signals generated by the LC oscillation circuit 1 and filter interference signals, clutter and harmonic waves.

Further, the proximity sensor circuit includes: high-frequency oscillation circuit 8: the circuit is used for generating frequency signals required by an LC oscillating circuit, a sampling circuit, a conversion circuit, a signal processing circuit, a control circuit, an input and output control circuit, an oscillation amplitude control circuit and a filter circuit.

Further, the proximity sensor circuit further includes: the memory circuit 9: for storing the amplitude value and frequency value of the LC oscillating circuit; collecting a threshold voltage value of an oscillation signal in a sampling circuit; the internal voltage reference value and the initial frequency of the proximity sensor circuit, the correction value for ensuring the consistency of the circuit, the set value of the initial state and the set value of the detection distance are obtained; the storage circuit 9 adopts a nonvolatile memory to complete the storage of variable values needing to be modified, such as the LC oscillation circuit 1, the oscillation amplitude control circuit 11, the sampling circuit 2, the signal processing circuit 4 and the like, and other control signals and variables needing to be set in the whole circuit. All the circuits are set by requiring the software of an upper computer to pass through an input-output circuit, and the control circuit stores the parameters in the storage circuit 9 after finishing the setting of each parameter.

Fig. 8 is a schematic flow chart of a distance detection method according to the present invention, and as shown in fig. 8, a distance detection method using the proximity sensor circuit according to any one of the above embodiments, the method includes the steps of:

s101, when the metal body is detected to be close to or far away from the coil, the LC oscillating circuit generates an oscillating signal with specific frequency;

s102, a sampling circuit collects oscillation signals in a threshold voltage;

s103, converting the acquired oscillation signals into high-frequency pulse signals by a conversion circuit;

s104, the signal processing circuit performs digital filtering operation on the high-frequency pulse signal to obtain a digital signal which can be read by the control circuit;

s105, the control circuit receives an external control instruction of the circuit and completes the detection of the distance between the proximity sensor and the position of the detected metal body;

and S106, the input and output control circuit outputs the distance detection through the output driving end OUT.

Specifically, the process of detecting the distance in step S105 is as follows: assuming that the frequency of the LC oscillating circuit is 100K, the threshold value of the sampling circuit is set to be 2V, the number of pulses of VFSA is 150 when no metal body approaches, when a metal body approaches to the SA position, the number of pulses of VFSA is 100, the metal body continues to approach, when the metal body approaches to the SB position, the number of pulses of VFSB is 80, when the metal body approaches to the SC position, the number of pulses of VFSC is 50, and the number of pulses corresponds to the distance of the detected metal body one by one; the pulse number is converted into 16-system digital quantity through digital processing, and then the pulse number of SA position and VFSA is converted into 64 (16-system); assuming that the distance from the metal body to the coil L is 1 cm at the SA position, and the detection distance of the metal body is set to be 1 cm, the set value is set to be 64(16 system), when the distance of the metal body is greater than 1 cm, the value of the detection quantity is greater than 64, the output circuit outputs low level, when the distance of the metal body reaches or is less than 1 cm, the value of the detection quantity is equal to or less than 64, at the moment, the detection value is equal to or less than 64, the output circuit changes to output high level, and the detection of different position switching quantities can be completed by setting different values; similarly, the detection current value is directly output without setting the switching value, and the continuous distance detection can be completed.

When the circuit works, the circuit is powered on, initialization setting is firstly carried out, and the circuit is in a blanking state before the initialization is finished; after the initialization is finished, all parts of the circuit are in working states, at the moment, the amplitude of an LC oscillating circuit is maximum, the waveform width of a VFA taken out by a sampling circuit is widest, the number of high-frequency pulses of the VFS converted by a conversion circuit is maximum, different processing is executed according to different states set by a client in signal processing, if the switching value is output, a current detection value is compared with a set value, and an input-output circuit is controlled according to a comparison result to output the comparison result; if the digital quantity is detected as the continuous quantity, the signal processing circuit directly sends the processed digital quantity to the input-output circuit for output; when the metal body is close to the coil, the amplitude of the LC oscillating circuit is smaller and smaller along with the approach of the distance, the waveform width of the VFA taken out by the sampling circuit is gradually narrowed, the number of high-frequency pulses of the VFS converted by the conversion circuit is gradually reduced, different processing is executed according to different states set by a client in signal processing, if the switching value is output, the current detection value is compared with a set value, and the input-output circuit is controlled according to the comparison result to output the comparison result, for example, the output state is changed after the detection value is reached; if the detection is continuous quantity, the signal processing circuit directly sends the processed digital quantity to the input-output circuit for output.

Further, before the detecting the metal body approaches or moves away from the coil, the method further includes: setting and storing an amplitude value and a frequency value of the LC oscillating circuit; setting and storing a threshold voltage value of an oscillation signal collected in a sampling circuit; setting and storing a reference value of voltage inside the proximity sensor circuit, an initial frequency, a correction value for ensuring circuit consistency, a set value in an initial state and a set value of a detection distance; and setting and storing frequency signals required by the sampling circuit, the conversion circuit, the signal processing circuit, the control circuit and the input and output control circuit.

Further, the distance detection method further includes: the amplitude is corrected according to the variation of the circuit of the external temperature sensor.

Further, before the sampling circuit collects the oscillation signal within the threshold voltage, the method further includes: and (3) processing an oscillation signal generated by the LC oscillation circuit through a band-pass filter to remove the jittering high-low frequency interference signal.

When a product is tested, the control circuit adjusts parameters according to an external command, and respectively sets the amplitude of the LC oscillating circuit, the threshold value of the sampling circuit and the high-frequency of the conversion circuit, so that the oscillation amplitude of the LC oscillating circuit works in a proper range, the parameters are stored, and then the amplitude of the LC oscillating circuit works according to the preset parameters in the working process of the circuit; storing the adjusted threshold value, calling a preset threshold value voltage by the circuit in work, and sampling the sampling voltage according to the threshold value voltage; the adjusted frequency value is stored, the circuit calls a preset frequency value in work, and the conversion circuit converts the detection signal into a high-frequency pulse signal according to the frequency; the signal processing circuit calculates the pulse signal generated by the conversion circuit into a digital signal and then executes different operations according to the instruction of the control circuit, and thresholds of various actions such as distance return difference and the like can be set during testing and all parameters confirmed during testing are stored.

Specifically, according to the fact that when a metal body approaches a coil in an LC oscillator, the amplitude of an LC oscillating circuit is attenuated and reduced along with the distance (as shown in figure three), the oscillating waveform is approximate to a sine wave, one or more voltage thresholds are set, the oscillating amplitude is reduced along with the approach of the metal body, the width of the waveform above (or below) the threshold voltage is reduced, the amplitude is reduced (as shown in figures four and five), converting voltage signals above (or below) a threshold value into high-frequency pulse signals (as shown in figure six) through high-frequency sampling processing, converting the high-frequency pulse signals into digital signals after the high-frequency pulse signals are processed, wherein the digital signals change along with the distance between the metal body and the coil, comparing the digital quantity representing the distance with a set value, the detection of the proximity distance switching value can be finished, and the digital value can be processed and then output to an external circuit, so that the continuous digital value distance detection can be realized; the digital quantity can be converted into analog quantity after passing through a digital-to-analog conversion circuit of the output circuit part, and continuous distance detection of analog quantity output can be realized.

Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种侵彻引信用电容传感器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类