Method and apparatus for testing a PIR sensor

By employing an independent data acquisition and parameter optimization process, and utilizing analog-to-digital conversion data in ADC mode to obtain trigger and false trigger rates, the problem of low testing efficiency of PIR sensors was solved, achieving efficient and accurate parameter optimization.

CN120491211BActive Publication Date: 2026-08-25ADDX (BEIJING) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510770607.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2026-08-25
Estimated Expiration
2045-06-10

AI Technical Summary

Technical Problem

Existing PIR sensors have low testing efficiency, making it difficult to achieve efficient parameter optimization under different environments, and the test results are easily affected by environmental factors.

Method used

The test method and apparatus using PIR sensors, by setting test conditions and items, utilizes analog-to-digital conversion data in ADC mode to obtain trigger and false trigger rates, independently performs data acquisition and parameter optimization, and avoids environmental and mode conversion interference.

Benefits of technology

It improves the accuracy and efficiency of PIR sensor testing, ensures the stability and consistency of test results, and is suitable for large-scale production and high-precision applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120491211B_ABST
    Figure CN120491211B_ABST
Patent Text Reader

Abstract

The application belongs to the field of sensor testing, and particularly relates to a PIR sensor testing method and device. The method comprises the following steps: setting a test working condition and various test items, installing and setting a PIR device according to the test working condition and the various test items, the PIR device having a set sensitivity parameter value; sequentially performing tests of the various test items to obtain ADC test data of different monitored objects in motion under the corresponding test items, the monitored objects including a target monitored object, and the ADC test data being analog-to-digital conversion data collected by the PIR device in an ADC mode; obtaining a trigger number of the PIR device according to the ADC test data, and comparing the trigger number with a motion number of the target monitored object to obtain a trigger rate and a false trigger rate; and obtaining an optimal sensitivity parameter value of the PIR device according to the trigger rate and the false trigger rate. The application greatly improves the accuracy and efficiency of the test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of sensor testing, and specifically relates to a testing method and apparatus for a PIR sensor. Background Technology

[0002] PIR (Passive Near Infrared) sensors are commonly used in IoT devices to detect the presence of people and trigger actions such as turning on lights or recording video. Current PIR sensors typically have adjustable parameters to adapt to different scenarios, such as sensitivity and false trigger rate. However, using a complete product for parameter tuning during product development is extremely unreliable because PIR sensor triggering is related to factors such as ambient temperature, object speed, and size, making parameter optimization difficult by controlling these variables.

[0003] Most mainstream PIR devices nowadays operate in two modes: interrupt mode and ADC mode. Interrupt mode is typically used in products to trigger an interrupt signal when an event occurs, causing the IoT device to initiate a certain action. ADC mode does not trigger an interrupt but outputs continuous values ​​of the infrared changes sensed by the PIR sensor.

[0004] In testing environments, PIR sensor testing typically involves fixing a set of parameters on the product, allowing a target (human / blackbody) to move repeatedly at different distances, and statistically analyzing the trigger rate and false trigger rate. Then, a new set of parameters is adjusted, and the process is repeated until a suitable set of parameters is found. This testing method requires multiple trials, making it difficult to ensure the consistency of the testing environment to effectively evaluate the parameters. Furthermore, this lengthy testing chain is susceptible to interference from various factors, leading to low testing efficiency.

[0005] Therefore, how to achieve high-efficiency testing of PIR sensors is a problem that needs to be solved. Summary of the Invention

[0006] The purpose of this application is to provide a testing method and apparatus for PIR sensors to solve the problem of low testing efficiency of existing PIR sensors.

[0007] The technical solution of this application is:

[0008] The first aspect of this application provides a method for testing a PIR sensor, comprising:

[0009] Set the test conditions and various test items, and install and set the PIR device according to the test conditions and various test items. The PIR device has the set sensitivity parameter value.

[0010] The tests for each of the aforementioned test items are performed sequentially to obtain ADC test data for different monitored objects moving under the corresponding test items. The monitored objects include the target monitored object, and the ADC test data is the analog-to-digital conversion data collected by the PIR device in ADC mode.

[0011] The number of times the PIR device is triggered is obtained based on the ADC test data, and the number of times the triggering is obtained is compared with the number of times the target monitored object moves to obtain the trigger rate and false trigger rate.

[0012] Based on the trigger rate and the false trigger rate, the optimal sensitivity parameter value of the PIR device is obtained.

[0013] Preferably, the installation and configuration of the PIR device according to the test conditions and each of the test items includes:

[0014] Under the test conditions, multiple PIR devices are installed and set for each test item, and the sensitivity parameter values ​​of each PIR device are set sequentially according to the set step size.

[0015] Preferably, obtaining the number of triggers of the PIR device based on the ADC test data includes:

[0016] Different signal amplitude range thresholds are set for different test items;

[0017] Obtain the signal amplitude from the ADC test data;

[0018] Determine whether the signal amplitude is within the threshold range of the signal amplitude. If so, increment the trigger count of the PIR device by one.

[0019] Preferably, obtaining the signal amplitude in the ADC test data includes:

[0020] Acquire the signal from any consecutive time period in the ADC test data;

[0021] The signal amplitude is acquired at predetermined time intervals within the continuous time period;

[0022] The average value of the acquired signal amplitudes is calculated by averaging all the acquired signal amplitudes.

[0023] Preferably, after acquiring a signal amplitude at predetermined time intervals within the continuous time period, the method further includes:

[0024] Set the signal amplitude compensation amount and the signal amplitude difference threshold;

[0025] Determine whether the signal amplitude within the continuous time period meets the fluctuation condition. If so, add the signal amplitude compensation amount to the signal amplitude. The fluctuation condition is that the signal amplitude difference between two adjacent signal amplitudes exceeds the signal amplitude difference threshold more than three times.

[0026] A second aspect of this application provides a testing apparatus for a PIR sensor, comprising:

[0027] The test item setting module is used to set the test conditions and various test items, and to install and set the PIR device according to the test conditions and various test items. The PIR device has the set sensitivity parameter value.

[0028] The ADC test data acquisition module is used to sequentially perform the tests of each of the test items and acquire ADC test data of different monitored objects moving under the corresponding test items. The monitored objects include target monitored objects, and the ADC test data is analog-to-digital conversion data collected by the PIR device in ADC mode.

[0029] The data processing module is used to obtain the number of times the PIR device is triggered based on the ADC test data, and to compare the number of times the triggering device is triggered with the number of times the target monitored object moves to obtain the trigger rate and the false trigger rate.

[0030] The parameter optimization module is used to obtain the optimal sensitivity parameter value of the PIR device based on the trigger rate and the false trigger rate.

[0031] Preferably, the test item setting module includes:

[0032] The parameter setting unit is used to install and set multiple PIR devices for each test item under the test conditions, and to set the sensitivity parameter values ​​of each PIR device in sequence according to the set step size.

[0033] Preferably, the data processing module includes:

[0034] The first threshold setting unit is used to set different signal amplitude range thresholds for different test items;

[0035] The first signal amplitude acquisition unit is used to acquire the signal amplitude in the ADC test data;

[0036] The trigger count acquisition unit is used to determine whether the signal amplitude is within the threshold range of the signal amplitude. If so, the trigger count of the PIR device is incremented by one.

[0037] Preferably, the first signal amplitude acquisition unit includes:

[0038] The signal acquisition unit is used to acquire the signal of any continuous time period in the ADC test data;

[0039] The second signal amplitude acquisition unit is used to acquire a signal amplitude at a predetermined time interval during the continuous time period;

[0040] The signal amplitude mean calculation unit is used to calculate the average value of all the acquired signal amplitudes to obtain the signal amplitude mean.

[0041] Preferably, the data processing module further includes:

[0042] The second threshold setting unit is used to set the signal amplitude compensation amount and the signal amplitude difference threshold.

[0043] The signal amplitude compensation unit is used to determine whether the signal amplitude within the continuous time period meets the fluctuation condition. If so, the signal amplitude compensation amount is superimposed on the signal amplitude. The fluctuation condition is that the signal amplitude difference between two adjacent signal amplitudes exceeds the signal amplitude difference threshold more than three times.

[0044] The testing method and apparatus for PIR sensors disclosed in this application involve the PIR device monitoring an object and acquiring ADC test data in ADC mode without requiring mode or environmental switching. Based on the acquired ADC test data, the number of triggers of the PIR device is obtained, and the trigger rate and false trigger rate are calculated to optimize the sensitivity parameter value. This application separates the data acquisition and parameter optimization processes, minimizing the introduction of other variables and factors from multiple acquisitions and tests, and significantly improving the accuracy and efficiency of the test. Attached Figure Description

[0045] To more clearly illustrate the technical solutions provided in this application, the accompanying drawings will be briefly described below. Obviously, the drawings described below are merely some embodiments of this application.

[0046] Figure 1 This is a flowchart of the test method for the PIR sensor in this application;

[0047] Figure 2 This is a schematic diagram of the test apparatus for the PIR sensor of this application. Detailed Implementation

[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0049] The first aspect of this application provides a testing method for a PIR sensor that separates the data acquisition and parameter optimization processes, thereby minimizing the introduction of other variables and factors due to multiple acquisitions and tests.

[0050] like Figure 1 As shown, the testing method for the PIR sensor in this application includes the following steps:

[0051] Step S100: Set the test conditions and various test items, and install and set the PIR device according to the test conditions and various test items. The PIR device has the set sensitivity parameter value.

[0052] Test conditions are set according to the actual application scenario of the PIR sensor. Under these conditions, various test items are set, and a corresponding target object is assigned to each test item. By using different test items, the optimal sensitivity parameter value of the PIR device for monitoring the corresponding target object can be selected. In a preferred embodiment of this application, the specific method for installing and setting the PIR device according to the test conditions and various test items is as follows: Under the test conditions, multiple PIR devices are installed and set for each test item, and the sensitivity parameter value of each PIR device is set sequentially according to a set step size.

[0053] Step S200: Perform the tests for each test item in sequence, and obtain the ADC test data of different monitored objects moving under the corresponding test items. The monitored objects include the target monitored objects, and the ADC test data are the analog-to-digital conversion data collected by the PIR device in ADC mode.

[0054] In conducting a test project, multiple PIR devices within the test project are set to ADC mode. Different monitored objects are then repeatedly moved within the monitoring area of ​​the PIR devices at varying speeds and distances. ADC test data is collected using the multiple PIR devices within the test project. Monitored objects include people, animals, and vehicles. If the test objective is to determine the optimal sensitivity parameters of the PIR devices when monitoring people, then people are designated as the target monitored object.

[0055] Step S300: Obtain the number of triggers of the PIR device based on the ADC test data, and compare the number of triggers with the number of movements of the target monitored object to obtain the trigger rate and false trigger rate.

[0056] Since the monitored object may be a person or an animal, in order to determine whether there is a target object moving within the monitoring area of ​​the PIR device, the same signal amplitude range threshold is set for multiple PIR devices in the same test project, and different signal amplitude range thresholds are set for PIR devices in different test projects. The signal amplitude in the ADC test data is compared with the signal amplitude range threshold, thereby detecting different target objects and obtaining the monitoring results of the PIR device.

[0057] In a preferred embodiment of this application, the trigger count of the PIR device is obtained based on ADC test data. The specific process includes:

[0058] Set different signal amplitude range thresholds for different test items;

[0059] Obtain the signal amplitude from the ADC test data;

[0060] Determine if the signal amplitude is within the signal amplitude range threshold. If so, increment the trigger count of the PIR device by one.

[0061] In this embodiment, the specific process of obtaining the signal amplitude from the ADC test data includes:

[0062] Acquire the signal from any consecutive time period in the ADC test data;

[0063] Acquire a signal amplitude at set time intervals within a continuous time period;

[0064] The average value of the signal amplitude is obtained by averaging all the acquired signal amplitudes.

[0065] The length of the continuous time period is preferably 15-20 seconds, and the time interval is preferably 0.5 seconds. The average signal amplitude is calculated by averaging all acquired signal amplitudes. The PIR device is then compared with a threshold value to determine whether it has been triggered.

[0066] If non-metallic or metallic obstructions exist on the target object being monitored, they may interfere with the ADC test data. Normally, obstructions will not completely block the target object; signal fluctuations will occur due to changes in the obstruction's position during the target object's movement. To reduce the impact of obstructions on the monitoring results, signal amplitude compensation is achieved by setting a signal amplitude compensation amount.

[0067] In a preferred embodiment of this application, after acquiring a signal amplitude at predetermined time intervals within a continuous time period, the method further includes:

[0068] Set the signal amplitude compensation amount and the signal amplitude difference threshold;

[0069] Determine whether the signal amplitude within a continuous time period meets the fluctuation condition. If so, add the signal amplitude compensation amount to the signal amplitude. The fluctuation condition is that the difference between the signal amplitudes of two adjacent signal amplitudes exceeds the signal amplitude difference threshold more than three times.

[0070] When there are significant fluctuations in signal amplitude over a continuous period, signal amplitude compensation is added to the signal amplitude to reduce interference from obstructions. The signal amplitude compensation amount and the signal amplitude difference threshold are set based on experience, and the fluctuation conditions can also be adjusted according to different test items.

[0071] By using the above method, the number of triggers of each PIR device under a certain test item can be obtained. Then, by comparing the number of triggers with the actual number of times the target object being monitored moves during the test item, the trigger rate and false trigger rate of each PIR device can be obtained.

[0072] Step S400: Obtain the optimal sensitivity parameter value of the PIR device based on the trigger rate and false trigger rate.

[0073] Based on the trigger rate and false trigger rate, determine the optimal PIR device among all PIR devices for monitoring the target object under a certain test item, and thus obtain the sensitivity parameter value of the PIR device.

[0074] The PIR sensor testing method of this application separates the data acquisition and parameter optimization processes. During the data acquisition phase, when the PIR device monitors the object, it only needs to remain in ADC mode without requiring mode or environmental switching to acquire ADC test data. In the parameter optimization phase, by simulating the triggering logic of the PIR circuit, the ADC test data is processed to obtain the number of triggers, and the trigger rate and false trigger rate are calculated, thereby optimizing the sensitivity parameter values ​​of the PIR device. This method minimizes the introduction of other variables and factors through multiple acquisitions and tests, significantly improves test accuracy, and has high test efficiency.

[0075] Based on the above-described testing method for PIR sensors, a second aspect of this application provides a testing apparatus for PIR sensors, such as... Figure 2 As shown, it includes:

[0076] The test item setting module is used to set the test conditions and various test items. The PIR device is installed and set according to the test conditions and various test items. The PIR device has the set sensitivity parameter value.

[0077] The ADC test data acquisition module is used to perform tests for each test item in sequence and acquire the ADC test data when the monitored object moves under the corresponding test item. The ADC test data is the analog-to-digital conversion data collected by the PIR device in ADC mode.

[0078] The data processing module is used to obtain the number of times the PIR device is triggered based on the ADC test data, and to compare the number of triggers with the number of times the target monitored object moves to obtain the trigger rate and false trigger rate.

[0079] The parameter optimization module is used to obtain the optimal sensitivity parameter values ​​of the PIR device based on the trigger rate and false trigger rate.

[0080] In a preferred embodiment of this application, the test item setting module includes:

[0081] The parameter setting unit is used to install and set multiple PIR devices for each test item under test conditions, and to set the sensitivity parameter values ​​of each PIR device in sequence according to the set step size.

[0082] In a preferred embodiment of this application, the data processing module includes:

[0083] The first threshold setting unit is used to set different signal amplitude range thresholds for different test items;

[0084] The first signal amplitude acquisition unit is used to acquire the signal amplitude in the ADC test data;

[0085] The trigger count acquisition unit is used to determine whether the signal amplitude is within the signal amplitude range threshold. If so, the trigger count of the PIR device is incremented by one.

[0086] In a preferred embodiment of this application, the first signal amplitude acquisition unit includes:

[0087] The signal acquisition unit is used to acquire the signal of any continuous time period in the ADC test data;

[0088] The second signal amplitude acquisition unit is used to acquire a signal amplitude at set time intervals within a continuous time period;

[0089] The signal amplitude mean calculation unit is used to calculate the average value of all acquired signal amplitudes to obtain the signal amplitude mean.

[0090] In a preferred embodiment of this application, the data processing module further includes:

[0091] The second threshold setting unit is used to set the signal amplitude compensation amount and the signal amplitude difference threshold.

[0092] The signal amplitude compensation unit is used to determine whether the signal amplitude within a continuous time period meets the fluctuation condition. If so, the signal amplitude compensation amount is added to the signal amplitude. The fluctuation condition is that the signal amplitude difference between two adjacent signal amplitudes exceeds the signal amplitude difference threshold more than three times.

[0093] The PIR sensor testing device of this application achieves efficient data acquisition through a test item setting module and an ADC test data acquisition module. The PIR device maintains a constant ADC mode, eliminating the need for mode and environment switching, thus ensuring the continuity and stability of the ADC test data. The data processing module incorporates an algorithm for the trigger logic of the simulated PIR circuit, processes the ADC test data to obtain the number of triggers, and calculates the trigger rate and false trigger rate. The parameter optimization module optimizes the sensitivity parameters of the PIR device. This device can accurately and efficiently complete the testing and optimization of PIR sensors, and is suitable for large-scale production or high-precision applications.

[0094] Finally, it should be noted that the accompanying drawings of the embodiments disclosed in this invention only involve the structures involved in the embodiments disclosed in this invention. Other structures can refer to the general design. In the absence of conflict, the same embodiment and different embodiments of this invention can be combined with each other.

[0095] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A testing method for a PIR sensor, characterized in that, include: Set the test conditions and various test items, and install and set the PIR device according to the test conditions and various test items. The PIR device has the set sensitivity parameter value. The tests for each of the aforementioned test items are performed sequentially to obtain ADC test data for different monitored objects moving under the corresponding test items. The monitored objects include the target monitored object, and the ADC test data is the analog-to-digital conversion data collected by the PIR device in ADC mode. The number of times the PIR device is triggered is obtained based on the ADC test data, and the number of times the triggering is compared with the number of times the target monitored object moves to obtain the trigger rate and false trigger rate. Based on the trigger rate and the false trigger rate, the optimal sensitivity parameter value of the PIR device is obtained; The installation and configuration of the PIR device according to the test conditions and each of the test items includes: Under the test conditions, multiple PIR devices are installed and set for each test item, and the sensitivity parameter values ​​of each PIR device are set sequentially according to the set step size. The step of obtaining the number of triggers of the PIR device based on the ADC test data includes: Different signal amplitude range thresholds are set for different test items; Obtain the signal amplitude from the ADC test data; Determine whether the signal amplitude is within the threshold range of the signal amplitude. If so, increment the trigger count of the PIR device by one.

2. The testing method for the PIR sensor as described in claim 1, characterized in that, The acquisition of the signal amplitude in the ADC test data includes: Acquire the signal from any consecutive time period in the ADC test data; The signal amplitude is acquired at predetermined time intervals within the continuous time period; The average value of the acquired signal amplitudes is calculated by averaging all the acquired signal amplitudes.

3. The testing method for the PIR sensor as described in claim 2, characterized in that, After acquiring a signal amplitude at predetermined time intervals within the continuous time period, the method further includes: Set the signal amplitude compensation amount and the signal amplitude difference threshold; Determine whether the signal amplitude within the continuous time period meets the fluctuation condition. If so, add the signal amplitude compensation amount to the signal amplitude. The fluctuation condition is that the signal amplitude difference between two adjacent signal amplitudes exceeds the signal amplitude difference threshold more than three times.

4. A testing device for a PIR sensor, characterized in that, include: The test item setting module is used to set the test conditions and various test items, and to install and set the PIR device according to the test conditions and various test items. The PIR device has the set sensitivity parameter value. The ADC test data acquisition module is used to sequentially perform the tests of each of the test items and acquire ADC test data of different monitored objects moving under the corresponding test items. The monitored objects include target monitored objects, and the ADC test data is analog-to-digital conversion data collected by the PIR device in ADC mode. The data processing module is used to obtain the number of times the PIR device is triggered based on the ADC test data, and to compare the number of times the triggering device is triggered with the number of times the target monitored object moves to obtain the trigger rate and the false trigger rate. The parameter optimization module is used to obtain the optimal sensitivity parameter value of the PIR device based on the trigger rate and the false trigger rate. The test item setting module includes: The parameter setting unit is used to install and set multiple PIR devices for each test item under the test conditions, and to set the sensitivity parameter values ​​of each PIR device in sequence according to the set step size. The data processing module includes: The first threshold setting unit is used to set different signal amplitude range thresholds for different test items; The first signal amplitude acquisition unit is used to acquire the signal amplitude in the ADC test data; The trigger count acquisition unit is used to determine whether the signal amplitude is within the threshold range of the signal amplitude. If so, the trigger count of the PIR device is incremented by one.

5. The testing apparatus for the PIR sensor as described in claim 4, characterized in that, The first signal amplitude acquisition unit includes: The signal acquisition unit is used to acquire the signal of any continuous time period in the ADC test data; The second signal amplitude acquisition unit is used to acquire a signal amplitude at a predetermined time interval during the continuous time period; The signal amplitude mean calculation unit is used to calculate the average value of all the acquired signal amplitudes to obtain the signal amplitude mean.

6. The testing apparatus for the PIR sensor as described in claim 5, characterized in that, The data processing module further includes: The second threshold setting unit is used to set the signal amplitude compensation amount and the signal amplitude difference threshold. The signal amplitude compensation unit is used to determine whether the signal amplitude within the continuous time period meets the fluctuation condition. If so, the signal amplitude compensation amount is superimposed on the signal amplitude. The fluctuation condition is that the signal amplitude difference between two adjacent signal amplitudes exceeds the signal amplitude difference threshold more than three times.

Citation Information

Patent Citations

  • PIR sensor detection method, device and system, and computer storage medium

    CN112067146A

  • Sensitivity adjusting method of PIR sensor and monitoring equipment

    CN118795570A