Method and circuit for detecting distance of metal object

By setting the oscillation amplitude of the LC oscillation circuit to V1 and sending a prompt signal when the metal object is close to V2, the detection error problem caused by the deviation distance is solved, and the accurate detection of the distance of the metal object is achieved.

CN117029660BActive Publication Date: 2025-02-11SHENZHEN HUAYIFENG TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310931674.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-26
Publication Date
2025-02-11
Estimated Expiration
2043-07-26

AI Technical Summary

Technical Problem

When detecting the distance of metal objects, the problem of distance difference is prone to occur in the prior art, which causes the detection circuit to repeatedly issue prompt signals, causing errors.

Method used

By setting the oscillation amplitude of the resonance of the LC oscillation circuit of the detection sensor to V1, and when the oscillation amplitude is reduced to V2 when the metal object is approaching, it sends a distance prompt signal to avoid errors caused by the difference in distance.

Benefits of technology

Accurate detection of the distance of metal objects is realized, detection errors caused by the response distance are reduced, and repeated display of prompt signals is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117029660B_ABST
    Figure CN117029660B_ABST
Patent Text Reader

Abstract

The present application relates to the field of sensors, and a method for detecting the distance of a metal object, comprising: setting the oscillation amplitude of the resonance of the LC oscillation circuit of the detection sensor to V1; when the metal object approaches the LC oscillation circuit to within a preset distance range, the oscillation amplitude of the LC oscillation circuit is reduced; when the oscillation amplitude of the LC oscillation circuit is reduced to V2, the detection sensor sends a distance prompt signal. The present application has the effect of being able to accurately detect the distance between the metal object and the LC oscillation circuit; when the distance between the metal object and the LC oscillation circuit repeatedly goes back and forth near the preset distance, the prompt signal will not be repeatedly displayed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of sensors, and in particular to a method and circuit for detecting the distance of a metal object. Background Art

[0002] At present, it is a common technical means to detect or locate metal workpieces in equipment. For example: detecting the positioning of aluminum cans and assembly line pallets on the assembly line, and the opening and closing status of doors. For the detection of the distance of metal objects, there is a problem of differential distance, that is, when the metal object approaches the detection circuit, if the distance between the two is within the range that the detection circuit can detect, the detection circuit will repeatedly send out prompt signals; obviously, this situation is not what we need, and it is also a technical problem that we need to solve urgently. Summary of the invention

[0003] In order to achieve accurate detection of the distance of a metal object and reduce detection errors caused by the problem of distance difference, the present application provides a method and circuit for detecting the distance of a metal object.

[0004] The present application provides a method for detecting the distance of a metal object, which adopts the following technical solution:

[0005] In a first aspect, a method for detecting the distance of a metal object is provided, comprising:

[0006] Set the oscillation amplitude of the LC oscillation circuit of the detection sensor to V1 when it resonates;

[0007] When the metal object approaches the LC oscillation circuit and reaches a preset distance range, the oscillation amplitude of the LC oscillation circuit decreases; when the oscillation amplitude of the LC oscillation circuit decreases to V2, the detection sensor sends a distance prompt signal.

[0008] Preferably, V2=0.2V1.

[0009] Preferably, when the oscillation amplitude of the LC oscillation circuit is reduced to V2, the detection sensor sends a distance prompt signal, and then, when the metal object moves away from the LC oscillation circuit, the oscillation amplitude of the LC oscillation circuit becomes V3; and (V3-V2) / V1<0.1.

[0010] In a second aspect, a circuit for detecting the distance of a metal object is also provided, comprising a power supply unit, and further comprising: an LC oscillating unit for receiving an excitation signal, being in an oscillating state, and changing the oscillation amplitude when the metal object approaches;

[0011] The main control chip is used to output the excitation signal and receive the oscillation amplitude change of the LC oscillation unit.

[0012] Preferably, it also includes: a distance adjustment unit, which is used to set a preset distance of the metal object close to the LC oscillation unit and a hysteresis distance away from the LC oscillation unit, and send them to the main control chip.

[0013] Preferably, it also includes: a prompt unit, which is used to send a prompt signal when the distance between the metal object and the LC oscillation circuit reaches a preset distance or a hysteresis distance.

[0014] Preferably, it also includes: a protection unit, which is used to prevent the input voltage from being reversed and to prevent the input voltage from being over-voltage.

[0015] Preferably, the oscillation amplitude of the LC oscillation circuit at resonance is V1; when the metal object approaches the LC oscillation unit and reaches a preset distance, the oscillation amplitude of the LC oscillation circuit is V2; when the metal object is away from the detection sensor and within the differential distance range, the oscillation amplitude of the LC oscillation circuit becomes V3.

[0016] Preferably, the oscillation amplitude of the LC oscillation circuit V2=0.2V1; the oscillation amplitude (V3-V2) / V1<0.1.

[0017] In summary, the present application includes at least one of the following beneficial technical effects:

[0018] 1. Can accurately detect the distance between metal objects and LC oscillation circuit;

[0019] 2. When the distance between the metal object and the LC oscillation circuit repeatedly moves back and forth near the preset distance, the prompt signal will not be displayed repeatedly. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a step diagram of a first embodiment of a method for detecting the distance of a metal object;

[0021] Figure 2 is a step diagram of a second embodiment of a method for detecting the distance of a metal object;

[0022] Figure 3 This is a diagram of the construction of a circuit for detecting the distance of a metal object;

[0023] Figure 4 It is a composition diagram of the distance adjustment unit;

[0024] Figure 5 It is a diagram of the composition of the prompt unit;

[0025] Figure 6 This is a diagram of the protection unit. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solutions and advantages of this application more clear, the following Figure 1 -Attached Figure 6 It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0027] The present application provides a method for detecting the distance of a metal object, which adopts the following technical solution:

[0028] First, as Figure 1 As shown, a method for detecting the distance of a metal object is provided, comprising:

[0029] S1: Set the oscillation amplitude of the LC oscillation circuit of the detection sensor at resonance to V1; in this embodiment, first, by selecting the inductance value and capacitance value of the LC oscillation circuit, the resonant frequency of the LC oscillation circuit can be determined. In addition, by setting the input of the excitation signal, the oscillation amplitude of the LC oscillation circuit at resonance can also be determined. At this time, the oscillation amplitude can be determined to be V1. The LC oscillation circuit includes: a parallel LC oscillation circuit and / or a series LC oscillation circuit.

[0030] S2: When the metal object approaches the LC oscillation circuit and reaches a preset distance range, the oscillation amplitude of the LC oscillation circuit decreases; the oscillation of the LC oscillation circuit is caused by the repeated absorption and transmission of the energy of the inductor L and the capacitor C. The inductor L converts electrical energy into magnetic energy, and then converts magnetic energy into electrical energy on the capacitor. Such repeated conversions can be called resonance. When the inductive reactance value of the inductor L changes, or the capacitive reactance value of the capacitor C changes, the oscillation frequency of the LC oscillation circuit will also change, and the oscillation amplitude will also change. When the metal object approaches the LC oscillation circuit, the capacitive reactance value and / or inductive reactance value around the LC oscillation circuit will change. Based on the basic principle of capacitance, the distance between the two metal plates changes, and the capacitive reactance value changes. Based on the basic principle of inductance, the distance between the two metal objects changes, and the inductive reactance value changes. The change in the capacitive reactance value means that the ability to accommodate the electric field changes. The change in the inductive reactance value means that the ability to accommodate the magnetic field changes. The change in the capacitive reactance value and / or the inductive reactance value changes, and the resonant frequency of the LC oscillation circuit changes. And the resonance amplitude will also be affected.

[0031] S3: When the oscillation amplitude of the LC oscillation circuit is reduced to V2, the detection sensor sends a distance prompt signal. The detection sensor outputs a switch signal to the PLC. Obviously, when the oscillation amplitude of the LC oscillation circuit is reduced to a certain value, it indicates that the distance between the metal object and the detection sensor has also reached a certain value. The formula for the resonant frequency is: From the above formula, it is obvious that the resonant frequency will change regardless of whether the value of the capacitor C or the inductor L changes.

[0032] Preferably, V2=0.2V1. When the oscillation amplitude is reduced to 20% of the resonance amplitude V1, it indicates that the distance of the metal object to the LC oscillation circuit is close enough. In this embodiment, the distance is usually 4 mm. If it is too far, the metal object will not have enough influence on the inductance L and capacitance C in the LC oscillation circuit. If it is too close, the metal object will have a great influence on the inductance L and capacitance C in the LC oscillation circuit. When it is close enough, the influence is just within the range that the circuit of the present application can handle.

[0033] Preferably, Figure 2 As shown, when the oscillation amplitude of the LC oscillation circuit is reduced to V2, the detection sensor sends a distance prompt signal, and then, S4: when the metal object is away from the LC oscillation circuit, the oscillation amplitude of the LC oscillation circuit becomes V3; and, (V3-V2) / V1<0.1. In this embodiment, when the distance between the metal object and the LC oscillation circuit is small enough, that is, when the oscillation amplitude of the LC oscillation circuit is detected to be reduced to V2, it indicates that the distance of the metal object close to the LC oscillation circuit is small enough and is within the range that the circuit of the present application can handle. In this embodiment, when the metal object approaches the LC oscillation circuit and then leaves, that is, when it is away from the LC oscillation circuit, the capacitive reactance value and / or inductive reactance value of the LC oscillation circuit will change and develop in the direction of increasing. At this time, the resonant frequency of the LC oscillation circuit will decrease, and the oscillation amplitude of the LC oscillation circuit will increase slightly. The oscillation amplitude V3 of the LC oscillation circuit will reach (V3-V2) / V1<0.1.

[0034] In the method of the present application, there are preset distances and differential distances. The so-called preset distance is the distance at which the metal object is close to the LC oscillation circuit when the oscillation amplitude of the LC oscillation circuit gradually decreases as the metal object gradually approaches the LC oscillation circuit. When the oscillation amplitude is small to a certain extent, it indicates that the metal object is close to the LC oscillation circuit.

[0035] The differential distance is the distance when the oscillation amplitude of the LC oscillation circuit reaches a certain value when the metal object approaches the LC oscillation circuit and causes the oscillation amplitude of the LC oscillation circuit to decrease, and then the metal object moves away from the LC oscillation circuit to a certain distance.

[0036] Second, as Figure 3 As shown, a circuit for detecting the distance of a metal object is also provided, including a power supply unit U2, and further including:

[0037] The LC oscillator is used to receive the excitation signal, is in an oscillating state, and changes the oscillation amplitude when a metal object approaches;

[0038] The main control chip U1 is used to output the excitation signal and receive the change of the oscillation amplitude of the LC oscillation unit. The main control chip used is DW0172. DW0172 includes 8 pins, namely: VDDA, VDD33, HYS, DIS, IND, INV, OVI and NOUT. VDDA is the power pin; VDD33 is the LDO output pin; HYS is the hysteresis control bit, that is, the hysteresis control time of the circuit reaction generated when the metal object approaches the LC oscillation circuit and then leaves the LC oscillation circuit; DIS is the distance control bit, that is, the distance range of the metal object approaching the LC oscillation circuit at which the oscillation amplitude of the LC oscillation circuit will change; IND is the inductor connection terminal, that is, the pin where DW0172 outputs the excitation signal and receives the oscillation signal of the LC oscillation circuit; INV is the normally open / normally closed control bit, used to control the DW0172 at In working state or dormant state; that is, when INV is in normally open state, when the metal object is close to the LC oscillation circuit, DW0172 can detect the change of the oscillation amplitude of the LC oscillation circuit; when INV is in normally closed state, no matter whether the metal object is close to the LC oscillation circuit, DW0172 will not detect the oscillation of the LC oscillation circuit; OVI pin is the ground terminal of chip DW0172; NOUT pin is the low-side output; that is, when DW0172 detects that the metal object is close to the LC oscillation circuit and the distance is close enough, the NOUT pin output signal controls the prompt unit to send a prompt signal. The power supply unit U2 uses ME6203A50PG as the power supply chip.

[0039] Preferably, Figure 4 As shown, it also includes: a distance adjustment unit, which is used to set the preset distance of the metal object close to the LC oscillation unit and the hysteresis distance away from the LC oscillation unit, and send it to the main control chip DW072. The distance adjustment unit includes a second resistor R2, a third resistor R3, a seventh resistor R7 and a variable resistor VR connected in series in sequence. One end of the second resistor R2 is connected to VDD33, and the other end is connected to the third resistor R3; the connection between the second resistor R2 and the third resistor R3 is connected to the HYS pin; the connection between the third resistor R3 and the seventh resistor R7 is connected to the DIS pin. The variable resistor VR is 0 ohm-20K ohm. The distance adjustment unit uses different resistance values ​​of the variable resistor VR to make the HYS pin and the DIS pin of DW0172 receive different voltage values, so as to adjust the preset distance of the metal object close to the LC oscillation unit and the hysteresis distance away from the LC oscillation unit.

[0040] Preferably, Figure 5 As shown, it also includes: a prompt unit, which is used to send a prompt signal when the distance between the metal object and the LC oscillation circuit reaches a preset distance or a hysteresis distance. The prompt unit is connected to the NOUT pin, and includes a sixth resistor R6, a light-emitting diode LED1, a ninth resistor R9, a transistor Q2, an eighth resistor R8, and a Zener diode D3. The transistor Q2 is an NPN tube; one end of the sixth resistor R6 is connected to the NOUT pin, and the other end is connected to the anode of the light-emitting diode LED1; the cathode of the light-emitting diode LED1 is connected to the base of the transistor Q2, and the base of the transistor Q2 is also connected to the ground terminal through the ninth resistor R9, and the emitter of the transistor Q2 is connected to the ground terminal through the eighth resistor R8; a Zener diode D3 is connected between the collector of the transistor Q2 and the ground terminal; the anode of the Zener diode D3 is connected to the ground terminal, and the cathode is connected to the collector of the transistor Q2.

[0041] Preferably, Figure 6 As shown, it also includes: a protection unit for preventing the input voltage from being reversed and preventing the input voltage from being over-voltage. The protection unit includes a diode D1, a diode D2 for preventing over-voltage, and a first resistor R1; the anode of the diode is connected to the input voltage terminal, the cathode of the diode D1 is connected to the cathode of the diode D2, and the anode of the diode D2 is connected to the ground terminal; the cathode of the diode D2 is connected to one end of the first resistor R1; and the other end of the first resistor R2 is connected to the power supply unit.

[0042] Preferably, the oscillation amplitude of the LC oscillation circuit at resonance is V1; when the metal object approaches the LC oscillation unit and reaches a preset distance, the oscillation amplitude of the LC oscillation circuit is V2; when the metal object is away from the detection sensor and within the differential distance range, the oscillation amplitude of the LC oscillation circuit becomes V3.

[0043] Preferably, the oscillation amplitude V2 of the LC oscillation circuit is 0.2V1; the oscillation amplitude is (V3-V2) / V1<0.1. The recommended value of the inductor L is: 2uH~100uH; the optimal value is: 6.8~22uH. The recommended value of the capacitor C is: 470pF.

[0044] In summary, the present application includes at least one of the following beneficial technical effects:

[0045] 1. Can accurately detect the distance between metal objects and LC oscillation circuit;

[0046] 2. When the distance between the metal object and the LC oscillation circuit repeatedly moves back and forth near the preset distance, the prompt signal will not be displayed repeatedly.

[0047] The above are all preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Any feature disclosed in this specification (including the abstract and drawings), unless otherwise stated, can be replaced by other equivalent or alternative features with similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.

Claims

1. A circuit for detecting the distance of a metal object, comprising a power supply unit, characterized in that: include: The LC oscillator is used to receive the excitation signal, is in an oscillating state, and changes the oscillation amplitude when a metal object approaches; The main control chip is used to output the excitation signal and receive the change of the oscillation amplitude of the LC oscillation unit; the main control chip adopts DW0172, including 8 pins, namely: VDDA, VDD33, HYS, DIS, IND, INV, OVI and NOUT; VDDA is the power pin, VDD33 is the LDO output pin, HYS is the hysteresis control bit, DIS is the distance control bit, IND is the inductor connection terminal, INV is the normally open / normally closed control bit, OVI is the ground terminal; NOUT is the low-side output; A distance adjustment unit is used to set a preset distance of a metal object close to the LC oscillation unit and a hysteresis distance away from the LC oscillation unit, and send them to the main control chip; the distance adjustment unit includes a second resistor R2, a third resistor R3, a seventh resistor R7 and a variable resistor VR connected in series in sequence; one end of the second resistor R2 is connected to VDD33, and the other end is connected to the third resistor R3; the connection between the second resistor R2 and the third resistor R3 is connected to the HYS pin; the connection between the third resistor R3 and the seventh resistor R7 is connected to the DIS pin; the variable resistor VR is 0 ohm-20K ohm; The oscillation amplitude of the LC oscillation unit when it resonates is V1; when the metal object approaches the LC oscillation unit and reaches a preset distance, the oscillation amplitude of the LC oscillation unit is V2; when the metal object is away from the LC oscillation unit within the hysteresis distance range, the oscillation amplitude of the LC oscillation unit becomes V3; V2=0.2V1; (V3-V2) / V1<0.

1.

2. The circuit for detecting the distance of a metal object according to claim 1, characterized in that: Also includes: The prompt unit is used to send a prompt signal when the distance between the metal object and the LC oscillation unit reaches a preset distance or a hysteresis distance.

3. The circuit for detecting the distance of a metal object according to claim 2, characterized in that: Also includes: The protection unit is used to prevent the input voltage from being reversed and the input voltage from being over-voltage.

Citation Information

Patent Citations

  • Proximity sensor circuit and distance detection method

    CN112629568A