Current detection method and infrared lamp testing method, device and storage medium
Patent Information
- Application Number
- CN202310451724.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-24
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2043-04-24
AI Technical Summary
[0004]本发明的主要目的在于:提供一种电流检测方法和红外灯测试方法、设备及存储介质,旨在解决现有技术中红外灯检测数据分散且不精确,测试结果误差较大的技术问题
[0047] This invention proposes a current detection method, an infrared lamp testing method, device, and storage medium. It acquires several current data sets when the infrared lamp is lit, calculates the average value of each data set, obtaining several current averages. Then, based on the maximum and minimum averages among these current averages, a first difference is obtained, or this first difference is further calculated by combining the average values of the several current averages. When the absolute value of the first difference is less than a preset value, the average value of the several current averages is determined as the final current detection result, achieving accurate detection of the infrared lamp current. Compared to existing infrared lamp detection methods, this invention acquires current data more centrally, resulting in more accurate current detection results and improving the precision of infrared lamp current detection. Furthermore, it improves the accuracy of infrared lamp polarity testing, reduces testing errors, and prevents defective products failing polarity testing from proceeding to the next process. Moreover, this current detection method and infrared lamp testing method can be implemented simply by modifying the test program on existing production line equipment, without requiring additional measuring instruments, saving hardware costs and demonstrating high practicality.
Smart Images

Figure CN116643075B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of infrared lamp technology, and in particular to a current detection method, an infrared lamp testing method, equipment, and storage medium. Background Technology
[0002] In people's daily lives, the emergence of smart devices such as mobile phones, tablets, televisions, and air conditioners has made life increasingly rich and colorful. Although the circuits of smart devices are not entirely the same, they almost all use infrared circuits internally. In the production process of these smart devices, especially in the production of equipment involving infrared lamps, it is generally necessary to test the parameters of infrared lamps when using testing fixtures on the production line. However, due to limitations such as testing space and costs on the production line, there is often a lack of precise equipment support. The data detection during testing takes a long time. Detecting a small number of data points over a long period of time, compared to detecting the same number of data points in a short period of time or detecting a larger number of data points in the same period of time, results in scattered data that may not accurately represent the actual parameters, making it difficult to determine whether the infrared lamp is faulty based on this data.
[0003] Therefore, the existing infrared lamp testing methods on production lines have technical problems such as scattered and inaccurate detection data and large errors in test results, making it difficult to distinguish between good and defective products during infrared lamp testing. Summary of the Invention
[0004] The main objective of this invention is to provide a current detection method and an infrared lamp testing method, device, and storage medium, aiming to solve the technical problems of scattered and inaccurate infrared lamp detection data and large errors in test results in the prior art.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] In a first aspect, the present invention provides a current detection method, comprising:
[0007] When the infrared light is turned on, acquire several current data sets, where several are positive integers greater than 2, and each current data set includes multiple current parameters.
[0008] Based on the average value corresponding to each group of current data, several current average values are obtained;
[0009] The first difference is obtained by considering the maximum and minimum average values among several current average values; or, the first difference is obtained by considering the maximum and minimum average values among several current average values and the average value corresponding to several current average values.
[0010] Determine whether the absolute value of the first difference is less than a preset value;
[0011] If the absolute value of the first difference is less than the preset value, then the average value corresponding to several current average values will be determined as the final current detection result.
[0012] Optionally, in the above current detection method, the step of obtaining the first difference based on the maximum and minimum average values among several current average values and the average value corresponding to several current average values includes:
[0013] The first average value is obtained by averaging the maximum and minimum average values among several current average values;
[0014] The second average value is obtained by averaging the values corresponding to several current average values;
[0015] The first difference is obtained by comparing the first average value with the second average value.
[0016] Optionally, before the step of acquiring several sets of current data in the above current detection method, the current detection method further includes:
[0017] When the infrared light is turned on, acquire the first current data set;
[0018] Determine whether to continue acquiring current data based on the first set of current data;
[0019] If necessary, obtain a second current data set;
[0020] Determine whether to continue acquiring current data based on the second set of current data.
[0021] If necessary, a third current data set is obtained to obtain several current data sets.
[0022] Optionally, in the above current detection method, the step of determining whether to continue acquiring current data sets based on the first set of current data includes:
[0023] The second difference is obtained based on the maximum and minimum values in the first current data set;
[0024] Determine whether the second difference is less than the preset value;
[0025] If the second difference is greater than or equal to the preset value, it is determined that it is necessary to continue acquiring current data sets;
[0026] If the second difference is less than the preset value, the first current mean is determined as the final current detection result, where the first current mean is the average value corresponding to the first current data group.
[0027] Optionally, in the above current detection method, the step of determining whether to continue acquiring current data based on the second set of current data includes:
[0028] The third difference is obtained by comparing the maximum and minimum average values of the first and second current average values, where the second current average value is the average value corresponding to the second current data group.
[0029] Determine whether the third difference is less than the preset value;
[0030] If the third difference is greater than or equal to the preset value, it is determined that it is necessary to continue acquiring current data sets;
[0031] If the third difference is less than the preset value, the average of the first current mean and the second current mean will be determined as the final current detection result.
[0032] Optionally, before the step of acquiring several sets of current data in the above current detection method, the current detection method further includes:
[0033] Generate a lighting control command and send it to the infrared light to turn it on;
[0034] The working duration of the infrared lamp and the time for taking the current parameter are obtained. The working duration is based on the lighting duration of the infrared lamp (2s) contained in the lighting control command, and the time for taking the current parameter is the time required to detect the current parameter once when the infrared lamp is lit (0.06s).
[0035] The detection duration is obtained by multiplying the total amount of data of the current parameters of the infrared lamp being detected by the time of value acquisition.
[0036] Compare working time with testing time;
[0037] When the working time exceeds the detection time, the infrared light is determined to be on, and the step of acquiring several current data sets is executed.
[0038] When the working time is less than or equal to the detection time, it is determined that the infrared light is in an off state. The process returns to generate a lighting control command and sends the lighting control command to the infrared light to make the infrared light light up. The process continues to keep the infrared light lit and executes the step of acquiring several current data groups.
[0039] Secondly, the present invention provides an infrared lamp testing method, wherein the infrared lamp includes three positive pins and one negative pin, and the three positive pins are interconnected.
[0040] Infrared lamp testing methods include:
[0041] By performing the current detection method described above, the final current detection result of the infrared lamp is obtained;
[0042] The polarity test results of the infrared lamp are obtained by comparing the final current detection results with the preset threshold range.
[0043] Thirdly, the present invention provides a current detection device, which includes a processor and a memory. The memory stores a current detection program, and when the current detection program is executed by the processor, it implements the current detection method as described above.
[0044] Fourthly, the present invention provides an infrared lamp testing device, which includes a processor and a memory. The memory stores an infrared lamp testing program. When the infrared lamp testing program is executed by the processor, it implements the infrared lamp testing method described above.
[0045] Fifthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by one or more processors, implements the current detection method or the infrared lamp testing method described above.
[0046] The above-described one or more technical solutions provided by this invention can have the following advantages or at least achieve the following technical effects:
[0047] This invention proposes a current detection method, an infrared lamp testing method, device, and storage medium. It acquires several current data sets when the infrared lamp is lit, calculates the average value of each data set, obtaining several current averages. Then, based on the maximum and minimum averages among these current averages, a first difference is obtained, or this first difference is further calculated by combining the average values of the several current averages. When the absolute value of the first difference is less than a preset value, the average value of the several current averages is determined as the final current detection result, achieving accurate detection of the infrared lamp current. Compared to existing infrared lamp detection methods, this invention acquires current data more centrally, resulting in more accurate current detection results and improving the precision of infrared lamp current detection. Furthermore, it improves the accuracy of infrared lamp polarity testing, reduces testing errors, and prevents defective products failing polarity testing from proceeding to the next process. Moreover, this current detection method and infrared lamp testing method can be implemented simply by modifying the test program on existing production line equipment, without requiring additional measuring instruments, saving hardware costs and demonstrating high practicality. Attached Figure Description
[0048] 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. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is a flowchart illustrating the first embodiment of the current detection method of the present invention;
[0050] Figure 2 This is a schematic diagram of the hardware structure of the current detection device involved in the present invention;
[0051] Figure 3 This is a flowchart illustrating the second embodiment of the current detection method of the present invention;
[0052] Figure 4 This is a detailed flowchart of step S200 in the second embodiment of the current detection method of the present invention;
[0053] Figure 5 This is a flowchart illustrating the first embodiment of the infrared lamp testing method of the present invention;
[0054] Figure 6 This is a schematic diagram of the hardware structure of the infrared lamp testing equipment involved in the present invention;
[0055] Figure 7 This is a schematic diagram of the pinout of the infrared lamp involved in this invention.
[0056] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0058] It should be noted that in this invention, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element. In this invention, descriptions involving "first," "second," etc., are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this is based on the fact that those skilled in the art can implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0059] In view of the technical problems of scattered and inaccurate infrared lamp detection data and large error in test results in the prior art, the present invention provides a current detection method and an infrared lamp testing method including the current detection method.
[0060] The current detection method, infrared lamp testing method, equipment, and storage medium provided by the present invention will be described in detail below with reference to the accompanying drawings and through specific embodiments and implementation methods.
[0061] Example 1
[0062] Reference Figure 1 The flowchart illustrates the first embodiment of the current detection method of the present invention, which is applied to a current detection device.
[0063] Current detection equipment refers to terminal devices or network devices that can achieve network connectivity. Current detection equipment can be terminal devices such as mobile phones, computers, tablets, portable computers, and embedded industrial control computers, or network devices such as servers and cloud platforms.
[0064] like Figure 2 The diagram shown is a schematic of the hardware structure of a current detection device. The current detection device may include: a processor 1001, such as a CPU (Central Processing Unit), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005.
[0065] Specifically, the communication bus 1002 is used to realize the connection and communication between these components; the user interface 1003 is used to connect to the client and communicate data with the client, and the user interface 1003 may include an output unit and an input unit; the network interface 1004 is used to connect to the backend server and communicate data with the backend server, and the network interface 1004 may include an input / output interface; the memory 1005 is used to store various types of data, such as instructions for any application or method in the current detection device, as well as application-related data, and the memory 1005 may be built-in memory; optionally, the memory 1005 may also be a storage device independent of the processor 1001, and so on. Figure 2 The memory 1005 may include an operating system, a network communication module, a user interface module, and a current detection program; the processor 1001 is used to call the current detection program stored in the memory 1005 and perform the following operations:
[0066] When the infrared light is turned on, acquire several current data sets, where several are positive integers greater than 2, and each current data set includes multiple current parameters.
[0067] Based on the average value corresponding to each group of current data, several current average values are obtained;
[0068] The first difference is obtained by considering the maximum and minimum average values among several current average values; or, the first difference is obtained by considering the maximum and minimum average values among several current average values and the average value corresponding to several current average values.
[0069] Determine whether the absolute value of the first difference is less than a preset value;
[0070] If the absolute value of the first difference is less than the preset value, then the average value corresponding to several current average values will be determined as the final current detection result.
[0071] Based on the aforementioned current detection equipment, the following is combined with... Figure 1 The flowchart shown illustrates the current detection method of this embodiment in detail. The current detection method may include the following steps:
[0072] Step S300: When the infrared light is turned on, acquire several current data sets, where several are positive integers greater than 2, and each current data set includes multiple current parameters.
[0073] Specifically, infrared lamps, also called IR lamps, can be used in various smart devices. The current parameter can be the current value detected when the IR lamp is lit, or multiple current parameters can be the corresponding current values detected at multiple moments within a time period when the IR lamp is lit. The current value is the operating current of the IR lamp. The current detection device can control the IR lamp to light up or turn off. Acquiring more than two sets of current data is beneficial for subsequent calculation of the average current value and the average of several current values. The initial number of current data sets can be 3 or a positive integer greater than 3, which can be set according to actual needs. The number of current parameters included in each current data set can also be set according to actual needs.
[0074] Step S400: Based on the average value corresponding to each group of current data, obtain several average current values.
[0075] Specifically, for each set of current data, the average value of multiple current parameters is calculated to obtain an average value corresponding to that current data set, i.e., a current mean. By performing the above steps for all current data sets, several average values can be obtained for each set of current data, i.e., several current mean values.
[0076] Step S500: Obtain the first difference based on the maximum and minimum average values among several current average values; or, obtain the first difference based on the maximum and minimum average values among several current average values and the average value corresponding to several current average values.
[0077] Specifically, there are two ways to obtain the first difference based on the above-mentioned average current values. One is to directly use the difference between the maximum and minimum average values among the several average current values as the first difference. The other is to use the difference between the average of the maximum and minimum average values among the several average current values and the average value corresponding to the several average current values as the first difference. The specific method can be set according to actual needs.
[0078] Step S600: Determine whether the absolute value of the first difference is less than a preset value.
[0079] Specifically, after obtaining the first difference, it is determined whether the absolute value of the first difference is less than a preset value. This preset value can be obtained during the initialization of the current detection device and can be set according to actual needs. For example, it can be set according to the accuracy requirements of current detection in actual applications. When the preset value is set higher, it indicates that the accuracy requirement for current detection is lower; conversely, when the preset value is set lower, it indicates that the accuracy requirement for current detection is higher.
[0080] Step S700: If the absolute value of the first difference is less than the preset value, then the average value corresponding to several current average values is determined as the final current detection result.
[0081] Specifically, when the absolute value of the first difference is less than a preset value, it indicates that the accuracy of the current detection of the infrared lamp meets the set requirements, and a current detection result can be directly determined as the final current detection result. In practical applications, there are two ways to determine the current detection result: one is to determine it based on the average of the maximum and minimum averages among several current averages; the other is to determine it based on the average of the corresponding values of several current averages. Here, the second method is used to determine the current detection result to determine the final current detection result, which more accurately represents the average of the acquired multiple sets of current parameters, thus obtaining a more accurate final current detection result.
[0082] In one embodiment, after step S600, i.e., "determining whether the absolute value of the first difference is less than a preset value", the current detection method may further include:
[0083] Step S800: If the absolute value of the first difference is greater than or equal to the preset value, return to the step of obtaining several current data sets to obtain the next current data set until the absolute value of the first difference is less than the preset value, and then obtain the final current detection result.
[0084] Specifically, when the absolute value of the first difference is greater than or equal to the preset value, it indicates that the accuracy of the current detection of the infrared lamp does not meet the set requirements. In order to obtain a final result that meets the requirements, more current parameters can be acquired to obtain more sets of current data. Therefore, at this time, we can return to step S300 and continue to acquire the next set of current data when the infrared lamp is lit, obtaining several sets plus one more set of current data, and then repeat the subsequent steps until the absolute value of the first difference is less than the preset value. Then, the final current detection result is obtained in any of the methods in step S700.
[0085] It should be noted that when the absolute value of the first difference is determined to be greater than or equal to the preset value, an alarm can be triggered to remind staff to take better current detection measures or adjust the current detection scheme in a timely manner to improve the accuracy of current detection, so that the required current detection results can be obtained in the future.
[0086] The current detection method provided in this embodiment acquires several sets of current data when the infrared lamp is lit, calculates the average value corresponding to each set of current data, and obtains several current averages. Then, based on the maximum and minimum averages among these current averages, a first difference is obtained, or this first difference is further combined with the average value corresponding to the several current averages. When the absolute value of the first difference is determined to be less than a preset value, the average value corresponding to the several current averages is determined as the final current detection result, achieving the purpose of accurately detecting the infrared lamp current. Compared with existing infrared lamp detection methods, this invention can detect more data in the same amount of time and detect the same amount of data in a shorter time, thus acquiring more concentrated current data and obtaining accurate current detection results, improving the accuracy of infrared lamp current detection. Furthermore, this current detection method only requires modification of the test program on existing production line equipment, without the need for additional measuring instruments, saving hardware costs and demonstrating high practicality.
[0087] Example 2
[0088] Based on the same inventive concept, referring to Figures 3 to 4 A second embodiment of the current detection method of the present invention is proposed, which can also be applied to the current detection device described above.
[0089] The following is combined Figure 3 The flowchart shown illustrates the current detection method of this embodiment in detail. The method may include the following steps:
[0090] Step S110: When the infrared light is turned on, acquire the first current data set.
[0091] Specifically, the current detection device can generate and send a lighting control command to the infrared lamp to turn it on. During the normal operation of the infrared lamp, multiple current parameters are detected to obtain the first set of current data.
[0092] In this embodiment, when the current detection device initializes, it acquires a preset value A, the number of current parameters j in each current data group, and the number i of real-time measured current data groups. Here, assuming a current data group has j = 10 current values, after initialization, 10 current values can be detected, represented as follows: That is, the first current data set is obtained.
[0093] Step S120: Determine whether it is necessary to continue acquiring current data groups based on the first current data group.
[0094] Specifically, when the accuracy of current detection of infrared lamps is sufficient, it may be possible to determine the final current detection result based on a set of current data. Therefore, the accuracy of detection can be judged based on the first set of current data to determine whether more sets of current data are needed to determine the current detection result. Once the accuracy of current detection is determined to meet the requirements based on the first set of current data, there is no need to repeat the subsequent steps, and the current detection result can be obtained as soon as possible, saving work time.
[0095] Optionally, step S120 may further include:
[0096] Step S121: Obtain the second difference based on the maximum and minimum values in the first current data set.
[0097] Specifically, find the maximum and minimum values of multiple current parameters in the first current data set, calculate the difference between the maximum and minimum values, and obtain the second difference.
[0098] In this embodiment, when the first current data group is obtained according to step S110... Then, find the maximum value among them. and the minimum value among them. Obtain the second difference
[0099] Step S122: Determine whether the second difference is less than the preset value.
[0100] Specifically, after obtaining the second difference, the accuracy of the current detection is judged based on the second difference and the preset value to determine whether the current detection accuracy meets the requirements. Specifically, the second difference is compared with the preset value to determine whether the second difference is less than the preset value.
[0101] In this embodiment, a second difference is obtained based on the first current data set. Then, the second difference can be determined. Is it less than the preset value A?
[0102] Step S123: If the second difference is greater than or equal to the preset value, it is determined that it is necessary to continue acquiring current data sets.
[0103] Specifically, when the second difference is greater than or equal to the preset value, it means that the accuracy of the current detection in the current detection process of the first current data set does not meet the requirements. The next current data set can be obtained to obtain more current data sets and then calculate a more accurate final current detection result.
[0104] In this embodiment, if it is determined If it is determined that it is necessary to continue acquiring current data sets, step S130 can be executed.
[0105] Step S124: If the second difference is less than the preset value, then the first current average value is determined as the final current detection result, wherein the first current average value is the average value corresponding to the first current data group.
[0106] Specifically, if the second difference is less than the preset value, it is determined that there is no need to continue acquiring current data sets, and the average value corresponding to the first current data set, i.e., the first current mean, can be directly determined as the final current detection result. When it is determined that the second difference is less than the preset value, it means that the current detection accuracy in the current detection process of the first current data set meets the requirements, and a current detection result can be directly determined based on the first current data set as the final current detection result.
[0107] In this embodiment, if it is determined Then it is determined that it is not necessary to continue acquiring current data sets. If M is used... i This represents the average value of multiple current values in each current data set. Here, we can calculate the average value corresponding to the first current data set. This yields the first average current value M1, specifically by calculating the average of the 10 current values in the first current data set. The average value M1 can be used as the final current detection result. At this point, further current detection of the infrared lamp is unnecessary, as the average value M1 is already a relatively accurate representation of the current detection result of the infrared lamp.
[0108] Step S130: If necessary, acquire the second current data set.
[0109] Specifically, when step S120 determines that it is necessary to acquire more current data based on the first current data set, a second current data set can be acquired. Specifically, during the normal operation of the infrared lamp, multiple current parameters are continuously detected to obtain a second current data set. Optionally, when step S123 determines that the second difference is greater than or equal to a preset value and it is necessary to acquire more current data, a second current data set can also be acquired.
[0110] In this embodiment, based on the above settings, when the infrared lamp is lit, a second group of 10 current values can be detected, which are respectively represented as follows: That is, the second current data group is obtained.
[0111] Step S140: Determine whether it is necessary to continue acquiring current data based on the second current data set;
[0112] Specifically, when the accuracy of current detection of infrared lamps is sufficient, it may be possible to determine the final current detection result based on a small number of sets, such as two sets of current data. Therefore, the accuracy of detection can be judged again based on the first and second sets of current data to determine whether more sets of current data are needed to determine the current detection result. Once it is determined that the current detection accuracy meets the requirements, there is no need to repeat the subsequent steps, and the final current detection result can be obtained as soon as possible, saving work time.
[0113] Optionally, step S140 may further include:
[0114] Step S141: Based on the maximum and minimum average values of the first and second current average values, obtain the third difference, where the second current average value is the average value corresponding to the second current data group.
[0115] Specifically, the first current mean is the average value corresponding to the first current data set, and the second current mean is the average value corresponding to the second current data set. There are two ways to obtain the third difference based on these two averages: one is to directly calculate the difference between the first and second current mean values as the third difference; the other is to compare the two current mean values, find the maximum and minimum mean values, and then calculate the difference between the maximum and minimum mean values as the third difference. The second method is used here to ensure that the third difference is a positive number, so that it can be directly compared with a preset value to determine whether to continue acquiring current data sets. If the first method is used, the third difference might be a negative number, then the absolute value of the third difference needs to be calculated first, and then compared with the preset value to determine whether to continue acquiring current data sets, adding an extra step.
[0116] In this embodiment, when the first current data group is obtained according to step S110... Then, the average value corresponding to the first set of current data can be calculated. That is, the first average current value M1 is obtained; when the second current data group is obtained according to step S130... Then, the average value corresponding to the second set of current data can be calculated. That is, we obtain the second average current value M2; then we find the maximum value between the first average current value M1 and the second average current value M2, and obtain the maximum average value M. max And the minimum value among them, to obtain the minimum mean M. min Then the third difference M can be obtained. max -M min .
[0117] Step S142: Determine whether the third difference is less than the preset value.
[0118] Specifically, after the third difference value is obtained, whether the current current detection accuracy meets the requirement is judged based on the third difference value and a preset value; specifically, the third difference value is compared with the preset value to judge whether the third difference value is smaller than the preset value.
[0119] In this embodiment, after the third difference value M max -M min is obtained, it can be judged whether the third difference value M max -M mim is smaller than a preset value A.
[0120] Step S143: if the third difference value is greater than or equal to the preset value, it is determined that current data groups need to be acquired continuously.
[0121] Specifically, when it is determined that the third difference value is greater than or equal to the preset value, it indicates that the current detection accuracy does not meet the requirement in the current detection process of two groups of current data groups, and it is necessary to continuously acquire a next current data group, so that after more current data groups are obtained, a more accurate final current detection result can be calculated.
[0122] In this embodiment, if it is determined that M max -M min ≥A, it is determined that current data groups need to be acquired continuously, and step S150 can be continuously executed.
[0123] Step S144: if the third difference value is smaller than the preset value, the average value of the first current average value and the second current average value is determined as a final current detection result.
[0124] Specifically, if the third difference value is smaller than the preset value, it is determined that current data groups do not need to be acquired continuously, and the average value of the first current average value and the second current average value can be determined as the final current detection result. When it is determined that the third difference value is smaller than the preset value, it indicates that the current detection accuracy meets the requirement in the current detection process of two groups of current data groups, and a current detection result can be determined based on the two groups of acquired current data groups to serve as the final current detection result.
[0125] In this embodiment, if it is determined that M max -M min <A, it is determined that current data groups do not need to be acquired continuously. If P represents the current average value of a plurality of groups of current data groups, that is, the average value corresponding to a plurality of current average values, the average value of the first current average value M1 and the second current average value M2 can be calculated here the average value P can be used as the final current detection result. Subsequently, current detection does not need to be performed on the infrared lamp any more, because compared with the average value M1 obtained in step S124, the average value P of current average values can more accurately represent the current detection result of the infrared lamp.
[0126] Step S150: If necessary, obtain a third current data set to obtain several current data sets.
[0127] Specifically, when step S140 determines that it is necessary to acquire more current data based on the first and second current data sets, a third current data set can be acquired. Specifically, during the normal operation of the infrared lamp, multiple current parameters are continuously detected to obtain a third current data set. Optionally, when step S143 determines that the third difference is greater than or equal to a preset value and it is necessary to acquire more current data, a third current data set can also be acquired.
[0128] It should be noted that after obtaining the third current data group, it meets the condition of several positive integers greater than 2 as defined in step S300. Therefore, the first, second, and third current data groups that have been obtained up to this point can be regarded as several current data groups to be obtained in step S300, specifically 3 current data groups.
[0129] In this embodiment, based on the above settings, when the infrared lamp is lit, the third group of 10 current values can be detected, which are represented as follows: That is, the third current data group was obtained.
[0130] Step S300: Obtain several current data sets, wherein several are positive integers greater than 2, and each current data set includes multiple current parameters.
[0131] Specifically, a number of positive integers greater than 2 indicates that the current detection device can acquire at least 3 sets of current data. In practical applications, the current detection device can skip steps S110-S150 and directly perform continuous detection for several rounds during the normal operation of the infrared lamp, detecting multiple current parameters in each round to obtain several sets of current data, such as 4 or 5 sets of current data. The specific number can be set according to the actual situation. After executing steps S110-S150, the current detection device can also use the first, second, and third current data groups as several current data groups to obtain three current data groups. Then, it can execute subsequent steps S400-S600, or directly execute step S700 based on the judgment result of step S600 to obtain the final current detection result, or execute step S800 based on the judgment result of step S600, return to step S300, and repeat steps S300-S600 to obtain the next current data group, i.e., the fourth current data group. This process is repeated until step S700 is executed to obtain the final current detection result.
[0132] In this embodiment, based on the above settings, after executing steps S110-S150, step S300 is executed to process the first current data set obtained when the infrared lamp is lit. Second current data group And the third current data group These are the three sets of current data acquired.
[0133] Step S400: Based on the average value corresponding to each group of current data, obtain several average current values.
[0134] Specifically, for each current data group, the average value of multiple current parameters is used to obtain a corresponding current mean value. Then, based on the several current data groups obtained in step S300, several current mean values can be obtained.
[0135] In this embodiment, based on the above settings, the first current data group is calculated respectively. The average value corresponding to j current values in the first data set, and the second current data set. The average value of j current values and the third current data group By averaging the j current values, we can obtain three current averages, which are: the first current average, the second current average, and the third current average. Second current average and the average value of the third current
[0136] In the first embodiment, after step S400, which is "obtaining several current averages based on the average value corresponding to each group of current data", the current detection method may further include:
[0137] Step A100: Obtain the fourth difference based on the maximum and minimum average values among several current average values;
[0138] Step A200: Determine whether the fourth difference is less than the preset value;
[0139] Step A300: If the fourth difference is less than the preset value, then the average value corresponding to several current average values is determined as the final current detection result;
[0140] Step A400: If the fourth difference is greater than or equal to the preset value, return to the step of obtaining several current data sets to obtain the next current data set until the fourth difference is less than the preset value, and obtain the final current detection result.
[0141] In this embodiment, based on the above settings, the maximum and minimum values are found among M1, M2, and M3 to obtain a maximum mean M. max and a minimum mean M min The fourth difference M is obtained. max -Mmin , then determining whether the fourth difference M max -M min is less than a preset value, such that when M max -M min < A, taking the average value of M1, M2 and M3 as the final current detection result; or when M max -M min ≥ A, returning to steps S300 and S400 to obtain a fourth current data set, so as to get 4 current data sets and corresponding 4 current average values, and repeating steps A100-A200 until the process ends when the condition of step A300 is satisfied.
[0142] In the first embodiment, whether the current detection accuracy requirement is satisfied is directly determined based on the difference between the maximum average value and the minimum average value among several current average values, and the process is simple and not cumbersome.
[0143] In the second embodiment, after step S400, i.e., "obtaining several current average values according to the corresponding average value of each current data set", the current detection method may further comprise:
[0144] Step S500: obtaining a first difference according to the maximum average value and the minimum average value among several current average values and the average value corresponding to the several current average values.
[0145] Optionally, step S500 may further comprise:
[0146] Step S510: obtaining a first average value according to the average value corresponding to the maximum average value and the minimum average value among several current average values;
[0147] Step S520: obtaining a second average value according to the average value corresponding to the several current average values;
[0148] Step S530: obtaining a first difference according to the difference between the first average value and the second average value.
[0149] In this embodiment, based on the above setting, according to step S510, the maximum value and the minimum value are first found out from three current average values, i.e., M1, M2 and M3, to obtain a maximum average value M max and a minimum average value M min , the average value corresponding to the maximum average value M max and the minimum average value M min is calculated to obtain the first average value then according to step S520, the average value corresponding to the three current average values, i.e., M1, M2 and M3, is calculated to obtain the second average value then according to step S530, the difference between the first average value N1 and the second average value N2 is calculated to obtain the first difference Here, N is used to represent the first difference, where N = N1-N2.
[0150] Step S600: determining whether the absolute value of the first difference is less than a preset value;
[0151] Step S700: if the absolute value of the first difference is less than the preset value, determining the average value corresponding to the plurality of current average values as a final current detection result;
[0152] Step S800: if the absolute value of the first difference is greater than or equal to the preset value, returning to the step of obtaining the plurality of current data groups to obtain a next current data group, until the absolute value of the first difference is less than the preset value, and obtaining the final current detection result.
[0153] In this embodiment, based on the above setting, after the first difference N is obtained, determining that the absolute value of the first difference N is less than a preset value A; thus, when that is, |N1-N2|<A, the average value of M1, M2 and M3, that is, the second average value obtained in step S520 is used as the final current detection result; or when that is, |N1-N2|≥A, the process returns to step S300 and step S400 to obtain a fourth current data group, obtain 4 current data groups and corresponding 4 current average values, repeat steps S510-S530 and S600, until the condition of step S700 is satisfied, the process ends and the final current detection result is obtained.
[0154] It should be noted that, in the process of returning to step S300 to obtain the (i+1)-th current data group and repeating the subsequent steps in step S800, the specific implementation manner is similar to the specific implementation manner illustrated by way of example in the foregoing embodiment, and details are not described herein again.
[0155] In the second embodiment, a first average value is obtained according to an average value corresponding to a maximum average value and a minimum average value among the plurality of current average values, a second average value is obtained according to an average value corresponding to the plurality of current average values, and then whether the current detection accuracy requirement is satisfied is determined according to a difference between the first average value and the second average value. Compared with the first embodiment, this embodiment has higher current detection accuracy and can obtain a current detection result more fitting with actual conditions.
[0156] In a third embodiment, after step S400, that is, "obtaining a plurality of current average values according to an average value corresponding to each group of current data groups", the current detection method may further comprise:
[0157] Step B100: obtaining a fourth difference according to a maximum average value and a minimum average value among the plurality of current average values;
[0158] Step B200: Based on the maximum and minimum average values among several current average values and the average value corresponding to several current average values, obtain the first difference; wherein, the first difference is the difference between the first average value and the second average value, the first average value is the average value corresponding to the maximum and minimum average values among several current average values, and the second average value is the average value corresponding to several current average values;
[0159] Step B300: Determine whether the fourth difference is less than a preset value and whether the absolute value of the first difference is less than a preset value;
[0160] Step B400: If the fourth difference is less than the preset value or the absolute value of the first difference is less than the preset value, then the average value corresponding to several current average values, i.e. the second average value, is determined as the final current detection result.
[0161] Step B500: If the fourth difference is greater than or equal to the preset value and the absolute value of the first difference is also greater than or equal to the preset value, then return to the step of obtaining several current data sets to obtain the next current data set until the fourth difference is less than the preset value or the absolute value of the first difference is less than the preset value, and then obtain the final current detection result.
[0162] The specific implementation process of this embodiment can be referred to the examples in the first and second embodiments described above. For the sake of brevity, it will not be repeated here.
[0163] In this third embodiment, the first and second embodiments described above are combined. As long as one of the conditions is met—for example, the fourth difference is less than a preset value but the absolute value of the first difference may be greater than or equal to the preset value; or the absolute value of the first difference is less than the preset value but the fourth difference may be greater than or equal to the preset value; or the fourth difference is less than the preset value and the absolute value of the first difference is also less than the preset value—the final current detection result can be determined based on the average of several current averages, i.e., the second average value. This allows for application to more diverse practical situations, improving the applicability and practicality of the current detection method.
[0164] In another embodiment, before performing the operations of "acquiring several current data groups" in step S300, "acquiring the first current data group" in step S110, "acquiring the second current data group" in step S130, "acquiring the third current data group" in step S150, or "acquiring the next current data group" in step S800, the current detection method may further include:
[0165] Step S200: Determine whether the infrared lamp is on or off, so as to detect the current parameters of the infrared lamp when it is on and obtain the corresponding current data set.
[0166] In practical applications, before acquiring a new set of current data, such as when step S800 needs to return to step S300 to acquire the (i+1)th set of current data, or when step S130 needs to acquire the second set of current data, it is possible to first determine whether the infrared lamp is still in a normal lit state. This is to obtain the current value of the infrared lamp when it is actually working, and to prevent unreasonable detection values from affecting the final current detection result.
[0167] The following detailed explanation will be based on step S200 before “acquiring several current data groups” in step S300.
[0168] Specifically, such as Figure 4 The detailed process diagram shown may include step S200 as follows:
[0169] Step S210: Generate a lighting control command and send the lighting control command to the infrared light to make the infrared light turn on;
[0170] Specifically, the current detection device can generate a light-up control command during initialization and send it to the infrared lamp to light it up and start working. For example, this is performed before step S300, or more specifically before step S110, so that the first set of current data can be obtained when the infrared lamp is lit.
[0171] Step S220: Obtain the working duration of the infrared lamp and the time for taking the current parameter value. The working duration is obtained based on the lighting duration of the infrared lamp contained in the lighting control command, and the time for taking the value is the time required to detect the current parameter once when the infrared lamp is lit.
[0172] Specifically, the lighting control command includes the lighting duration set for this command. The infrared light will turn off after the corresponding duration. This lighting duration can be set according to actual needs, so that the final current detection result can be determined directly during the process of the infrared light lighting once. It can also ensure that there is no waste of lighting, shorten the current detection efficiency of each infrared light, and thus improve the current detection efficiency of the infrared light.
[0173] In this embodiment, the illumination duration of the infrared lamp is set to T = 2s, and the obtained working duration of the infrared lamp is also T = 2s. Based on the characteristics of the programmable power supply, the time required to take 10 current values is 0.6s. Correspondingly, the time required for the current detection device to detect a current parameter once when the infrared lamp is illuminated is also the single current parameter acquisition time t = 0.06s. A set of current data includes j = 10 current parameters, and the acquisition time for one set of current data can be determined as j × t.
[0174] Step S230: Calculate the detection duration by multiplying the total amount of data of the current parameters of the infrared lamp being detected by the value taking time.
[0175] Specifically, regardless of which stage step S200 is executed, the total detection time is calculated based on the product of the total amount of data of multiple current parameters in several current data groups that the current detection device has already acquired and the time of a single detection of current parameters, i.e., the aforementioned value acquisition time.
[0176] In this embodiment, taking the acquisition of the third current data group after step S150 and before step S300 as an example, at this time, i = 3 current data groups are acquired, and each current data group has j = 10 current values. Therefore, the total amount of data for detecting the current parameters of the infrared lamp is i × j = 30. Combining this with the value acquisition time t = 0.06s obtained in step S220, the detection duration can be obtained as i × j × t = 1.8s. Alternatively, taking the acquisition of the fourth current data group after step S800, repeating step S300, as an example, to acquire i = 4 current data groups, each current data group has j = 10 current values, when the third current value of the fourth round is detected... The fourth current value Previously, the infrared light would turn off, making it impossible to obtain the fourth current value in the fourth round that meets the requirements. For subsequent current values, it's necessary to promptly activate the infrared lamp, such as by sending a second activation command, to address situations requiring more current data sets to determine the final current detection result. Of course, if the final current detection result can be obtained directly in the first, second, or third round, there's no need to send a second activation command. The infrared lamp can automatically turn off after the activation duration T=2s, eliminating the need for operator intervention and allowing for immediate current detection of the next infrared lamp after obtaining its final result.
[0177] Step S240: Compare the working time with the detection time.
[0178] Specifically, after obtaining the total detection time used in step S230, the detection time is compared with the lighting time obtained in step S210.
[0179] In this embodiment, after step S150 and before step S300, when i = 3 current data sets are acquired, the detection time is i × j × t = 1.8 s. This value is compared with the working time T = 2 s, and step S260 can be executed accordingly. However, after step S800, step S300 is repeated. During the acquisition of the i = 4th current data set, i does not actually reach 4. After detecting the 3rd current value in the 4th round, i is... The calculated detection time is Comparing this value with the working time T = 2s corresponds to executing step S260; however, after detecting the fourth current value in the fourth round, i is... The calculated detection time is Compare this value with the working time T = 2s, and step S260 needs to be executed accordingly.
[0180] Step S250: When the working time is longer than the detection time, determine that the infrared lamp is lit and execute the step of acquiring several current data groups.
[0181] Specifically, when the working time exceeds the detection time, it is determined that the infrared light is still within the lighting time required by the current lighting control command, that is, the infrared light is in the lit state, and the current parameter detection or current data group acquisition in the infrared lit state can be carried out normally afterwards.
[0182] In this embodiment, after step S150 and before step S300, when i = 3 current data sets have been acquired, the working time T = 2s is greater than the detection time of 1.8s, indicating that the infrared lamp is still lit at this time, and the current value detection under the infrared lit state can be performed normally, for example, to continue acquiring the current value in the 4th round.
[0183] Step S260: When the working time is less than or equal to the detection time, it is determined that the infrared lamp is in the off state. The process returns to generating a lighting control command and sending the lighting control command to the infrared lamp to make the infrared lamp light up. The process continues to light up the infrared lamp and executes the step of acquiring several current data groups.
[0184] Specifically, when the working time is less than or equal to the detection time, the infrared light is determined to be in an off state. If it is still necessary to continue acquiring current data sets, the current detection device needs to generate a second light-on control command and send it to the infrared light to make the infrared light light up again so as to acquire the data needed later.
[0185] In this embodiment, after step S800, step S300 is repeated. During the process of acquiring the i=4th current data group, after detecting the 3rd current value in the 4th round, the working time T=2s is greater than the detection time of 1.98s. Step S250 is then executed to detect the 4th current value in the 4th round. However, since the working time T=2s is less than the detection time of 2.04s, the infrared lamp is in an off state, and the 4th current value in the 4th round cannot be successfully acquired. At this point, step S260 is executed, whereby the current detection device generates a second light-up control command and sends it to the infrared lamp to relight it, so that the fourth current value of the fourth round can be obtained. Alternatively, reacquire the j current values from the entire fourth round to obtain the fourth current data set.
[0186]
[0187] The current detection method provided in this embodiment offers several different implementation methods. A suitable implementation method can be selected based on different practical application needs, allowing the current detection method to be applied to various working conditions. This reduces the external limitations of practical applications and makes it applicable to current detection conditions on various production lines, such as infrared lamp production lines or intelligent equipment production lines containing infrared lamps. In addition to improving the accuracy of current detection, the method also increases its practicality.
[0188] Example 3
[0189] Based on the same inventive concept, referring to Figure 5 The flowchart illustrates the first embodiment of the infrared lamp testing method of the present invention, which is applied to an infrared lamp testing device.
[0190] Infrared light testing equipment refers to terminal devices or network devices that can achieve network connectivity. Infrared light testing equipment can be terminal devices such as mobile phones, computers, tablets, portable computers, and embedded industrial control computers, or network devices such as servers and cloud platforms.
[0191] like Figure 6 The diagram shown is a hardware structure schematic of an infrared lamp testing device. The infrared lamp testing device may include: a processor 2001, such as a CPU (Central Processing Unit), a communication bus 2002, a user interface 2003, a network interface 2004, and a memory 2005.
[0192] Specifically, the communication bus 2002 is used to realize the connection and communication between these components; the user interface 2003 is used to connect to the client and communicate data with the client, and the user interface 2003 may include output units and input units; the network interface 2004 is used to connect to the backend server and communicate data with the backend server, and the network interface 2004 may include input / output interfaces; the memory 2005 is used to store various types of data, such as instructions for any application or method in the infrared lamp testing device, as well as application-related data, and the memory 2005 may be built-in memory; optionally, the memory 2005 may also be a storage device independent of the processor 2001, and so on. Figure 2 The memory 2005 may include an operating system, a network communication module, a user interface module, and an infrared lamp test program; the processor 2001 is used to call the infrared lamp test program stored in the memory 2005 and perform the following operations:
[0193] When the infrared light is turned on, acquire several current data sets, where several are positive integers greater than 2, and each current data set includes multiple current parameters.
[0194] Based on the average value corresponding to each group of current data, several current average values are obtained;
[0195] The first difference is obtained by considering the maximum and minimum average values among several current average values; or, the first difference is obtained by considering the maximum and minimum average values among several current average values and the average value corresponding to several current average values.
[0196] Determine whether the absolute value of the first difference is less than a preset value;
[0197] If the absolute value of the first difference is less than the preset value, then the average value corresponding to several current average values will be determined as the final current detection result.
[0198] The polarity test results of the infrared lamp are obtained by comparing the final current detection results with the preset threshold range.
[0199] Based on the infrared lamp testing equipment described above, the following will be combined with... Figure 5 The flowchart shown below provides a detailed description of the infrared lamp testing method in this embodiment.
[0200] When this infrared lamp testing method is specifically applied to the polarity test of an infrared lamp, the infrared lamp may include three positive pins and one negative pin, with the three positive pins interconnected.
[0201] like Figure 7The diagram shows the pinout of an infrared lamp. This lamp has four pins: pins 1, 3, and 4 are all positive pins and are interconnected; pin 2 is the negative pin. In actual production lines, during surface mount technology (SMT) assembly, infrared lamps may be incorrectly mounted (rotated 90°, 180°, 270°, etc.). When mounted incorrectly, the infrared lamp will short-circuit. The difference from its normal operating circuit is that in this case, the circuit lacks a conducting impedance, and the current may be excessive, causing polarity reversal. Therefore, it is necessary to perform polarity reversal testing on the infrared lamp by detecting its current.
[0202] The infrared lamp testing method may include the following steps:
[0203] Step S10: Perform all or part of the steps of each embodiment of the above current detection method to obtain the final current detection result of the infrared lamp;
[0204] Step S20: Compare the final current detection result with the preset threshold range to obtain the polarity test result of the infrared lamp.
[0205] In one implementation, step S20 may include:
[0206] Step S21: Determine whether the final current detection result is within the preset threshold range;
[0207] Step S22: If the final current detection result is within the preset threshold range, the polarity test of the infrared lamp is deemed to have passed, indicating that the infrared lamp is a good product.
[0208] Step S23: If the final current detection result is not within the preset threshold range, the polarity test of the infrared lamp is determined to be unsuccessful, indicating that the infrared lamp is a defective product and the infrared lamp may have the patch reversed.
[0209] The preset threshold range can be set according to actual needs and is not limited here. After obtaining the final current detection result according to any specific implementation of Embodiment 1 or Embodiment 2, the final current detection result is compared with the preset threshold range to determine whether the infrared lamp has polarity issues, and defective products are intercepted in time to prevent them from flowing into the next process.
[0210] The infrared lamp testing method in this embodiment improves the accuracy of infrared lamp current detection based on the aforementioned current detection method, and also enhances the accuracy of infrared lamp polarity testing, reducing testing errors and preventing defective products that fail polarity testing from proceeding to the next process. Furthermore, this infrared lamp testing method can be implemented simply by modifying the testing program on existing production line equipment, without requiring additional measuring instruments, thus saving hardware costs and demonstrating high practicality.
[0211] It should be noted that the specific implementation of the current detection method in step S10 can refer to the above embodiment one or embodiment two. Since the infrared lamp testing method of this embodiment adopts all the technical solutions of all the above embodiments of the current detection method, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, and will not be described in detail here.
[0212] Example 4
[0213] Based on the same inventive concept, referring to Figure 2 The hardware structure diagram shows that this embodiment provides a current detection device, which may include a processor and a memory. The memory stores a current detection program. When the current detection program is executed by the processor, it implements all or part of the steps of the various embodiments of the current detection method of the present invention.
[0214] Specifically, current detection equipment refers to terminal devices or network devices that can achieve network connectivity. These can be terminal devices such as mobile phones, computers, tablets, portable computers, and embedded industrial control computers, or network devices such as servers and cloud platforms.
[0215] It is understandable that current sensing devices may also include communication buses, user interfaces, and network interfaces. The communication bus is used to connect and communicate between these components; the user interface is used to connect to the client and communicate data with the client. The user interface may include output units such as a display screen and speakers, and input units such as a keyboard and microphone; the network interface is used to connect to the backend server and communicate data with the backend server. The network interface may include input / output interfaces, such as standard wired interfaces and wireless interfaces such as Wi-Fi interfaces; the memory is used to store various types of data. This data may include, for example, instructions for any application or method in the current detection device, as well as application-related data. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Random Access Memory (RAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), and Programmable Read-Only Memory (PROM). The memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk, etc.; optionally, the memory can also be a storage device independent of the processor; the processor is used to call the current detection program stored in the memory and execute the current detection method as described above. The processor can be an application-specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components, used to execute all or part of the steps of the various embodiments of the current detection method described above.
[0216] It needs to be explained that, Figure 2The hardware structure shown does not constitute a limitation on the current detection device of the present invention. It may include more or fewer components than shown, or combine certain components, or have different component arrangements. It should also be noted that the functions and corresponding technical effects achieved by the current detection device provided in this embodiment can be referred to the description of the specific implementation methods in the various embodiments of the current detection method of the present invention. For the sake of brevity, they will not be repeated here.
[0217] Example 5
[0218] Based on the same inventive concept, referring to Figure 6 The hardware structure diagram shows that this embodiment provides an infrared lamp testing device, which may include a processor and a memory. The memory stores an infrared lamp testing program. When the processor executes the infrared lamp testing program, it implements all or part of the steps of various embodiments of the infrared lamp testing method of the present invention.
[0219] Specifically, infrared lamp testing equipment refers to terminal devices or network devices that can achieve network connectivity. These can be terminal devices such as mobile phones, computers, tablets, portable computers, and embedded industrial control computers, or network devices such as servers and cloud platforms.
[0220] It is understood that infrared lamp testing equipment may also include a communication bus, a user interface, and a network interface. The communication bus is used to establish communication between these components; the user interface connects to clients and communicates with them, and may include output units such as displays and speakers, and input units such as keyboards and microphones; the network interface connects to a backend server and communicates with it, and may include input / output interfaces such as standard wired interfaces and wireless interfaces such as Wi-Fi interfaces; the memory stores various types of data, which may include instructions for any application or method in the infrared lamp testing equipment, as well as application-related data. The memory can be implemented using any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM) or random access memory (RAM). The memory may be an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a disk, or an optical disk, etc.; optionally, the memory may also be a storage device independent of the processor; the processor is used to call the infrared lamp test program stored in the memory and execute the infrared lamp test method as described above. The processor may be an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field-programmable gate array (FPGA), a controller, a microcontroller, a microprocessor, or other electronic components, used to execute all or part of the steps of the various embodiments of the infrared lamp test method described above.
[0221] It needs to be explained that, Figure 6 The hardware structure shown does not constitute a limitation on the infrared lamp testing device of the present invention. It may include more or fewer components than shown, or combine certain components, or have different component arrangements. It should also be noted that the functions and corresponding technical effects achieved by the infrared lamp testing device provided in this embodiment can be referred to the description of the specific implementation methods in the various embodiments of the infrared lamp testing method of the present invention. For the sake of brevity, they will not be repeated here.
[0222] Example 6
[0223] Based on the same inventive concept, this embodiment provides a computer-readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, disk, optical disk, server, etc. The storage medium stores a computer program, which can be executed by one or more processors. When the computer program is executed by the processor, it can implement all or part of the steps of the various embodiments of the current detection method of the present invention or all or part of the steps of the various embodiments of the infrared lamp testing method of the present invention.
[0224] It should be noted that the sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. The above embodiments are only optional embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made under the inventive concept of the present invention using the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are all included within the patent protection scope of the present invention.
Claims
1. A current detection method, characterized in that, include: When the infrared lamp is lit, several current data sets are acquired, wherein the several are positive integers greater than 2, and each current data set includes multiple current parameters, wherein the current parameters are the corresponding current values detected at multiple times within a time period when the infrared lamp is lit. Based on the average value corresponding to each group of current data, several current average values are obtained; A first difference is obtained based on the maximum and minimum average values among the plurality of current average values; or, a first average value is obtained based on the average value corresponding to the maximum and minimum average values among the plurality of current average values, wherein the first average value is the average value of the maximum and minimum average values among the plurality of current average values; a second average value is obtained based on the average value corresponding to the plurality of current average values; and a first difference value is obtained based on the difference between the first average value and the second average value. Determine whether the absolute value of the first difference is less than a preset value; If the absolute value of the first difference is less than the preset value, then the average value corresponding to the plurality of current average values is determined as the final current detection result; If the absolute value of the first difference is greater than or equal to the preset value, the process returns to the step of obtaining several current data sets to obtain the next current data set until the absolute value of the first difference is less than the preset value, at which point the final current detection result of the infrared lamp is obtained. Before the step of acquiring several sets of current data, the current detection method further includes: Generate a lighting control command and send the lighting control command to the infrared light to make the infrared light light up; The working duration of the infrared lamp and the time for taking the value of the current parameter are obtained, wherein the working duration is obtained based on the lighting duration of the infrared lamp contained in the lighting control command, and the time for taking the value is the time required to detect the current parameter once when the infrared lamp is lit. The detection duration is obtained by multiplying the total amount of data of the current parameter of the infrared lamp being detected by the value taking time. Compare the working time with the detection time; When the working time is longer than the detection time, it is determined that the infrared lamp is lit, and the step of acquiring several current data groups is executed. When the working time is less than or equal to the detection time, it is determined that the infrared lamp is in an off state. The step of generating a lighting control command and sending the lighting control command to the infrared lamp to make the infrared lamp light up is performed to continue to light up the infrared lamp and to execute the step of acquiring several current data groups.
2. The current detection method as described in claim 1, characterized in that, Before the step of acquiring several sets of current data, the current detection method further includes: When the infrared light is turned on, acquire the first current data set; Determine whether it is necessary to acquire more current data groups based on the first current data group; If necessary, obtain a second current data set; Determine whether it is necessary to continue acquiring current data based on the second current data set; If necessary, a third current data group is obtained to obtain the plurality of current data groups.
3. The current detection method as described in claim 2, characterized in that, The step of determining whether to continue acquiring current data sets based on the first current data set includes: The second difference is obtained based on the maximum and minimum values in the first current data set; Determine whether the second difference is less than the preset value; If the second difference is greater than or equal to the preset value, it is determined that it is necessary to continue acquiring current data sets; If the second difference is less than the preset value, then the first current average value is determined as the final current detection result, wherein the first current average value is the average value corresponding to the first current data group.
4. The current detection method as described in claim 3, characterized in that, The step of determining whether to continue acquiring current data groups based on the second current data group includes: The third difference is obtained based on the maximum and minimum average values of the first and second current average values, wherein the second current average value is the average value corresponding to the second current data group. Determine whether the third difference is less than the preset value; If the third difference is greater than or equal to the preset value, it is determined that it is necessary to continue acquiring current data sets. If the third difference is less than the preset value, then the average value of the first current mean and the second current mean is determined as the final current detection result.
5. A method for testing infrared lamps, characterized in that, The infrared lamp includes three positive pins and one negative pin, and the three positive pins are interconnected. The infrared lamp testing method includes: The final current detection result of the infrared lamp is obtained by performing the current detection method as described in any one of claims 1 to 4; The polarity test result of the infrared lamp is obtained by comparing the final current detection result with the preset threshold range.
6. A current detection device, characterized in that, The current detection device includes a processor and a memory, the memory storing a current detection program, which, when executed by the processor, implements the current detection method as described in any one of claims 1 to 4.
7. An infrared lamp testing device, characterized in that, The infrared lamp testing device includes a processor and a memory. The memory stores an infrared lamp testing program. When the processor executes the infrared lamp testing program, it implements the infrared lamp testing method as described in claim 5.
8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by one or more processors, implements the current detection method as described in any one of claims 1 to 4 or the infrared lamp testing method as described in claim 6.
Citation Information
Patent Citations
Motor current sampling method and motor control method and device
CN109061271A
Grounding arc fault detection method for power distribution system
CN113702755A
Repeater state monitoring method and device
CN114019214A
Meter for measuring an electrical parameter
US20200096544A1