Electronic component testing method, testing equipment and smart lock
A method and device for testing the effectiveness of sound and light devices in smart locks by comparing current values of components in smart locks by using a device for testing the effectiveness of sound and light devices in smart locks by using a device for solving the technical problem of existing technologies that have not effectively addressed the effectiveness of sound and light devices in smart locks.
Patent Information
- Application Number
- CN202111332493.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-11
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2041-11-11
AI Technical Summary
Traditional electronic smart lock testing methods cannot effectively assess the effectiveness of sound and light devices, leading to undetected abnormalities that compromise safety performance.
A method and device for testing electronic components in smart locks by comparing current values of components under test with calibrated components, using thresholds to determine proper and effective functioning, and outputting results on a display.
Accurately identifies normal and effective functioning of sound and light devices in smart locks, ensuring safety and reliability by detecting abnormalities beyond mere operation.
Smart Images

Figure CN114137334B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic component testing, and in particular to an electronic component testing method, testing equipment and a smart lock. Background Art
[0002] Compared with traditional mechanical locks, electronic smart locks have introduced a variety of identification methods, the most common of which include magnetic cards, fingerprints, passwords, and face recognition. For electronic smart locks, it is necessary to set up light-emitting devices and / or sound-emitting devices to prompt the opening and closing and operating status of the lock body. During the use of electronic smart locks, if the relevant sound and light devices fail, it will affect the user's judgment of the state of the lock body and reduce the safety performance of the lock body. Therefore, a test program is usually set up in the electronic smart lock to test whether the functions of the sound and light devices are normal. For example, by testing whether there is current in the sound and light devices, it is determined whether the sound and light devices can work normally, that is, whether the sound device can make a sound and whether the light device can light up. However, the effectiveness of its work cannot be further identified. For example, the decibel of the sound emitted by the sound device is too large or too small, there are noises, popping sounds, etc.; the brightness of the light emitted by the light-emitting device is too low or too high. In other words, the traditional test program can only test whether the sound and light devices are working, but cannot test the effectiveness of the work, resulting in some abnormal devices in the electronic smart lock cannot be quickly and timely identified. Summary of the invention
[0003] One of the purposes of the present invention is to provide an electronic component testing method for testing the working status of components in a smart lock.
[0004] In order to achieve the above object, in a first aspect, the present invention provides an electronic component testing method, comprising:
[0005] Step S11, sending instructions to components to put the components into working state;
[0006] Step S12: Collect the current value I of the component to be tested when executing the instruction i , collect the current value P of the calibration component of the same model as the component to be tested and which can work effectively when executing the instruction i , 0<i≤t, t is the time from when the instruction is issued to when the collected current value is 0;
[0007] Step S13, calculation I i With P i The ratio A i , Statistics | A i -1|>the number m of D, where D is a preset first threshold;
[0008] Step S14: Analyze the working status of the components to be tested.
[0009] If A i =0, then the information that the component under test fails to work properly is output.
[0010] If m>n, then the information that the component under test fails to work effectively is output, and n is the second threshold value.
[0011] If m≤n, the information that the component under test can work effectively is output.
[0012] In order to achieve the above object, in a second aspect, the present invention provides another electronic component testing method, comprising:
[0013] Step S21, sending instructions to components to put the components into working state;
[0014] Step S22: Collect the current value I of the component to be tested when executing the instruction i , collecting the current value of the calibration component of the same model as the component to be tested and which can work effectively when executing the instruction, 0<i≤t, t is the time from the issuance of the instruction to the time when the collected current value is 0;
[0015] Step S23, calculation I i With P i The ratio A i ,I i+j With P i The ratio A i+j , and count |A i -1|>the number of D m, |A i+j -1|>the number of D m j , D is the preset first threshold, 0<j≤t;
[0016] Step S24: Analyze the working status of the components to be tested.
[0017] If A i =0, then the information that the component under test fails to work properly is output;
[0018] If m≤n, then output the information that the component under test can work effectively, and n is the second threshold value;
[0019] After traversing all values of j, if there exists m>n and m j ≤n, then the information that the component under test can work effectively is output; otherwise, the information that the component under test cannot work effectively is output.
[0020] In order to achieve the above object, in a third aspect, the present invention provides a testing device for testing the working state of a component, comprising:
[0021] A control module is used to send instructions to components to make them operate;
[0022] Data acquisition module, used to collect the current value I flowing through the components to be tested i and the current value P flowing through the calibration component of the same model as the component to be tested and which can work effectively when executing the instruction i , where 0<i≤t, t is the time from when the instruction is issued to when the collected current value is 0;
[0023] Data calculation module, used to calculate I i With P i The ratio A i , and count |A i -1|>the number m of D, where D is a preset first threshold;
[0024] Data analysis module, used to analyze the working status of the components under test. i If both are 0, information that the component under test fails to work normally is output; if m>n, information that the component under test fails to work effectively is output; if m≤n, information that the component under test can work effectively is output, wherein n is the second threshold value.
[0025] In order to achieve the above-mentioned object, in a fourth aspect, the present invention provides another testing device for testing the working state of a component, comprising:
[0026] A control module is used to send instructions to components to make them operate;
[0027] Data acquisition module, used to collect the current value I flowing through the components to be tested i and the current value P flowing through the calibration component of the same model as the component to be tested and which can work effectively when executing the instruction i , where 0<i≤t, t is the time from when the instruction is issued to when the collected current value is 0;
[0028] Data calculation module, used to calculate I i With P i The ratio A i ,I i+j With P i The ratio A i+j , and count |A i -1|>the number of D m, |A i+j -1|>the number of D m j , D is the preset first threshold, 0<j≤t;
[0029] Data analysis module, used to analyze the working status of the components under test,
[0030] If A i =0, then the information that the component under test fails to work properly is output;
[0031] If m≤n, then output the information that the component under test can work effectively, and n is the second threshold value;
[0032] After traversing all values of j, if there exists m>n and m j ≤n, then the information that the component under test can work effectively is output; otherwise, the information that the component under test cannot work effectively is output.
[0033] In order to achieve the above-mentioned object, in a fifth aspect, the present invention provides a smart lock that can test its own components, including:
[0034] Components, including sound-generating devices and / or light-emitting devices;
[0035] A control module, used for sending instructions to the components to make the components operate;
[0036] A data acquisition module is used to collect the current value I flowing through the component when executing the instruction. i The data acquisition module stores current calibration data, which is the current value P of the calibration component of the same model as the component and which can work effectively when executing the instruction. i , where 0<i≤t, t is the time from when the instruction is issued to when the collected current value is 0;
[0037] Data calculation module, used to calculate I i With P i The ratio A i ,I i+j With P i The ratio A i+j , and count |A i -1|>the number of D m, |A i+j -1|>the number of D m j , D is the preset first threshold, 0<j≤t;
[0038] A data analysis module is used to analyze the working status of the components.
[0039] If m≤n, then output information that the component can work effectively, and n is a second threshold;
[0040] After traversing all values of j, if there exists m>n and m j ≤n, then the information that the component under test can work effectively is output; otherwise, the information that the component under test cannot work effectively is output.
[0041] Preferably, the component is also used to output information that the component fails to work effectively and information that the component can work effectively.
[0042] Preferably, it also includes: an output module, used for outputting the working status of the components.
[0043] According to the above description and practice, the electronic component testing method of the present invention collects the current data of the component under test when executing the preset instruction, and compares it with the current data of the calibration component when executing the preset instruction, and judges the working state of the component under test by analyzing the difference between the two. It can be obtained whether the component under test can work normally, and whether the component under test can work effectively. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 This is a flow chart of the electronic component testing method involved in Embodiment 1 of the present invention.
[0045] Figure 2 This is a flow chart of the electronic component testing method involved in the second embodiment of the present invention. DETAILED DESCRIPTION
[0046] The exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and fully convey the concepts of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0047] Embodiment 1
[0048] like Figure 1 In this embodiment, a method for testing electronic components is provided, comprising the following steps:
[0049] Step S11: Send instructions to components to put the components into working state.
[0050] There are various components included in the smart lock. In this embodiment, a sound-emitting device and a light-emitting device are taken as examples to describe the electronic component testing method.
[0051] The components in this step include the components to be tested and the calibration components of the same model as the components to be tested and which can work effectively. In other words, in this step, the above instructions are sent to two components in total. Among them, the components of the same model as the components to be tested and which can work effectively are used as calibration components to assist in testing the working status of the components to be tested.
[0052] When testing a sound-generating device, the instruction may be to instruct the sound-generating device to play a preset audio, which may be selected as the test audio according to actual test requirements. When the sound-generating device under test is abnormal, the current values at each moment when it plays the test audio are different from the current values at each moment when the calibrated sound-generating device plays the test audio. Therefore, the working state of the sound-generating device under test can be determined by comparing the current flowing through the sound-generating device under test with the current flowing through the calibrated sound-generating device.
[0053] When testing a light-emitting device, the instruction may be to apply a voltage with a preset frequency of change to the light-emitting device. For example, a voltage that gradually increases from low to high is applied to the light-emitting device, wherein the lowest value of the voltage should not be greater than the lowest operating voltage of the light-emitting device, and the highest value of the voltage should not be less than the highest operating voltage of the light-emitting device. When the applied voltage increases from the lowest operating voltage to the highest operating voltage of the light-emitting device, its luminous intensity also gradually increases, and accordingly, the current flowing through the light-emitting device also changes. When the light-emitting device to be tested is abnormal, its current values at each moment are not exactly the same as the current values of the calibrated light-emitting device at each moment, so the working state of the light-emitting device to be tested can be judged by comparing the current flowing through the light-emitting device to be tested with the current flowing through the calibrated light-emitting device.
[0054] Step S12: Collect the current value I of the component to be tested when executing the above instruction i , collect the current value P of the calibration components when executing the above instructions i , wherein 0<i≤t, t is the time from when the instruction is issued to when the collected current value is 0.
[0055] Among them I i is the current value flowing through the component under test at time i; P i is the current value flowing through the calibration component at time i. i is any value between 0 and t. In actual testing, several time points can be taken at equal intervals between 0 and t for subsequent calculation.
[0056] When the components and current data are collected normally, when testing a sound-emitting device, t is the time required for the sound-emitting device to play the test audio; when testing a light-emitting device, t is the time consumed to apply a voltage with a preset changing frequency.
[0057] Step S13, calculation I i With P i The ratio A i , Statistics | A i -1|>D number m, D is a preset first threshold.
[0058] By calculating I i With P i The ratio Ai , and calculate |A i -1|, the difference between the current value flowing through the component under test and the current value flowing through the calibration component at time i can be obtained. D can be any value less than 1. i -1|>D, it means that the current value flowing through the component under test at time i is significantly different from the current value flowing through the calibration component, that is, the function of the component under test at this moment is abnormal. By counting the value of m, we can know the number of times the component under test has abnormal function when executing the above instructions.
[0059] Step S14: Analyze the working status of the components to be tested, specifically referring to the following method for analysis:
[0060] If A i =0, then the information that the component under test fails to work properly is output. i =0 means that the current flowing through the component under test at each moment is 0. In other words, the component under test is damaged and cannot work normally.
[0061] If m>n, the information that the component under test fails to work effectively is output, and n is the second threshold value, which can be set according to the actual situation. When m>n, it means that the component under test has a large number of functional abnormalities, which has exceeded the preset second threshold value, that is, the component under test cannot work effectively. Specifically, for a light-emitting device, its light intensity may be abnormal; for a sound-emitting device, its sound intensity may be abnormal.
[0062] If m≤n, then information that the component under test can work effectively is outputted. At this time, although the component under test may have functional abnormalities, the number of occurrences is small and lower than the preset second threshold, so it can be determined that the component under test can work effectively.
[0063] The following is a test sample of a loudspeaker as a sound-generating device, and the above test method is executed. As shown in Table 1, when the calibrated loudspeaker and the loudspeaker to be tested are playing preset audio, the time consumed for collecting current data is 850 milliseconds, and i is taken from 0-850 milliseconds at intervals of 50 milliseconds. Accordingly, the current values at each moment are shown in Table 1.
[0064] Table 1:
[0065]
[0066]
[0067] In this test, the first threshold D is 0.1, and the second threshold n is 5. Combining the data in Table 1, it can be concluded that |A i -1|>The number of D m=3. Since m<n, the speaker to be tested can work effectively.
[0068] In this embodiment, a testing device is provided for executing the electronic component testing method. The testing device includes a control module, a data acquisition module, a data calculation module and a data analysis module.
[0069] The control module is used to send instructions to the components to make them run. The control module can be implemented by a programmable logic controller. When testing, preset instructions can be sent to the components to be tested and the calibrated components to make them run.
[0070] The data acquisition module can use an ammeter to collect the current value I flowing through the components to be tested. i and the current value P flowing through the calibration components i , wherein 0<i≤t, t is the time from when the instruction is issued to when the collected current value is 0.
[0071] The data calculation module can use an electronic calculator to calculate I i With P i The ratio A i , and count |A i -1|>the number m of D, wherein D is a preset first threshold. During the test, the data calculation module can receive the information collected by the data collection module to perform calculations.
[0072] The data analysis module can use a computing device with logic analysis function, such as a computer, calculator, mobile phone and other devices. After receiving the information from the data calculation module, the working status of the components to be tested is analyzed. Specifically, if A i If both are 0, information that the component under test fails to work normally is output; if m>n, information that the component under test fails to work effectively is output; if m≤n, information that the component under test can work effectively is output, where n is the second threshold value.
[0073] In addition, in this embodiment, a smart lock is also disclosed, which can test its own components in combination with the above electronic component testing method. The smart lock includes: components, a control module, a data acquisition module, a data calculation module and a data analysis module.
[0074] Among them, the components include sound-emitting devices and / or light-emitting devices, such as speakers and indicator lights on smart locks, which can play audio or emit light when in use.
[0075] The control module is used to send instructions to the above-mentioned sound-generating device and / or light-emitting device to make them operate. The control module can be implemented by a programmable logic controller. When testing, a preset instruction can be sent to the sound-generating device and / or light-emitting device to be tested to make them enter the operating state.
[0076] The data acquisition module can use an ammeter to collect the current value Ii flowing through the component to be tested. In addition, the data acquisition module also stores current calibration data, which is the current value P flowing through the calibration component of the same model as the above component and which can work effectively when executing the above instruction. i , wherein 0<i≤t, t is the time from when the instruction is issued to when the collected current value is 0.
[0077] The data calculation module can use an electronic calculator to calculate I i With P i The ratio A i , and count |A i -1|>the number m of D, wherein D is a preset first threshold. During the test, the data calculation module can receive the information collected by the data collection module to perform calculations.
[0078] The data analysis module can use a computing device with logic analysis function, such as a computer, calculator, mobile phone and other devices. After receiving the information from the data calculation module, the working status of the components to be tested is analyzed. Specifically, if A i If both are 0, information that the component under test fails to work normally is output; if m>n, information that the component under test fails to work effectively is output; if m≤n, information that the component under test can work effectively is output, where n is the second threshold value.
[0079] In the smart lock, the above components can also be used to output the above “information that the components fail to work effectively” and “information that the components can work effectively”. For example, when the test result is “information that the components fail to work effectively”, the light emitting device emits a light of a preset color and / or the sound emitting device emits a preset audio; when the test result is “information that the components can work effectively”, the light emitting device emits a light of another preset color and / or the sound emitting device emits another preset audio.
[0080] In addition, an output module may be provided in the smart lock, such as a display screen, for outputting the working status of the above components. For example, "the tested component fails to work properly", "information that the tested component can work effectively", "information that the tested component fails to work effectively" may be displayed on the display screen.
[0081] It should be noted that in the above-mentioned smart lock and test device, the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0082] Embodiment 2
[0083] like Figure 2 In this embodiment, a method for testing electronic components is provided, comprising the following steps:
[0084] Step S21: Send instructions to components to put the components into working state.
[0085] There are various components included in the smart lock. In this embodiment, a sound-emitting device and a light-emitting device are taken as examples to describe the electronic component testing method.
[0086] The components in this step include the components to be tested and the calibration components of the same model as the components to be tested and which can work effectively. In other words, in this step, the above instructions are sent to two components in total. Among them, the components of the same model as the components to be tested and which can work effectively are used as calibration components to assist in testing the working status of the components to be tested.
[0087] When testing a sound-generating device, the instruction may be to instruct the sound-generating device to play a preset audio, which may be selected as the test audio according to actual test requirements. When the sound-generating device under test is abnormal, the current values at each moment when it plays the test audio are different from the current values at each moment when the calibrated sound-generating device plays the test audio. Therefore, the working state of the sound-generating device under test can be determined by comparing the current flowing through the sound-generating device under test with the current flowing through the calibrated sound-generating device.
[0088] When testing a light-emitting device, the instruction may be to apply a voltage with a preset frequency of change to the light-emitting device. For example, a voltage that gradually increases from low to high is applied to the light-emitting device, wherein the lowest value of the voltage should not be greater than the lowest operating voltage of the light-emitting device, and the highest value of the voltage should not be less than the highest operating voltage of the light-emitting device. When the applied voltage increases from the lowest operating voltage to the highest operating voltage of the light-emitting device, its luminous intensity also gradually increases, and accordingly, the current flowing through the light-emitting device also changes. When the light-emitting device to be tested is abnormal, its current values at each moment are not exactly the same as the current values of the calibrated light-emitting device at each moment, so the working state of the light-emitting device to be tested can be judged by comparing the current flowing through the light-emitting device to be tested with the current flowing through the calibrated light-emitting device.
[0089] Step S22: Collect the current value I of the component to be tested when executing the above instruction i , collect the current value P of the calibration components when executing the above instructions i , wherein 0<i≤t, t is the time from when the instruction is issued to when the collected current value is 0, wherein 0<i≤t, t is the time from when the instruction is issued to when the collected current value is 0.
[0090] Among them I i is the current value flowing through the component under test at time i; P i is the current value flowing through the calibration component at time i. i is any value between 0 and t. In actual testing, several time points can be taken at equal intervals between 0 and t for subsequent calculation.
[0091] When the components and current data are collected normally, when testing a sound-emitting device, t is the time required for the sound-emitting device to play the test audio; when testing a light-emitting device, t is the time consumed to apply a voltage with a preset changing frequency.
[0092] Step S23, calculation I i With P i The ratio A i ,I i+j With P i The ratio A i+j , Statistics | A i -1|>the number of D m, |A i+j -1|>the number of D m j , D is the preset first threshold, 0<j≤t.
[0093] By calculating I i With P i The ratio A i , and calculate |A i -1|, the difference between the current value flowing through the component under test and the current value flowing through the calibration component at time i can be obtained. D can be any value less than 1. i -1|>D, it means that the current value flowing through the component under test at time i is significantly different from the current value flowing through the calibration component, that is, the function of the component under test at this moment is abnormal. By counting the value of m, we can know the number of times the component under test has abnormal function when executing the above instructions.
[0094] In some test processes, the timestamp of the collected current values may be offset. For example, the current data collected at time i is actually the current data at time i+j. Therefore, the above I i+j With P i The ratio A i+jand Statistics | A i+j -1|>the number of D m j , which is convenient for accurately analyzing the working status of the components to be tested. In the specific test process, j can be set to a number of fixed values, such as ±50ms, ±100ms.
[0095] Step S24: Analyze the working status of the components to be tested, specifically referring to the following method for analysis:
[0096] If A i =0, then the information that the component under test fails to work properly is output. i =0 means that the current flowing through the component under test at each moment is 0. In other words, the component under test is damaged and cannot work normally.
[0097] If m≤n, then the information that the component under test can work effectively is output. n is the second threshold value, which can be set according to the actual situation. At this time, although the component under test has functional abnormalities, the number of occurrences is small and does not exceed the preset second threshold value, so it can be determined that the component under test can work effectively.
[0098] After traversing all values of j, if there exists m>n and m j ≤n, then output information that the component under test can work effectively. At this time, although the number of functional abnormalities of the component under test exceeds the preset second threshold, after the detection data is time-shifted, the number of functional abnormalities does not exceed the preset second threshold, so it can be determined that the component under test can work effectively.
[0099] After traversing all the values of j, if m>n and m j >n, then the information that the component under test fails to work effectively is output. This indicates that the number of times the component under test has functional abnormalities exceeds the preset second threshold, and the number of times the functional abnormalities occur after time shift still exceeds the preset second threshold, that is, the component under test cannot work effectively. Specifically, for a light-emitting device, its light intensity may be abnormal; for a sound-emitting device, its sound intensity may be abnormal.
[0100] The following is a test sample of a loudspeaker as a sound-generating device, and the above test method is executed. As shown in Table 2, when the calibrated speaker and the speaker to be tested are playing preset audio, the time for collecting the current data flowing through the calibrated speaker is 850ms, and the time for collecting the current data flowing through the speaker to be tested is 950ms. i takes values from 0-950 milliseconds at intervals of 50 milliseconds, and j takes values of 50ms and 100ms. Correspondingly, the current values at each moment are shown in Table 2.
[0101] Table 2:
[0102]
[0103] In this test, the first threshold D is 0.1, and the second threshold n is 5. Combining the data in Table 2, it can be concluded that |A i -1|>the number of D m=15,|A i+50 -1|>the number of D m 50 =15,|A i+100 -1|>the number of D m 100 =3, since m>n and m 100 <n, so the speaker under test can work effectively.
[0104] In this embodiment, a testing device is provided for executing the electronic component testing method. The testing device includes a control module, a data acquisition module, a data calculation module and a data analysis module.
[0105] The control module is used to send instructions to the components to make them run. The control module can be implemented by a programmable logic controller. When testing, preset instructions can be sent to the components to be tested and the calibrated components to make them run.
[0106] The data acquisition module can use an ammeter to collect the current value I flowing through the components to be tested. i and the current value P flowing through the calibration components i , wherein 0<i≤t, t is the time from when the instruction is issued to when the collected current value is 0.
[0107] The data calculation module can use an electronic calculator to calculate I i With P i The ratio A i ,I i+j With P i The ratio A i+j , and count |A i -1|>the number of D m, |A i+j -1|>the number of D m j , where D is a preset first threshold, 0<j≤t. During the test, the data calculation module can receive the information collected by the data collection module to perform calculations.
[0108] The data analysis module can use a computing device with logic analysis function, such as a computer, calculator, mobile phone and other devices. After receiving the information from the data calculation module, the working status of the components to be tested is analyzed. Specifically, if A i =0, then output the information that the component under test fails to work properly; if m≤n, then output the information that the component under test can work effectively, n is the second threshold; after traversing each value of j, if there is m>n and mj ≤n, then the information that the component under test can work effectively is output; otherwise, the information that the component under test cannot work effectively is output.
[0109] In addition, in this embodiment, a smart lock is also disclosed, which can test its own components in combination with the above electronic component testing method. The smart lock includes: components, a control module, a data acquisition module, a data calculation module and a data analysis module.
[0110] Among them, the components include sound-emitting devices and / or light-emitting devices, such as speakers and indicator lights on smart locks, which can play audio or emit light when in use.
[0111] The control module is used to send instructions to the above-mentioned sound-generating device and / or light-emitting device to make them operate. The control module can be implemented by a programmable logic controller. When testing, a preset instruction can be sent to the sound-generating device and / or light-emitting device to be tested to make them enter the operating state.
[0112] The data acquisition module can use an ammeter to collect the current value I flowing through the components to be tested. i In addition, the data acquisition module also stores current calibration data, which is the current value P flowing through the calibration component of the same model as the above-mentioned component and which can work effectively when executing the above-mentioned instruction. i , wherein 0<i≤t, t is the time from when the instruction is issued to when the collected current value is 0.
[0113] The data calculation module can use an electronic calculator to calculate I i With P i The ratio A i ,I i+j With P i The ratio A i+j , and count |A i -1|>the number of D m, |A i+j -1|>the number of D m j , D is a preset first threshold, 0<j≤t. During the test, the data calculation module can receive the information collected by the data collection module to perform calculations.
[0114] The data analysis module can use a computing device with logic analysis function, such as a computer, calculator, mobile phone and other devices. After receiving the information from the data calculation module, analyze the working status of the component to be tested. Specifically, if m≤n, then output the information that the component can work effectively, n is the second threshold; after traversing each value of j, if there is m>n and m j≤n, then the information that the tested component can work effectively is output, otherwise the information that the tested component cannot work effectively is output. i =0, it means that the tested components of the smart lock are damaged and cannot operate.
[0115] In the smart lock, the above components can also be used to output the above “information that the components fail to work effectively” and “information that the components can work effectively”. For example, when the test result is “information that the components fail to work effectively”, the light emitting device emits a light of a preset color and / or the sound emitting device emits a preset audio; when the test result is “information that the components can work effectively”, the light emitting device emits a light of another preset color and / or the sound emitting device emits another preset audio.
[0116] In addition, an output module may be provided in the smart lock, such as a display screen, for outputting the working status of the above components. For example, "the tested component fails to work properly", "information that the tested component can work effectively", "information that the tested component fails to work effectively" may be displayed on the display screen.
[0117] It should be noted that in the above-mentioned smart lock and test device, the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0118] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0119] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, the embodiments should be regarded as exemplary and non-limiting from all points of view, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention, and any reference numerals in the claims should not be regarded as limiting the claims involved.
Claims
1. A method for testing electronic components, It is characterized in that Step S21, sending instructions to components to put the components into working state; when the components are light-emitting devices, the instructions are to apply a voltage with a preset changing frequency to the light-emitting devices; when the components are sound-emitting devices, the instructions are to make the sound-emitting devices play preset audio; Step S22: Collect the current value I of the component to be tested when executing the instruction i , collect the current value P of the calibration component of the same model as the component to be tested and which can work effectively when executing the instruction i , 0<i≤t, t is the time from when the instruction is issued to when the collected current value is 0; Step S23, calculation I i With P i The ratio A i ,I i+j With P i The ratio A i+j , and count |A i -1|>the number of D m, |A i+j -1|>the number of D m j , D is a preset first threshold, 0<j≤t, and the value of j includes ±50ms and ±100ms; Step S24: Analyze the working status of the components to be tested. If A i =0, then the information that the component under test fails to work properly is output; If m≤n, then output the information that the component under test can work effectively, and n is the second threshold value; After traversing all values of j, if there exists m>n and m j ≤n, then the information that the component under test can work effectively is output; otherwise, the information that the component under test cannot work effectively is output.
2. A test device used to test the working status of components. It is characterized in that include: A control module is used to send instructions to components to make them operate; When the component is a light-emitting device, the instruction is to apply a voltage of a preset changing frequency to the light-emitting device; when the component is a sound-emitting device, the instruction is to make the sound-emitting device play a preset audio; Data acquisition module, used to collect the current value I flowing through the components to be tested i and the current value P flowing through the calibration component of the same model as the component to be tested and which can work effectively when executing the instruction i , where 0<i≤t, t is the time from when the instruction is issued to when the collected current value is 0; Data calculation module, used to calculate I i With P i The ratio A i ,I i+j With P i The ratio A i+j , and count |A i -1|>the number of D m, |A i+j -1|>the number of D m j , D is a preset first threshold, 0<j≤t, and the value of j includes ±50ms and ±100ms; Data analysis module, used to analyze the working status of the components under test, If A i =0, then the information that the component under test fails to work properly is output; If m≤n, then output the information that the component under test can work effectively, and n is the second threshold value; After traversing all values of j, if there exists m>n and m j ≤n, then the information that the component under test can work effectively is output; otherwise, the information that the component under test cannot work effectively is output.
3. A smart lock, It is characterized in that include: Components, including sound-generating devices and / or light-emitting devices; A control module, used for sending instructions to the components to make the components operate; When the component is a light-emitting device, the instruction is to apply a voltage of a preset changing frequency to the light-emitting device; when the component is a sound-emitting device, the instruction is to make the sound-emitting device play a preset audio; A data acquisition module is used to collect the current value I flowing through the component when executing the instruction. i The data acquisition module stores current calibration data, which is the current value P of the calibration component of the same model as the component and which can work effectively when executing the instruction. i , where 0<i≤t, t is the time from when the instruction is issued to when the collected current value is 0; Data calculation module, used to calculate I i With P i The ratio A i ,I i+j With P i The ratio A i+j , and count |A i -1|>the number of D m, |A i+j -1|>the number of D m j , D is a preset first threshold, 0<j≤t, and the value of j includes ±50ms and ±100ms; A data analysis module is used to analyze the working status of the components. If m≤n, then output information that the component can work effectively, and n is a second threshold; After traversing all values of j, if there exists m>n and m j ≤n, then the information that the component under test can work effectively is output; otherwise, the information that the component under test cannot work effectively is output.
4. The smart lock according to claim 3, It is characterized in that The component is also used to output information that the component fails to work effectively and information that the component can work effectively.
5. The smart lock as claimed in claim 3, It is characterized in that Also includes: The output module is used to output the working status of the components.
