CN117687110A - Method, system, equipment and storage medium for resisting ambient light interference - Google Patents

Method, system, equipment and storage medium for resisting ambient light interference Download PDF

Info

Publication number
CN117687110A
CN117687110A CN202311635150.5A CN202311635150A CN117687110A CN 117687110 A CN117687110 A CN 117687110A CN 202311635150 A CN202311635150 A CN 202311635150A CN 117687110 A CN117687110 A CN 117687110A
Authority
CN
China
Prior art keywords
signal
ambient light
receiving end
period
interfered
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311635150.5A
Other languages
Chinese (zh)
Inventor
贺行侠
周中富
叶立平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Akusense Technology Co Ltd
Original Assignee
Shenzhen Akusense Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Akusense Technology Co Ltd filed Critical Shenzhen Akusense Technology Co Ltd
Priority to CN202311635150.5A priority Critical patent/CN117687110A/en
Publication of CN117687110A publication Critical patent/CN117687110A/en
Pending legal-status Critical Current

Links

Abstract

The application discloses a method, a system, equipment and a storage medium for resisting ambient light interference, wherein the method comprises the steps of obtaining a receiving end signal; when the receiving end signal is interfered by the ambient light, calculating the ambient light to obtain a period and a reference level of the ambient light, and correcting the receiving end signal based on the period and the reference level of the ambient light to obtain a receiving end signal after the ambient light interference is eliminated; and comparing the level signal of the receiving end signal which is not interfered by the ambient light or the receiving end signal after the ambient light interference is eliminated with a preset threshold value, outputting a detection result according to the comparison result, judging whether the pulse signal is detected in a non-signal period or not so as to judge whether the current receiving end signal is interfered by the ambient light, eliminating the interference caused by the ambient light on the detection result of the photoelectric sensor, enhancing the light interference resistance of the photoelectric sensor, and solving the problem that the photoelectric sensor cannot accurately detect the target under the ambient light interference.

Description

Method, system, equipment and storage medium for resisting ambient light interference
Technical Field
The application belongs to the technical field of sensors, and particularly relates to a method, a system, equipment and a storage medium for resisting ambient light interference.
Background
The photoelectric sensor, as a kind of detection means, can be used to detect whether an object is present in the detection area. The photoelectric sensor is provided with a transmitting end and a receiving end, the transmitting end irradiates light to the detection area, the receiving end receives light transmitted through the detection area or reflected by the detection area, a detection signal corresponding to the received light is generated, the detection signal becomes an amplified signal after being amplified, and the amplified signal is compared with a threshold value to reflect whether an object exists in the detection area.
When the existing photoelectric sensor is used for modulating, a fixed preset level is adopted to be compared with a receiving end signal, when the receiving end signal is larger than the preset level, the photoelectric sensor determines that a target is detected, and otherwise, the photoelectric sensor determines that the target is not detected. However, when there is interference of ambient light between the transmitting end and the receiving end, the signal of the receiving end will be superimposed with the ambient light, and the magnitude relation between the signal of the receiving end and the preset level cannot be accurately determined, so that the photoelectric sensor cannot accurately detect whether there is a target detection object, and misjudgment is generated.
Disclosure of Invention
The application provides a method, a system, equipment and a storage medium for resisting ambient light interference, which are used for solving the problem of how to accurately detect a target detection object under the ambient light interference by a photoelectric sensor.
In order to solve the technical problem, the application provides a method for resisting ambient light interference, which is applied to a photoelectric sensor and comprises the following steps:
acquiring a receiving end signal;
when the receiving end signal is interfered by the ambient light, calculating the ambient light to obtain a period and a reference level of the ambient light, and correcting the receiving end signal based on the period and the reference level of the ambient light to obtain a receiving end signal after the ambient light interference is eliminated;
and comparing the level signal of the receiving end signal which is not interfered by the ambient light or the receiving end signal after the ambient light interference is eliminated with a preset threshold value, and outputting a detection result according to the comparison result.
As a further improvement of the present application, the step of determining whether the receiving-end signal is interfered by the ambient light is:
judging whether a pulse signal is detected in a non-signal period; wherein the non-signal period is configured to form a complete signal period with the signal period, and acquire the receiving end signal in the signal period;
if the pulse signal is detected, judging that the current receiving end signal is interfered by ambient light;
if the pulse signal is not detected, judging that the current receiving end signal is not interfered by the ambient light.
As a further improvement of the present application, said modifying said receiver signal based on said period of ambient light and said reference level comprises:
collecting a voltage signal of the receiving end signal, and shifting the voltage signal by taking the period of the ambient light as a reference to obtain a voltage reference signal V' after shifting N periods; wherein N is a positive integer;
the voltage reference signal V' is compared with the reference level V of the ambient light dc Performing difference to obtain the offset delta of the signal of the receiving end; wherein Δ=v' -V dc
Correcting the voltage signal V by combining the offset delta to obtain a voltage signal V with the ambient light interference eliminated r
As a further improvement of the present application, the correcting the voltage signal V by the combined offset Δ includes:
vr=v- |Δ| when Δ > 0; when Δ < 0, vr=v+|Δ|.
As a further improvement of the method, the voltage signal V of the receiving end signal is acquired in a manner triggered by a singlechip timer, and the voltage reference signal V' offset by N periods is acquired.
As a further improvement of the present application, the comparing the level signal of the receiving end signal which is not interfered by the ambient light or the receiving end signal after eliminating the ambient light interference with the preset threshold value, outputting the detection result according to the comparison result, includes:
collecting a plurality of voltage signals in the receiving end signals which are not interfered by the ambient light, or collecting a plurality of voltage signals in the receiving end signals after the ambient light interference is eliminated;
sequentially combining a plurality of voltage signals with a preset threshold V th Comparing;
when the comparison result shows that the plurality of voltage signals are all larger than the preset threshold V th Outputting a detection result; when the comparison result shows that the plurality of voltage signals are smaller than or equal to the preset threshold V th In this case, no output is performed.
As a further improvement of the present application, the ambient light is a high-frequency periodic signal, the reference level is a direct current component value of the high-frequency periodic signal, and the period is a period value of the high-frequency periodic signal.
The application provides a system of anti ambient light interference, is applied to photoelectric sensor, includes:
the signal acquisition module is used for acquiring a receiving end signal;
the signal correction module is used for calculating the ambient light to obtain the period and the reference level of the ambient light when the signal of the receiving end is interfered by the ambient light, and correcting the signal of the receiving end based on the period and the reference level of the ambient light to obtain the signal of the receiving end after the interference of the ambient light is eliminated;
and the comparison output module is used for comparing the level signal of the receiving end signal which is not interfered by the ambient light or the receiving end signal after the ambient light interference is eliminated with a preset threshold value, and outputting a detection result according to the comparison result.
The application also provides an apparatus for resisting ambient light interference, comprising a processor and a memory, wherein:
the memory is used for storing a computer program;
the processor is configured to read the computer program in the memory and perform the steps of the method of combating ambient light interference as described above.
The present application also provides a computer readable storage medium having stored thereon a readable computer program which when executed by a processor performs the steps of a method of combating ambient light disturbances as described above.
The method, system, equipment and storage medium for resisting ambient light interference provided by the application have the following steps of
The beneficial effects are that:
according to the method, the receiving end signal is obtained, when the receiving end signal is interfered by the ambient light, the period and the reference level of the ambient light are calculated to obtain the period and the reference level of the ambient light, the receiving end signal after the ambient light interference is eliminated is obtained by correcting the receiving end signal based on the period and the reference level of the ambient light, the receiving end signal which is not interfered by the ambient light or the level signal of the receiving end signal after the ambient light interference is compared with the preset threshold value, so that the photoelectric sensor outputs a detection signal according to the comparison result, the interference caused by the detection result of the photoelectric sensor by the ambient light is eliminated, the light interference resistance of the photoelectric sensor is enhanced, and the problem that the photoelectric sensor cannot accurately detect a target under the ambient light interference is solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, but not all embodiments, and other drawings obtained according to these drawings without inventive effort to those skilled in the art are all within the scope of protection of the present application.
FIG. 1 is a flow chart of a method of providing resistance to ambient light interference according to an embodiment of the present application;
fig. 2 is a flowchart for determining whether a signal at a receiving end is interfered by ambient light according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a receiving-end signal according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of modifying a signal at a receiving end according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a receiver signal after being shifted according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an anti-ambient light interference system according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an anti-ambient light interference device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
In order that the description of the present disclosure may be more complete and thorough, an illustrative description is provided below of embodiments and specific examples of the present application; this is not the only form of practicing or implementing the embodiments of the application. The description covers the features of the embodiments and the method steps and sequences for constructing and operating the embodiments. However, other embodiments may be utilized to achieve the same or equivalent functions and sequences of steps. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein.
In the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; the text "and/or" is merely an association relation describing the associated object, and indicates that three relations may exist, for example, a and/or B may indicate: in addition, in the description of the embodiments of the present application, "a plurality" means two or more, and other words and the like, it is to be understood that the preferred embodiments described herein are merely for illustration and explanation of the present application, and are not intended to limit the present application, and embodiments of the present application and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1 to fig. 5, in order to solve the problem of how to accurately detect a target detection object under the interference of ambient light by using a photoelectric sensor, an embodiment of the present application provides a method for resisting the interference of ambient light, and fig. 1 is a schematic diagram of a method for resisting the interference of ambient light, which is applied to the photoelectric sensor, and includes the following steps:
step S1: acquiring a receiving end signal;
in the embodiment of the application, when a target object is visually detected by the photoelectric sensor, a transmitting end of the photoelectric sensor periodically transmits a pulse modulation signal through the photodiode, and when the target object exists in a detection path of the photoelectric sensor, the transmitted pulse modulation signal is reflected by the target object to form a receiving end signal, however, interference of ambient light can cause that an interference signal generated by the ambient light is superimposed in the formed receiving end signal, so that the result output of the photoelectric sensor is influenced to cause erroneous judgment.
As an optional implementation manner, the receiver signal acquired in the embodiment of the present application may be a receiver signal that is not interfered by ambient light, or may be a receiver signal that is overlapped after being interfered by ambient light, so it is required to determine whether the current receiver signal is interfered by ambient light according to a detection result of the non-signal period, and whether the current receiver signal needs to be subjected to ambient light interference cancellation.
It should be noted that, the ambient light exemplified in the present application needs to satisfy the characteristics of the high-frequency periodic signal, and the ambient light may be a high-frequency periodic signal that varies at the time, but at least has to satisfy the characteristics of the periodic signal.
As an optional implementation manner, please refer to fig. 2, which is a flowchart for determining whether a receiving-end signal is interfered by ambient light according to an embodiment of the present application, where the determining step of whether the receiving-end signal is interfered by ambient light is:
judging whether a pulse signal is detected in a non-signal period; wherein the non-signal period is configured to form a complete signal period with the signal period, and acquire the receiving end signal in the signal period;
if the pulse signal is detected, judging that the current receiving end signal is interfered by ambient light;
if the pulse signal is not detected, judging that the current receiving end signal is not interfered by the ambient light.
In the embodiment of the application, a complete signal period is divided into a signal period and a non-signal period, and the method is specifically characterized in that pulse signals of a signal device and pulse signals of the non-signal period are detected through different input interfaces of a singlechip respectively, if the input interfaces detect the pulse signals in the non-signal period, the environment light interference can be considered to exist, the current receiving end signal can be interfered, otherwise, if the input interfaces do not detect the pulse signals in the non-signal period, the environment light interference does not exist currently, and the current receiving end signal is not interfered by the environment light.
Step S2: when the receiving end signal is interfered by the ambient light, calculating the ambient light to obtain a period and a reference level of the ambient light, and correcting the receiving end signal based on the period and the reference level of the ambient light to obtain a receiving end signal after the ambient light interference is eliminated;
as an optional implementation manner, when it is determined that the input interface detects the pulse signal in the non-signal period, the current receiving-end signal needs to be modified to reject the interference caused by the ambient light.
Because the ambient light provided by the application is a high-frequency periodic signal, and the periodic value and the direct current component value exist, the high-frequency periodic signal needs to be calculated to obtain the required reference level V dc A period T; wherein the reference level V dc For the dc component value of the high-frequency periodic signal, the period T is a period value of the high-frequency periodic signal, and can be obtained by calculating the detected pulse signal in the non-signal period, which is not described in detail in the present application.
As an optional implementation manner, the correcting the receiving-end signal based on the period of the ambient light and the reference level includes:
collecting a voltage signal of the receiving end signal, and shifting the voltage signal by taking the period of the ambient light as a reference to obtain a voltage reference signal V' after shifting N periods; wherein N is a positive integer;
the voltage reference signal V' is compared with the reference level V of the ambient light dc Performing difference to obtain the offset delta of the signal of the receiving end; wherein Δ=v' -V dc
Correcting the voltage signal V by combining the offset delta to obtain a voltage signal V with the ambient light interference eliminated r
Referring to fig. 3, a schematic structural diagram of a receiving-end signal provided in an embodiment of the present application may be observed that when ambient light interference exists, the obtained receiving-end signal is a superimposed signal, and in this application, three-point signals A, B, C are taken as an example to explain how to eliminate ambient light in detail, so as to restore the receiving-end signal to a condition without interference.
Specifically, the reference level V of the ambient light needs to be calculated first dc And a period T, in order to determine the interference situation of the A, B, C three-point signal, the A, B, C three-point signal needs to be shifted with respect to the period T of the ambient light, and the reference signals a ', B ', C ' after shifting by N periods are obtained, where the shifting number N of the periods is set to be a positive integer.
The voltage signal is preferably selected as the judgment of each point signal, the voltage signal V of the signal of the receiving end is acquired in a manner triggered by the singlechip timer, and the voltage reference signal V' after shifting N periods is acquired.
Referring to fig. 4, a schematic structural diagram of correcting a signal at a receiving end according to an embodiment of the present application is shown, and corresponding to a signal at three A, B, C points in the reference diagram, a voltage signal V at three A, B, C points needs to be collected by a single chip microcomputer A 、V B 、V C After A, B, C three points are shifted by one period T, collecting voltage reference signals V corresponding to A, B, C three points at the moment A ’、V B ’、V C ’。
V to be obtained A ’、V B ’、V C Reference level V to ambient light dc The difference is made to obtain the offset delta of the receiver signal, in one embodiment provided herein, V dc =1.8v, three-point voltage signal V acquired by the single chip microcomputer A =2.9V、V B =2.2V、V C =3v, and the voltage reference signal after one period T is shifted to V A ’=1.9V、V B ’=1.5V、V C ' =2v, sequentially adding the above V A ’、V B ’、V C ' and reference level V dc Difference is made to obtain delta A =1.9V-1.8V=0.1V、Δ B =1.5V-1.8V=-0.3V、Δ C =2V-1.8V=0.2V。
The delta calculated as described above is then combined A 、Δ B And delta C For V A 、V B 、V C The three-point voltage signal is corrected, when delta>At 0, vr=v- |Δ|; when Δ < 0, vr=v+|Δ|.
Due to delta A =0.1V>0, the voltage signal representing the point A is pulled up under the interference of ambient light, and thus its actual value Vr A =V A- Δ A =2.9V-0.1V=2.8V;Δ B The voltage signal representing point B is pulled down by the disturbance of ambient light, thus its actual value Vr = -0.3V < 0 B =V B- Δ B =2.2v+0.3v=2.5V; similarly, deltaA C =0.2V>0, the voltage signal representing the C point is pulled up by the interference of the ambient light, and thus its actual value Vr C =V C- Δ C =3v—0.2v=2.8v. Through the steps, the voltage signal V of the A, B, C three points A 、V B 、V C The state of not being interfered by the ambient light is restored, and the actual voltage signal is Vr A 、Vr B And Vr (V-R) C
In the above, the receiver signal from which the ambient light is disturbed is obtained by correcting the receiver signal based on the period of the ambient light and the reference level, and the receiver signal may be not disturbed by the ambient light.
Step S3: and comparing the level signal of the receiving end signal which is not interfered by the ambient light or the receiving end signal after the ambient light interference is eliminated with a preset threshold value, and outputting a detection result according to the comparison result.
Under the condition that no ambient light interference exists, a plurality of voltage signals are generally selected from the receiving end signals, whether the current receiving end signals are effective or not is judged by comparing the selected plurality of voltage signals with a preset threshold value, and whether the current receiving end signals need to be output or not is judged, because the receiving end signals which are interfered by the ambient light are corrected in the step S2, the plurality of voltage signals can be selected from the receiving end signals which are eliminated by the ambient light interference, and the selected plurality of voltage signals are compared with the preset threshold value, namely, the purpose of the step S2 is to restore the receiving end signals to the condition which are not interfered by the ambient light, so that the receiving end signals can be compared with the preset threshold value, and whether the current receiving end signals are effective or not and whether the current receiving end signals need to be output or not is judged.
As an optional implementation manner, the comparing the level signal of the receiving end signal which is not interfered by the ambient light or the receiving end signal after eliminating the ambient light interference with a preset threshold value, and outputting a detection result according to the comparison result, includes:
collecting a plurality of voltage signals in the receiving end signals which are not interfered by the ambient light, or collecting a plurality of voltage signals in the receiving end signals after the ambient light interference is eliminated;
sequentially combining a plurality of voltage signals with a preset threshold V th Comparing;
when the comparison result shows that the plurality of voltage signals are all larger than the preset threshold V th Outputting a detection result; when the comparison result shows that the plurality of voltage signals are smaller than or equal to the preset threshold V th In this case, no output is performed. Wherein the detection result includes detecting the target object, and when a part of the voltage signals are less than or equal to a preset threshold value V th When the signal of the current receiving end is invalid, the photoelectric sensor does not detect the target object, and the corresponding detection result is not output.
With continued reference to fig. 3, the signal at the receiving end selects A, B, C three points, and determines whether output is required by comparing the three points with a predetermined threshold, for example, a predetermined voltage threshold V is set th When V A >V、V B >V、V C >V, at this time, the receiving end signal is valid, the sensor outputs a detection result, V in one embodiment provided in the present application A =2.8V、V B =2.5V、V C =2.8v, preset voltage threshold V set th =2.5v, due to V A =2.8V>V th 、V B =2.5V>V th 、V C =2.8V>V th Therefore, the receiving-side signal at this time is judged to be valid, and the photoelectric sensor outputs the detection result.
The preset voltage threshold V is as follows th Related to the detection distance between the emitting end and the receiving end of the photoelectric sensor, the preset voltage threshold V can be set according to the actual detection requirement th Is adjusted according to the specific value of (a) to how to adjust the corresponding preset voltage threshold V according to the detection th And are not emphasized as a matter of description of the present application, so that further description is omitted here.
However, when there is ambient light interference, the voltage signals at three points A, B, C are affected, the signal corresponding to point A is emphasized, the signal at point B is attenuated, the signal at point C is emphasized, and thus the ambient light affects themPreset voltage threshold V th And the size judgment of the two sensors leads to misjudgment of the photoelectric sensor.
Referring to fig. 4, in step S2, the present application corrects the receiving end signal interfered by the ambient light based on the period and the reference level of the ambient light to obtain a receiving end signal after eliminating the ambient light interference, so as to obtain an actual voltage signal Vr corresponding to three points A, B, C A =2.8V、Vr B =2.5V、Vr C =2.8V。
In one embodiment provided herein, a preset voltage threshold V is set th =2.5v due to Vr A =2.8V>V th 、Vr B =2.5V>V th 、Vr C =2.8V>V th Obviously, the corrected receiving end signal is effective at this time, and the photoelectric sensor judges that the target detection object exists according to the comparison result and outputs the detection result.
Referring to fig. 5, for a schematic structural diagram of a receiver signal after offset, the application preferably samples a voltage signal in a timer triggered manner by a single chip ADC, and samples at A, B, C, D points to obtain a voltage signal point required by us, in the figure, a ', B', C ', D' respectively correspond to voltage reference signal points after offset by 1 period T from the four points A, B, C, D, intervals between the a point and the a 'point, between the B point and the B' point, between the C point and the C 'point, and between the D point and the D' point are exactly an ambient light period T, and a time error brought by a software triggered manner can be avoided by a timer triggered manner of collecting the voltage signal point, so that the required voltage signal point and the voltage reference signal point after the offset period can be found more accurately.
In the actual receiving end signal recovery, the right side of the diagram corresponds to the signal which does not arrive, so the application preferably selects the left side of the current voltage signal point to perform the offset and the signal recovery of the period T; meanwhile, the method for eliminating the interference of the ambient light by adding and subtracting the offset delta on the basis of the voltage signal is realized, and the voltage signal can be restored to the condition of not being interfered by the ambient light in other feedback adjustment modes, so that the method is feasible.
Based on the method for resisting the ambient light interference, the application also provides an ambient light interference resisting system, as shown in fig. 6, which is a schematic structural diagram of the ambient light interference resisting system provided by the embodiment of the application, wherein the system comprises a signal acquisition module, a signal correction module and a comparison output module;
the signal acquisition module is used for acquiring a receiving end signal;
the signal correction module is used for calculating the ambient light to obtain the period and the reference level of the ambient light when the signal of the receiving end is interfered by the ambient light, and correcting the signal of the receiving end based on the period and the reference level of the ambient light to obtain the signal of the receiving end after the interference of the ambient light is eliminated;
and the comparison output module is used for comparing the level signal of the receiving end signal which is not interfered by the ambient light or the receiving end signal after the ambient light interference is eliminated with a preset threshold value, and outputting a detection result according to the comparison result.
For further details of implementing the above technical solution by each module in the above anti-ambient light interference system, reference may be made to the description in the method for anti-ambient light interference provided in the above application embodiment, which is not repeated here.
Based on the above-mentioned method for resisting ambient light interference, as shown in fig. 7, a schematic structural diagram of an apparatus for resisting ambient light interference according to an embodiment of the present application is provided, and the embodiment of the present application further provides an apparatus for resisting ambient light interference, where the identifying apparatus includes a processor 701 and a memory 702 coupled to the processor 701. The memory 702 stores a computer program which, when executed by the processor 701, causes the processor 701 to perform the steps in the method for resisting ambient light interference provided by the above embodiment.
For further details of implementing the above technical solution by the processor 701 in the above anti-ambient light interference device, reference may be made to the description of the method for anti-ambient light interference provided in the above application embodiment, which is not repeated here.
The processor 701 may also be called a CPU (Central Processing Unit ), and the processor 701 may be an integrated circuit chip with signal processing capability; the processor 701 may also be a general purpose processor, such as a microprocessor or the processor 701 may be any conventional processor, a DSP (Digital Signal Process, digital signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (FieldProgrammable GataArray, field programmable gate array) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
As shown in fig. 8, the embodiment of the present application further provides a schematic structural diagram of a computer readable storage medium, where a readable computer program 801 is stored on the storage medium; the computer program 801 may be stored in the storage medium in the form of a software product, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a magnetic disk or optical disk, a ROM (Read-only memory), a RAM (RandomAccess Memory), or a terminal device such as a computer, a server, a mobile phone, or a tablet.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus, device, and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
According to the method, the system, the device and the storage medium for resisting the ambient light interference, the ambient light is calculated to obtain the period and the reference level of the ambient light when the ambient light is interfered by the ambient light through obtaining the receiving end signal, the receiving end signal after the ambient light interference is eliminated is corrected based on the period and the reference level of the ambient light, the receiving end signal which is not interfered by the ambient light or the level signal of the receiving end signal after the ambient light interference is eliminated is compared with the preset threshold value, so that the photoelectric sensor outputs a detection signal according to the comparison result, the interference caused by the detection result of the ambient light to the photoelectric sensor is eliminated, the light interference resistance of the photoelectric sensor is enhanced, and the problem that the photoelectric sensor cannot accurately detect a target under the ambient light interference is solved.
The foregoing description of the preferred embodiments of the present application is not intended to be limiting, but is intended to cover any and all modifications, equivalents, and alternatives falling within the spirit and principles of the present application.

Claims (10)

1. A method for resisting ambient light interference, applied to a photoelectric sensor, comprising the following steps:
acquiring a receiving end signal;
when the receiving end signal is interfered by the ambient light, calculating the ambient light to obtain a period and a reference level of the ambient light, and correcting the receiving end signal based on the period and the reference level of the ambient light to obtain a receiving end signal after the ambient light interference is eliminated;
and comparing the level signal of the receiving end signal which is not interfered by the ambient light or the receiving end signal after the ambient light interference is eliminated with a preset threshold value, and outputting a detection result according to the comparison result.
2. The method for resisting ambient light interference as claimed in claim 1, wherein the step of determining whether the receiving-end signal is interfered by the ambient light is:
judging whether a pulse signal is detected in a non-signal period; wherein the non-signal period is configured to form a complete signal period with the signal period, and acquire the receiving end signal in the signal period;
if the pulse signal is detected, judging that the current receiving end signal is interfered by ambient light;
if the pulse signal is not detected, judging that the current receiving end signal is not interfered by the ambient light.
3. The method of claim 1, wherein said modifying said receiver signal based on said period of ambient light and said reference level comprises:
collecting a voltage signal of the receiving end signal, and shifting the voltage signal by taking the period of the ambient light as a reference to obtain a voltage reference signal V' after shifting N periods; wherein N is a positive integer;
the voltage reference signal V' is compared with the reference level V of the ambient light dc Performing difference to obtain the offset delta of the signal of the receiving end; wherein Δ=v' -V dc
Correcting the voltage signal V by combining the offset delta to obtain a voltage signal V with the ambient light interference eliminated r
4. A method of providing immunity to ambient light as recited in claim 3, wherein modifying the voltage signal V in combination with the offset delta comprises:
vr=v- |Δ| when Δ > 0; when Δ < 0, vr=v+|Δ|.
5. A method of resisting ambient light interference as defined in claim 3, wherein the voltage signal V of the receiving end signal is collected by means of triggering a timer of a single-chip microcomputer, and the voltage reference signal V' offset by N periods is collected.
6. The method for resisting ambient light interference according to claim 1, wherein comparing the level signal of the receiving end signal which is not interfered by the ambient light or the receiving end signal after eliminating the ambient light interference with a preset threshold, and outputting a detection result according to the comparison result, comprises:
collecting a plurality of voltage signals in the receiving end signals which are not interfered by the ambient light, or collecting a plurality of voltage signals in the receiving end signals after the ambient light interference is eliminated;
sequentially combining a plurality of voltage signals with a preset threshold V th Comparing;
when the comparison result shows that the plurality of voltage signals are all larger than the preset threshold V th Outputting a detection result; when the comparison result shows that the plurality of voltage signals are smaller than or equal to the preset threshold V th In this case, no output is performed.
7. The method of claim 1, wherein the ambient light is a high frequency periodic signal, the reference level is a dc component value of the high frequency periodic signal, and the period is a period value of the high frequency periodic signal.
8. A system for resisting ambient light interference, applied to a photoelectric sensor, comprising:
the signal acquisition module is used for acquiring a receiving end signal;
the signal correction module is used for calculating the ambient light to obtain the period and the reference level of the ambient light when the signal of the receiving end is interfered by the ambient light, and correcting the signal of the receiving end based on the period and the reference level of the ambient light to obtain the signal of the receiving end after the interference of the ambient light is eliminated;
and the comparison output module is used for comparing the level signal of the receiving end signal which is not interfered by the ambient light or the receiving end signal after the ambient light interference is eliminated with a preset threshold value, and outputting a detection result according to the comparison result.
9. An apparatus for combating ambient light interference, comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor implements the steps of the method according to any one of claims 1 to 7 when said computer program is executed by said processor.
10. A computer readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.
CN202311635150.5A 2023-12-01 2023-12-01 Method, system, equipment and storage medium for resisting ambient light interference Pending CN117687110A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311635150.5A CN117687110A (en) 2023-12-01 2023-12-01 Method, system, equipment and storage medium for resisting ambient light interference

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311635150.5A CN117687110A (en) 2023-12-01 2023-12-01 Method, system, equipment and storage medium for resisting ambient light interference

Publications (1)

Publication Number Publication Date
CN117687110A true CN117687110A (en) 2024-03-12

Family

ID=90136394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311635150.5A Pending CN117687110A (en) 2023-12-01 2023-12-01 Method, system, equipment and storage medium for resisting ambient light interference

Country Status (1)

Country Link
CN (1) CN117687110A (en)

Similar Documents

Publication Publication Date Title
KR101952798B1 (en) Detection distance calibration method, apparatus, and device
CN108139998B (en) Electric fast transient tolerant input/output (I/O) communication system
KR101921675B1 (en) Touchscreen interference suppression method and apparatus, and terminal device
EP2658279B1 (en) Isolated system data communication
US10691271B2 (en) Method for determining touch position and touch control chip
US9565424B2 (en) Information processing device, information processing method, and program
US10254892B2 (en) Hotknot based proximity detection method, apparatus and touch screen terminal
JP6049554B2 (en) Image processing device
CN117687110A (en) Method, system, equipment and storage medium for resisting ambient light interference
US20210011579A1 (en) Method and system for transmitting signal, active stylus, touch screen and readable storage medium
US10462268B2 (en) Data transmitting/receiving apparatus and data transmitting/receiving method
US9843438B2 (en) Transmission device, reception device, and transceiver system
US10715362B2 (en) Method for increasing the signal-to-noise ratio for common-mode interference on a two-wire data bus
CN104682981A (en) Decoding board of ADS-B (automatic dependent surveillance broadcast) receiver
US10148418B2 (en) Receiving device
CN109639396B (en) Data transmission method and device and computer readable storage medium
CN109963127B (en) Image processing apparatus
KR102546218B1 (en) Device and method for recovering digital signal damaged by line resistance and noise
JP2019193208A (en) Electronic control device
CN109802761B (en) Fault identification method and device
CN111903096B (en) Communication system, receiving apparatus, transmission interval changing method, and computer program
CN109324711B (en) Data processing method and device
CN106533499A (en) Pulse interference cancellation device and pulse interference cancellation method
EP2999181A1 (en) Signaling processing method and apparatus, and signal receiver
JP2005316984A (en) Sensor system and system for detection of suspicious person

Legal Events

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