Optical sensor and method of controlling the same

By introducing a differential amplifier circuit and a bandpass filter circuit into the photoelectric sensor, and setting the center frequency to 500kHz-600kHz, interference from LED light sources is filtered out, enabling accurate object detection under changing lighting conditions.

CN118276101BActive Publication Date: 2026-05-15SHENZHEN CHEVEN TECH
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN CHEVEN TECH
Filing Date
2024-02-18
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing photoelectric sensors suffer from interference from LED light sources in the detection environment, leading to inaccurate detection, especially when lighting conditions change.

Method used

The system adopts a structural design that includes a power supply module, a transmitter module, a main control MCU module, a receiver module, and an output module. The received pulse signal is filtered through a differential amplifier circuit and a bandpass filter circuit. The center frequency is set to 500KHZ-600KHZ to filter out interference signals. The sampled signal is compared with a preset threshold to control the output level signal of the output module.

Benefits of technology

It effectively suppresses the interference of LED light sources in ambient light on photoelectric sensors, ensuring accurate detection of objects even when lighting conditions change.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118276101B_ABST
    Figure CN118276101B_ABST
Patent Text Reader

Abstract

The application belongs to the field of sensors, and discloses an optoelectronic sensor and a control method thereof. The optoelectronic sensor comprises a power module, a transmitting module, a master control MCU module, a receiving module and an output module. The power module provides a first voltage signal for the optoelectronic sensor and outputs the first voltage signal to the transmitting module. The master control MCU module drives the transmitting module to emit a first pulse signal and outputs the first pulse signal to the receiving module. The receiving module filters the first pulse signal into a second pulse signal and outputs the filtered second pulse signal to the master control MCU module. The master control MCU module samples the second pulse signal into a third pulse signal, compares the sampled third pulse signal with a preset signal threshold in the master control MCU module, and controls the output module to output a level signal according to the comparison result. The optoelectronic sensor effectively suppresses the interference of LED light sources in ambient light on the optoelectronic sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of sensors, specifically relating to a photoelectric sensor and its control method. Background Technology

[0002] Object detection typically uses photoelectric sensors. Since the visible light spectrum of photoelectric sensors is the same as that of artificial light or sunlight, this can lead to erroneous outputs when detecting objects. The most challenging issue is that lighting conditions vary significantly from place to place. Therefore, an optical sensor that works flawlessly at the manufacturer's location may fail to function properly at the customer's location due to different lighting conditions. Current technologies often address this light interference by adding filters to the receiver tube to filter out unwanted wavelengths and reducing the aperture. While these methods improve resistance to light interference, reducing the aperture shortens the detection distance. When light interference sources of the same wavelength as the receiver tube are present in the detection environment, especially when LED light sources are present, photoelectric sensors struggle to accurately detect objects.

[0003] Frequency domain analysis of commonly used LED light sources revealed that their light signal frequencies range from 15kHz to 200kHz. Current methods for suppressing interference from LED light sources include using optical filters, controlling the emitted pulse frequency between 1kHz and 10kHz, or using analog switches to reduce the receiving signal window time. However, these methods are only effective when the interference signal strength is low and the frequency of the interference source signal is lower than the emitted pulse frequency. Additionally, time-division synchronous detection can be used to suppress signal interference from LED light sources; however, when ambient light interference persists for extended periods, the sensor may fail to output a signal even when the target is within the detection range.

[0004] Therefore, how to effectively suppress the interference of LED light sources in ambient light on photoelectric sensors is an urgent problem to be solved. Summary of the Invention

[0005] To address the technical problem of light interference from LED light sources in ambient light on photoelectric sensors, this invention provides a photoelectric sensor and its control method.

[0006] In a first aspect, the present invention provides a photoelectric sensor, including a power supply module, a transmitting module, a main control MCU module, a receiving module, and an output module; the power supply module is connected to the transmitting module, and the power supply module is used to provide a first voltage signal to the photoelectric sensor and output the first voltage signal to the transmitting module; the transmitting module is connected to the main control MCU module, and the main control MCU module drives the transmitting module to transmit a first pulse signal and outputs the first pulse signal to the receiving module; the receiving module is connected to the main control MCU module, and the receiving module filters the first pulse signal into a second pulse signal and outputs the filtered second pulse signal to the main control MCU module; the main control MCU module is connected to the output module, and the main control MCU module samples the received second pulse signal into a third pulse signal, compares the sampled third pulse signal with a preset signal threshold in the main control MCU module, and controls the output module to output a level signal according to the comparison result.

[0007] Preferably, the transmitting module includes a transmitting diode and a first phototransistor, and the main control MCU module includes a pulse drive pin;

[0008] The first phototransistor is connected to the pulse drive pin, and the emitting diode is connected to the first phototransistor.

[0009] Preferably, the receiving module includes a differential amplifier circuit and a bandpass filter circuit, and the main control MCU module includes signal receiving pins;

[0010] The differential amplifier circuit includes a first receiving diode, a second receiving diode, a first capacitor, a second capacitor, a first resistor, a second resistor, and a differential amplifier; the bandpass filter circuit includes a third resistor, a first operational amplifier, a fourth resistor, and a second operational amplifier.

[0011] The first capacitor is connected to the first receiving diode and the first resistor respectively, and the second capacitor is connected to the second receiving diode and the second resistor respectively;

[0012] The positive input terminal of the differential amplifier is connected to the second resistor, the inverting input terminal of the differential amplifier is connected to the first resistor, and the output terminal of the differential amplifier is connected to the third resistor.

[0013] The output of the first operational amplifier is connected to the fourth resistor, and the output of the second operational amplifier is connected to the signal receiving pin.

[0014] Preferably, the output module includes a second phototransistor, a third phototransistor, and a fifth resistor;

[0015] The main control MCU module includes an output control pin, the second phototransistor is connected to the output control pin, and the third phototransistor is connected to the fifth resistor.

[0016] Preferably, the photoelectric sensor further includes an indicator module, which includes a sixth resistor, a voltage indicator light, a seventh resistor, and an output indicator light. The main control MCU module includes a voltage indicator light control pin and an output indicator light control pin.

[0017] The sixth resistor is connected to the voltage indicator control pin and the voltage indicator, respectively, and the seventh resistor is connected to the output indicator control pin and the output indicator, respectively.

[0018] Secondly, the present invention also provides a control method for a photoelectric sensor, comprising:

[0019] The power module acquires the first voltage signal provided by the power module to the photoelectric sensor and outputs the first voltage signal to the transmitting module. The main control MCU module drives the transmitting module to transmit a first pulse signal and outputs the first pulse signal to the receiving module.

[0020] The receiving module filters the first pulse signal into a second pulse signal and outputs the filtered second pulse signal to the main control MCU module.

[0021] The main control MCU module samples the received second pulse signal as a third pulse signal, compares the sampled third pulse signal with a preset signal threshold in the main control MCU module, and controls the output module to output a level signal based on the comparison result.

[0022] Preferably, the receiving module filters the first pulse signal into a second pulse signal and outputs the filtered second pulse signal to the main control MCU module, including:

[0023] The received first pulse signal is input to a differential amplifier for differential amplification, and the differentially amplified pulse signal is output to a bandpass filter.

[0024] The bandpass filter selects the frequency of the differentially amplified pulse signal into a second pulse signal, and outputs the second pulse signal to the main control MCU module.

[0025] Preferably, the bandpass filter selectively processes the differentially amplified pulse signal into a second pulse signal and outputs the second pulse signal to the main control MCU module, including:

[0026] Set the center frequency of the bandpass filter, and compare the frequency of the differentially amplified pulse signal with the center frequency of the bandpass filter;

[0027] If the frequency of the differentially amplified pulse signal is greater than the center frequency of the set bandpass filter, the differentially amplified pulse signal is output to the main control MCU module through the bandpass filter.

[0028] Otherwise, the differentially amplified pulse signal is filtered out.

[0029] Preferably, the center frequency of the bandpass filter is set in the range of 500kHz-600kHz.

[0030] Preferably, the sampled third pulse signal is compared with a preset signal threshold in the main control MCU module, and the output module is controlled to output a level signal based on the comparison result, including:

[0031] If the sampled third pulse signal is greater than the preset signal threshold in the main control MCU module, the main control MCU module controls the output module to output a high level;

[0032] Otherwise, the main control MCU module controls the output module to output a low level.

[0033] Compared with existing technologies, this invention provides a photoelectric sensor and its control method. The receiving module in the photoelectric sensor filters a received first pulse signal into a second pulse signal and outputs the filtered second pulse signal to the main control MCU module. The main control MCU module samples the received second pulse signal into a third pulse signal, compares the sampled third pulse signal with a preset signal threshold in the main control MCU module, and controls the output module to output a level signal based on the comparison result. This invention effectively suppresses interference from ambient light sources (LED light sources) on the photoelectric sensor by filtering the received pulse signal. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and not all embodiments. For those skilled in the art, other drawings obtained from these drawings without creative effort are all within the scope of protection of the present invention.

[0035] Figure 1 A schematic diagram of the frame structure of a photoelectric sensor provided in an embodiment of the present invention;

[0036] Figure 2 A schematic diagram of the circuit structure of a transmitting module provided in an embodiment of the present invention;

[0037] Figure 3 This is a schematic diagram of the circuit structure of a main control MCU module provided in an embodiment of the present invention.

[0038] Figure 4 A schematic diagram of the circuit structure of a differential amplifier circuit provided in an embodiment of the present invention;

[0039] Figure 5 A schematic diagram of the circuit structure of a bandpass filter circuit provided in an embodiment of the present invention;

[0040] Figure 6 A schematic diagram of the circuit structure of an output module provided in an embodiment of the present invention;

[0041] Figure 7 A schematic diagram of the circuit structure of an indicator module provided in an embodiment of the present invention;

[0042] Figure 8 This is a flowchart illustrating a control method for a photoelectric sensor provided in an embodiment of the present invention.

[0043] Figure 9 An amplitude-frequency curve of a bandpass filter provided in an embodiment of the present invention;

[0044] Figure 10 This is a waveform diagram of a transmission pulse provided in an embodiment of the present invention. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0046] To provide a more detailed and complete description of the present invention, illustrative descriptions of its implementation methods and specific embodiments are provided below; however, these are not the only forms of implementing or utilizing the specific embodiments of the present invention. The implementation methods cover features of multiple specific embodiments, as well as the methods, steps, and their order for constructing and operating these specific embodiments. However, other specific embodiments can also be used to achieve the same or equivalent functions and sequence of steps. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the present invention.

[0047] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.

[0048] In the description of the embodiments of the present invention, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The word "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present invention, "multiple" means two or more. Other quantifiers should be understood similarly. The preferred embodiments described herein are only for illustrating and explaining the present invention and are not intended to limit the present invention. Furthermore, the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.

[0049] To address the technical problem of light interference from LED light sources in ambient light affecting photoelectric sensors, this invention provides a photoelectric sensor. Please refer to [reference needed]. Figure 1 , Figure 1 This is a schematic diagram of the frame structure of a photoelectric sensor provided in an embodiment of the present invention. The photoelectric sensor includes a power supply module 10, a transmitting module 20, a main control MCU module 30, a receiving module 40, and an output module 50. The power supply module 10 is connected to the transmitting module 20 and provides a first voltage signal to the photoelectric sensor, and outputs the first voltage signal to the transmitting module 20. The transmitting module 20 is connected to the main control MCU module 30 and drives the transmitting module 20 to transmit a first pulse signal, and outputs the first pulse signal to the receiving module 40. The receiving module 40 is connected to the main control MCU module 30 and filters the first pulse signal into a second pulse signal, and outputs the filtered second pulse signal to the main control MCU module 30. The main control MCU module 30 is connected to the output module 50 and samples the received second pulse signal into a third pulse signal, compares the sampled third pulse signal with a preset signal threshold in the main control MCU module 30, and controls the output module 50 to output a level signal according to the comparison result.

[0050] Specifically, in this embodiment of the invention, the power supply module provides a voltage signal to the entire photoelectric sensor on the one hand, and converts the 10V-30V input voltage signal into a 7V voltage signal for output to the transmitting module 20 on the other hand. The transmitting module 20 generates three pulse driving signals from the pulse driving pin inside the main control MCU. The light in the photoelectric sensor is focused by the transmitting lens. When there is an object in front of the photoelectric sensor, the light signal reflected back by the object is received by the receiving module 40 and filtered to remove the LED light interference signal in the ambient light. The filtered signal is then input to the ADC unit inside the main control MCU module 30 for sampling. The sampled electrical signal is compared with the threshold set by the main control MCU module 30, and the output module 50 is controlled to output a level signal according to the comparison result.

[0051] The power module 10 can be an existing DC-DC power module. The output of the DC-DC power module can also be connected to a DC linear buck module. The DC linear buck module is equipped with a linear buck chip, which can step down the 7V voltage signal of the power module to a 5V voltage signal for use by the photoelectric sensor.

[0052] As one implementation method, please refer to Figure 2-3 , Figure 2 This is a schematic diagram of the circuit structure of a transmitting module provided in an embodiment of the present invention. Figure 3 This is a schematic diagram of the circuit structure of a main control MCU module provided in an embodiment of the present invention. The transmitting module 20 includes an emitting diode D10 and a first phototransistor Q5. The main control MCU module 30 includes a pulse drive pin PWM. The first phototransistor D10 is connected to the pulse drive pin PWM, and the emitting diode D10 is connected to the first phototransistor Q5. In addition, the transmitting module 20 also includes resistors R25 and R24 and capacitor C14. Resistors R25 and R24 are both current-limiting resistors, and capacitor C14 is an energy storage filter capacitor. One end of resistor R25 is connected to the voltage source V7PO of the transmitting module 20, and the other end is connected to the first phototransistor Q5 and capacitor C14 respectively. One end of resistor R24 ​​is connected to the first phototransistor Q5, and the other end of resistor R24 ​​is grounded. One end of capacitor C14 is connected to resistor R24 ​​and the first phototransistor Q5 respectively, and the other end of capacitor C14 is grounded.

[0053] As one implementation method, please refer to Figure 4-5 , Figure 4 This is a schematic diagram of the circuit structure of a differential amplifier circuit provided in an embodiment of the present invention. Figure 5This is a schematic diagram of a bandpass filter circuit provided in an embodiment of the present invention. The receiving module 40 includes a differential amplifier circuit and a bandpass filter circuit. The main control MCU module 30 includes a signal receiving pin AIN2. The differential amplifier circuit includes a first receiving diode D11-1, a second receiving diode D11-2, a first capacitor C6, a second capacitor C10, a first resistor R17, a second resistor R9, and a differential amplifier U6.1. The bandpass filter circuit includes a third resistor R14, a first operational amplifier U6.2, a fourth resistor R31, and a second operational amplifier U3.1. The first capacitor C6 is connected to the... The first receiving diode D11-1 is connected to the first resistor R17, and the second capacitor C10 is connected to the second receiving diode D11-2 and the second resistor R9 respectively; wherein, the first capacitor C6 and the second capacitor C10 can isolate DC signals, the positive input terminal of the differential amplifier is connected to the second resistor R9, the inverting input terminal of the differential amplifier is connected to the first resistor R17, and the output terminal of the differential amplifier is connected to the third resistor R14; the output terminal of the first operational amplifier is connected to the fourth resistor R31, and the output terminal of the second operational amplifier is connected to the signal receiving pin AI N2.

[0054] In this embodiment of the invention, the differential amplifier circuit further includes a current-limiting resistor R8, a filter capacitor C1, resistors R10 and R20, and capacitors C6, C10, and C9. One end of the current-limiting resistor R8 is connected to a 5V voltage source, and the other end of the current-limiting resistor R8 is connected to the filter capacitor C1 and the first receiving diode D11-1 and the second receiving diode D11-2, respectively. The first receiving diode D11-1 is connected to the first capacitor C6 and the resistor R10, and the first receiving diode D11-2... The capacitor C9 is connected to the second capacitor C10 and resistor R20; the capacitor C9 is connected to the resistor R20; the differential amplifier circuit also includes capacitor C5, capacitor C7, resistor R16, resistor R18 and resistor R19, wherein capacitor C5 and resistor R19 are connected in parallel, capacitor C7 and resistor R18 are connected in parallel, and resistor R16 is connected to a 5V voltage source; the differential amplifier circuit also includes capacitor C3 and resistor R15, resistor R15 is connected to the output terminal of the differential amplifier, and capacitor C3 and resistor R15 are connected in parallel.

[0055] In this embodiment of the invention, the bandpass filter circuit further includes capacitors C17 and C19, resistors R5 and R28, wherein one end of capacitor C17 is connected to resistor R28, the other end of capacitor C17 is connected to resistor R5 and capacitor C19, and resistor R28 is connected to the inverting input terminal of the first operational amplifier; the bandpass filter circuit further includes capacitors C21 and C20, resistors R30 and R29, wherein one end of capacitor C21 is connected to resistor R29, the other end of capacitor C17 is connected to resistor R30 and capacitor C20, and resistor R29 is connected to the inverting input terminal of the second operational amplifier.

[0056] As one implementation method, please refer to Figure 6 , Figure 6 This is a schematic diagram of the circuit structure of an output module provided in an embodiment of the present invention. The output module 50 includes a second phototransistor Q1, a third phototransistor Q2, and a fifth resistor R3. The main control MCU module 30 includes an output control pin LED_RED. The second phototransistor Q1 is connected to the output control pin SHORT, and the third phototransistor Q2 is connected to the fifth resistor R3. Furthermore, the output module 50 also includes a photodiode D6, resistors R1, R2, and R22. The photodiode D6 is grounded, resistor R1 is connected to a 5V voltage source, one end of resistor R2 is connected to the second phototransistor Q1, and the other end of resistor R2 is connected to the third phototransistor Q2 and resistor R22, respectively.

[0057] As one implementation method, please refer to Figure 7 , Figure 7 This is a circuit diagram of an indicator module provided in an embodiment of the present invention. The photoelectric sensor further includes an indicator module 60, which includes a sixth resistor R12, a voltage indicator LED1, a seventh resistor R11, and an output indicator LED2. The main control MCU module 30 includes a voltage indicator control pin LED_GREEN and an output indicator control pin LED_RED. The sixth resistor R12 is connected to the voltage indicator control pin LED_GREEN and the voltage indicator LED1, respectively, and the seventh resistor R11 is connected to the output indicator control pin LED_RED and the output indicator LED2, respectively.

[0058] Based on the above-described photoelectric sensor, this invention also provides a control method for the photoelectric sensor, which can be executed by software and / or hardware devices. For examples, please refer to... Figure 8 , Figure 8This is a flowchart illustrating a control method for a photoelectric sensor provided in an embodiment of the present invention. The control method includes: S101, acquiring a first voltage signal provided by a power supply module to the photoelectric sensor, outputting the first voltage signal to a transmitting module, and the main control MCU module driving the transmitting module to transmit a first pulse signal, which is then output to a receiving module; S102, the receiving module filtering the first pulse signal into a second pulse signal, and outputting the filtered second pulse signal to the main control MCU module; S103, the main control MCU module sampling the received second pulse signal into a third pulse signal, comparing the sampled third pulse signal with a preset signal threshold in the main control MCU module, and controlling the output module to output a level signal based on the comparison result. The control method for the photoelectric sensor provided in this embodiment of the present invention effectively suppresses interference from LED light sources in ambient light on the photoelectric sensor by filtering the received pulse signal.

[0059] In one implementation, the receiving module filters the first pulse signal into a second pulse signal and outputs the filtered second pulse signal to the main control MCU module. This includes: inputting the received first pulse signal into a differential amplifier for differential amplification, and outputting the differentially amplified pulse signal to a bandpass filter; the bandpass filter selectively processes the differentially amplified pulse signal into a second pulse signal, and outputs the second pulse signal to the main control MCU module. In this embodiment of the invention, interference signals can be filtered out before the LED light source enters the main control MCU module in ambient light, enabling the photoelectric sensor to stably detect objects even in the presence of light interference.

[0060] In one implementation, the bandpass filter selectively processes the differentially amplified pulse signal into a second pulse signal and outputs the second pulse signal to the main control MCU module. This includes: setting the center frequency of the bandpass filter and comparing the frequency of the differentially amplified pulse signal with the center frequency of the bandpass filter; if the frequency of the differentially amplified pulse signal is greater than the set center frequency of the bandpass filter, then the differentially amplified pulse signal is output to the main control MCU module through the bandpass filter; otherwise, the differentially amplified pulse signal is filtered out.

[0061] As one implementation method, please refer to Figure 9-10 , Figure 9 This is an amplitude-frequency curve of a bandpass filter provided in an embodiment of the present invention. Figure 10The waveform diagram of a transmitted pulse provided in this embodiment of the invention is based on frequency domain analysis of the light signals from commonly used LED light sources. The analysis reveals that the light signal frequency of LED light sources is between 15kHz and 200kHz. Therefore, the center frequency of the bandpass filter can be set within the range of 500kHz-600kHz. Preferably, the center frequency of the bandpass filter can be set at 550kHz. Since the high-level time and low-level time of a single pulse are both 0.9µs, the center frequency of the bandpass filter can be set at 550kHz, and the frequency of the transmitted pulse signal is also set at 550kHz. It should be noted that in this embodiment of the invention, the purpose of continuously sending three pulses is to increase the transmitted energy and improve the energy intensity of the received signal. Simultaneously, the transmitted pulse signal experiences almost no attenuation when passing through the filter, while interference signals are completely attenuated by the filter.

[0062] Preferably, the sampled third pulse signal is compared with a preset signal threshold in the main control MCU module, and the output module is controlled to output a level signal according to the comparison result. This includes: if the sampled third pulse signal is greater than the preset signal threshold in the main control MCU module, the main control MCU module controls the output module to output a high level; otherwise, the main control MCU module controls the output module to output a low level. In this embodiment of the invention, if the output module outputs a high level, the main control MCU module controls the indicator light in the indicator module to illuminate; if the output module outputs a low level, the main control MCU module controls the indicator light in the indicator module to de-illuminate.

[0063] The control method for the photoelectric sensor provided in this embodiment of the invention can execute the technical solution of the photoelectric sensor in any of the above embodiments. Its implementation principle and beneficial effects are similar to those of the photoelectric sensor. Please refer to the implementation principle and beneficial effects of the photoelectric sensor, which will not be repeated here.

[0064] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0065] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

[0066] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A photoelectric sensor, characterized in that, It includes a power supply module, a transmitter module, a main control MCU module, a receiver module, and an output module; The power module is connected to the transmitting module. The power module is used to provide a first voltage signal to the photoelectric sensor and output the first voltage signal to the transmitting module. The transmitting module is connected to the main control MCU module, and the main control MCU module drives the transmitting module to transmit a first pulse signal and outputs the first pulse signal to the receiving module; The receiving module is connected to the main control MCU module. The receiving module filters the first pulse signal into a second pulse signal and outputs the filtered second pulse signal to the main control MCU module. The main control MCU module is connected to the output module. The main control MCU module samples the received second pulse signal as a third pulse signal, compares the sampled third pulse signal with a preset signal threshold in the main control MCU module, and controls the output module to output a level signal according to the comparison result. The receiving module includes a differential amplifier circuit and a bandpass filter circuit, and the main control MCU module includes signal receiving pins; The differential amplifier circuit includes a first receiving diode, a second receiving diode, a first capacitor, a second capacitor, a first resistor, a second resistor, and a differential amplifier; the bandpass filter circuit includes a third resistor, a first operational amplifier, a fourth resistor, and a second operational amplifier. The first capacitor is connected to the first receiving diode and the first resistor respectively, and the second capacitor is connected to the second receiving diode and the second resistor respectively; The positive input terminal of the differential amplifier is connected to the second resistor, the inverting input terminal of the differential amplifier is connected to the first resistor, and the output terminal of the differential amplifier is connected to the third resistor. The output of the first operational amplifier is connected to the fourth resistor, and the output of the second operational amplifier is connected to the signal receiving pin.

2. The photoelectric sensor according to claim 1, characterized in that, The transmitting module includes a transmitting diode and a first phototransistor, and the main control MCU module includes a pulse drive pin; The first phototransistor is connected to the pulse drive pin, and the emitting diode is connected to the first phototransistor.

3. The photoelectric sensor according to claim 2, characterized in that, The output module includes a second phototransistor, a third phototransistor, and a fifth resistor; The main control MCU module includes an output control pin, the second phototransistor is connected to the output control pin, and the third phototransistor is connected to the fifth resistor.

4. The photoelectric sensor according to claim 3, characterized in that, The photoelectric sensor also includes an indicator module, which includes a sixth resistor, a voltage indicator light, a seventh resistor, and an output indicator light. The main control MCU module includes a voltage indicator light control pin and an output indicator light control pin. The sixth resistor is connected to the voltage indicator control pin and the voltage indicator, respectively, and the seventh resistor is connected to the output indicator control pin and the output indicator, respectively.

5. A control method for a photoelectric sensor, characterized in that, include: The power module acquires the first voltage signal provided by the power module to the photoelectric sensor and outputs the first voltage signal to the transmitting module. The main control MCU module drives the transmitting module to transmit a first pulse signal and outputs the first pulse signal to the receiving module. The receiving module filters the first pulse signal into a second pulse signal and outputs the filtered second pulse signal to the main control MCU module. The main control MCU module samples the received second pulse signal as a third pulse signal, compares the sampled third pulse signal with a preset signal threshold in the main control MCU module, and controls the output module to output a level signal based on the comparison result. The receiving module filters the first pulse signal into a second pulse signal and outputs the filtered second pulse signal to the main control MCU module, including: The received first pulse signal is input to a differential amplifier for differential amplification, and the differentially amplified pulse signal is output to a bandpass filter. The bandpass filter selects the frequency of the differentially amplified pulse signal into a second pulse signal, and outputs the second pulse signal to the main control MCU module.

6. The control method for the photoelectric sensor according to claim 5, characterized in that, The bandpass filter selectively processes the differentially amplified pulse signal into a second pulse signal, and outputs the second pulse signal to the main control MCU module, including: Set the center frequency of the bandpass filter, and compare the frequency of the differentially amplified pulse signal with the center frequency of the bandpass filter; If the frequency of the differentially amplified pulse signal is greater than the center frequency of the set bandpass filter, the differentially amplified pulse signal is output to the main control MCU module through the bandpass filter. Otherwise, the differentially amplified pulse signal is filtered out.

7. The control method for the photoelectric sensor according to claim 6, characterized in that, The center frequency of the bandpass filter is set in the range of 500kHz-600kHz.

8. The control method for the photoelectric sensor according to claim 7, characterized in that, The sampled third pulse signal is compared with a preset signal threshold in the main control MCU module, and the output module is controlled to output a level signal based on the comparison result, including: If the sampled third pulse signal is greater than the preset signal threshold in the main control MCU module, the main control MCU module controls the output module to output a high level. Otherwise, the main control MCU module controls the output module to output a low level.