Photoelectric sensor test system

By using a gearless and motorless photoelectric sensor testing system, which monitors the changing edge of the PWM projection pulse signal through a control module, the safety risks and noise pollution problems of existing equipment are solved, high-frequency testing is achieved, and costs are reduced.

CN118654716APending Publication Date: 2024-09-17SHENZHEN CHEVEN TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410647334.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

Existing photoelectric sensor testing equipment suffers from safety risks, noise pollution, and high costs during ultra-high-speed rotation, and cannot test the frequency of high-frequency photoelectric proximity switches.

Method used

A gearless and motorless photoelectric sensor testing system is adopted. The control module monitors the changing edge of the PWM light-emitting pulse signal and calculates the test frequency by combining the status of the light-emitting and light-receiving modules, so as to realize high-frequency testing.

Benefits of technology

It achieves a frequency testing range of 0-100kHz, avoiding the safety risks and noise pollution caused by traditional equipment and reducing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118654716A
    Figure CN118654716A
Patent Text Reader

Abstract

The invention provides a photoelectric sensor test system, which comprises a control module used for monitoring a PWM light projection pulse signal, sending a first control signal and recording the starting time t1 of a first effective change edge when the PWM light projection pulse signal is monitored to have the first effective change edge, when it is monitored that a second effective change edge exists in the PWM light projection pulse signal, a second control signal is sent, the starting time t2 of the second effective change edge is recorded, and a clock is built in the control module; the light emitting module is used for outputting a PWM light projection pulse signal, emitting light after receiving the first control signal and stopping emitting light after receiving the second control signal; the light receiving module is used for outputting a first level under the condition that the light is received and outputting a second level under the condition that the light is not received; the control module calculates the test frequency according to the acquired time. According to the invention, high-frequency testing frequency can be provided for the photoelectric sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sensors, and in particular to a photoelectric sensor testing system. Background Art

[0002] Photoelectric sensor is a type of proximity switch sensor, mainly including two categories: reflective type and through-beam type. In the reflective type sensor, the emitter and the light receiver are on the same sensor. Its working principle is that the light emitted by the emitter is reflected by the object and reflected to the light receiver, and then processed by the internal circuit for output; in the through-beam sensor, the emitter is one sensor and the light receiver is another sensor. The working principle is that the light emitted by the emitting sensor directly shines on the receiving sensor. After the receiving sensor receives the light signal, it is processed by the internal circuit and output.

[0003] The existing frequency test of photoelectric sensors uses gears as targets and reference sensors as time references. Gears are generally made of metal and driven by high-speed motors. Since metal targets have a certain weight, when the high-speed motor rotates at ultra-high speed, there is a risk that the metal target will fly out, which may injure the tester. At the same time, when the motor rotates at ultra-high speed, it will make a very harsh sound. In addition, after searching the existing frequency test instruments, the maximum frequency is generally lower than 5K, and the frequency test of high-frequency photoelectric proximity switches cannot be performed. Summary of the invention

[0004] The present invention provides a photoelectric sensor testing system, the main purpose of which is to provide a high-frequency testing frequency for the photoelectric sensor.

[0005] An embodiment of the present invention provides a photoelectric sensor testing system, comprising:

[0006] A control module, used for monitoring the PWM light-casting pulse signal, sending a first control signal and recording the start time t1 of the first effective change edge when the PWM light-casting pulse signal is monitored, and sending a second control signal and recording the start time t2 of the second effective change edge when the PWM light-casting pulse signal is monitored, wherein the control module has a built-in clock;

[0007] A light-emitting module, used for outputting the PWM light-emitting pulse signal, emitting light after receiving the first control signal, and stopping emitting light after receiving the second control signal;

[0008] A light receiving module, configured to output a first level when receiving light, and output a second level when not receiving light;

[0009] The control module is further configured to obtain a start time t3 of the first level and a start time t4 of the second level, and calculate a test frequency in combination with a start time t1 of the first effective change edge and a start time t2 of the second effective change edge.

[0010] The present invention proposes a photoelectric sensor testing system. When testing the photoelectric sensor, the light-emitting module outputs a PWM light-casting pulse signal, and the control module monitors the PWM light-casting pulse signal. When the PWM light-casting pulse signal is monitored to have a first effective change edge, the first control signal is sent and the start time t1 of the first effective change edge is recorded; after receiving the first control signal, the light-emitting module emits light, and the light reflected or transmitted by the target is received by the light-receiving module, and the light-receiving module outputs a first level; the control module monitors the light-receiving module outputting the first level and records the start time t3 of the first level. The control module continues to monitor the PWM light-casting pulse signal, and when the PWM light-casting pulse signal is monitored to have a second effective change edge, the second control signal is sent and the start time t2 of the second effective change edge is recorded; after receiving the second control signal, the light-emitting module stops emitting light, the light-receiving module cannot receive light, the output of the light-receiving module changes, and the second level is output, and the control module monitors the second level and records the start time t4 of the second level. Finally, the control module calculates the current test frequency according to the start time t1 of the first effective change edge, the start time t3 of the first level, the start time t2 of the second effective change edge, and the start time t4 of the second level. The embodiment of the present invention processes and detects data. Since data judgment and processing are at the microsecond level, the testable frequency range is 0-100KHZ, which is much larger than the testable frequency of traditional test equipment. Since no gears and motors are used, the risk of harming testers and noise caused by traditional test equipment during ultra-high-speed testing is completely solved. Since no external clock is used as a time reference, it is no longer necessary to purchase a reference sensor, which greatly reduces costs. Since gears are no longer needed as targets, costs can also be further saved. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 A schematic diagram of the structure of a photoelectric sensor testing system provided by an embodiment of the present invention;

[0012] Figure 2 A schematic diagram of the structure of a light emitting module provided by an embodiment of the present invention;

[0013] Figure 3 A circuit diagram of a light emitting module provided by an embodiment of the present invention.

[0014] Reference numerals:

[0015] 100, photoelectric sensor test system; 110, control module;

[0016] 120, light emitting module; 130, light receiving module;

[0017] 121, a pulse unit; 122, a light emitter;

[0018] 123, switch unit.

[0019] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0020] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0021] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.

[0022] In the embodiments of the present invention, at least one refers to one or more; multiple refers to two or more. In the description of the present invention, words such as "first", "second", "third", etc. are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0023] References to "one embodiment" or "some embodiments" etc. described in this specification mean that one or more embodiments of the present invention include a particular feature, structure or characteristic described in conjunction with the embodiment. Thus, in this specification, the terms "include", "comprises", "has" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0024] It should be noted that in the embodiments of the present invention, "connection" can be understood as electrical connection, and the connection between two electrical components can be a direct or indirect connection between the two electrical components. For example, the connection between A and B can be either a direct connection between A and B or an indirect connection between A and B through one or more other electrical components.

[0025] In the prior art, photoelectric sensors generally use gears as targets during testing, and use external reference sensors as time references. Gears are generally made of metal and driven by high-speed motors. Since metal targets have a certain weight, when the high-speed motor rotates at ultra-high speed, the metal target is at risk of flying out, which may injure the tester. At the same time, the motor will make a very harsh sound when rotating at ultra-high speed. After searching for existing frequency test instruments, the maximum frequency is generally lower than 5K, which cannot be used to test the frequency of high-frequency photoelectric proximity switches. In addition, the reference sensor requires that its own test frequency is more than 10 times that of the equipment under test (EUT), and the purchase cost is very high.

[0026] Figure 1 A schematic diagram of the structure of a photoelectric sensor testing system 100 provided in an embodiment of the present invention is shown in FIG. Figure 1 As shown, the photoelectric sensor testing system 100 includes:

[0027] The control module 110 is used to monitor the PWM light-casting pulse signal, and when the PWM light-casting pulse signal is monitored to have a first effective change edge, send a first control signal and record the start time t1 of the first effective change edge, and when the PWM light-casting pulse signal is monitored to have a second effective change edge, send a second control signal and record the start time t2 of the second effective change edge. The control module 110 has a built-in clock;

[0028] The light emitting module 120 is used to output the PWM light projection pulse signal, emit light after receiving the first control signal, and stop emitting light after receiving the second control signal;

[0029] The light receiving module 130 is used to output a first level when receiving light, and output a second level when not receiving light;

[0030] The control module 110 is further configured to obtain a start time t3 of the first level and a start time t4 of the second level, and calculate a test frequency in combination with a start time t1 of the first effective change edge and a start time t2 of the second effective change edge.

[0031] In the embodiment of the present invention, the photoelectric sensor test system 100 includes a control module 110, a light emitting module 120 and a light receiving module 130, and the control module 110 is respectively connected to the light emitting module 120 and the light receiving module 130. In the embodiment of the present invention, the light emitting module 120 continuously sends out a PWM light-casting pulse signal, and the control module 110 always monitors the PWM light-casting pulse signal sent by the light emitting module 120, and if it is detected that the PWM light-casting pulse signal has a first effective change edge, a first control signal is sent to the light emitting module 120, and the control module 110 records the time t1 of sending the first effective change edge.

[0032] Among them, the PWM light projection pulse signal is a PWM waveform, and the period and duty cycle of the signal can be determined according to actual conditions; the first effective change edge can be a rising edge or a falling edge, which is pre-set and can be determined according to actual conditions.

[0033] Among them, taking into account the interference of ambient light, sometimes the ambient light will interfere with the optical signal received by the light receiving module 130. In order to reduce the interference, the control module 110 will make multiple judgments on the monitored PWM light projection pulse signal. For example, when it is confirmed that there is a first valid change edge in both pulse signal cycles, the first control signal will be output, otherwise the first control signal will not be output.

[0034] After receiving the first control signal, the light emitting module 120 is in working state, and the light emitter 122 inside the light emitting module 120 starts to emit light; generally, the light emitting module 120 is in a disconnected and non-working state, and is in working state only when it is closed after receiving the first control signal.

[0035] In the embodiment of the present invention, after the light emitted by the light emitting module 120 is reflected or transmitted by the target object, the reflected light or the transmitted light is received by the light receiving module 130. After receiving the light, the light receiving module 130 converts the light into a first level, which can be a high level or a low level, depending on the pre-agreed situation. In addition, the control module 110 monitors the output of the light receiving module 130 all the time. If it is detected that the light receiving module 130 outputs the first level, the start time t3 of the light receiving module 130 outputting the first level is recorded.

[0036] The control module 110 continues to monitor the PWM light projection pulse signal emitted by the light emitting module 120. If it is detected that the PWM light projection pulse signal has a second effective change edge, a second control signal is sent to the light emitting module 120, and the start time t2 of sending the second effective change edge is recorded.

[0037] Among them, the second effective change edge is opposite to the first effective change edge. For example, when the first effective change edge is a rising edge, the second effective change edge is a falling edge. When the first effective change edge is a falling edge, the second effective change edge is a rising edge. It is pre-set and can be determined according to actual conditions.

[0038] After receiving the second control signal, the light-emitting module 120 is disconnected and stops emitting light, so that the light-receiving module 130 cannot receive the reflected light or transmitted light of the target object. The light-receiving module 130 resumes outputting the second level. After the control module 110 detects that the light-receiving module 130 outputs the second level, it records the starting time t4 of the second level.

[0039] The second level is opposite to the first level. For example, when the first level is high, the second level is low; when the first level is low, the second level is high. These are all preset and can be determined based on actual conditions.

[0040] It should be noted that there are two types of photoelectric sensors: reflection type and through-beam type. Different types of photoelectric sensors have different locations for the light-emitting module 120 and the light-receiving module 130. For example, if the photoelectric sensor is a reflection type, the light-emitting module 120 and the light-receiving module 130 are integrated into one product, and the target object can be a white paper, which is placed on the same side of the light-emitting module 120 and the light-receiving module 130 so that the light-receiving module 130 can stably receive the light reflected by the white paper; if the photoelectric sensor is a through-beam type, the light emitted by the light-emitting module 120 must be directly facing the receiving end of the light-receiving module 130 to ensure that the light-receiving module 130 can stably sense without a target.

[0041] After the control module 110 obtains the start time t1 of the first effective change edge, the start time t2 of the second effective change edge, the start time t3 of the first level, and the start time t4 of the second level, it first subtracts the start time t1 of the first effective change edge from the start time t3 of the first level to obtain the time t on Then, the start time t4 of the second level minus the start time t2 of the second effective change edge is used to obtain the time t off ; According to time t on and time t off , the frequency of the photoelectric sensor test system 100 is calculated, and the calculation formula is as follows:

[0042]

[0043] This formula is a national standard calculation formula. For example, the first effective change edge is the rising edge, and the second effective change edge is the falling edge. The light-emitting module 120 sends out the PWM light-emitting pulse rising edge to start timing. The light-receiving module 130 receives the light signal and performs internal processing, and controls the sensor to output. This period of time is recorded as t on PWM light-emitting pulse falling edge starts timing, the light-receiving module 130 loses the light signal, and controls the sensor to stop outputting, this period of time is recorded as t off In the embodiment of the present invention, t is calculated in the above manner. on and t off , and then calculate the frequency according to the formula.

[0044] The present invention proposes a photoelectric sensor testing system 100. When testing a photoelectric sensor, the light-emitting module 120 outputs a PWM light-emitting pulse signal, and the control module 110 monitors the PWM light-emitting pulse signal. When the PWM light-emitting pulse signal is detected to have a first effective change edge, the control module 110 sends a first control signal and records the start time t1 of the first effective change edge. The light-emitting module 120 emits light after receiving the first control signal, and the light reflected or transmitted by the target object is received by the light-receiving module 130, which outputs a first level. The control module 110 detects that the light-receiving module 130 outputs the first level and records the start time t3 of the first level. The control module 110 continues to monitor the PWM light-casting pulse signal, and when it detects that the PWM light-casting pulse signal has a second effective change edge, it sends a second control signal and records the start time t2 of the second effective change edge; the light-emitting module 120 stops emitting light after receiving the second control signal, and the light-receiving module 130 cannot receive light, and the output of the light-receiving module 130 changes, outputting a second level, and the control module 110 monitors the second level and records the start time t4 of the second level. Finally, the control module 110 calculates the current test frequency according to the start time t1 of the first effective change edge, the start time t3 of the first level, the start time t2 of the second effective change edge, and the start time t4 of the second level. The embodiment of the present invention processes and detects data. Since data judgment and processing are both at the microsecond level, the testable frequency range is 0-100KHZ, which is much larger than the testable frequency of traditional test equipment. Since no gears and motors are used, the risk of harming testers and noise caused by traditional test equipment during ultra-high-speed testing is completely solved. Since no external clock is used as a time reference, there is no need to purchase a reference sensor, which greatly reduces costs. Since gears are no longer needed as targets, costs can be further saved.

[0045] In some embodiments, Figure 2 A schematic diagram of the structure of a light emitting module 120 provided in an embodiment of the present invention is shown in FIG. Figure 2 As shown, the light emitting module 120 includes:

[0046] The pulse unit 121 is used to output the PWM light projection pulse signal;

[0047] A light emitter 122, one end of which is connected to a power source;

[0048] The switch unit 123 has one end grounded and the other end connected to the other end of the light emitter 122, and is used for closing when receiving the first control signal and opening when receiving the second control signal.

[0049] In the embodiment of the present invention, the light-emitting module 120 includes a pulse unit 121, a light emitter 122 and a switch unit 123. The pulse unit 121 is connected to the control module 110 and outputs a PWM light projection pulse signal under power supply; one end of the light emitter 122 is connected to the power supply, and the other end of the light emitter 122 is connected to the other end of the switch unit 123, and one end of the switch unit 123 is grounded.

[0050] The pulse unit 121 continuously outputs a PWM light-casting pulse signal, and the control module 110 continuously monitors the PWM light-casting pulse signal output by the pulse unit 121. If the control module 110 detects that the PWM light-casting pulse signal has a first effective change edge, the control module 110 sends a first control signal to the switch unit 123; the switch unit 123 closes after receiving the first control signal, so that the circuit between the light emitter 122 and the power supply is connected, and the light emitter 122 can emit light.

[0051] If the control module 110 detects that the PWM light projection pulse signal has a second valid change edge, the control module 110 sends a second control signal to the switch unit 123; the switch unit 123 disconnects after receiving the second control signal, so that the circuit between the light emitter 122 and the power supply is disconnected, and the light emitter 122 stops emitting light.

[0052] For example, the pulse unit 121 may be a signal output device, the light emitter 122 may be a light emitting diode, and the switch unit 123 may be a transistor, a MOS transistor, a controllable switch, and the like.

[0053] As an implementation method, Figure 3 A circuit diagram of a light emitting module 120 provided in an embodiment of the present invention is shown in FIG. Figure 3 As shown, the switch unit 123 includes a first transistor and a second transistor, wherein:

[0054] The control end of the first transistor is connected to the output end of the pulse unit 121, the first end of the first transistor is connected to the other end of the light emitter 122, and the second end of the first transistor is connected to the second end of the second transistor;

[0055] The control end of the second transistor is connected to the output end of the control module 110 , the first end of the second transistor is connected to the load resistor, and the control end of the second transistor is used to receive the first control signal and the second control signal.

[0056] like Figure 3 As shown, the light emitter 122 is a light emitting diode. Figure 3 LED1 is used to represent it, R1 is a pull-up resistor; the switch unit 123 includes a first transistor and a second transistor, the first transistor is represented by N1, the second transistor is represented by N2, and RL represents a load resistor.

[0057] The positive electrode of the light-emitting diode is connected to the power supply through the resistor R1, the negative electrode of the light-emitting diode is connected to the first end of the first transistor, the control end of the first transistor is connected to the output end of the pulse unit 121, and the PWM light-casting pulse signal output by the pulse unit 121 is provided to the control end of the first transistor for powering the first transistor so that the first transistor is closed; the second end of the first transistor is connected to the second end of the second transistor.

[0058] The control end of the second transistor is connected to another output end of the control module 110 , and the control end of the second transistor is connected to the control module 110 for receiving the first control signal or the second control signal. The first end of the second transistor is grounded through the load resistor RL.

[0059] For example, the first transistor is an NPN transistor, whose control end is the base, whose first end is the collector, and whose second end is the emitter; the second transistor is an NMOS transistor, whose control end is the gate, whose first end is the source, and whose second end is the drain. The positive electrode of the light-emitting diode is connected to the power supply through the resistor R1, the negative electrode of the light-emitting diode is connected to the collector of the transistor, the base of the transistor is connected to the output end of the pulse unit 121, the emitter of the transistor is connected to the drain of the NMOS transistor, the gate of the NMOS transistor is connected to the output end of the control module 110, and is used to receive the first control signal or the second control signal, and the source of the NMOS transistor is grounded through the load resistor RL.

[0060] The base end of the transistor receives a PWM light-casting pulse signal, so that the transistor is turned on; if the gate of the NMOS transistor receives a first control signal, where the first control signal is set to a high level, under the action of the high level, the NMOS transistor is turned on, thereby forming a path between the light-emitting diode and the power supply, and the light-emitting diode emits light; if the gate of the NMOS transistor receives a second control signal, where the second control signal is set to a low level, under the action of the low level, the NMOS transistor is cut off, the path between the light-emitting diode and the power supply is disconnected, and the light-emitting diode does not emit light.

[0061] It should be noted that the selection of NMOS transistors must meet two points. First, the on-resistance must be very small to reduce the influence of the NMOS transistor's own resistance when it is turned on. Second, the capacitance between each pole must be very small, between 0.2 and 2PF, to reduce the interference generated by the NMOS transistor itself during high-speed switching.

[0062] In some embodiments, the light receiving module 130 includes a light receiver, and the light receiver is a photosensitive diode.

[0063] In the embodiment of the present invention, the light receiving module 130 includes a light receiver, which is a photodiode. The photodiode can convert the received optical signal into an electrical signal, thereby outputting a first level or a second level.

[0064] In some embodiments, the system further comprises:

[0065] The level conversion module is used to perform level conversion on the PWM light projection pulse signal output by the light emitting module 120, so that the control module 110 can monitor the PWM light projection pulse signal after the level conversion.

[0066] In the embodiment of the present invention, the photoelectric sensor test system 100 also includes a level conversion module, which is used to perform level conversion on the PWM light projection pulse signal. Since the PWM light projection pulse signal is generally 5V or 3.3V, and the control module 110 in the embodiment of the present invention is powered by 3.3V, if the PWM light projection pulse signal is directly input into the control module 110, the control module 110 may be burned out. Therefore, in the embodiment of the present invention, the PWM light projection pulse signal input into the control module 110 is controlled by the level conversion module to ensure that the control module 110 will not be burned out.

[0067] By way of example, the level conversion module may be a level conversion chip.

[0068] In some embodiments, the system further comprises:

[0069] A 24V power supply module, used to supply power to the light emitting module 120 and the light receiving module 130;

[0070] 7V DC power conversion module, used to convert the voltage output by the 24V power module into 7V;

[0071] A 5V DC power conversion module, used to convert the voltage output by the 7V DC power conversion module into 5V and supply power to the level conversion module;

[0072] The 3.3V DC power conversion module is used to convert the voltage output by the 7V DC power conversion module into 3.3V and supply power to the control module 110 .

[0073] The system further comprises:

[0074] The display module is used to display the frequency.

[0075] In the embodiment of the present invention, the 24V power supply module is provided by a separate external DC power supply, which is mainly used to directly power the light emitting module 120 and the light receiving module 130 , and is also the total power supply of the entire photoelectric sensor testing system 100 .

[0076] The 7V DC power conversion module, DC-DC step-down, reduces the 24V voltage to 7V, the purpose is to step down the voltage step by step and reduce the circuit ripple. Among them, the 7V DC power conversion module also includes a fuse, a surge protector and a diode, etc. The fuse can prevent the large current from burning the entire photoelectric sensor test system 100, the surge protector can realize surge protection, and the diode can realize reverse polarity protection.

[0077] 5V DC power conversion module, DC-DC step-down, reduces the 7V voltage to 5V to power the level conversion module.

[0078] 3.3V DC power conversion module, DC-DC step-down, reduces the 7V voltage to 3.3V to power the level conversion module, microcontroller, and display screen.

[0079] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0080] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A photoelectric sensor testing system, characterized in that: include: A control module, used for monitoring the PWM light-casting pulse signal, sending a first control signal and recording the start time t1 of the first effective change edge when the PWM light-casting pulse signal is monitored, and sending a second control signal and recording the start time t2 of the second effective change edge when the PWM light-casting pulse signal is monitored, wherein the control module has a built-in clock; A light-emitting module, used for outputting the PWM light-emitting pulse signal, emitting light after receiving the first control signal, and stopping emitting light after receiving the second control signal; A light receiving module, configured to output a first level when receiving light, and output a second level when not receiving light; The control module is further configured to obtain a start time t3 of the first level and a start time t4 of the second level, and calculate a test frequency in combination with a start time t1 of the first effective change edge and a start time t2 of the second effective change edge.

2. The photoelectric sensor testing system according to claim 1, characterized in that: The light emitting module comprises: A pulse unit, used for outputting the PWM light projection pulse signal; A light emitter, one end of which is connected to a power source; A switch unit has one end grounded and the other end connected to the other end of the light emitter, and is used to close when receiving the first control signal and to open when receiving the second control signal.

3. The photoelectric sensor testing system according to claim 2, characterized in that: The switch unit comprises a first transistor and a second transistor, wherein: The control end of the first transistor is connected to the output end of the pulse unit, the first end of the first transistor is connected to the other end of the light emitter, and the second end of the first transistor is connected to the second end of the second transistor; The control end of the second transistor is connected to the output end of the control module, the first end of the second transistor is connected to the load resistor, and the control end of the second transistor is used to receive the first control signal and the second control signal.

4. The photoelectric sensor testing system according to claim 2, characterized in that: The light emitter is a light emitting diode.

5. The photoelectric sensor testing system according to claim 1, characterized in that: The light receiving module comprises a light receiver, and the light receiver is a photosensitive diode.

6. The photoelectric sensor testing system according to any one of claims 1 to 5, characterized in that: The system further comprises: The level conversion module is used to perform level conversion on the PWM light projection pulse signal output by the light emitting module, so that the control module can monitor the PWM light projection pulse signal after the level conversion.

7. The photoelectric sensor testing system according to any one of claims 1 to 5, characterized in that: The system further comprises: A 24V power supply module, used to supply power to the light-emitting module and the light-receiving module; 7V DC power conversion module, used to convert the voltage output by the 24V power module into 7V; A 5V DC power conversion module, used to convert the voltage output by the 7V DC power conversion module into 5V and supply power to the level conversion module; The 3.3V DC power conversion module is used to convert the voltage output by the 7V DC power conversion module into 3.3V and supply power to the control module.

8. The photoelectric sensor testing system according to any one of claims 1 to 5, characterized in that: The control module is a single chip microcomputer.

9. The photoelectric sensor testing system according to any one of claims 1 to 5, characterized in that: The system further comprises: The display module is used to display the frequency.

Citation Information

Cited By

  • Photoelectric encoder rotation angle dynamic precision detection method

    CN120063363A