CN108362322B - Sensor testing method and device and readable storage medium - Google Patents

Sensor testing method and device and readable storage medium Download PDF

Info

Publication number
CN108362322B
CN108362322B CN201810041755.4A CN201810041755A CN108362322B CN 108362322 B CN108362322 B CN 108362322B CN 201810041755 A CN201810041755 A CN 201810041755A CN 108362322 B CN108362322 B CN 108362322B
Authority
CN
China
Prior art keywords
sensor
baffle
ambient light
test
distance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201810041755.4A
Other languages
Chinese (zh)
Other versions
CN108362322A (en
Inventor
李玮琮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qiku Internet Technology Shenzhen Co Ltd
Original Assignee
Qiku Internet Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qiku Internet Technology Shenzhen Co Ltd filed Critical Qiku Internet Technology Shenzhen Co Ltd
Priority to CN201810041755.4A priority Critical patent/CN108362322B/en
Publication of CN108362322A publication Critical patent/CN108362322A/en
Application granted granted Critical
Publication of CN108362322B publication Critical patent/CN108362322B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D18/00Testing or calibrating apparatus or arrangements provided for in groups G01D1/00 - G01D15/00

Abstract

A method for testing a Sensor includes obtaining ambient light brightness detected by a light intensity Sensor under different gain parameters and judging whether ambient light brightness changes along with change of gain parameters, carrying out test for simulating that a baffle is close to or far away from the Sensor by changing infrared emission power, and determining that the Sensor is normal when the test is successful.

Description

Sensor testing method and device and readable storage medium
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a sensor testing method and apparatus, and a readable storage medium.
Background
With the continuous development of electronic technology, intelligent terminal devices, such as mobile phones and tablet computers, gradually become important tools for people to communicate with the outside and for personal resource management, and bring convenience to the life of people.
In the prior art, sensors used in terminals include gravity sensors, gyroscopes, light-sensing distance sensors, etc., wherein the light-sensing distance Sensor (a L SP-Sensor) is an important component of the intelligent terminal device.
Firstly, the brightness of a screen is adjusted by sensing the intensity of external light so as to achieve the purposes of power saving and comfortable vision;
and secondly, sensing the approaching and the keeping away of objects such as the human face and the like to lock and unlock, for example, when a call is received, when the human face approaches the screen, the screen lamp can be extinguished, and the screen can be automatically locked to prevent the misoperation of the face, and when the human face leaves, the screen lamp can be automatically started and automatically unlocked.
In the prior art, the light sensation-distance sensor test is mainly carried out by a special detector, or the complete machine test is carried out after the complete machine product is produced, so that the detection speed is low, the efficiency is low, and manpower and material resources are wasted.
Disclosure of Invention
In view of the above, it is desirable to provide a sensor testing method, a device and a readable storage medium for solving the problem of low testing efficiency of the photo-distance sensor in the prior art.
A sensor testing method is applied to a mainboard, a sensor is connected with the mainboard, a baffle is arranged at a position away from the mainboard by a preset distance during testing, the sensor comprises a light intensity sensor and an infrared emitter, and the sensor testing method comprises the following steps:
acquiring the ambient light brightness detected by the light intensity sensor under different gain parameters, and judging whether the ambient light brightness changes along with the change of the gain parameters;
if yes, carrying out a test for simulating the baffle to approach or depart from the sensor by changing infrared emission power;
when the test is successful, it is determined that the sensor is functioning properly.
The sensor testing method, wherein the step of performing the test for simulating the approach and the departure of the baffle plate to the sensor by changing the infrared emission power comprises the following steps:
acquiring the distance detected by the light intensity sensor under different infrared emission power conditions, wherein the distance is the position of the baffle detected by the light intensity sensor;
determining whether the phenomenon that the baffle plate is close to or far away from the sensor exists or not according to the relation between the distance and the external line sending power;
if yes, the test is determined to be successful.
In the sensor testing method, the step of determining whether the phenomenon that the baffle approaches or separates from the sensor is present based on the relationship between the distance and the outer line transmission power includes:
determining that the baffle is away from the sensor when the distance increases with a decrease in the infrared ray transmission power;
when the infrared ray transmission power is increased and decreased, it is determined that the baffle is close to the sensor.
In the sensor testing method, the step of obtaining the ambient light brightness detected by the light intensity sensor under the condition of different gain parameters and determining whether the ambient light brightness changes with the change of the gain parameters includes:
sequentially acquiring gain parameter groups of a plurality of preset test periods, wherein each gain parameter group comprises two different gain parameters;
sequentially modifying the gain parameters of the light intensity sensor into two gain parameters in the current test period, and performing ambient light detection to obtain two ambient light brightness values;
when the two environment light brightness values are different, marking the current period as qualified;
counting the ratio of the qualified period, and determining that the ambient light brightness changes along with the change of the gain parameter when the ratio is greater than or equal to a preset threshold value.
The sensor testing method described above, wherein, after the step of determining whether the ambient light brightness changes with the change of the gain parameter, further includes:
when the ambient light brightness is judged not to change along with the change of the gain parameter, first prompt information is sent out to prompt a user of ambient light sensing, a power supply circuit and I2The C circuit anomaly has at least one anomaly.
The sensor testing method further comprises the following steps after the step of simulating the test that the baffle is close to or far away from the sensor by changing the infrared emission power:
and when the test fails, sending a second prompt message to prompt the user that the infrared transmitter is abnormal in function.
The embodiment of the invention also provides a sensor testing device, which is applied to a mainboard, wherein the sensor is connected with the mainboard, a baffle is arranged at a position away from the mainboard by a preset distance during testing, the sensor comprises a light intensity sensor and an infrared emitter, and the sensor testing device comprises:
the judging module is used for acquiring the ambient light brightness detected by the light intensity sensor under different gain parameters and judging whether the ambient light brightness changes along with the change of the gain parameters;
the test module is used for carrying out a test for simulating the baffle to approach and depart from the sensor by changing infrared emission power when the ambient light brightness changes along with the change of the gain parameter;
and the first determination module is used for determining that the sensor functions normally when the test is successful.
The above sensor testing device, wherein the testing module comprises:
the first acquisition module is used for acquiring the distance detected by the light intensity sensor under different infrared emission power conditions, wherein the distance is the position of the baffle detected by the light intensity sensor;
the second determining module is used for determining whether the phenomenon that the baffle is close to or far away from the sensor exists or not according to the relation between the distance and the external line sending power;
and the third determination module is used for determining that the test is successful when the phenomenon that the baffle is close to or far away from the sensor exists.
The sensor testing device, wherein the second determining module is specifically configured to:
determining that the baffle is away from the sensor when the distance increases with a decrease in the infrared ray transmission power;
when the infrared ray transmission power is increased and decreased, it is determined that the baffle is close to the sensor.
The above sensor testing device, wherein the judging module comprises:
the second acquisition module is used for sequentially acquiring gain parameter groups of a plurality of preset test periods, wherein each gain parameter group comprises two different gain parameters;
the detection module is used for sequentially modifying the gain parameters of the light intensity sensor into two gain parameters in the current test period and carrying out ambient light detection to obtain two ambient light brightness values;
the marking module is used for marking the current period as qualified when the two environment light brightness values are different;
and the fourth determining module is used for counting the proportion of the period marked as qualified, and when the proportion is greater than or equal to a preset threshold value, determining that the ambient light brightness changes along with the change of the gain parameter.
Above-mentioned sensor testing arrangement, it still includes:
a first prompt module for sending a first prompt message to prompt the user of the ambient light sensor, the power supply circuit and the I when the ambient light brightness is judged not to change along with the change of the gain parameter2The C circuit anomaly has at least one anomaly.
The sensor testing device further comprises:
and the second prompting module is used for sending out second prompting information to prompt the user that the infrared transmitter is abnormal in function when the test fails.
An embodiment of the present invention further provides a readable storage medium, on which a program is stored, where the program, when executed by a processor, implements the steps of any one of the above-mentioned methods.
In the embodiment of the invention, the gain parameters of the light intensity sensor are changed to compare whether the detected ambient light brightness is different under different gain parameters, if so, the power supply circuit and the I are indicated2And if the circuit C and the light intensity sensor are normal, determining whether the distance sensing function is normal. The distance sensing is detected through the infrared emitter and the light intensity sensor, and whether the distance sensing function is normal or not is determined according to the distance data detected under different infrared emission powers, namely whether the infrared emitter function is normal or not is determined.
When the A L SP-Sensor device is mounted on a board card, the detection of the Sensor can be carried out after the board card is electrified, manual testing or judgment of a testing result is not needed, and therefore the SMT capacity is improved.
Drawings
FIG. 1 is a flow chart of a method for testing a sensor according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a method for testing a sensor according to a second embodiment of the present invention;
fig. 3 is a block diagram of a sensor testing device according to a third embodiment of the present invention.
FIG. 4 is a block diagram of a test module according to a third embodiment of the present invention;
fig. 5 is a block diagram of a determining module according to a third embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
These and other aspects of embodiments of the invention will be apparent with reference to the following description and attached drawings. In the description and drawings, particular embodiments of the invention have been disclosed in detail as being indicative of some of the ways in which the principles of the embodiments of the invention may be practiced, but it is understood that the scope of the embodiments of the invention is not limited correspondingly. On the contrary, the embodiments of the invention include all changes, modifications and equivalents coming within the spirit and terms of the claims appended hereto.
The Sensor testing method in the first embodiment of the present invention is applied to a main board of a terminal, such as a mobile phone, a tablet computer, a personal digital assistant, a wearable device (glasses, a watch, etc.), currently, a photo-proximity Sensor (a L SP-Sensor) on the terminal is basically attached to the main board, and a light intensity Sensor and an infrared emitter (IR led) are generally integrated on the device for sensing ambient light and infrared light.
Referring to fig. 1, a method for testing a sensor according to a first embodiment of the present invention includes steps S11-S13.
Step S11, obtaining the ambient light brightness detected by the light intensity sensor under different gain parameters, and determining whether the ambient light brightness changes with the change of the gain parameters.
The Sensor testing method in the embodiment is applied to the mainboard, the mainboard is installed on a testing fixture, and a black baffle is placed above A L SP-Sensor at a certain distance.
When the board card is fixed on the test fixture and powered on, the board card obtains a plurality of preset gain parameters, and the gain of the environment light sensor is changed into the preset gain parameters in turn. Under each gain parameter condition, the ambient light brightness is detected, and whether the ambient light brightness changes along with the change of the gain parameter is judged.
In specific implementation, the gain of the light intensity Sensor (a L S-Sensor) may be sequentially modified to "× 1", "× 4", × 16 ", and" × 64 ", and the detected 4 values of the ambient light intensity are obtained, and whether the obtained 4 values are all different is determined, if yes, the power supply circuit and I are illustrated2And if the light intensity sensors of the C circuit and the A L S-Sensor device are in normal functions, the next detection is carried out.
The gain of the light intensity sensor is related to the detection sensitivity, the larger the gain parameter is, the higher the sensitivity is, under the same ambient light, the value of the ambient light brightness detected by the sensor with different sensitivities is different, for example, the ambient light brightness detected when the gain is "× 1" is 1000lux, the ambient light intensity value detected when the gain is "× 4" is 10567lux, and the detection data are more sensitive.
The purpose of setting the gain multiple times is to ensure that I can be passed2C operating lightSensing device, thereby determining power supply circuit, I2The C circuit and the a L S-Sensor device have no problem, and the gain is set only once, so that abnormal ambient light data may be obtained due to the damage of the device, and it is impossible to confirm whether the circuit and the device have problems.
In step S12, when the ambient light level changes with the change of the gain parameter, a test for simulating the approach and the departure of the shutter to and from the sensor is performed by changing the infrared emission power.
When the environmental light brightness changes along with the change of the gain parameter, the power supply circuit and the I are explained2And if the C circuit and the A L S-Sensor device are normal in function, the function of the infrared transmitter is detected.
A black baffle is arranged above the A L SP-Sensor at a certain distance and is mainly used for distance detection, the distance between the black baffle and the A L SP-Sensor is approximately 3-5 cm, and when the distance exceeds the range, the judgment of the distance detection is not facilitated.
In a general terminal, the infrared emission power of the infrared emitter is fixed, when an object is close to the terminal, the object can be sensed to be close according to the real-time detection red ray intensity, and similarly, when the object is far away, the object is sensed to be far away according to the real-time detection infrared ray intensity. In order to avoid adding a testing device and simplify the operation, in the embodiment, the position of the baffle is fixed, and the scene that the baffle is close to and far away from the sensor is simulated by adjusting the infrared ray emission power of the infrared emitter.
In specific implementation, the distance detected by the light intensity sensor under different infrared emission power conditions is obtained, and the distance is the position of a baffle detected by the light intensity sensor;
determining that the baffle is away from the sensor when the distance increases with a decrease in the infrared ray transmission power;
determining that the baffle is close to the sensor when the distance decreases with an increase in the infrared ray transmission power.
The position of the baffle is fixed, the larger the infrared ray transmitting power is, the larger the detected distance is, the smaller the infrared ray transmitting power is, the smaller the detected distance is, and the far and close of the baffle can be simulated based on the principle.
And step S13, when the test is successful, determining that the sensor functions normally.
And when the simulation test that the baffle is close to or far away from the sensor is successful, determining that the sensor is normal in function, and if the baffle is failed, indicating that the infrared emitter is abnormal in function.
Since the distance sensing function is performed depending on the light intensity sensor, the detection of the light intensity sensor and the circuit portion is performed first in this embodiment.
In this embodiment, the gain parameter of the light intensity sensor is changed to compare whether the ambient light intensities detected under different gain parameters are different, and if so, the power supply circuit and the I are indicated2And if the circuit C and the light intensity sensor are normal, determining whether the distance sensing function is normal. The distance sensing is detected through the infrared emitter and the light intensity sensor, and whether the distance sensing function is normal or not is determined according to the distance data detected under different infrared emission powers, namely whether the infrared emitter function is normal or not is determined.
When the A L SP-Sensor device is mounted on a board card, the detection of the Sensor can be carried out after the board card is electrified, manual testing or judgment of a testing result is not needed, and therefore the SMT capacity is improved.
Referring to fig. 2, a sensor testing method according to a second embodiment of the present invention includes steps S21-S28.
Step S21, sequentially obtaining gain parameter sets of a plurality of preset test periods, where each gain parameter set includes two different gain parameters.
And step S22, sequentially modifying the gain parameters of the light intensity sensor into two gain parameters in the current test period, and performing ambient light detection to obtain two ambient light brightness values.
In step S23, when the two ambient light brightness values are different, the current period is marked as being qualified.
Step S24, counting the ratio of the cycles marked as qualified, and determining whether the ratio is greater than or equal to a preset threshold, if so, executing step S25, otherwise, executing step S27.
Testing for multiple cycles to detect supply circuit, I2The C circuit and the light intensity sensor are more accurate in detection and higher in reliability. Each test period sets a set of gain parameters, each set of gain parameters comprising two different gain parameters. The test time interval corresponding to two gain parameters in each gain parameter group is not too long, and is controlled within 1-10 s, so that the actual brightness of the environment in the same group of test processes is basically the same, and the test accuracy is improved. The number of test cycles and the time interval between each cycle are not limited herein and may be set according to a desired test completion time.
In the above steps, the ratio of the qualified cycles is the number of the qualified cycles divided by the total number of the cycles. For example, 10 test cycles are set, and the test is performed at different time points. If 8 test periods are qualified after the test is finished, the percentage of occupation is 80%. The threshold value can be set according to actual conditions, for example, the threshold value can be set to 80%, when the percentage is greater than or equal to 80%, the ambient light brightness changes along with the change of the gain parameter, and then the next test is carried out.
Step S25 is to obtain the distance detected by the light intensity sensor under different infrared emission power conditions, where the distance is the position of the baffle detected by the light intensity sensor.
And step S26, determining whether the baffle is close to or far away from the sensor according to the relation between the distance and the external wire sending power, if so, determining that the sensor is normal in function, otherwise, executing step S28.
In the above step, when the distance increases with a decrease in infrared ray transmission power, it is determined that the shutter is away from the sensor, and when the distance decreases with an increase in infrared ray transmission power, it is determined that the shutter is close to the sensor. When the distance does not increase with the decrease of the infrared ray transmission power or when the distance does not decrease with the increase of the infrared ray transmission power, it is interpreted that the infrared transmitter is abnormally functioning.
In specific implementation, a reference value of infrared emission power, a first test data set and a second test data set can be preset, wherein the first test data set comprises a plurality of first emission power parameter values smaller than or equal to the reference value, and each first emission power parameter value of the first data set is different and is arranged in sequence from large to small according to the value. The second test data group comprises a plurality of second transmitting power parameter values which are larger than the reference value, the plurality of second transmitting power parameter values are different and are arranged in sequence from small to large according to the numerical values.
When detection is carried out, the board card sequentially obtains a plurality of first transmission power parameter values and obtains distance information detected by the light intensity sensor under the condition of the plurality of first transmission power parameter values so as to obtain a plurality of first distance data;
determining that the baffle is away from the sensor when the first distance data increases with decreasing transmit power;
sequentially acquiring a plurality of second transmitting power parameters and distance information detected by the light intensity sensor under the condition of the plurality of second transmitting power parameters to obtain a plurality of second distance data;
determining that the baffle is away from the sensor when the second distance data increases with increasing transmit power.
The distance of the baffle detected under the condition of the reference value is the reference distance, and in the test process, if the distance between the baffle and the sensor is detected according to the first transmission power parameter value in the first data set, the obtained first distance data is gradually reduced from the reference distance; and the second distance data obtained according to the distance between the baffle and the sensor detected by the second transmitting power parameter value in the first data group is gradually increased from the reference distance, so that the functions of the interrupt pin and the infrared transmitter of the sensor can be judged to be normal, otherwise, the step S28 is executed.
Step S27, send out the firstPrompt information to prompt the user of light intensity sensor, power supply circuit and I2There is at least one anomaly in the C circuit.
And step S28, sending out a second prompt message to prompt the user that the infrared emitter is out of function.
In contrast to the first embodiment, in the present embodiment, the light intensity sensor, the power supply circuit, and the I are performed through a plurality of test cycles2And the detection of the C circuit is more accurate and has higher reliability. And when the tests at each stage are not passed, prompt information is sent out to remind the user of removing the fault.
Referring to fig. 3, a sensor testing apparatus according to a third embodiment of the present invention is applied to a motherboard, the sensor is connected to the motherboard, a baffle is disposed at a position away from the motherboard by a predetermined distance during testing, the sensor includes a light intensity sensor and an infrared emitter, and the sensor testing apparatus includes:
the judging module 100 is configured to obtain the ambient light brightness detected by the light intensity sensor under different gain parameters, and judge whether the ambient light brightness changes with a change of the gain parameters;
a test module 200 for performing a test simulating the approach and the departure of the baffle from the sensor by changing the infrared emission power when the ambient light brightness changes with the change of the gain parameter;
a first determination module 300 for determining that the sensor is functioning properly when the test is successful.
Further, as shown in fig. 4, the test module 200 includes:
a first obtaining module 210, configured to obtain distances detected by the light intensity sensor under different infrared emission power conditions, where the distances are positions of the baffles detected by the light intensity sensor;
a second determining module 220, configured to determine whether a phenomenon that the baffle is close to or far away from the sensor exists according to a relationship between the distance and the external line transmission power;
a third determination module 230 for determining that the test is successful when there is a phenomenon that the baffle is close to and far from the sensor.
Further, in the sensor testing apparatus, the second determining module 220 is specifically configured to:
determining that the baffle is away from the sensor when the distance increases with a decrease in the infrared ray transmission power;
when the infrared ray transmission power is increased and decreased, it is determined that the baffle is close to the sensor.
Further, as shown in fig. 5, the determining module 100 includes:
a second obtaining module 110, configured to sequentially obtain gain parameter sets of a plurality of preset test periods, where each gain parameter set includes two different gain parameters;
the detection module 120 is configured to modify the gain parameters of the light intensity sensor into two gain parameters in the current test period in sequence, and perform ambient light detection to obtain two ambient light brightness values;
a marking module 130, configured to mark the current period as qualified when two of the ambient light brightness values are different;
a fourth determining module 140, configured to count a fraction of the period marked as pass, and determine that the ambient light brightness changes with a change of the gain parameter when the fraction is greater than or equal to a preset threshold.
Further, the sensor testing device further includes:
a first prompting module 400, configured to send a first prompting message to prompt a user about ambient light sensing, a power supply circuit, and I when it is determined that the ambient light brightness does not change with a change of the gain parameter2The C circuit anomaly has at least one anomaly.
Further, the sensor testing device further includes:
and the second prompting module 500 is configured to send a second prompting message to prompt a user that the infrared emitter is out of function when the test fails.
The sensor testing device provided by the embodiment of the invention has the same implementation principle and technical effects as the method embodiments, and for the sake of brief description, the corresponding contents in the method embodiments can be referred to where the device embodiments are not mentioned.
The invention also proposes a readable storage medium on which a computer program is stored which, when being executed by a processor, implements the sensor testing method described above.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (13)

1. A sensor testing method is characterized in that the sensor is applied to a mainboard, the sensor is connected with the mainboard, a baffle is arranged at a position away from the mainboard by a preset distance during testing, the sensor comprises a light intensity sensor and an infrared emitter, and the sensor testing method comprises the following steps:
acquiring the ambient light brightness detected by the light intensity sensor under different gain parameters, and judging whether the ambient light brightness changes along with the change of the gain parameters;
if yes, carrying out a test for simulating the baffle to approach or depart from the sensor by changing the infrared emission power;
when the test is successful, it is determined that the sensor is functioning properly.
2. The sensor testing method of claim 1, wherein said step of performing a test simulating the approach and the departure of said baffle from said sensor by varying the infrared emission power comprises:
acquiring the distance detected by the light intensity sensor under different infrared emission power conditions, wherein the distance is the position of the baffle detected by the light intensity sensor;
determining whether the phenomenon that the baffle is close to or far away from the sensor exists according to the relation between the distance and the infrared ray emission power;
if yes, the test is determined to be successful.
3. The sensor testing method of claim 2, wherein the step of determining whether there is a phenomenon that the barrier is approaching and moving away from the sensor based on the relationship between the distance and the infrared emission power comprises:
determining that the baffle is away from the sensor when the distance increases with decreasing infrared emission power;
determining that the baffle is close to the sensor when the distance decreases with increasing infrared emission power.
4. The sensor testing method of any one of claims 1 to 3, wherein the step of obtaining the ambient light brightness detected by the light intensity sensor under different gain parameters and determining whether the ambient light brightness changes with the change of the gain parameters comprises:
sequentially acquiring gain parameter groups of a plurality of preset test periods, wherein each gain parameter group comprises two different gain parameters;
sequentially modifying the gain parameters of the light intensity sensor into two gain parameters in the current test period, and performing ambient light detection to obtain two ambient light brightness values;
when the two environment light brightness values are different, marking the current test period as qualified;
counting the proportion of the test period marked as qualified, and determining that the ambient light brightness changes along with the change of the gain parameter when the proportion is larger than or equal to a preset threshold value.
5. The sensor testing method of claim 1, wherein said step of determining whether the ambient light level changes with a change in the gain parameter is further followed by:
when the environment light brightness is judged not to change along with the change of the gain parameter, first prompt information is sent out to prompt a user of the light intensity sensor, the power supply circuit and the I2The C circuit has at least one anomaly.
6. The sensor testing method of claim 1, wherein said step of simulating an attempt by varying the infrared emission power to move said baffle closer to and further away from said sensor is further followed by the steps of:
and when the test fails, sending a second prompt message to prompt the user that the infrared transmitter is abnormal in function.
7. The utility model provides a sensor testing arrangement, its characterized in that is applied to in the mainboard, the sensor with mainboard connection, during the test with the mainboard sets up a baffle apart from the position of default distance, the sensor includes light intensity inductor and infrared emitter, sensor testing arrangement includes:
the judging module is used for acquiring the ambient light brightness detected by the light intensity sensor under different gain parameters and judging whether the ambient light brightness changes along with the change of the gain parameters;
the testing module is used for simulating the test that the baffle is close to or far away from the sensor by changing the infrared ray emission power when the ambient light brightness changes along with the change of the gain parameter;
and the first determination module is used for determining that the sensor functions normally when the test is successful.
8. The sensor testing apparatus of claim 7, wherein the testing module comprises:
the first acquisition module is used for acquiring the distance detected by the light intensity sensor under different infrared emission power conditions, wherein the distance is the position of the baffle detected by the light intensity sensor;
the second determining module is used for determining whether the phenomenon that the baffle is close to or far away from the sensor exists according to the relation between the distance and the infrared ray transmitting power;
and the third determination module is used for determining that the test is successful when the phenomenon that the baffle is close to or far away from the sensor exists.
9. The sensor testing apparatus of claim 8, wherein the second determination module is specifically configured to:
determining that the baffle is away from the sensor when the distance increases with decreasing infrared emission power;
determining that the baffle is close to the sensor when the distance decreases with increasing infrared emission power.
10. The sensor testing apparatus of any one of claims 7 to 9, wherein the determining module comprises:
the second acquisition module is used for sequentially acquiring gain parameter groups of a plurality of preset test periods, wherein each gain parameter group comprises two different gain parameters;
the detection module is used for sequentially modifying the gain parameters of the light intensity sensor into two gain parameters in the current test period and carrying out ambient light detection to obtain two ambient light brightness values;
the marking module is used for marking the current test period as qualified when the two environment light brightness values are different;
and the fourth determining module is used for counting the proportion of the test period marked as qualified, and when the proportion is greater than or equal to a preset threshold value, determining that the ambient light brightness changes along with the change of the gain parameter.
11. The sensor testing apparatus of claim 7, further comprising:
a first prompt module, configured to send a first prompt message to prompt a user about the light intensity sensor, the power supply circuit, and the I when it is determined that the ambient light brightness does not change with the change of the gain parameter2The C circuit has at least one anomaly.
12. The sensor testing apparatus of claim 7, further comprising:
and the second prompting module is used for sending out second prompting information to prompt a user that the infrared transmitter is abnormal in function when the test fails.
13. A readable storage medium on which a program is stored, which program, when executed by a processor, carries out the method according to any one of claims 1-6.
CN201810041755.4A 2018-01-16 2018-01-16 Sensor testing method and device and readable storage medium Expired - Fee Related CN108362322B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810041755.4A CN108362322B (en) 2018-01-16 2018-01-16 Sensor testing method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810041755.4A CN108362322B (en) 2018-01-16 2018-01-16 Sensor testing method and device and readable storage medium

Publications (2)

Publication Number Publication Date
CN108362322A CN108362322A (en) 2018-08-03
CN108362322B true CN108362322B (en) 2020-07-17

Family

ID=63006467

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810041755.4A Expired - Fee Related CN108362322B (en) 2018-01-16 2018-01-16 Sensor testing method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN108362322B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109238336A (en) * 2018-09-12 2019-01-18 东莞市奕冠塑胶五金电子有限公司 A kind of Full-automatic infrared inductor test cabinet
CN114624542A (en) * 2022-04-24 2022-06-14 深圳市研强物联技术有限公司 System and method for testing functions of intelligent helmet

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102883061A (en) * 2012-09-26 2013-01-16 广东欧珀移动通信有限公司 Method and system for controlling working state of touch screen of mobile terminal
CN103391365A (en) * 2013-07-16 2013-11-13 广东欧珀移动通信有限公司 Mobile terminal backlight intensity accurately adjusted method, system and mobile terminal
CN105681557A (en) * 2016-01-15 2016-06-15 广东欧珀移动通信有限公司 Method and device for controlling infrared proximity sensor
CN105786153A (en) * 2015-01-13 2016-07-20 摩托罗拉移动有限责任公司 Portable Electronic Device With Dual, Diagonal Proximity Sensors And Mode Switching Functionality
CN106932004A (en) * 2017-03-27 2017-07-07 上海与德科技有限公司 The detection method and device of a kind of sensor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102883061A (en) * 2012-09-26 2013-01-16 广东欧珀移动通信有限公司 Method and system for controlling working state of touch screen of mobile terminal
CN103391365A (en) * 2013-07-16 2013-11-13 广东欧珀移动通信有限公司 Mobile terminal backlight intensity accurately adjusted method, system and mobile terminal
CN105786153A (en) * 2015-01-13 2016-07-20 摩托罗拉移动有限责任公司 Portable Electronic Device With Dual, Diagonal Proximity Sensors And Mode Switching Functionality
CN105681557A (en) * 2016-01-15 2016-06-15 广东欧珀移动通信有限公司 Method and device for controlling infrared proximity sensor
CN106932004A (en) * 2017-03-27 2017-07-07 上海与德科技有限公司 The detection method and device of a kind of sensor

Also Published As

Publication number Publication date
CN108362322A (en) 2018-08-03

Similar Documents

Publication Publication Date Title
CN107315468B (en) Electricity based reminding method, device, storage medium and terminal
CN106464754A (en) Method, apparatus and device for correcting detection distance
CN108362322B (en) Sensor testing method and device and readable storage medium
CN111654692B (en) Camera detection method and device, camera and storage medium
CN105635467A (en) Mobile terminal and promoting method thereof
CN108457888A (en) A kind of server fan fault detection method, apparatus and system
CN108918427A (en) Method, apparatus, storage medium and the electronic equipment of substance detection
CN105842680A (en) Data processing method and apparatus thereof
CN112540224A (en) Meter reading machine and detection method of ammeter data
EP4180827A1 (en) Method for detecting storage battery of vehicle and battery detection device
CN105744034A (en) Screen brightness output method and device
CN116007750A (en) LED detection method, device, equipment, storage medium and system
CN108872780A (en) Charge livewire work detection, system and the terminal device reconnoitred
CN105955692B (en) A kind of adjusting method, device and intelligent terminal for intelligent terminal display screen
CN115503535B (en) Secure charging method, apparatus, device and computer readable storage medium
CN113017591B (en) Wearable device wearing state detection method, wearable device wearing state detection device, wearable device wearing state detection equipment and storage medium
CN115514106A (en) Display method, system, device and storage medium of wireless charging device
CN110441714A (en) Detection method, device and the computer readable storage medium of indicator light
CN104700815B (en) Brightness controlling device and brightness control method
CN107238754B (en) Method and device for detecting electric quantity
CN108536567A (en) Operation condition of server monitoring method, equipment and readable storage medium storing program for executing
CN112513609B (en) Street lamp flicker effect analysis method and terminal
CN207516477U (en) A kind of detection device
CN202693758U (en) Automatic test system for direction switch of electronic door and window of automobile
CN105866703A (en) Simulation automobile starting intelligent tester device and testing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200717

Termination date: 20220116

CF01 Termination of patent right due to non-payment of annual fee