CN116800232A - Signal modulation method and system for improving response frequency of inductance proximity switch - Google Patents

Signal modulation method and system for improving response frequency of inductance proximity switch Download PDF

Info

Publication number
CN116800232A
CN116800232A CN202310416912.6A CN202310416912A CN116800232A CN 116800232 A CN116800232 A CN 116800232A CN 202310416912 A CN202310416912 A CN 202310416912A CN 116800232 A CN116800232 A CN 116800232A
Authority
CN
China
Prior art keywords
signal
proximity switch
inductance
variable
square wave
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310416912.6A
Other languages
Chinese (zh)
Inventor
徐春明
原帅
刘美娟
段嗣妍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yantai Institute Of Technology
Original Assignee
Yantai Institute Of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yantai Institute Of Technology filed Critical Yantai Institute Of Technology
Priority to CN202310416912.6A priority Critical patent/CN116800232A/en
Publication of CN116800232A publication Critical patent/CN116800232A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K7/00Modulating pulses with a continuously-variable modulating signal
    • H03K7/06Frequency or rate modulation, i.e. PFM or PRM
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03BGENERATION OF OSCILLATIONS, DIRECTLY OR BY FREQUENCY-CHANGING, BY CIRCUITS EMPLOYING ACTIVE ELEMENTS WHICH OPERATE IN A NON-SWITCHING MANNER; GENERATION OF NOISE BY SUCH CIRCUITS
    • H03B5/00Generation of oscillations using amplifier with regenerative feedback from output to input
    • H03B5/08Generation of oscillations using amplifier with regenerative feedback from output to input with frequency-determining element comprising lumped inductance and capacitance
    • H03B5/12Generation of oscillations using amplifier with regenerative feedback from output to input with frequency-determining element comprising lumped inductance and capacitance active element in amplifier being semiconductor device
    • H03B5/1237Generation of oscillations using amplifier with regenerative feedback from output to input with frequency-determining element comprising lumped inductance and capacitance active element in amplifier being semiconductor device comprising means for varying the frequency of the generator
    • H03B5/1262Generation of oscillations using amplifier with regenerative feedback from output to input with frequency-determining element comprising lumped inductance and capacitance active element in amplifier being semiconductor device comprising means for varying the frequency of the generator the means comprising switched elements
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • H03K17/94Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the way in which the control signals are generated
    • H03K17/945Proximity switches
    • H03K17/95Proximity switches using a magnetic detector
    • H03K17/952Proximity switches using a magnetic detector using inductive coils

Landscapes

  • Electronic Switches (AREA)

Abstract

The invention provides a signal modulation method and a system for improving the response frequency of an inductance proximity switch in order to solve the problem that the oscillation frequency of the existing inductance proximity switch is low. The signal modulation method comprises the steps of 1, generating a sine signal, 2, setting an operation point voltage Vop and a release point voltage Vrp of an inductance proximity switch, wherein the operation point voltage Vop is less than the release point voltage Vrp; the peak voltage of the sinusoidal signal in the step 1 is collected and is respectively compared with the operating point voltage Vop and the release point voltage Vrp, and a corresponding control signal is output according to the comparison result: and 3, detecting the control signal and controlling the on-off of the inductance proximity switch. The system comprises an LC oscillating circuit, a double-path comparator and a control device, wherein the control device is used for detecting the change condition of a control signal from the double-path comparator and outputting an on-off signal to control the on-off of an inductance proximity switch; the invention increases the response frequency of the inductance proximity switch under the same detection distance.

Description

Signal modulation method and system for improving response frequency of inductance proximity switch
Technical Field
The invention belongs to the field of signal modulation, and can be applied to the fields of aviation, aerospace, ships, industrial automation and the like, in particular to a signal modulation method and a system for improving response frequency of an inductance proximity switch.
Background
The inductance proximity switch is a non-contact electronic switch adopting an electromagnetic induction principle, and the structure comprises: the inductance probe, the printed circuit board circuit, the shell and the cable lead can be used for non-contact detection of the position information of the metal conductor and converting the position information into an electric signal of switching value, the inductance proximity switch is internally provided with an LC sine wave resonant circuit, the inductance probe is a component inductance of the LC sine wave resonant circuit, and the function of the inductance probe is as follows: when the detected metal conductor is close to the induction surface of the proximity switch, the change of the inductance value, the equivalent resistance value and the quality factor Q value of the LC sine wave resonant circuit can be influenced due to the eddy current effect, and when the detected metal conductor reaches or is smaller than the action point position of the proximity switch, the digital level output by the proximity switch is reversed; when the detected object approaches to and departs from the induction surface of the inductive proximity switch at high speed, the inductive proximity switch outputs high-low level signals with corresponding frequencies.
The schematic diagram of the signal modulation technology of the existing inductive proximity switch is shown in fig. 1, and the schematic diagram is generally composed of: the LC sine wave resonant circuit, the peak detector circuit (generally composed of a diode and a capacitor), the hysteresis comparator circuit, the output switch driving circuit and the like. The inductance proximity switch is a contactless electronic switch using a metal conductor as a trigger medium, and generates an alternating magnetic field in front of an inductance probe when the detected metal conductor is close, electromagnetic coupling occurs between the metal and the inductance probe, so that the peak value of a sinusoidal oscillation signal is reduced or oscillation is stopped, the sinusoidal oscillation signal output by the LC oscillation circuit enters a peak detector circuit (composed of a diode and a capacitor) as shown in fig. 1, the peak value of the sinusoidal oscillation signal is demodulated, the sinusoidal oscillation signal is changed into a direct current signal, and the demodulated direct current signal is converted into a digital switch signal through a hysteresis comparator and then is output after passing through a driving circuit.
The currently existing signal modulation techniques, such as the peak detector circuit shown in fig. 1, typically consist of diodes, capacitors, whose function is to demodulate the peak of the sinusoidal signal of the LC sine wave resonator circuit. The inductance proximity switch generally works near the resonance frequency, and the LC resonance frequency is calculated by the inductance value of the inductance probe and the capacitance value of the resonance capacitor according to the formulaAnd (5) calculating to obtain the product. When the LC sine wave resonant circuit works, the inductance energy storage and the capacitance energy storage are mutually converted to form a sine oscillation signal. When the inductive proximity switch detects a longer distance, a larger diameter inductive probe is required to generate a longer longitudinal (detection direction) component magnetic field, and thus a larger capacitance value capacitor is required to resonate in cooperation with the inductive probe. Therefore, the oscillation frequency of the inductive proximity switch decreases with the increase of the detection distance.
As shown in fig. 2, for example, when an NPN normally open type or a PNP normally closed type inductive proximity switch (when no metal conductor is approaching, the inductive proximity switch output is at a high level, and when a metal conductor is approaching, the inductive proximity switch output becomes at a low level), when a measured metal conductor is approaching, a peak value of a sinusoidal oscillation signal is reduced or oscillation is stopped. When the detected metal conductor continuously approaches the inductive surface of the inductive proximity switch from a distance, the LC oscillation peak value of the inductive proximity switch is continuously reduced, and when the detected metal conductor reaches the position of an operating point, the LC oscillation peak value of the inductive proximity switch is attenuated to the voltage Vop of the operating point, and the final output of the inductive proximity switch is changed from the open state (high level) of the inductive proximity switch to the closed state (low level) of the inductive proximity switch; otherwise, when the detected metal conductor is continuously far from the inductive surface of the inductive proximity switch from the near, the LC oscillation peak value of the inductive proximity switch is continuously increased, and when the detected metal conductor reaches the position of the release point, the LC oscillation peak value of the inductive proximity switch is increased to the release point voltage Vrp, and the final output of the inductive proximity switch is changed from closed to open; therefore, the position information of the detected conductor can be judged by the peak value of the oscillation sine signal or the existence of the oscillation sine signal, the hysteresis comparator in fig. 1 is used for setting proper operating point voltage Vop and release point voltage Vrp, and when the metal conductor approaches or is smaller than the operating point position (detection distance threshold value) or approaches or is larger than the release point position, the proximity switch outputs corresponding low and high level signals. The voltage Vop of the operating point is different from the voltage Vrp of the releasing point, and the voltage Vrp is generally greater than Vop, so that the inductance proximity switch is prevented from repeatedly triggering and releasing due to jitter or other reasons at the position of the operating point, and unstable oscillation pulse signals are output by the inductance proximity switch.
The conventional signal modulation technology is as shown in a peak detector circuit in fig. 1, the purpose of demodulating the peak value of a sinusoidal signal is achieved by charging the capacitor with the sinusoidal signal and discharging the capacitor through a resistor, the detection performance of the RC peak detector circuit is affected by the R value and the C value, and the R value and the C value are required to be large enough for outputting the stable signal. When the peak signal is demodulated, the RC value is influenced by the frequency of the sinusoidal signal, and when the frequency of the sinusoidal signal is low, the charging frequency of the capacitor C by the sinusoidal signal is low, so that in order to stabilize the demodulated direct current signal, the R value of the resistor and the C value of the capacitor also need to be correspondingly increased to reduce the discharging time of the RC loop, so that the RC time constant is also increased, the response time is increased, and the response frequency is reduced. The current inductance approach switch signal modulation technology is characterized in that the diameter of an inductance approach switch shell, the oscillation frequency of a built-in LC sine wave resonant circuit, the detection distance and the response frequency are shown in a table 1.
TABLE 1 response frequency of prior art inductive proximity switch
As shown in Table 1, the oscillation frequency of the built-in LC sine wave resonant circuit of the inductive proximity switch is far higher than the response frequency of the inductive proximity switch, the response frequency only reaches three orders of magnitude, and in order to further improve the response frequency of the inductive proximity switch, the invention designs a signal modulation method and a system for improving the response frequency of the inductive proximity switch, which can enable the inductive proximity switch to have higher response frequency to reach four orders of magnitude under the same detection distance, and the response frequency after improvement can reach more than three times of the prior art.
Disclosure of Invention
The invention provides a signal modulation method and a system for improving the response frequency of an inductive proximity switch in order to further improve the response frequency of the inductive proximity switch.
The technical scheme of the invention is as follows:
a signal modulation method for improving response frequency of an inductance proximity switch is characterized by comprising the following steps: the method comprises the following steps:
generating a sinusoidal signal, wherein when a metal conductor approaches, the amplitude of the sinusoidal signal is reduced or oscillation is stopped;
setting an operation point voltage Vop and a release point voltage Vrp of the inductance proximity switch, wherein the operation point voltage Vop is less than the release point voltage Vrp; the peak voltage of the sinusoidal signal in the step 1 is collected and is respectively compared with the operating point voltage Vop and the release point voltage Vrp, and a corresponding control signal is output according to the comparison result:
when the peak voltage of the sinusoidal signal is greater than or equal to the release point voltage Vrp, the control signal is a two-way square wave signal;
when the peak voltage of the sinusoidal signal is larger than the operating point voltage Vop and smaller than the release point voltage Vrp, the control signal is a square wave signal;
when the peak voltage of the sinusoidal signal is less than or equal to the voltage Vop of the operating point, the control signal is no signal;
detecting the control signal and controlling the on-off of the inductance proximity switch, wherein the control signal is divided into the following cases:
when the control signal is always two paths of square wave signals, the inductance proximity switch is in an off state;
when the control signal is changed from two square wave signals to one square wave signal, the inductance proximity switch is in an off state;
when the control signal is changed from two paths of square wave signals to no signal, the inductance proximity switch is changed from an open state to a closed state;
when the control signal is a square wave signal all the time, the inductance approach switch maintains the previous state and is not changed;
when the control signal is changed from a square wave signal to no signal, the inductance proximity switch is in a closed state;
when the control signal is changed from one square wave signal to two square wave signals, the inductance proximity switch is in an off state;
when the control signal is no signal all the time, the inductance proximity switch is in a closed state;
when the control signal is changed from no signal to one square wave signal, the inductance proximity switch is in a closed state;
when the control signal is changed from no signal to two paths of square wave signals, the inductance proximity switch is changed from a closed state to an open state.
Specifically, the step 3 is implemented by detecting the control signal and controlling the on/off of the inductance proximity switch through a singlechip.
Specifically, the following steps are realized by programming the singlechip in the step 3:
3.1, turning on the interrupt function of the singlechip, and setting the triggering mode of two external interrupts of the singlechip as the effective falling edge; setting initial values of a variable Bop and a variable Brp in the singlechip to be 0;
3.2, delaying for waiting, if the external interrupt pin INT0 of the singlechip detects a falling edge, setting a variable Bop to be 1, otherwise, setting the variable Bop to be 0; if the external interrupt pin INT1 of the singlechip detects a falling edge, setting a variable Brp to be 1, otherwise, the variable Brp is still 0;
3.3, closing the interruption function of the singlechip;
3.4) determine if variable Brp is equal to 1, then determine if Bop is equal to 1:
if the variable Brp is equal to 1 and the variable Bop is necessarily equal to 1, setting the initial position flag bit InitialState to 1, and outputting a level capable of enabling the inductance proximity switch to be disconnected by the singlechip;
if the variable Brp is not equal to 1 and the variable Bop is equal to 1, setting the initial position flag bit InitialState to 2, and outputting a level capable of enabling the inductance proximity switch to be disconnected by the singlechip;
if the variable Brp is not equal to 1, if the variable Bop is not equal to 1, the initial position flag bit InitialState is set to 3, and the singlechip outputs the level which can enable the inductance proximity switch to be closed;
3.5, setting the variable Bop and the variable Brp to 0 again, and opening the interrupt function of the singlechip;
3.6, delaying for waiting, if the external interrupt pin INT0 of the singlechip detects a falling edge, setting the variable Bop to be 1, otherwise, setting the variable Bop to be 0; if the external interrupt pin INT1 of the singlechip detects a falling edge, setting a variable Brp to be 1, otherwise, the variable Brp is still 0;
3.7, closing the interruption function of the singlechip;
3.8 ] firstly judging whether the variable Brp is equal to 1, and then judging whether the Bop is equal to 1:
if the variable Brp is equal to 1, the current position flag bit CurrentState is set to 1, and the singlechip outputs the level which can enable the inductance proximity switch to be kept in an off state;
if the variable Brp is not equal to 1, the variable Bop is equal to 1, and the initial position flag bit InitialState is 1, the current position flag bit CurrentState is set to 2, and the singlechip outputs a level capable of enabling the inductance proximity switch to be disconnected;
if the variable Brp is not equal to 1, the variable Bop is equal to 1, and the initial position flag bit InitialState is 3, the current position flag bit CurrentState is set to 2, and the singlechip outputs a level capable of enabling the inductance proximity switch to be closed;
if the variable Brp is not equal to 1, if the variable Bop is not equal to 1, the current position flag bit CurrentState is set to 3, and the singlechip outputs the level capable of enabling the inductance to be close to the switch;
3.9, the numerical value of the current position zone bit CurrentState is assigned to the initial position zone bit InitialState;
3.10, repeating the steps 3.5 to 3.9.
Specifically, the delay waiting time in the steps 3.2 and/or 3.6 is at least 2 times of the oscillation period of the sinusoidal signal.
Specifically, in the step 2, the collected peak voltage of the sinusoidal signal is compared with the operating point voltage Vop and the release point voltage Vrp respectively by a two-way comparator, and a square wave signal is output or no signal is output.
Specifically, the step 1 is to generate a sinusoidal signal through an LC oscillating circuit.
The invention also provides a signal modulation system for improving the response frequency of the inductive proximity switch, which comprises an LC oscillating circuit for generating a sinusoidal signal, and is characterized in that: and also comprises
A two-way comparator for comparing the peak voltage of the sinusoidal signal with the operating point voltage Vop and the releasing point voltage Vrp of the inductance proximity switch respectively and outputting a corresponding control signal according to the comparison result,
the control device is used for detecting the change condition of the control signal from the two-way comparator and outputting an on-off signal to control the on-off of the inductance proximity switch;
the two-way comparator comprises a first comparator and a second comparator, the reference level of the first comparator and the second comparator is respectively set as an operation point voltage Vop and a release point voltage Vrp of the inductive proximity switch, the operation point voltage Vop is less than the release point voltage Vrp,
when the peak voltage of the sinusoidal signal is greater than or equal to the release point voltage Vrp, the two-way comparator outputs two-way square wave signals;
when the peak voltage of the sinusoidal signal is larger than the operating point voltage Vop and smaller than the release point voltage Vrp, the two-way comparator outputs a square wave signal;
when the peak voltage of the sinusoidal signal is less than or equal to the operating point voltage Vop, the two-way comparator does not output any signal;
two output ends of the two-way comparator are electrically connected with two external interrupt pins of the control device in a one-to-one correspondence manner;
when the control device detects that the output of the two-way comparator is always two-way square wave signals, the inductance proximity switch is in an off state;
when the control device detects that the output of the two-way comparator is changed from two-way square wave signals to one-way square wave signal, the inductance proximity switch is in an off state;
when the control device detects that the output of the two-way comparator is changed from two-way square wave signals to no signal, the inductance proximity switch is changed from an open state to a closed state;
when the control device detects that the output of the two-way comparator is always a square wave signal, the inductance approach switch maintains the previous state and is not changed;
when the control device detects that the output of the two-way comparator is changed from one square wave signal to no signal, the inductance proximity switch is in a closed state;
when the control device detects that the output of the two-way comparator is changed from one square wave signal to two square wave signals, the inductance proximity switch is in an off state;
when the control device detects that the output of the two-way comparator is always without any signal, the inductance proximity switch is in a closed state;
when the control device detects that the output of the two-way comparator is changed from no signal to one-way square wave signal, the inductance proximity switch is in a closed state;
when the control device detects that the output of the two-way comparator is changed from no signal to two-way square wave signals, the inductance proximity switch is changed from a closed state to an open state.
Preferably, the system further comprises a switch driving circuit electrically connected to the output of the control device.
Preferably, the control device is a single chip microcomputer with two external interrupt functions.
The invention also provides an inductance proximity switch which is characterized by comprising the signal modulation system.
The invention has the advantages that:
1. the signal modulation technology can enable the inductance proximity switch to have higher response frequency under the same detection distance. The response frequency of the existing inductive proximity switch is inversely proportional to the detection distance, the long detection distance and the high response frequency are difficult to consider, the response frequency and the detection distance are two important parameter indexes of the inductive proximity switch, and the inductive proximity switch response frequency is increased on the basis of unchanged detection distance, so that the frequency response performance of the inductive proximity switch is improved. The specific response frequency increment is shown in table 1 and table 2, and the comparison parameters show that the inductance proximity switch can have higher response frequency to reach four orders of magnitude under the same detection distance.
2. The signal modulation technology is realized by combining an analog circuit with a singlechip, the parameter (such as output type: normally open or normally closed output) of the inductance proximity switch can be adjusted by adjusting the singlechip program, and the hardware circuit is required to be changed in the prior art, so that the invention is suitable for product generalization and batch production.
3. The signal modulation technology has low cost, has low requirement on the performance of devices, and the common small-package 51 single chip microcomputer can realize the technical function, so that the inductance proximity switch has the advantages of small volume, low cost and cost.
4. The device is widely applied to the fields of aviation, aerospace, ships, industrial automation and the like, can be used for measuring the rotating speed of a metal conductor and the linear speed of the linear motion of the metal conductor, and can also be used for measuring the position information of other types of movable mechanisms.
Drawings
FIG. 1 is a schematic diagram of a modulation technique of an existing inductive proximity switch;
FIG. 2 is a functional block diagram of a prior inductive proximity switch;
FIG. 3 is a schematic diagram of the modulation technique of the inductance proximity switch of the present invention;
FIG. 4 is a schematic diagram of a second principle of the inductive proximity switch modulation technique of the present invention;
FIG. 5 is a schematic diagram of the output signal of the two-way comparator;
FIG. 6 is a flow chart of a singlechip program for an inductive proximity switch signal modulation system of the present invention;
fig. 7 is a circuit diagram of a signal modulation system for increasing the response frequency of an inductive proximity switch according to the present invention.
Detailed Description
Example 1
A signal modulation method for improving response frequency of an inductance proximity switch comprises the following steps:
generating a sinusoidal signal, wherein when a metal conductor approaches, the amplitude of the sinusoidal signal is reduced or oscillation is stopped, and an LC oscillating circuit is generally adopted to generate the sinusoidal signal in the prior art;
setting an operation point voltage Vop and a release point voltage Vrp of the inductance proximity switch, wherein the operation point voltage Vop is less than the release point voltage Vrp; the peak voltage of the sinusoidal signal in the step 1 is collected and is respectively compared with the operating point voltage Vop and the release point voltage Vrp, and a corresponding control signal is output according to the comparison result:
when the peak voltage of the sinusoidal signal is greater than or equal to the release point voltage Vrp, the control signal is a two-way square wave signal;
when the peak voltage of the sinusoidal signal is larger than the operating point voltage Vop and smaller than the release point voltage Vrp, the control signal is a square wave signal;
when the peak voltage of the sinusoidal signal is less than or equal to the voltage Vop of the operating point, the control signal is no signal;
detecting the control signal and controlling the on-off of the inductance proximity switch, wherein the control signal is divided into the following cases:
when the control signal is always two paths of square wave signals, the inductance proximity switch is in an off state;
when the control signal is changed from two square wave signals to one square wave signal, the inductance proximity switch is in an off state;
when the control signal is changed from two paths of square wave signals to no signal, the inductance proximity switch is changed from an open state to a closed state;
when the control signal is a square wave signal all the time, the inductance approach switch maintains the previous state and is not changed;
when the control signal is changed from a square wave signal to no signal, the inductance proximity switch is in a closed state;
when the control signal is changed from one square wave signal to two square wave signals, the inductance proximity switch is in an off state;
when the control signal is no signal all the time, the inductance proximity switch is in a closed state;
when the control signal is changed from no signal to one square wave signal, the inductance proximity switch is in a closed state;
when the control signal is changed from no signal to two paths of square wave signals, the inductance proximity switch is changed from a closed state to an open state.
Specifically, the step 3 is implemented by detecting the control signal and controlling the on/off of the inductance proximity switch through a singlechip. More specifically, the specific implementation process of the single chip microcomputer in the step 3 is as shown in fig. 5:
3.1, turning on the interrupt function of the singlechip, and setting the triggering mode of two external interrupts of the singlechip as the effective falling edge; setting the initial values of two variables Bop and Brp to be 0;
3.2), if the external interrupt pin INT0 of the singlechip detects a falling edge, setting Bop as 1, otherwise, setting Bop as 0; if the external interrupt pin INT1 of the singlechip detects a falling edge, brp is set to be 1, otherwise, the external interrupt pin INT1 of the singlechip still is set to be 0;
3.3, closing the interruption function of the singlechip;
3.4) determining whether Brp is equal to 1, and then determining whether Bop is equal to 1:
if Brp is equal to 1 and Bop is necessarily equal to 1, setting an initial position flag bit InitialState to 1, and outputting a level capable of enabling an inductance proximity switch to be disconnected by a singlechip;
if Brp is not equal to 1 and Bop is equal to 1, setting an initial position flag bit InitialState to 2, and outputting a level capable of enabling the inductance proximity switch to be disconnected by the singlechip;
if Brp is not equal to 1, if Bop is not equal to 1, setting an initial position flag bit InitialState to 3, and outputting a level capable of enabling an inductance proximity switch to be closed by a singlechip;
3.5, setting Bop and Brp to 0 again, and opening the interrupt function of the singlechip;
3.6 delaying waiting (generally 2 times of the oscillation period of the sinusoidal signal), if the external interrupt pin INT0 of the singlechip detects a falling edge, setting Bop as 1, otherwise, setting Bop as 0; if the external interrupt pin INT1 of the singlechip detects a falling edge, brp is set to be 1, otherwise, the external interrupt pin INT1 of the singlechip still is set to be 0;
3.7, closing the interruption function of the singlechip;
3.8 ], judging whether Brp is equal to 1, and then judging whether Bop is equal to 1:
if Brp is equal to 1, the current position flag bit CurrentState is set to 1, and the singlechip outputs a level which can enable the inductance proximity switch to be kept in an off state;
if Brp is not equal to 1, bop is equal to 1, and the initial position marker bit InitialState is 1, setting the initial position marker bit CurrentState to 2, and outputting a level capable of enabling the inductance proximity switch to be disconnected by the singlechip;
if Brp is not equal to 1, bop is equal to 1, and the initial position marker bit InitialState is 3, setting the initial position marker bit CurrentState to 2, and outputting a level capable of enabling the inductance proximity switch to be closed by the singlechip;
if Brp is not equal to 1, if Bop is not equal to 1, the initial position flag bit CurrentState is set to 3, and the singlechip outputs the level which can enable the inductance to be close to the switch;
3.9, the numerical value of the current position zone bit CurrentState is assigned to the initial position zone bit InitialState;
3.10, repeating the steps 3.5 to 3.9.
Specifically, in the step 2, the collected peak voltage of the sinusoidal signal is compared with the operating point voltage Vop and the release point voltage Vrp by the two-way comparator, and a square wave is output or no signal is output. The two-way comparator comprises a first comparator and a second comparator, and the reference levels of the first comparator and the second comparator are respectively set to be the operation point voltage Vop and the release point voltage Vrp of the inductance proximity switch.
Response time t of the present invention tatal Mainly comprises the following components: LC oscillation frequency period t LC And the execution time t of the singlechip program MCU Two parts are formed, t tatal =t LC +t MCU . Single chip microcomputer cycle period program execution time t MCU < 40. Mu.S; from Table 2, the oscillation frequency period t LC < 10. Mu.S, thus t tatal And < 50 mu S, so that the highest response frequency can reach 20KHz after optimization.
Example two
As shown in fig. 3 and 4, a signal modulation system for increasing the response frequency of an inductive proximity switch is mainly different from the prior modulation technology in that the modulation circuits (2) and (3) of fig. 3 comprise LC oscillating circuits for generating sinusoidal signals, two-way comparators for comparing peak voltages of the sinusoidal signals with an operating point voltage Vop and a release point voltage Vrp of the inductive proximity switch respectively and outputting corresponding control signals according to comparison results, and control means for detecting the change condition of the control signals from the two-way comparators and outputting turn-on signals to control turn-off of the inductive proximity switch.
And placing a metal conductor at the position of an operating point of the inductive proximity switch, detecting the peak voltage of the LC oscillating circuit in the inductive proximity switch at the moment, wherein the peak voltage value is the operating point voltage Vop, and similarly, placing the conductor at the position of a releasing point of the inductive proximity switch, detecting the peak voltage of the LC oscillating circuit in the inductive proximity switch at the moment, and the peak voltage value is the releasing point voltage Vrp.
The two-way comparator comprises a first comparator and a second comparator, the reference levels of the first comparator and the second comparator are respectively set to be an operation point voltage Vop and a release point voltage Vrp of the inductive proximity switch, the operation point voltage Vop is smaller than the release point voltage Vrp, and the values of the operation point voltage Vop and the release point voltage Vrp are different, so that the inductive proximity switch is prevented from being repeatedly triggered and released at an action point due to jitter or other reasons, and an unstable oscillation pulse signal is output by the inductive proximity switch.
When the measured metal conductors are close, the peak value of the sinusoidal signal is reduced or oscillation is stopped. The peak value of the sinusoidal signal is in different intervals between the operating point voltage Vop and the release point voltage Vrp, so that the output signals of the first comparator and the second comparator have three conditions, and the schematic diagram of the three conditions is shown in fig. 5.
In fig. 5 (1), when the peak voltage of the sinusoidal signal of the LC oscillating circuit is greater than or equal to the release point voltage Vrp, the first comparator and the second comparator output two square wave signals (or other periodic signals that can cause interruption);
in fig. 5 (2), when the peak voltage of the sinusoidal signal of the LC oscillating circuit is greater than the reference level Vop of the first comparator and less than the reference level Vrp of the second comparator, the first comparator outputs 1-path square wave signal (or other periodic signal that can cause interruption); the second comparator does not output square wave signals;
in fig. 5 (3), when the peak voltage of the sinusoidal signal of the LC oscillating circuit is less than or equal to the operating point voltage Vop, neither the first comparator nor the second comparator outputs any signal.
Two output ends of the two-way comparator are electrically connected with two external interrupt pins of the control device in a one-to-one correspondence manner;
the control device is a single chip microcomputer with two external interrupt functions, such as STC15W204S. Two paths of signals of the first comparator and the second comparator are respectively input into two external interrupt pins of the singlechip, and the functions of the singlechip are mainly divided into 2 parts:
function 1: the detection and judgment of the existence of the external interrupt signal are used for indirectly judging the amplitude of the sine signal peak value of the LC oscillating circuit, the reference level Vop of the first comparator and the reference level Vrp of the second comparator.
Function 2: by the embedded program, the hardware hysteresis comparator function is simulated according to the flow chart shown in fig. 6 by the initial state (initial state) of the two-way interrupt signal input at the current moment and the current state (CurrentState) of the two-way interrupt signal at the next moment, and the high-low level is output to control the on-off of the inductance proximity switch. Taking the case of NPN normally open or PNP normally closed (when no metal conductor is close, the high level is reached; after the metal conductor is close, the output becomes low level), when the metal conductor is close to the operating point position or less, the peak value of the sine signal is equal to or less than the reference level Vop of the comparator, and the proximity switch outputs low level. When the metal conductor is far away from reaching or being larger than the release point position, the peak value of the sinusoidal signal is equal to or larger than the second reference level Vrp of the comparator, and the proximity switch outputs a high level. According to the states (1) - (3) of fig. 5, the oscillating signal peak change and proximity switch hysteresis output logic is:
when the control signal is always two paths of square wave signals, the inductance proximity switch is in an off state;
when the control signal is changed from two square wave signals to one square wave signal, the singlechip outputs high level, and the inductance proximity switch is in an off state;
when the control signal is changed from two paths of square wave signals to no signal, the output of the singlechip is changed from high level to low level, and the inductance proximity switch is changed from an open state to a closed state;
when the control signal is a square wave signal all the time, the inductance approach switch maintains the previous state and is not changed;
when the control signal is changed from one square wave signal to no signal, the output of the singlechip is changed from high level to low level, and the inductance proximity switch is changed from an open state to a closed state;
when the control signal is changed from one square wave signal to two square wave signals, the singlechip outputs high level, and the inductance proximity switch is in an off state;
when the control signal is no signal all the time, the singlechip outputs a low level, and the inductance proximity switch is in a closed state;
when the control signal is changed from no signal to one square wave signal, the singlechip outputs low level, and the inductance proximity switch is in a closed state;
when the control signal is changed into two paths of square wave signals from no signal, the output of the singlechip is changed into high level from low level, and the inductance proximity switch is changed into an open state from a closed state.
Preferably, the system further comprises a switch driving circuit electrically connected with the output end of the control device, and the switch driving circuit is only needed by adopting the prior art. The singlechip generates an output signal through the IO port, and finally outputs the output signal after passing through a driving circuit (shown in figure 7).
The signal modulation system still detects the peak value of the oscillation sine signal, but adopts a new technical means, and achieves the aim of rapidly detecting the peak value of the oscillation sine signal by utilizing the characteristic of high oscillation frequency of the LC sine wave resonant circuit of the inductance proximity switch. The response frequency can be greatly improved under the same detection distance. The diameter, detection distance and response frequency of the inductive proximity switch shell using the inductive proximity switch signal modulation technique of the invention are shown in table 2. It can be seen that the response frequency can be greatly improved by more than 3 times under the same shell diameter, LC oscillation frequency and detection distance by using the technology.
Table 2 inductive proximity switch response frequency using the techniques of the present invention
The specific implementation circuit is as shown in fig. 7, the singlechip comprises but not limited to STC15W204S with a double-interrupt function, the double-path comparator comprises but not limited to LMV393, the operation point voltage Vop and the release point voltage Vrp of the double-path comparator are realized by a voltage dividing circuit, and the LC oscillating circuit and the switch driving circuit adopt the prior art.
Example III
An inductive proximity switch comprising the system described in embodiment two. The system may be mounted in a housing of an inductive proximity switch.

Claims (10)

1. A signal modulation method for improving response frequency of an inductance proximity switch is characterized by comprising the following steps of: the method comprises the following steps:
generating a sinusoidal signal, wherein when a metal conductor approaches, the amplitude of the sinusoidal signal is reduced or oscillation is stopped;
setting an operation point voltage Vop and a release point voltage Vrp of the inductance proximity switch, wherein the operation point voltage Vop is less than the release point voltage Vrp; the peak voltage of the sinusoidal signal in the step 1 is collected and is respectively compared with the operating point voltage Vop and the release point voltage Vrp, and a corresponding control signal is output according to the comparison result:
when the peak voltage of the sinusoidal signal is greater than or equal to the release point voltage Vrp, the control signal is a two-way square wave signal;
when the peak voltage of the sinusoidal signal is larger than the operating point voltage Vop and smaller than the release point voltage Vrp, the control signal is a square wave signal;
when the peak voltage of the sinusoidal signal is less than or equal to the voltage Vop of the operating point, the control signal is no signal;
detecting the control signal and controlling the on-off of the inductance proximity switch, wherein the control signal is divided into the following cases:
when the control signal is always two paths of square wave signals, the inductance proximity switch is in an off state;
when the control signal is changed from two square wave signals to one square wave signal, the inductance proximity switch is in an off state;
when the control signal is changed from two paths of square wave signals to no signal, the inductance proximity switch is changed from an open state to a closed state;
when the control signal is a square wave signal all the time, the inductance approach switch maintains the previous state and is not changed;
when the control signal is changed from a square wave signal to no signal, the inductance proximity switch is in a closed state;
when the control signal is changed from one square wave signal to two square wave signals, the inductance proximity switch is in an off state;
when the control signal is no signal all the time, the inductance proximity switch is in a closed state;
when the control signal is changed from no signal to one square wave signal, the inductance proximity switch is in a closed state;
when the control signal is changed from no signal to two paths of square wave signals, the inductance proximity switch is changed from a closed state to an open state.
2. The method for modulating a signal to increase the response frequency of an inductive proximity switch of claim 1, wherein: and 3, detecting the control signal and controlling the on-off of the inductance proximity switch through a singlechip.
3. The method for modulating a signal to increase the response frequency of an inductive proximity switch of claim 2, wherein: the specific implementation process of the singlechip in the step 3 is as follows:
3.1, turning on the interrupt function of the singlechip, and setting the triggering mode of two external interrupts of the singlechip as the effective falling edge; setting initial values of a variable Bop and a variable Brp in the singlechip to be 0;
3.2, delaying for waiting, if the external interrupt pin INT0 of the singlechip detects a falling edge, setting a variable Bop to be 1, otherwise, setting the variable Bop to be 0; if the external interrupt pin INT1 of the singlechip detects a falling edge, setting a variable Brp to be 1, otherwise, the variable Brp is still 0;
3.3, closing the interruption function of the singlechip;
3.4) determine if variable Brp is equal to 1, then determine if Bop is equal to 1:
if the variable Brp is equal to 1 and the variable Bop is necessarily equal to 1, setting the initial position flag bit InitialState to 1, and outputting a level capable of enabling the inductance proximity switch to be disconnected by the singlechip;
if the variable Brp is not equal to 1 and the variable Bop is equal to 1, setting the initial position flag bit InitialState to 2, and outputting a level capable of enabling the inductance proximity switch to be disconnected by the singlechip;
if the variable Brp is not equal to 1, if the variable Bop is not equal to 1, the initial position flag bit InitialState is set to 3, and the singlechip outputs the level which can enable the inductance proximity switch to be closed;
3.5, setting the variable Bop and the variable Brp to 0 again, and opening the interrupt function of the singlechip;
3.6, delaying for waiting, if the external interrupt pin INT0 of the singlechip detects a falling edge, setting the variable Bop to be 1, otherwise, setting the variable Bop to be 0; if the external interrupt pin INT1 of the singlechip detects a falling edge, setting a variable Brp to be 1, otherwise, the variable Brp is still 0;
3.7, closing the interruption function of the singlechip;
3.8 ] firstly judging whether the variable Brp is equal to 1, and then judging whether the Bop is equal to 1:
if the variable Brp is equal to 1, the current position flag bit CurrentState is set to 1, and the singlechip outputs the level which can enable the inductance proximity switch to be kept in an off state;
if the variable Brp is not equal to 1, the variable Bop is equal to 1, and the initial position flag bit InitialState is 1, the current position flag bit CurrentState is set to 2, and the singlechip outputs a level capable of enabling the inductance proximity switch to be disconnected;
if the variable Brp is not equal to 1, the variable Bop is equal to 1, and the initial position flag bit InitialState is 3, the current position flag bit CurrentState is set to 2, and the singlechip outputs a level capable of enabling the inductance proximity switch to be closed;
if the variable Brp is not equal to 1, if the variable Bop is not equal to 1, the current position flag bit CurrentState is set to 3, and the singlechip outputs the level capable of enabling the inductance to be close to the switch;
3.9, the numerical value of the current position zone bit CurrentState is assigned to the initial position zone bit InitialState;
3.10, repeating the steps 3.5 to 3.9.
4. A signal modulation method for increasing an inductive proximity switch response frequency as recited in claim 3, wherein: step 3.2 and/or 3.6), the delay waiting time is at least 2 times of the oscillation period of the sinusoidal signal.
5. A signal modulation method for increasing the response frequency of an inductive proximity switch according to any one of claims 1-4, wherein: and step 2, comparing the acquired peak voltage of the sinusoidal signal with the operating point voltage Vop and the release point voltage Vrp respectively through a two-way comparator, and outputting a square wave signal or not outputting a signal.
6. A signal modulation method for increasing the response frequency of an inductive proximity switch according to any one of claims 1-4, wherein: the step 1 is to generate a sine signal through an LC oscillating circuit.
7. A signal modulation system for increasing the response frequency of an inductive proximity switch comprising an LC tank circuit for generating a sinusoidal signal, characterized by: and also comprises
A two-way comparator for comparing the peak voltage of the sinusoidal signal with the operating point voltage Vop and the releasing point voltage Vrp of the inductance proximity switch respectively and outputting a corresponding control signal according to the comparison result,
the control device is used for detecting the change condition of the control signal from the two-way comparator and outputting an on-off signal to control the on-off of the inductance proximity switch;
the two-way comparator comprises a first comparator and a second comparator, the reference level of the first comparator and the second comparator is respectively set as an operation point voltage Vop and a release point voltage Vrp of the inductive proximity switch, the operation point voltage Vop is less than the release point voltage Vrp,
when the peak voltage of the sinusoidal signal is greater than or equal to the release point voltage Vrp, the two-way comparator outputs two-way square wave signals;
when the peak voltage of the sinusoidal signal is larger than the operating point voltage Vop and smaller than the release point voltage Vrp, the two-way comparator outputs a square wave signal;
when the peak voltage of the sinusoidal signal is less than or equal to the operating point voltage Vop, the two-way comparator does not output any signal;
two output ends of the two-way comparator are electrically connected with two external interrupt pins of the control device in a one-to-one correspondence manner;
when the control device detects that the output of the two-way comparator is always two-way square wave signals, the inductance proximity switch is in an off state;
when the control device detects that the output of the two-way comparator is changed from two-way square wave signals to one-way square wave signal, the inductance proximity switch is in an off state;
when the control device detects that the output of the two-way comparator is changed from two-way square wave signals to no signal, the inductance proximity switch is changed from an open state to a closed state;
when the control device detects that the output of the two-way comparator is always a square wave signal, the inductance approach switch maintains the previous state and is not changed;
when the control device detects that the output of the two-way comparator is changed from one square wave signal to no signal, the inductance proximity switch is in a closed state;
when the control device detects that the output of the two-way comparator is changed from one square wave signal to two square wave signals, the inductance proximity switch is in an off state;
when the control device detects that the output of the two-way comparator is always without any signal, the inductance proximity switch is in a closed state;
when the control device detects that the output of the two-way comparator is changed from no signal to one-way square wave signal, the inductance proximity switch is in a closed state;
when the control device detects that the output of the two-way comparator is changed from no signal to two-way square wave signals, the inductance proximity switch is changed from a closed state to an open state.
8. The signal modulation system for increasing the response frequency of an inductive proximity switch of claim 7, wherein: the control device also comprises a switch driving circuit electrically connected with the output end of the control device.
9. The signal modulation system for increasing the response frequency of an inductive proximity switch of claim 8, wherein: the control device is a singlechip with two external interrupt functions.
10. An inductance proximity switch, characterized in that: a signal modulation system comprising the improved inductive proximity switch response frequency of claim 7 or 8 or 9.
CN202310416912.6A 2023-04-19 2023-04-19 Signal modulation method and system for improving response frequency of inductance proximity switch Pending CN116800232A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310416912.6A CN116800232A (en) 2023-04-19 2023-04-19 Signal modulation method and system for improving response frequency of inductance proximity switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310416912.6A CN116800232A (en) 2023-04-19 2023-04-19 Signal modulation method and system for improving response frequency of inductance proximity switch

Publications (1)

Publication Number Publication Date
CN116800232A true CN116800232A (en) 2023-09-22

Family

ID=88041164

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310416912.6A Pending CN116800232A (en) 2023-04-19 2023-04-19 Signal modulation method and system for improving response frequency of inductance proximity switch

Country Status (1)

Country Link
CN (1) CN116800232A (en)

Similar Documents

Publication Publication Date Title
US8258777B2 (en) Inductive proximity sensor
CN104104375B (en) Strengthen the method and circuit of the anti-mobile phone interference of capacitance type touch key
JPS62159913A (en) Non-contact proximity switch
EP0399563A3 (en) High frequency oscillation type proximity switch
JPH11264876A (en) Induction access detector
JPH04233337A (en) Automatic system for adjustment and control of frequency
CN110726435A (en) Electromagnet state monitoring method
CN101394165B (en) Differentiation hysteresis comparator and application thereof
CN107389994B (en) Configurable pin multiplexing method and system applied to current sensor chip
CN116800232A (en) Signal modulation method and system for improving response frequency of inductance proximity switch
US4125794A (en) Electronic touch key
US4072927A (en) Tire pressure monitor
CN111600587A (en) Sensor system for inductive proximity switch
CN209198618U (en) A kind of electromagnetic relay contact closure detection circuit
CN104753514B (en) A kind of contact witch controls circuit
AU2014274608B2 (en) Improvements to a metal detector
CN111669162B (en) Detection device
CN215186693U (en) Non-contact induction type proximity switch
RU2458322C1 (en) Adaptive item monitoring sensor
US9608635B1 (en) Digital input circuit and method for high voltage sensors
RU2359233C1 (en) Multifunction item control sensor
CN103840825A (en) All-digital integrated capacitance-type sensor interface circuit
CN105842618B (en) Magnetic switch comprehensive tester with process tracking protection and testing method thereof
KR101088389B1 (en) Proximity sensor using radio frequency oscillator with hysteresis compensation function
CN111478583A (en) Switching power supply control circuit and switching power supply control method applying same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination