Dual-output photoelectric sensor and its control method

CN122544830APending Publication Date: 2026-08-11SHENZHEN CHEVEN TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-07
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

然而,该方案需采购、安装和维护两个独立传感器,导致硬件成本成倍增加;此外,双传感器并排安装需占用额外空间,且需进行信号同步调试,增加了安装与使用的复杂度,同时多传感器之间的电磁干扰也可能影响检测精度

Benefits of technology

[0016]与现有技术相比,本发明提供的一种双路输出的光电传感器及其控制方法,通过在单个传感器内部集成两个独立驱动的光电发射端,两个光电发射端从不同角度照射待测物体,降低了因物体表面材质差异导致的信号波动,提升了光电传感器检测的稳定性。同时,本发明将双路检测和双路独立输出集成于单一传感器壳体内,只需一个安装工位、就完成了原有两个传感器才能实现的冗余或互补检测功能,大幅低了硬件采购、安装和维护成本,简化了现场安装布线和调试工作。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122544830A_ABST
    Figure CN122544830A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of sensors and discloses a dual-output photoelectric sensor and its control method. The photoelectric sensor includes a power supply module, a transmitting module, a main control MCU module, a receiving module, and an output module. The transmitting module includes two photoelectric emitting terminals for emitting detection light towards the object under the drive of the main control MCU module. The receiving module includes a photoelectric receiving terminal for receiving the reflected light signal reflected by the object under test and converting the reflected light signal into an electrical signal, which is then output to the main control MCU module. The main control MCU module detects the object under test based on the electrical signal output from the receiving module, generating two independent detection signals corresponding to the two photoelectric emitting terminals, and sending these two independent detection signals to the output module. The output module, based on the control signal from the main control MCU module, converts the two independent detection signals into two independent level signals for output. This invention improves the stability of object detection by the photoelectric 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 dual-output photoelectric sensor and its control method. Background Technology

[0002] Photoelectric sensors are non-contact detection devices based on the photoelectric effect, widely used in industrial automation, production line inspection, and object recognition. However, in practical applications, the surface gloss and material of the object being detected vary significantly. For example, a mirror-like reflective surface may result in excessively strong and concentrated reflected light, while a matte surface or dark material may result in insufficient reflected light. These differences in surface characteristics cause large fluctuations in the intensity of the reflected light signal received by a single photoelectric sensor, easily leading to unstable detection, occasional undetectable failures, and in severe cases, misjudgments by the detection system or even production line shutdowns.

[0003] To address the issue of unstable detection by a single sensor, the current mainstream solution is to install two independent photoelectric sensors in parallel. This dual-sensor approach compensates for the detection blind spots of a single sensor, thereby improving detection stability. However, this solution requires the purchase, installation, and maintenance of two independent sensors, significantly increasing hardware costs. Furthermore, the parallel installation of two sensors occupies additional space and necessitates signal synchronization debugging, increasing the complexity of installation and use. Additionally, electromagnetic interference between multiple sensors may affect detection accuracy.

[0004] Therefore, how to improve the stability of photoelectric sensors in detecting objects with different surface characteristics while controlling costs is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] To address the technical problem of instability in the detection of objects with different surface characteristics by photoelectric sensors, this invention provides a dual-output photoelectric sensor and its control method.

[0006] In a first aspect, the present invention provides a dual-output photoelectric sensor, including a power supply module, a transmitting module, a main control MCU module, a receiving module, and an output module; The power module is connected to the transmitting module. The power module is used to convert the first voltage signal received from the outside into a second voltage signal and send the second voltage signal to the transmitting module. The transmitting module is connected to the main control MCU module. The transmitting module includes two photoelectric transmitting ends, which are used to emit detection light towards the object under the drive of the main control MCU module. The receiving module is connected to the main control MCU module. The receiving module includes a photoelectric receiving end, which is used to receive the reflected light signal reflected by the object under test, and convert the reflected light signal into an electrical signal and output it to the main control MCU module. The main control MCU module is connected to the output module. The main control MCU module detects the object under test according to the electrical signal output by the receiving module, generates two independent detection signals corresponding to the two photoelectric emitting ends, and sends the two independent detection signals to the output module. The output module converts the two independent detection signals into two independent level signals for output based on the control signal from the main control MCU module.

[0007] Preferably, the transmitting module includes a first transmitting drive unit and a second transmitting drive unit. The first transmitting drive unit includes a first current-limiting resistor, a first driving transistor, a first emitting diode, and a first emitting resistor. The second transmitting drive unit includes a second current-limiting resistor, a second driving transistor, a second emitting diode, and a second emitting resistor. The main control MCU module includes a first pulse drive pin and a second pulse drive pin. The first end of the first current-limiting resistor is connected to the first pulse drive pin, and the second end of the first current-limiting resistor is connected to the base of the first driving transistor; the collector of the first driving transistor is connected to the cathode of the first emitting diode, the first end of the first emitting resistor is connected to the emitter of the first driving transistor, and the second end of the first emitting resistor is grounded. The first end of the second current-limiting resistor is connected to the second pulse drive pin, the second end of the second current-limiting resistor is connected to the base of the second drive transistor, the collector of the second drive transistor is connected to the cathode of the second emitter diode, the first end of the second emitter resistor is connected to the emitter of the second drive transistor, and the second end of the second emitter resistor is grounded.

[0008] Preferably, the first transmission driving unit further includes a first power supply resistor and a first capacitor, and the second transmission driving unit further includes a second power supply resistor and a second capacitor; The first end of the first power supply resistor is connected to the second voltage signal, the second end of the first power supply resistor is connected to the anode of the first emitting diode, the first end of the first capacitor is connected to the second end of the first power supply resistor, and the second end of the first capacitor is grounded. The first end of the second power supply resistor is connected to the second voltage signal, the second end of the second power supply resistor is connected to the anode of the second emitting diode, the first end of the second capacitor is connected to the second end of the second power supply resistor, and the second end of the second capacitor is grounded.

[0009] Preferably, the receiving module includes an analog switch chip, a first matching resistor, a third capacitor, and a fourth capacitor, and the main control MCU module includes a receiving control pin; The signal input pin of the analog switch chip is connected to the photoelectric receiving signal, and the signal output pin of the analog switch chip is connected to the first end of the first matching resistor and the first end of the third capacitor, respectively. The second end of the third capacitor is grounded. The enable pin of the analog switch chip is connected to the receive control pin, and the power supply terminal of the analog switch chip is connected to the power supply voltage signal. The first terminal of the fourth capacitor is connected to the power supply terminal of the analog switch chip, and the second terminal of the fourth capacitor is grounded.

[0010] Preferably, the output module includes a first output driving unit and a second output driving unit. The first output driving unit includes a first base resistor, a first pull-down resistor, a first output transistor, a first fuse, and a first varistor. The second output driving unit includes a second base resistor, a second pull-down resistor, a second output transistor, a second fuse, and a second varistor. The main control MCU module includes a first output driving pin and a second output driving pin. The first end of the first base resistor is connected to the first output drive pin, the second end of the first base resistor is connected to the base of the first output transistor, the first end of the first pull-down resistor is connected to the base of the first output transistor, and the second end of the first pull-down resistor is grounded. The emitter of the first output transistor is connected to the first end of the first fuse, the second end of the first fuse is grounded, the collector of the first output transistor is connected to the first end and the first output end of the first varistor, and the second end of the first varistor is grounded. The first end of the second base resistor is connected to the second output drive pin, the second end of the second base resistor is connected to the base of the second output transistor, the first end of the second pull-down resistor is connected to the base of the second output transistor, and the second end of the second pull-down resistor is grounded. The emitter of the second output transistor is connected to the first end of the second fuse, the second end of the second fuse is grounded, the collector of the second output transistor is connected to the first end and the second output end of the second varistor, and the second end of the second varistor is grounded.

[0011] Preferably, the main control MCU module further includes a calibration unit, which is used to calibrate the transmission power of the two photoelectric transmitters and / or the detection threshold of the received signal of the photoelectric receiver.

[0012] Secondly, the present invention also provides a control method for a dual-output photoelectric sensor, comprising: The second voltage signal provided by the power module is acquired and sent to the transmitting module; The two photoelectric transmitting ends of the transmitting module emit detection light towards the object under test under the drive of the main control MCU module, and receive the reflected light signal reflected by the object under test through the photoelectric receiving end of the receiving module, and convert the reflected light signal into an electrical signal and output it to the main control MCU module. The main control MCU module detects the object under test based on the electrical signal output by the receiving module, generates two independent detection signals corresponding to the two photoelectric transmitters, and sends the two independent detection signals to the output module. The output module converts the two independent detection signals into two independent level signals for output based on the control signal from the main control MCU module.

[0013] Preferably, the two photoelectric transmitting ends of the transmitting module emit detection light towards the object under test under the drive of the main control MCU module, and receive the reflected light signal reflected by the object under test through the photoelectric receiving end of the receiving module, converting the reflected light signal into an electrical signal and outputting it to the main control MCU module, including: Within a preset detection period, the main control MCU module outputs a first pulse signal through the first pulse drive pin, driving the first photoelectric emitting end of the transmitting module to emit the first detection light. The photoelectric receiver receives the first reflected light signal reflected by the object under test, and converts the first reflected light signal into a first electrical signal through the main control MCU module; After the first photoelectric emitting terminal emits the first detection light and after a preset delay time, the main control MCU module outputs a second pulse signal through the second pulse drive pin to drive the second photoelectric emitting terminal of the emitting module to emit the second detection light. The photoelectric receiver receives the second reflected light signal reflected by the object under test, and converts the second reflected light signal into a second electrical signal through the main control MCU module.

[0014] Preferably, the main control MCU module detects the object under test based on the electrical signal output by the receiving module, generates two independent detection signals corresponding to the two photoelectric transmitting ends respectively, and sends the two independent detection signals to the output module, including: The main control MCU module samples the first electrical signal output by the receiving module at the first sampling time to obtain the first signal amplitude corresponding to the first detection light, and samples the second electrical signal output by the receiving module at the second sampling time to obtain the second signal amplitude corresponding to the second detection light. The main control MCU module compares the amplitude of the first signal with a preset first signal amplitude threshold to generate a first detection signal, and compares the amplitude of the second signal with a preset second signal amplitude threshold to generate a second detection signal. The main control MCU module sends the first detection signal and the second detection signal to the output module.

[0015] Preferably, the output module converts the two independent detection signals into two independent level signals for output according to the control signal from the main control MCU module, including: The main control MCU module generates a first control signal based on the first detection signal, and outputs the first control signal to the first output driving unit of the output module through the first output driving pin, so as to drive the first output driving unit to output a first level signal to the first output terminal of the photoelectric sensor; The main control MCU module generates a second control signal based on the second detection signal, and outputs the second control signal to the second output drive unit of the output module through the second output drive pin, so as to drive the second output drive unit to output a second level signal to the second output terminal of the photoelectric sensor.

[0016] Compared with existing technologies, the present invention provides a dual-output photoelectric sensor and its control method. By integrating two independently driven photoelectric emitters within a single sensor, the two emitters illuminate the object under test from different angles, reducing signal fluctuations caused by differences in the object's surface material and improving the stability of the photoelectric sensor's detection. Furthermore, the present invention integrates dual-channel detection and dual independent output within a single sensor housing, requiring only one installation station to achieve the redundant or complementary detection functions previously achieved with two sensors. This significantly reduces hardware procurement, installation, and maintenance costs, and simplifies on-site installation, wiring, and debugging. Attached Figure Description

[0017] 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.

[0018] Figure 1 This is a schematic diagram of the frame structure of a dual-output photoelectric sensor provided in an embodiment of the present invention.

[0019] Figure 2 This is a schematic diagram of the circuit structure of a transmitting module provided in an embodiment of the present invention.

[0020] 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.

[0021] Figure 4 This is a schematic diagram of the circuit structure of a receiving module provided in an embodiment of the present invention.

[0022] Figure 5 This is a schematic diagram of the circuit structure of an output module provided in an embodiment of the present invention.

[0023] Figure 6 This is a flowchart illustrating a control method for a dual-output photoelectric sensor provided in an embodiment of the present invention. Detailed Implementation

[0024] 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.

[0025] 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.

[0026] 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.

[0027] 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.

[0028] To address the technical problem of instability in the detection of objects with different surface characteristics by the aforementioned photoelectric sensors, this invention provides a dual-output photoelectric sensor. Please refer to... Figure 1 , Figure 1This is a schematic diagram of the frame structure of a dual-output photoelectric sensor provided in an embodiment of the present invention, including 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 is used to convert a first voltage signal received externally into a second voltage signal, and send the second voltage signal to the transmitting module 20. The transmitting module 20 is connected to the main control MCU module 30, and includes two photoelectric emitting terminals, which are used to emit detection light towards the object under the drive of the main control MCU module 30. The receiving module 40 is connected to the main control MCU module 30. The U module 30 is connected, and the receiving module 40 includes a photoelectric receiving end. The photoelectric receiving end is used to receive the reflected light signal reflected by the object under test and convert the reflected light signal into an electrical signal and output it to the main control MCU module 30. The main control MCU module 30 is connected to the output module 50. The main control MCU module 30 detects the object under test according to the electrical signal output by the receiving module 40, generates two independent detection signals corresponding to the two photoelectric emitting ends, and sends the two independent detection signals to the output module 50. The output module 50 converts the two independent detection signals into two independent level signals and outputs them according to the control signal of the main control MCU module 30. Specifically, in this embodiment of the invention, during the detection process, the main control MCU module 30 controls the first photoelectric emitting end 21 and the second photoelectric emitting end 22 to emit detection light beams towards the object under test. After the two detection light beams irradiate the surface of the object under test, they are reflected respectively. Since the two photoelectric emitting ends are symmetrically distributed with respect to the photoelectric receiving end 41, the reflected light paths they form cover different areas and angles of the surface of the object under test. For example, on a highly reflective surface, the light emitted by the first photoelectric emitter 21 may be deflected by the mirror, resulting in the photoelectric receiver 41 only receiving a weak reflected signal. However, due to the different emission angle, the light emitted by the second photoelectric emitter 22 can be effectively captured by the photoelectric receiver 41 in the form of diffuse reflection. The photoelectric receiver 41 converts the received reflected light signal into an electrical signal, which is sampled and processed by the main control MCU module 30. The main control MCU module 30 collects the first signal amplitude corresponding to the first photoelectric emitter 21 and the second signal amplitude corresponding to the second photoelectric emitter 22 in a time-division manner, and compares them with preset detection thresholds to independently determine whether the two optical paths have effectively detected the object, ultimately generating two independent detection signals. After conversion by the output module 50, the two detection signals are output as two independent level signals. This invention integrates two independent photoelectric emitters within a single sensor and drives them in a time-division manner, achieving the equivalent detection effect of two independent optical paths with a single sensor and a photoelectric receiver.Compared to traditional single-transmitter, single-receiver structures, dual transmitters illuminate from different angles, reducing signal fluctuations caused by differences in the reflective properties of object surfaces. The two signals can complement each other. Even if one optical path is interfered with, the other can still ensure effective detection, significantly improving detection stability. Furthermore, this invention integrates dual-path detection and dual independent output into a single sensor housing, requiring only one installation station and one wiring step to achieve the redundant or complementary detection functions previously achieved with two sensors. This significantly reduces hardware procurement, installation, and maintenance costs, simplifies on-site installation, wiring, and debugging, and balances performance and cost.

[0029] In one implementation, the dual-output photoelectric sensor further includes a sensor housing. The photoelectric receiving end is fixedly disposed in the middle of the detection end of the sensor housing. The two photoelectric emitting ends are symmetrically disposed on both sides of the photoelectric receiving end, and the emission direction of the two photoelectric emitting ends is consistent with the receiving direction of the photoelectric receiving end, both facing the detection direction of the sensor housing. Specifically, the distance between the two photoelectric emitting ends and the photoelectric receiving end is equal, and the distance range is 2mm to 5mm. By placing the photoelectric receiving end in the middle and the two photoelectric emitting ends symmetrically distributed on both sides, the detection light emitted by the two photoelectric emitting ends can cover the detection area of ​​the surface of the object to be measured from different angles. At the same time, the above-mentioned distance range ensures sufficient coverage of the two detection light beams while avoiding mutual interference between the light from the two emitting ends in space, ensuring that the reflected light signal received by the photoelectric receiving end is clear and stable. In addition, the detection end of the sensor housing is also provided with a light-transmitting protective cover, which covers the two photoelectric emitting ends and the photoelectric receiving end. Specifically, the light-transmitting protective cover is used to protect the photoelectric transmitter and receiver components inside the sensor housing, while preventing dust and debris from entering the sensor and blocking light, thus affecting the detection effect. The light-transmitting protective cover is made of high-transmittance acrylic material with a transmittance greater than or equal to 95%, in order to minimize the attenuation of detection light as it passes through the protective cover, ensuring the emission intensity of the emitted light and the reception efficiency of the reflected light, thereby ensuring that the sensor's detection distance and detection sensitivity are not affected by the protective cover.

[0030] As one implementation method, please refer to Figures 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 3This 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 a first transmitting drive unit and a second transmitting drive unit. The first transmitting drive unit includes a first current-limiting resistor R17, a first driving transistor Q2, a first emitting diode D4, and a first emitter resistor R19. The second transmitting drive unit includes a second current-limiting resistor R51, a second driving transistor Q4, a second emitting diode D12, and a second emitter resistor R50. The main control MCU module 30 includes a first pulse drive pin PWM1 and a second pulse drive pin PWM2. The first end of the first current-limiting resistor R17 is connected to the first pulse drive pin PWM1, and the second end of the first current-limiting resistor R17 is connected to the base of the first driving transistor Q2. The collector of the first driving transistor Q2 is connected to the cathode of the first emitting diode D4. The first end of the first emitting resistor R19 is connected to the emitter of the first driving transistor Q2, and the second end of the first emitting resistor R19 is grounded. The first end of the second current-limiting resistor R51 is connected to the second pulse drive pin PWM2, and the second end of the second current-limiting resistor R51 is connected to the base of the second driving transistor Q4. The collector of the second driving transistor Q4 is connected to the cathode of the second emitting diode D12. The first end of the second emitting resistor R50 is connected to the emitter of the second driving transistor Q4, and the second end of the second emitting resistor R50 is grounded. Specifically, in this embodiment of the invention, the first current-limiting resistor R17 is connected in series between the first pulse drive pin PWM1 and the base of the first driving transistor Q2 to limit the current flowing into the base of the first driving transistor Q2, preventing the main control MCU module 30 pin from being damaged due to overload, while ensuring the reliable operation of the first driving transistor Q2. The first emitter resistor R19 is connected between the emitter of the first driver transistor Q2 and ground to limit the peak current flowing through the emitter diode D4 when the first driver transistor Q2 is turned on, preventing the first emitter diode D4 from burning out due to overcurrent. The second current-limiting resistor R51 and the second emitter resistor R50 serve the same current-limiting protection function in the second emitter drive unit. During operation, the main control MCU module 30 outputs a high-frequency pulse signal through the first pulse drive pin PWM1. When the first pulse drive pin PWM1 outputs a high level, current flows into the base of the first driver transistor Q2 through the first current-limiting resistor R17, and the first driver transistor Q2 is saturated and turned on. At this time, the supply voltage VCC_IN forms a conducting current loop through the first emitter diode D4, the first driver transistor Q2, and the first emitter resistor R19. The first emitter diode D4 is forward biased and emits infrared detection light pulses. When the first pulse drive pin PWM1 outputs a low level, the first driver transistor Q2 is turned off, the loop is broken, and the first emitter diode D4 is turned off.This invention employs a dual-path transmission drive circuit controlled by independent PWM pins, allowing the main control MCU module 30 to adjust the duty cycle or frequency of the pulse signals output from the first pulse drive pin PWM1 and the second pulse drive pin PWM2, respectively. When the surface of the object being detected has strong reflectivity, the main control MCU module 30 can appropriately reduce the transmission power to avoid signal saturation; conversely, when the surface of the object being detected has weak reflectivity, the main control MCU module 30 can appropriately increase the transmission power to enhance the intensity of the reflected signal. By independently adjusting the transmission power of the two photoelectric transmitters, a single sensor can simultaneously adapt to objects with different surface gloss levels and materials, ensuring that the photoelectric receiver can stably capture the reflected light signal, thereby improving the reliability and adaptability of the detection.

[0031] As one implementation method, please refer to Figure 2 The first transmitting drive unit further includes a first power supply resistor R6 and a first capacitor C10, and the second transmitting drive unit further includes a second power supply resistor R49 and a second capacitor C23. The first end of the first power supply resistor R6 is connected to the second voltage signal VCC_IN, and the second end of the first power supply resistor R6 is connected to the anode of the first transmitting diode D4. The first end of the first capacitor C10 is connected to the second end of the first power supply resistor R6, and the second end of the first capacitor C10 is grounded. The first end of the second power supply resistor R49 is connected to the second voltage signal VCC_IN, and the second end of the second power supply resistor R49 is connected to the anode of the second transmitting diode D12. The first end of the second capacitor C23 is connected to the second end of the second power supply resistor R49, and the second end of the second capacitor C23 is grounded. Specifically, in this embodiment of the invention, the first power supply resistor R6 is connected in series between the power supply VCC_IN and the anode of the first transmitting diode D4, serving to limit the operating current of the first transmitting diode D4, and together with the first emitter resistor R19, sets the peak current flowing through the first transmitting diode D4. The first capacitor C10 is connected in parallel between the second terminal of the first power supply resistor R6 and ground. This filters out high-frequency ripple interference from the power supply line, preventing power supply noise from coupling into the transmitted optical signal and ensuring a clean and stable optical pulse waveform. The second power supply resistor R49 and the second capacitor C23 serve the same current-limiting power supply and energy storage filtering functions in the second transmission drive unit. This invention, by independently configuring the power supply resistor and energy storage filter capacitor for each transmission drive circuit, completely decouples the power supply circuits of the two transmission channels. The large pulse current at one transmission end will not cause voltage drops or crosstalk to the other channel through the internal resistance of the common power supply, further improving the accuracy and reliability of dual-channel independent detection.

[0032] As one implementation method, such as Figure 4 As shown, Figure 4This is a schematic diagram of the circuit structure of a receiving module provided in an embodiment of the present invention. The receiving module 40 includes an analog switch chip U8, a first matching resistor R8, a third capacitor C7, and a fourth capacitor C22. The main control MCU module 30 includes a receive control pin ReceiverCR. The signal input pin of the analog switch chip U8 is connected to the photoelectric receiving signal Receiver. The signal output pin of the analog switch chip U8 is connected to the first end of the first matching resistor R8 and the first end of the third capacitor C7, respectively. The second end of the third capacitor C7 is grounded. The enable pin of the analog switch chip U8 is connected to the receive control pin ReceiverCR. The power supply terminal VCC of the analog switch chip U8 is connected to the power supply voltage signal V5P0. The first end of the fourth capacitor C22 is connected to the power supply terminal VCC of the analog switch chip U8. The second end of the fourth capacitor C22 is grounded. Specifically, in this embodiment of the present invention, the signal input pin of the analog switch chip U8 receives the photoelectric receiving signal Receiver from the photoelectric receiving end, and the signal output pin outputs the selected signal to the subsequent receiving amplification circuit. The first matching resistor R8 is connected in series in the signal output path of U8 to achieve impedance matching between the preceding and following circuits, reduce signal reflection and attenuation, and ensure the integrity of the received signal. The third capacitor C7 is connected in parallel between the signal output pin of the analog switch chip U8 and ground to filter out high-frequency noise in the signal path and improve the signal-to-noise ratio of the received signal. The fourth capacitor C22 is connected in parallel between the power supply terminal VCC of the analog switch chip U8 and ground to filter out high-frequency ripple and transient interference on the power supply line, ensuring stable operation of the analog switch chip U8. This invention, by setting the analog switch chip U8 in the receiving module 40 and controlling its on / off state by the receive control pin ReceiverCR of the main control MCU module 30, can precisely control the sampling timing of the received signal. In the dual-channel time-division transmission mode, the main control MCU module 30 can control the analog switch chip U8 to conduct to collect the first reflected signal when the first photoelectric transmitter emits detection light; after the first acquisition is completed, it controls the analog switch chip U8 to turn off to isolate the signal path and avoid signal crosstalk during the second transmission. Through precise gating control of the analog switch, the two reflected signals are separated in the time domain, effectively avoiding mutual interference between the two signals. This provides a hardware foundation for the subsequent main control MCU module 30 to independently process the two signals and generate two independent detection signals. In addition, the receiving module 40 also includes a first bias resistor R13, a fifth capacitor C9, a first operational amplifier U6A, a first feedback resistor R4, a first input resistor R11, a sixth capacitor C14, a seventh capacitor C6, a second output resistor R22, a first clamping diode D8, and a pull-up resistor R23.The first bias resistor R13 and the fifth capacitor C9 are connected in parallel between the signal input pin of the analog switch chip U8 and ground, respectively, to provide DC bias and filter high-frequency noise. The first operational amplifier U6A is configured as a transimpedance amplifier circuit to convert the received signal from a current signal to a voltage signal and amplify it. The first feedback resistor R4 is used to set the amplification gain, and the first input resistor R11 is used to provide DC bias for the non-inverting input terminal. The sixth capacitor C14 is used to isolate the DC component of the preceding and following stages and transmit the amplified AC signal to the subsequent stage. The first clamping diode D8 is used to clamp the output voltage within a safe range and protect the pins of the main control MCU module.

[0033] As one implementation method, such as Figure 5 As shown, Figure 5This 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 first output driving unit and a second output driving unit. The first output driving unit includes a first base resistor R33, a first pull-down resistor R32, a first output transistor Q3A, a first fuse, and a first varistor RV2. The second output driving unit includes a second base resistor R48, a second pull-down resistor R47, a second output transistor Q3B, a second fuse, and a second varistor RV3. The main control MCU module 30 includes a first output driving pin OUT_DRIVER1 and a second output driving pin OUT_DRIVER2. The first end of the first base resistor R33 is connected to the first output driving pin OUT_DRIVER1, the second end of the first base resistor R33 is connected to the base of the first output transistor Q3A, the first end of the first pull-down resistor R32 is connected to the base of the first output transistor Q3A, and the second end of the first pull-down resistor R32 is grounded. The emitter of transistor Q3A is connected to the first terminal of the first fuse, and the second terminal of the first fuse is grounded. The collector of the first output transistor Q3A is connected to the first terminal of the first varistor RV2 and the first output terminal OUT1, respectively, and the second terminal of the first varistor RV2 is grounded. The first terminal of the second base resistor R48 is connected to the second output drive pin OUT_DRIVER2, and the second terminal of the second base resistor R48 is connected to the base of the second output transistor Q3B. The first terminal of the second pull-down resistor R47 is connected to the base of the second output transistor Q3B, and the second terminal of the second pull-down resistor R47 is grounded. The emitter of the second output transistor Q3B is connected to the first terminal of the second fuse, and the second terminal of the second fuse is grounded. The collector of the second output transistor Q3B is connected to the first terminal of the second varistor RV3 and the second output terminal OUT2, respectively, and the second terminal of the second varistor RV3 is grounded. Specifically, in this embodiment of the invention, the first base resistor R33 is connected in series between the OUT_DRIVER1 pin and the base of the first output transistor Q3A to limit the current flowing into the base of the first output transistor Q3A and protect the pin of the main control MCU module 30. The first pull-down resistor R32 is connected between the base of the first output transistor Q3A and ground to reliably pull down the base potential of the first output transistor Q3A to a low level when the pin of the main control MCU module 30 does not output a signal or is in a high impedance state, preventing the first output transistor Q3A from being falsely turned on due to noise or floating state, and improving the anti-interference capability of the output circuit. The first fuse is connected in series between the emitter of the first output transistor Q3A and ground. When an overcurrent or short circuit fault occurs in the output circuit, the first fuse blows and disconnects the current path from the emitter of the first output transistor Q3A to ground, protecting the first output transistor Q3A and the subsequent circuit from damage.The first varistor RV2 is connected in parallel between the first output terminal OUT1 and ground. When a surge voltage or electrostatic discharge impact occurs at the output terminal, RV2 instantaneously conducts to discharge the overvoltage energy to ground, clamping the output voltage within a safe range and protecting the internal circuitry of the sensor and the connected external devices. During operation, when the main control MCU module 30 determines that an object has been detected in the first channel, it outputs a high level through the first output drive pin OUT_DRIVER1. This drives the first output transistor Q3A to saturate and conduct via the first base resistor R33, pulling the collector of the first output transistor Q3A low, and the first output terminal OUT1 outputs a low-level signal. When no object is detected in the first channel, OUT_DRIVER1 outputs a low level, the first output transistor Q3A is cut off, and the first output terminal OUT1 is pulled high by an external pull-up resistor. This invention, by setting two completely independent and symmetrically structured output drive units, ensures that when an external load experiences a short circuit or surge impact, the corresponding protection element only acts on the faulty circuit, while the other output remains unaffected and can continue normal operation. This dual-path independent protection architecture significantly improves the reliability and survivability of sensors in harsh industrial environments, enabling a single sensor to replace two independent sensors used in parallel, while greatly simplifying field wiring and maintenance.

[0034] In one implementation, the main control MCU module 30 further includes a calibration unit, which is used to calibrate the transmission power of the two photoelectric transmitters and / or the detection threshold of the received signal of the photoelectric receiver. Specifically, in this embodiment of the invention, when calibrating the transmission power of the two photoelectric transmitters, the main control MCU module 30 adjusts the duty cycle or frequency of the pulse signals output by the first pulse drive pin PWM1 and the second pulse drive pin PWM2 through the calibration unit, thereby adjusting the drive current of the first photoelectric transmitter and the second photoelectric transmitter respectively, so as to achieve independent calibration of the transmission power of the two photoelectric transmitters. When calibrating the detection threshold of the received signal of the photoelectric receiver, the main control MCU module 30 adjusts the comparison reference level or the digital threshold in the decision algorithm of the internal analog-to-digital conversion unit through the calibration unit, thereby changing the signal strength standard for determining the presence or absence of an object. For example, when the background light of the detection environment is strong, the calibration unit can appropriately increase the detection threshold to avoid false triggering; when the surface reflection of the detected object is weak, the calibration unit can appropriately decrease the detection threshold to ensure effective detection, thereby adapting to the needs of different detection scenarios. After calibration, the calibration unit stores the calibration parameters in the non-volatile memory inside the main control MCU module 30. The sensor automatically recalls the stored calibration parameters during subsequent normal operation, eliminating the need for repeated calibration. This invention integrates a calibration unit into the main control MCU module 30, achieving flexible calibration of transmit power and receive detection thresholds in a purely software-based manner, without requiring additional hardware potentiometers or external calibration equipment. Compared to traditional calibration methods using mechanical potentiometers, software calibration offers higher accuracy.

[0035] Based on the aforementioned dual-output photoelectric sensor, this invention also provides a control method for the dual-output photoelectric sensor, which can be executed by software and / or hardware devices. For example, please refer to... Figure 6 , Figure 6 This is a flowchart illustrating a control method for a dual-output photoelectric sensor provided in an embodiment of the present invention. The control method for the dual-output photoelectric sensor includes: S101. Obtain the second voltage signal provided by the power supply module and send the second voltage signal to the transmitting module. Specifically, in this embodiment of the invention, the power supply module converts the externally received first voltage signal into a second voltage signal to provide a stable operating voltage for the transmitting module. The stable voltage signal provided by the power supply module can ensure the consistency of the driving current of the two photoelectric transmitters, providing a basis for the balance of the two subsequent detection signals.

[0036] S102. Under the drive of the main control MCU module, the two photoelectric emitting ends of the transmitting module emit detection light towards the object under test, and receive the reflected light signal reflected by the object under test through the photoelectric receiving end of the receiving module, converting the reflected light signal into an electrical signal and outputting it to the main control MCU module. Specifically, in this embodiment of the invention, the two photoelectric emitting ends emit detection light towards the object under test under the drive of the main control MCU module, forming two independent optical paths. Since the two photoelectric emitting ends are in different spatial positions relative to a single photoelectric receiving end, the two beams of detection light illuminate the surface of the object under test from different angles, and the reflected light paths formed by each cover different areas of the surface of the object under test. When there are local specular reflections, matte areas, or material differences on the surface of the object under test, even if the reflected light signal of one path is attenuated or deflected due to changes in surface characteristics, the other path can still effectively capture the reflected light signal. Compared with the detection failure problem caused by the limited light coverage of the traditional single-emitting, single-receiving structure, this step significantly improves the stability of photoelectric sensor detection through the dual-optical-path complementary mechanism.

[0037] S103. The main control MCU module detects the object under test based on the electrical signal output by the receiving module, generating two independent detection signals corresponding to the two photoelectric transmitters, and sending the two independent detection signals to the output module. Specifically, in this embodiment of the invention, the main control MCU module performs time-division sampling and independent processing on the electrical signal output by the receiving module, generating two independent detection signals corresponding to the two photoelectric transmitters. The generation process of the two detection signals is completely independent, and the main control MCU module can set different detection thresholds and decision logic for the two signals respectively. Compared with the complex scheme in the prior art where two independent sensors are connected in parallel and require external equipment to synchronize and logically combine the two output signals, this step completes the separation, processing, and independent decision of the two signals inside the sensor. The client does not need additional signal processing equipment, simplifying the system architecture and reducing the complexity of use.

[0038] S104. The output module converts the two independent detection signals into two independent level signals for output according to the control signal from the main control MCU module. Specifically, in this embodiment of the invention, the output module converts the two internally generated detection signals into two independent level signals according to the control signal from the main control MCU module, and outputs them independently through two output terminals. When an external load connected to one output terminal experiences a short circuit or is subjected to a surge, the protection element of that circuit only acts on the faulty circuit, and the other output is unaffected and can continue to operate normally. This method provides dual independent outputs through a single sensor, significantly reducing the number of output cables and controller I / O resource usage, reducing installation and maintenance workload, and improving the reliability of the system in harsh industrial environments through the dual independent protection design.

[0039] In one implementation, in step S102, the two photoelectric emitting ends of the transmitting module emit detection light towards the object under test under the drive of the main control MCU module, and receive the reflected light signal reflected by the object under test through the photoelectric receiving end of the receiving module, converting the reflected light signal into an electrical signal and outputting it to the main control MCU module. This includes: within a preset detection period, the main control MCU module outputs a first pulse signal through a first pulse drive pin to drive the first photoelectric emitting end of the transmitting module to emit the first detection light; the photoelectric receiving end receives the first reflected light signal reflected by the object under test, and converts the first reflected light signal into a first electrical signal through the main control MCU module; after the first photoelectric emitting end emits the first detection light and a preset delay time is elapsed, the main control MCU module outputs a second pulse signal through a second pulse drive pin to drive the second photoelectric emitting end of the transmitting module to emit the second detection light; the photoelectric receiving end receives the second reflected light signal reflected by the object under test, and converts the second reflected light signal into a second electrical signal through the main control MCU module. Specifically, in this embodiment of the invention, within a preset detection period, the main control MCU module outputs a first pulse signal through the first pulse drive pin, driving the first photoelectric transmitter to emit a first detection light. By limiting the detection process to a fixed detection period, the sampling time offset of the two signals caused by random fluctuations in the emission timing is avoided, ensuring the consistency of the detection. Secondly, after the first detection light is emitted, the photoelectric receiver receives the first reflected light signal reflected by the object under test, and the main control MCU module converts it into a first electrical signal. The process of the first light signal from emission to reception is completed independently in time and is not affected by the second signal. Thirdly, after the first photoelectric transmitter emits the first detection light and after a preset delay time, the main control MCU module outputs a second pulse signal through the second pulse drive pin, driving the second photoelectric transmitter to emit a second detection light. The second transmitter will not emit light before the first reflected light signal is fully received and converted into an electrical signal, ensuring that the two light pulses and their reflected signals do not overlap at the photoelectric receiver. Finally, the photoelectric receiver receives the second reflected light signal reflected by the object under test, and the main control MCU module converts it into a second electrical signal. The second signal was also acquired and converted independently in time, obtaining the reflection characteristics information of the second irradiated area on the surface of the object under test.

[0040] In one implementation, in step S103, the main control MCU module detects the object under test based on the electrical signal output by the receiving module, generates two independent detection signals corresponding to the two photoelectric transmitting ends, and sends the two independent detection signals to the output module. This includes: the main control MCU module sampling the first electrical signal output by the receiving module at a first sampling time to obtain a first signal amplitude corresponding to the first detection light; and sampling the second electrical signal output by the receiving module at a second sampling time to obtain a second signal amplitude corresponding to the second detection light; the main control MCU module comparing the first signal amplitude with a preset first signal amplitude threshold to generate a first detection signal, and comparing the second signal amplitude with a preset second signal amplitude threshold to generate a second detection signal; and sending the first and second detection signals to the output module through the main control MCU module. Specifically, in this embodiment, the first electrical signal is sampled at the first sampling time to obtain the first signal amplitude, and the second electrical signal is sampled at the second sampling time to obtain the second signal amplitude. Since the two emitted light pulses are spaced apart by a preset time delay, the arrival times of the two reflected light signals at the photoelectric receiving end are also staggered. The main control MCU module achieves precise separation of the two signals in the time domain by acquiring their peak amplitudes at different sampling times. This avoids crosstalk that may occur when acquiring two signals simultaneously, ensuring the accuracy and independence of the two signal amplitude sampling. Secondly, the main control MCU module compares the amplitude of the first signal with a preset first signal amplitude threshold and the amplitude of the second signal with a preset second signal amplitude threshold, generating two detection signals respectively. For example, when one side of the surface of the object under test is specularly reflective and the other side is matte, the first reflection signal may be too strong while the second reflection signal is weak. In this case, the first signal amplitude threshold can be appropriately increased to prevent signal saturation and misjudgment, while the second signal amplitude threshold can be appropriately decreased to ensure that the weak reflection signal can also be effectively captured. Through two independent threshold settings, the sensor can flexibly adapt to objects with different surface characteristics, overcoming the limitations of traditional single-threshold solutions when dealing with complex surfaces. Finally, the main control MCU module sends the two independently generated detection signals to the output module, ultimately outputting them as two independent level signals. The client can directly obtain the two independent detection results without the need for additional external signal synchronization or processing equipment.

[0041] In one implementation, in step S104, the output module converts two independent detection signals into two independent level signals for output according to the control signal from the main control MCU module. This includes: the main control MCU module generating a first control signal based on the first detection signal and outputting the first control signal to the first output drive unit of the output module through a first output drive pin, thereby driving the first output drive unit to output a first level signal to the first output terminal of the photoelectric sensor; and the main control MCU module generating a second control signal based on the second detection signal and outputting the second control signal to the second output drive unit of the output module through a second output drive pin, thereby driving the second output drive unit to output a second level signal to the second output terminal of the photoelectric sensor. Specifically, in this embodiment, the main control MCU module generates a first control signal based on the first detection signal and outputs it to the first output drive unit through a first output drive pin; and generates a second control signal based on the second detection signal and outputs it to the second output drive unit through a second output drive pin. The generation and output of the two control signals are completely independent and do not interfere with each other. The main control MCU module can determine the level state of each output according to the different decision results of the two detection signals. For example, when the first path detects an object while the second path does not, the first control signal drives the first output terminal to output a valid level, while the second control signal controls the second output terminal to remain at an invalid level. Each output independently reflects the detection result of its corresponding optical path. Secondly, the two output drive units are electrically isolated from each other and each is equipped with independent protection components. When an external load connected to one output terminal experiences a short circuit or surge, the protection component for that path only acts on the faulty circuit, while the other output drive unit remains unaffected and can continue to operate normally. This dual-path independent protection architecture significantly improves the reliability and survivability of the sensor in harsh industrial environments. Thirdly, the two independent level signals are output to the first and second output terminals respectively, allowing the client to flexibly configure the decision logic of the two signals according to actual application requirements.

[0042] In this embodiment of the invention, after the photoelectric sensor is powered on, the main control MCU module configures the operating parameters of the I / O port, analog-to-digital converter, and high-precision timer, and loads pre-stored dual-transmitter power parameters and two independent detection thresholds from its internal non-volatile memory. After initialization, the main control MCU module starts a fixed-period timer interrupt and enters a state waiting for the detection cycle to be triggered. After the detection cycle is triggered, the main control MCU module outputs a first pulse signal with a pulse width of 1µs through the first pulse drive pin, driving the first photoelectric transmitter to emit the first detection light; after being received by the photoelectric receiver and converted into a first electrical signal, the main control MCU module executes a 10µs hardware delay to ensure that the first reflected light signal is fully received and processed. After the delay, the main control MCU module outputs a second pulse signal with a pulse width of 1µs through the second pulse drive pin, driving the second photoelectric transmitter to emit the second detection light. Subsequently, the photoelectric receiver receives the second reflected light signal and converts it into a second electrical signal. The detection cycle is 200µs. During signal processing, the analog-to-digital conversion unit of the main control MCU module collects the peak intensity of two electrical signals in a time-division manner, storing them as a first signal amplitude and a second signal amplitude, respectively. During decision-making, the main control MCU module first compares the first signal amplitude with a preset first signal amplitude threshold. If the first signal amplitude is less than the first signal amplitude threshold, it determines that no object was detected in the first channel, and directly controls the output module to maintain or switch to a low-level output. If the first signal amplitude is greater than or equal to the first signal amplitude threshold, it continues to compare the second signal amplitude with a preset second signal amplitude threshold. If the second signal amplitude is less than the second signal amplitude threshold, it determines that no object was detected in the second channel, and controls the output module to maintain or switch to a low-level output. Only when both signal amplitudes are greater than or equal to their respective preset thresholds does the main control MCU module trigger the output module to output a high level, indicating that both channels have effectively detected an object. After the current detection cycle ends, the sensor waits for the next detection cycle to trigger and repeats the above detection process.

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

[0044] 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.

[0045] 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.

[0046] 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 dual output photosensor, characterized by, 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 convert the first voltage signal received from the outside into a second voltage signal and send the second voltage signal to the transmitting module. The transmitting module is connected to the main control MCU module. The transmitting module includes two photoelectric transmitting ends, which are used to emit detection light towards the object under the drive of the main control MCU module. The receiving module is connected to the main control MCU module. The receiving module includes a photoelectric receiving end, which is used to receive the reflected light signal reflected by the object under test, and convert the reflected light signal into an electrical signal and output it to the main control MCU module. The main control MCU module is connected to the output module. The main control MCU module detects the object under test according to the electrical signal output by the receiving module, generates two independent detection signals corresponding to the two photoelectric emitting ends, and sends the two independent detection signals to the output module. The output module converts the two independent detection signals into two independent level signals for output based on the control signal from the main control MCU module.

2. The dual-output photoelectric sensor according to claim 1, characterized in that, The transmitting module includes a first transmitting drive unit and a second transmitting drive unit. The first transmitting drive unit includes a first current-limiting resistor, a first driving transistor, a first emitting diode, and a first emitting resistor. The second transmitting drive unit includes a second current-limiting resistor, a second driving transistor, a second emitting diode, and a second emitting resistor. The main control MCU module includes a first pulse drive pin and a second pulse drive pin. The first end of the first current-limiting resistor is connected to the first pulse drive pin, and the second end of the first current-limiting resistor is connected to the base of the first driving transistor; the collector of the first driving transistor is connected to the cathode of the first emitting diode, the first end of the first emitting resistor is connected to the emitter of the first driving transistor, and the second end of the first emitting resistor is grounded. The first end of the second current-limiting resistor is connected to the second pulse drive pin, the second end of the second current-limiting resistor is connected to the base of the second drive transistor, the collector of the second drive transistor is connected to the cathode of the second emitter diode, the first end of the second emitter resistor is connected to the emitter of the second drive transistor, and the second end of the second emitter resistor is grounded.

3. The dual-output photoelectric sensor according to claim 2, characterized in that, The first transmission driving unit further includes a first power supply resistor and a first capacitor, and the second transmission driving unit further includes a second power supply resistor and a second capacitor; The first end of the first power supply resistor is connected to the second voltage signal, the second end of the first power supply resistor is connected to the anode of the first emitting diode, the first end of the first capacitor is connected to the second end of the first power supply resistor, and the second end of the first capacitor is grounded. The first end of the second power supply resistor is connected to the second voltage signal, the second end of the second power supply resistor is connected to the anode of the second emitting diode, the first end of the second capacitor is connected to the second end of the second power supply resistor, and the second end of the second capacitor is grounded.

4. The dual-output photoelectric sensor according to claim 1, characterized in that, The receiving module includes an analog switch chip, a first matching resistor, a third capacitor, and a fourth capacitor; the main control MCU module includes a receiving control pin. The signal input pin of the analog switch chip is connected to the photoelectric receiving signal, and the signal output pin of the analog switch chip is connected to the first end of the first matching resistor and the first end of the third capacitor, respectively. The second end of the third capacitor is grounded. The enable pin of the analog switch chip is connected to the receive control pin, and the power supply terminal of the analog switch chip is connected to the power supply voltage signal. The first terminal of the fourth capacitor is connected to the power supply terminal of the analog switch chip, and the second terminal of the fourth capacitor is grounded.

5. The dual-output photoelectric sensor according to claim 1, characterized in that, The output module includes a first output driving unit and a second output driving unit. The first output driving unit includes a first base resistor, a first pull-down resistor, a first output transistor, a first fuse, and a first varistor. The second output driving unit includes a second base resistor, a second pull-down resistor, a second output transistor, a second fuse, and a second varistor. The main control MCU module includes a first output driving pin and a second output driving pin. The first end of the first base resistor is connected to the first output drive pin, the second end of the first base resistor is connected to the base of the first output transistor, the first end of the first pull-down resistor is connected to the base of the first output transistor, and the second end of the first pull-down resistor is grounded. The emitter of the first output transistor is connected to the first end of the first fuse, the second end of the first fuse is grounded, the collector of the first output transistor is connected to the first end and the first output end of the first varistor, and the second end of the first varistor is grounded. The first end of the second base resistor is connected to the second output drive pin, the second end of the second base resistor is connected to the base of the second output transistor, the first end of the second pull-down resistor is connected to the base of the second output transistor, and the second end of the second pull-down resistor is grounded. The emitter of the second output transistor is connected to the first end of the second fuse, the second end of the second fuse is grounded, the collector of the second output transistor is connected to the first end and the second output end of the second varistor, and the second end of the second varistor is grounded.

6. The dual-output photoelectric sensor according to claim 1, characterized in that, The main control MCU module also includes a calibration unit, which is used to calibrate the transmission power of the two photoelectric transmitters and / or the detection threshold of the received signal of the photoelectric receiver.

7. A control method for a dual-output photoelectric sensor, characterized in that, include: The second voltage signal provided by the power module is acquired and sent to the transmitting module; The two photoelectric transmitting ends of the transmitting module emit detection light towards the object under test under the drive of the main control MCU module, and receive the reflected light signal reflected by the object under test through the photoelectric receiving end of the receiving module, and convert the reflected light signal into an electrical signal and output it to the main control MCU module. The main control MCU module detects the object under test based on the electrical signal output by the receiving module, generates two independent detection signals corresponding to the two photoelectric transmitters, and sends the two independent detection signals to the output module. The output module converts the two independent detection signals into two independent level signals for output based on the control signal from the main control MCU module.

8. The control method for a dual-output photoelectric sensor according to claim 7, characterized in that, The two photoelectric transmitting ends of the transmitting module emit detection light towards the object under test under the drive of the main control MCU module, and receive the reflected light signal reflected by the object under test through the photoelectric receiving end of the receiving module, converting the reflected light signal into an electrical signal and outputting it to the main control MCU module, including: Within a preset detection period, the main control MCU module outputs a first pulse signal through the first pulse drive pin, driving the first photoelectric emitting end of the transmitting module to emit the first detection light. The photoelectric receiver receives the first reflected light signal reflected by the object under test, and converts the first reflected light signal into a first electrical signal through the main control MCU module; After the first photoelectric emitting terminal emits the first detection light and after a preset delay time, the main control MCU module outputs a second pulse signal through the second pulse drive pin to drive the second photoelectric emitting terminal of the emitting module to emit the second detection light. The photoelectric receiver receives the second reflected light signal reflected by the object under test, and converts the second reflected light signal into a second electrical signal through the main control MCU module.

9. The control method for a dual-output photoelectric sensor according to claim 8, characterized in that, The main control MCU module detects the object under test based on the electrical signal output by the receiving module, generates two independent detection signals corresponding to the two photoelectric transmitters, and sends the two independent detection signals to the output module, including: The main control MCU module samples the first electrical signal output by the receiving module at the first sampling time to obtain the first signal amplitude corresponding to the first detection light, and samples the second electrical signal output by the receiving module at the second sampling time to obtain the second signal amplitude corresponding to the second detection light. The main control MCU module compares the amplitude of the first signal with a preset first signal amplitude threshold to generate a first detection signal, and compares the amplitude of the second signal with a preset second signal amplitude threshold to generate a second detection signal. The main control MCU module sends the first detection signal and the second detection signal to the output module.

10. The control method for a dual-output photoelectric sensor according to claim 9, characterized in that, The output module converts two independent detection signals into two independent level signals for output based on the control signals from the main control MCU module, including: The main control MCU module generates a first control signal based on the first detection signal, and outputs the first control signal to the first output driving unit of the output module through the first output driving pin, so as to drive the first output driving unit to output a first level signal to the first output terminal of the photoelectric sensor; The main control MCU module generates a second control signal based on the second detection signal, and outputs the second control signal to the second output drive unit of the output module through the second output drive pin, so as to drive the second output drive unit to output a second level signal to the second output terminal of the photoelectric sensor.