Four-way displacement analog quantity sensor test bench

CN122468024BActive Publication Date: 2026-09-18ZHEJIANG IND & TRADE VOCATIONAL & TECH COLLEGE (ZHEJIANG IND & TRADE TECHNICIAN COLLEGE)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610970258.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-01
Publication Date
2026-09-18
Estimated Expiration
2046-07-01

AI Technical Summary

Technical Problem

传统的测试方法多依赖于手动调整位移平台,使用高精度测距仪器(如激光干涉仪、千分表)作为基准,同时用高精度万用表读取传感器输出,这种方法效率低下、人工操作误差大、难以实现多通道并行测试,且无法适应批量化、快速化的生产测试需求

Benefits of technology

1.实现测试与演示的一体化集成设计:将精密的运动控制、多通道数据采集与图形化人机交互高度集成于单一设备。将内部测试仪的严谨性与客户演示器的直观性合二为一,避免了为不同目的搭建不同平台的成本与不便。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122468024B_ABST
    Figure CN122468024B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of sensor testing, and discloses a four-way displacement analog quantity sensor test board, which is internally provided with an STM32 microprocessor, a touch industrial control screen and a multi-station parallel test layout; through configuration of a timer output comparison interrupt and a DMA continuous scanning mechanism, an asynchronous characteristic latch model driven by displacement events is established; while the stepper motor is driven to run, a high-frequency scanning DMA is used to construct an analog quantity dynamic data pool, and a motor pulse cumulative value is used as a sampling reference; when the displacement reaches a preset space step, an instantaneous latch is performed on a corresponding analog-digital conversion value, a displacement-voltage synchronous data sequence with equal intervals of space coordinates is constructed, a data alignment problem under a multi-channel asynchronous variable frequency working condition is solved, three-dimensional performance evaluation of sensitivity, linearity and repeatability of the sensor can be automatically completed, and full-automatic synchronous detection of the displacement sensor is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of sensor testing technology, specifically a four-channel displacement analog sensor test bench. Background Technology

[0002] In industrial automation, precision measurement, and process control, displacement sensors serve as crucial sensing components, and their accuracy and stability directly impact the reliability and control precision of the entire system. Displacement sensors capable of outputting continuous analog signals (typically voltage or current) are widely used in applications requiring real-time, continuous position feedback due to their ability to provide rich distance information. Examples include robotic arm positioning, sheet metal thickness detection, vibration monitoring, and liquid level measurement. Common analog output displacement sensors are primarily categorized based on their sensing principles: inductive, capacitive, infrared reflective, and laser reflective. Each type of sensor has its own characteristics in terms of measurement range, accuracy, response speed, environmental adaptability (such as sensitivity to the material, color, ambient light, and electromagnetic interference of the measured object), and cost, making them suitable for various industrial scenarios.

[0003] To ensure that these sensors meet design requirements before leaving the factory or during use, and to effectively evaluate key indicators such as linearity, sensitivity, repeatability, and temperature drift, systematic and standardized testing and calibration are essential. Traditional testing methods often rely on manually adjusting the displacement platform, using high-precision ranging instruments (such as laser interferometers and dial indicators) as a reference, and simultaneously using high-precision multimeters to read the sensor output. This method is inefficient, prone to large human error, difficult to implement multi-channel parallel testing, and cannot meet the demands of batch and rapid production testing.

[0004] Therefore, developing a test platform that can achieve multi-channel parallel automatic control, synchronous real-time data acquisition, and dynamic waveform visualization is a technical problem that urgently needs to be solved in the field of sensor detection. Summary of the Invention

[0005] In order to overcome the shortcomings of the prior art, at least one technical problem raised in the background art is solved.

[0006] The technical solution adopted by this invention to solve its technical problem is: a four-channel displacement analog sensor test bench, comprising the following modules: Displacement execution module: Drives four stepper motors through an STM32F103C8T6 processor to control the corresponding baffle to move back and forth in front of the sensor; Signal acquisition and conditioning module: The sensor outputs a corresponding analog voltage based on the distance between itself and the baffle, and sends the analog voltage to the A / D conversion input port of STM32 after voltage division and conditioning; Control calculation module: Converts analog quantities into digital quantities, calculates the corresponding voltage values, and then transmits them to the configuration screen to display the corresponding sensor voltages through the display interface; Performance testing and evaluation module: Constructs a displacement-voltage synchronous data sequence using the sensor voltage and the displacement output from the displacement execution module to perform three-dimensional performance testing and evaluation of the sensor.

[0007] As a further technical solution of the present invention: the running speed of each of the four stepper motors can be controlled and set through the display interface of the configuration screen. After the STM32F103C8T6 processor receives the control command, it controls the running speed of the stepper motor and controls the forward and backward movement speed of the upper baffle of the motor in front of the sensor. The start and stop of each of the four stepper motors can be controlled through the display interface of the configuration screen. After the STM32F103C8T6 processor receives the start and stop control command, it can control the stop and start of the stepper motor.

[0008] As a further technical solution of the present invention: the configuration screen is equipped with a waveform display function, which can generate a time-voltage curve for the received voltage data, so as to track the relationship between the output voltage of the sensor and the distance.

[0009] As a further technical solution of the present invention: the process of controlling the corresponding baffle to move back and forth at the front end of the sensor is as follows: The user sets the motor speed, sends start / stop commands, and selects the waveform display channels on the configuration screen. The configuration screen sends the instructions to the STM32F103C8T6 processor via serial port 2. The STM32F103C8T6 processor parses the instructions and generates pulse signals of the corresponding frequency through a timer according to the speed instructions, which are then sent to the corresponding A4988 driver module. The A4988 drives the stepper motor to rotate according to the pulse frequency and ensures smooth operation through microstepping settings. The motor drives the baffle to move linearly in front of the sensor.

[0010] As a further technical solution of the present invention: the STM32F103C8T6 processor and the A4988 driver module are both powered by a power supply circuit. Specifically, the power supply circuit is as follows: an external 24VDC power supply is introduced through connector P1 and overcurrent protection is provided by a 24V / 1A fuse F1. The 24V power supply mainly powers the stepper motor and its A4988 driver. The core component is a 5V step-down to 3.3V power supply module, which first reduces the input 24V voltage to 5V to power some peripherals, and then further regulates it to the 3.3V required by the system core to power the STM32 microcontroller and other logic chips.

[0011] As a further technical solution of the present invention: the STM32F103C8T6 processor also includes GPIO, ADC, timer and USART; Among them, GPIO: generates pulse and direction signals to control the A4988 driver, precisely controlling the rotation steps and direction of the four stepper motors; ADC: It integrates a 12-bit ADC. The conditioned analog voltage signals from the four sensors are connected to the ADC pin of the STM32F103C8T6 processor and converted into digital quantities for calculation. Timer: Used to generate pulse signals to control the stepper motor driver to determine the movement speed, and as a displacement event trigger source. It drives displacement coordinate counting and analog feature latching in real time by generating output comparison interrupts.

[0012] USART: Serial Port 2: As the main communication interface, it connects to the configuration panel. The STM32F103C8T6 processor receives speed settings and start / stop commands from the configuration panel through it, and sends real-time collected voltage data to the configuration panel. Serial Port 1: As a debugging interface, it connects to the PC. Developers can use this port to print program running status and variable value information using a serial port debugging assistant tool.

[0013] As a further technical solution of the present invention: the A4988 driver is specifically: Drive core: The system adopts a four-channel A4988 stepper motor drive module. The A4988 is a DMOS micro-stepping driver with converter and overcurrent protection. Control signals: Each A4988 module receives two types of signals from the STM32: STEP signal: Each pulse drives the motor to rotate one microstep; DIR signal: High / low level controls the forward / reverse rotation of the motor; Microstepping settings: Each A4988 module is equipped with a three-position DIP switch. By setting different switch combinations, the driver can be microstepped, achieving precise and smooth control of the baffle movement.

[0014] As a further technical solution of the present invention: the voltage divider conditioning is achieved through a sensor signal conditioning circuit, specifically as follows: It mainly consists of a resistor divider network and may include operational amplifiers for signal buffering. This ensures that the entire voltage range output by the sensor at different distances can be accurately acquired by the STM32 without saturation or damage, so as to adapt the voltage range output by different sensors to the safe input range of the STM32 ADC.

[0015] As a further technical solution of the present invention: the process of constructing the displacement-voltage synchronous data sequence adopts a spatial trigger latching mechanism: while driving the stepper motor to run and the processor maintains the pulse accumulation count value in real time, the ADC module is configured to perform high-frequency continuous scanning in the background using the DMA mechanism and form a dynamic data pool; the real-time pulse accumulation value of each motor is used as the sampling reference, and whenever the count value reaches the preset spatial displacement step size, the latching instruction is executed instantaneously and the corresponding analog voltage sampling point is extracted from the dynamic data pool; through this displacement event-driven mapping method, the analog voltage is precisely aligned with the real-time physical coordinates, thereby establishing the displacement-voltage synchronous data sequence and ensuring that the sampling points are evenly distributed on the displacement axis.

[0016] As a further technical solution of the present invention: the process of performing three-dimensional performance testing and evaluation of the sensor is as follows: Sensitivity analysis: The processor uses the least squares method to perform linear fitting on the above displacement-voltage data sequence and calculates the slope of the fitted line. This slope is defined as the sensitivity value of the sensor under test, which is used to evaluate the sensor's response strength to displacement changes. Linearity analysis: The processor calculates the maximum deviation between the measured voltage at each measurement point and the fitted straight line, and uses the ratio of the maximum deviation value to the full-scale output value of the sensor as a linearity index to evaluate the linear proportional relationship between the sensor output signal and the displacement input. Repeatability analysis: The processor controls the actuator to drive the baffle to perform multiple reciprocating strokes, automatically extracting multiple voltage sampling data at the same displacement coordinate point, and evaluating the output repeatability of the sensor by calculating the range or standard deviation of the voltage sampling data.

[0017] The beneficial effects of this invention are as follows: 1. Integrated design for testing and demonstration: Precise motion control, multi-channel data acquisition, and graphical human-computer interaction are highly integrated into a single device. This combines the rigor of internal testing equipment with the intuitiveness of customer demonstrators, avoiding the cost and inconvenience of building separate platforms for different purposes.

[0018] 2. Implement an interactive demonstration mode based on a touchscreen: Abandoning the buttons and indicator lights of traditional devices, a full touchscreen control is adopted. Users can complete all operations by clicking and swiping, transforming passive observation into active interaction, improving the participation and interaction efficiency of the demonstration, and making it the preferred solution for showcasing the functions of modern industrial products.

[0019] 3. Real-time visualization of both data and waveforms: The system not only provides accurate digital voltage readings but also integrates real-time waveform display functionality. This design transforms the sensor from a static parameter display to a dynamic curve display, enabling in-depth performance analysis, providing intuitive visual feedback, and improving the displayability and evaluation efficiency of technical parameters.

[0020] 4. Achieving High-Precision Quantitative Evaluation and Multi-Dimensional Comparative Analysis of Performance Indicators: Through the invention's unique "spatial trigger latch" mechanism, microsecond-level strong coupling and alignment of asynchronous displacement pulses and ADC sampling data are achieved, ensuring the absolutely equidistant distribution of the evaluation sequence along the physical displacement axis. This high-quality synchronous data stream, combined with algorithms such as the least squares method, can more accurately and automatically calculate key indicators such as linearity, sensitivity, and repeatability, eliminating the calculation distortion caused by speed fluctuations in traditional timed sampling. The system supports horizontal comparisons at the same speed and vertical comparisons at varying speeds for various types of sensors, providing scientific and objective data support for accurate sensor selection and dynamic performance optimization. Attached Figure Description

[0021] The invention will now be further described with reference to the accompanying drawings.

[0022] Figure 1 This is a logic block diagram of the four-channel displacement analog sensor test platform described in this embodiment of the invention for testing sensors; Figure 2 This is a circuit diagram of the voltage division of the sensor input analog signal by the four-channel displacement analog sensor test platform described in this embodiment of the invention; Figure 3 This is a flowchart of the module of the four-channel displacement analog sensor test platform described in this embodiment of the invention; Figure 4 This is a three-dimensional structural schematic diagram of the multi-channel displacement analog sensor testing device according to an embodiment of the present invention; Figure 5 This is a top view and component labeling diagram of the multi-channel displacement analog sensor testing device according to an embodiment of the present invention, wherein: 1. Industrial control screen; 2. First acrylic sensing plate; 3. Infrared sensor; 4. Laser sensor; 5. Second acrylic sensing plate; 6. Inductive sensor; 7. Capacitive sensor; 8. Iron sensing plate; 9. Aluminum sensing plate; 10. First motor and moving mechanism; 11. Second motor and moving mechanism; 12. Third motor and moving mechanism; 13. Fourth motor and moving mechanism. Detailed Implementation

[0023] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.

[0024] Example 1 Please see Figures 1-3 As shown in the figure, the four-channel displacement analog sensor test bench of this invention includes the following modules: Displacement execution module: Drives four stepper motors through an STM32F103C8T6 processor to control the corresponding baffle to move back and forth in front of the sensor; Signal acquisition and conditioning module: The sensor outputs a corresponding analog voltage based on the distance between the baffle and itself, and sends the analog voltage to the A / D conversion input port of the STM32F103C8T6 processor after voltage division and conditioning; Control calculation module: Converts analog quantities into digital quantities, calculates the corresponding voltage values, and then transmits them to the configuration screen to display the corresponding sensor voltages through the display interface; Performance testing and evaluation module: Constructs a displacement-voltage synchronous data sequence using the sensor voltage and the displacement output from the displacement execution module to perform three-dimensional performance testing and evaluation of the sensor.

[0025] In the displacement execution module: the sensors include inductive, capacitive, infrared, and laser types, respectively. Figure 1 As shown; In the displacement execution module, the process of controlling the corresponding baffle to move back and forth at the front end of the sensor is as follows: The running speed of each of the four stepper motors can be controlled and set through the display interface of the configuration screen. After the STM32F103C8T6 (STM32 for short) processor receives the control command, it controls the running speed of the stepper motor and the speed at which the upper baffle of the motor moves back and forth in front of the sensor. More specifically, the user sets the motor speed, sends start / stop commands, and selects the number of waveform display channels on the configuration screen. The configuration screen sends the commands to the STM32F103C8T6 processor via serial port 2. The STM32F103C8T6 processor parses the commands and, based on the speed command, generates pulse signals of the corresponding frequency through a timer, sending them to the corresponding A4988 driver module. The A4988 drives the stepper motor to rotate according to the pulse frequency, and ensures smooth operation through microstepping settings. The motor drives the baffle to move linearly in front of the sensor. Furthermore, the start and stop of each of the four stepper motors can be controlled through the configuration screen's display interface. After receiving the start / stop control command, the STM32F103C8T6 processor can control the stop and start of the stepper motors. Preferably, the following table provides an example of setting the motor speed, sending start / stop commands, and selecting the number of waveform display channels; Table 1. User settings and example parameters for the displacement sensor test bench;

[0026] Referring to the four-channel asynchronous parallel test example shown in Table 1, the motion control and sampling alignment logic of the system based on the temporal background acquisition-spatial feature latch architecture is explained: Independent channel rate mapping and adaptive triggering: The system supports parallel operation of four actuators under completely independent motion parameters. The processor generates drive pulse sequences with varying frequencies using independent comparison channels of timers, based on the set motion speeds (v1 to v4) for each channel. The core feature of the system lies in its "constant spatial resolution" adaptive mapping mechanism: regardless of the drive frequency of each motor, the system uniformly or independently sets the "recorded displacement step" as the mapping benchmark. For example, when a channel moves 0.05mm, corresponding to 10 pulses, the system triggers an interrupt in units of "10 pulses." This processing method allows the feature latching frequency of each channel to adaptively adjust with its operating speed, ensuring that the sensor can accurately map the analog characteristics in the current DMA buffer at every tiny preset displacement node in its respective stroke.

[0027] Spatial distribution consistency optimization across speeds: Thanks to the speed-triggered spatial latching mechanism described above, the system maintains a high degree of consistency in the distribution density of physical sampling points across all channels under asynchronous operating conditions with different movement speeds and pulse frequencies. This standardized sampling in the spatial domain eliminates waveform distortion caused by motor speed fluctuations or drift in the sampling period of each channel from the physical source. This not only provides reliable spatial feature samples for dynamic response analysis under high-speed motion conditions, but also ensures that the data from the four asynchronously operating sensors have natural alignment characteristics on the displacement axis coordinates, significantly improving the calibration efficiency of multi-station parallel testing.

[0028] Mathematical model optimization based on uniformly distributed spatial nodes: The system receives the synchronization sequence after spatial latching. Since the sampling points are absolutely uniformly distributed and equally spaced along the displacement axis (X-axis), this eliminates the regression fitting variance bias caused by uneven sampling point distribution to the greatest extent possible when using the least squares method for linear fitting. This stable data structure enables test curves at different speeds and ranges to have extremely high lateral comparability, truly reflecting the sensor's performance profile under complex dynamic loads, thereby achieving accurate performance consistency determination.

[0029] Physical Displacement-Voltage Characteristic Curve (SV Curve) Generation: The configuration panel utilizes a high-precision spatial synchronization sequence to generate an intuitive "displacement-voltage" characteristic curve. Unlike the "time-voltage" curve generated by traditional testing instruments, this invention directly uses the physical displacement as the abscissa and the sensor's analog output as the ordinate, achieving real-time dynamic plotting of the sensor's transfer function. Users can intuitively monitor the output deviation of each independent channel sensor at every position point in its physical travel, significantly improving the intuitiveness and quantification depth of performance evaluation.

[0030] In the displacement execution module, both the STM32F103C8T6 processor and the A4988 driver module are powered by a power supply circuit. Specifically, the power supply circuit consists of an external 24VDC power supply introduced through connector P1, and overcurrent protection via a 24V / 1A fuse F1. This 24V power supply primarily powers the stepper motor and its A4988 driver. The core component is a 5V-to-3.3V step-down power supply module. It first reduces the input 24V voltage to 5V to power some peripherals, and then further regulates it to the 3.3V required by the system core to power the STM32 microcontroller and other logic chips.

[0031] The STM32F103C8T6 processor also includes GPIO, ADC, timers, and USART; Among them, GPIO (General Purpose Input / Output): generates pulse (PUL / STEP) and direction (DIR) signals to control the A4988 driver, precisely controlling the number of rotation steps and direction of the four stepper motors; ADC (Analog-to-Digital Converter): It integrates a 12-bit ADC. The conditioned analog voltage signals (0-3.3V) from the four sensors are connected to the ADC pin of the STM32F103C8T6 processor and converted into digital quantities for calculation. Timer: Used to precisely generate pulse signals to control the A4988; the pulse frequency directly determines the running speed of the stepper motor. USART (Universal Synchronous Asynchronous Receiver / Transmitter): Serial Port 2 (USART2): Serves as the main communication interface, connecting to the configuration panel. The STM32F103C8T6 processor uses it to receive speed settings and start / stop commands from the configuration panel and sends real-time acquired voltage data back to the configuration panel. Serial Port 1 (USART1): Serves as the debugging interface, connecting to the PC. Developers can use this port to print program running status and variable value information using serial port debugging tools.

[0032] The A4988 driver is specifically: Drive core: The system adopts a four-channel A4988 stepper motor driver module. The A4988 is a DMOS microstepper driver with converter and overcurrent protection, which simplifies the control of the stepper motor; Control signals: Each A4988 module receives two types of signals from the STM32: STEP (pulse) signal: Each pulse drives the motor to rotate one microstep; DIR (Direction) signal: High / low level controls the forward / reverse rotation of the motor; Microstepping settings: Each A4988 module is equipped with a three-position DIP switch. By setting different switch combinations, the driver can be microstepped. Increasing the microstepping setting can significantly improve the smoothness of motor operation, reduce noise and vibration, thereby achieving precise and smooth control of the baffle movement.

[0033] In the signal acquisition and conditioning module, the voltage divider conditioning is implemented through a sensor signal conditioning circuit, specifically as follows: It mainly consists of a resistor divider network and may include operational amplifiers for signal buffering. This ensures that the entire voltage range output by the sensor at different distances can be accurately acquired by the STM32 without saturation or damage, thus adapting the voltage range of different sensor outputs to the safe input range (0-3.3V) of the STM32 ADC. The schematic diagram of the voltage divider circuit for the analog output sensor is as follows: Figure 2 As shown, four sensors are connected to their corresponding interfaces. The analog outputs from the sensors are divided by resistors, and the output voltage is sent to the PA4 port of the STM32 for analog-to-digital conversion. Taking the first channel as an example, the voltage division ratio is (R9 / (R8+R9)). The SMAJ3.3A is a transient voltage suppressor diode. When the input voltage is higher than 3.3V, it will clamp the voltage to 3.3V, thereby achieving overvoltage protection.

[0034] In the performance testing and evaluation module, the process of constructing the displacement-voltage synchronous data sequence includes: while driving the stepper motor and having the processor maintain the pulse accumulation count in real time, the ADC module is configured to perform high-frequency continuous scanning in the background using the DMA mechanism to form a dynamic data pool; the system adopts a "spatial trigger latch" strategy, using the real-time pulse accumulation value of each motor as the sampling reference, and whenever the count value reaches the preset spatial displacement step size, the latch instruction is executed instantaneously and the corresponding analog voltage sampling point is extracted from the dynamic data pool; through this displacement event-driven mapping method, the analog voltage is precisely aligned with the real-time physical coordinates, thereby establishing the displacement-voltage synchronous data sequence and ensuring that the sampling points are evenly distributed on the displacement axis; Specifically, the system uses the output comparison mode of the timer to generate frequency-independent drive pulse signals to control the displacement of the actuator, and maintains the pulse count value in real time to characterize the physical displacement coordinates of the baffle.

[0035] Establishment of dynamic data pool: The ADC module, in conjunction with the DMA controller, performs high-frequency continuous scanning in the background and stores the conversion results in real time into the circular storage area, forming a dynamic characteristic data pool of analog quantities that characterizes the current state of the sensor.

[0036] Spatial domain triggered latch: The system uses a displacement counter as the trigger source. When the count value reaches the preset spatial sampling step, the interrupt logic momentarily acts as a "spatial sampling switch" to perform feature latching.

[0037] Spatiotemporal feature mapping: At the instant the latching action occurs, the system extracts the corresponding analog-to-digital conversion result from the dynamic data pool and maps it one-to-one with the current physical displacement coordinates, thereby constructing a displacement-voltage synchronization data sequence that is strictly and equally distributed on the displacement axis (X-axis).

[0038] This processing logic eliminates fitting bias caused by differences in actuator speed, sampling jitter, or clock skew at the source through strong coupling alignment in the spatial dimension.

[0039] Based on displacement-voltage synchronization data sequences, the sensor's performance was evaluated using three dimensions: Sensitivity Analysis: The processor uses the least squares method to perform linear regression analysis on the synchronous data sequence. Because the displacement nodes xi have absolutely equal spacing, the coordinate deviation caused by velocity fluctuations in traditional timed sampling is eliminated, allowing the slope k of the calculated fitted line to more accurately reflect the sensor's response to changes in physical displacement.

[0040] Linearity Analysis: Based on the aforementioned high-precision fitted straight line, the processor calculates the residual between the measured voltage yi at each sampling point and the fitted value. Thanks to the asynchronous feature latching technology, the sampling points are distributed extremely evenly across the entire range, enabling the system to capture subtle nonlinear characteristics throughout the range. The processor obtains the optimized linearity index by calculating the ratio of the maximum absolute deviation Δymax to the full-scale output value.

[0041] Repeatability Analysis: The system controls the actuator to perform multiple round trips, using pulse count values ​​as the absolute physical coordinate reference. This module introduces a coordinate index-based matching extraction mechanism. When the pulse count value reaches the preset target coordinate point Ntarget again, feature data extraction is automatically triggered. This "physical position reproduction" evaluation method completely eliminates the influence of mechanical round trip delay and transmission backlash on repeatability testing, achieving accurate quantitative evaluation of sensor output stability.

[0042] Example 2, please refer to Figures 4 to 5 As shown, the multi-channel displacement analog sensor testing device described in this embodiment of the invention adopts a portable integrated structure, and its specific physical layout and mechanical structure are as follows: Overall layout and housing structure: The device is integrated into a portable integrated housing with a hinged lid. For example... Figure 3 and Figure 5 As shown, a mounting panel is horizontally installed inside the enclosure, and all core testing components and interactive components are fixed to the mounting panel. When the enclosure is closed, it protects the internal precision components; when opened, the mounting panel provides a convenient view for operation and observation, suitable for laboratory quality inspection and mobile demonstrations at exhibitions.

[0043] Interactive display unit: such as Figure 5 As shown, an industrial control screen (1) (i.e., a touch screen) is embedded in the upper left of the mounting panel as a human-machine interaction terminal for setting motor parameters, controlling the start and stop of the test process, and drawing the real-time dynamic waveform of the sensor output.

[0044] Multi-station testing layout: The right side of the panel has four parallel independent testing stations, each equipped with a specific sensing target (baffle) for sensors with different sensing principles: The first station includes an infrared sensor (3) fixed on a bracket and a first acrylic sensing plate (2) mounted on a movable slider. The second station includes a laser sensor (4) and a corresponding second acrylic sensing plate (5). The third station includes an inductive sensor (6) and a corresponding iron induction plate (8). The fourth station includes a capacitive sensor (7) and a corresponding aluminum induction plate (9).

[0045] Actuating and moving mechanisms: Each test station is equipped with an independent motor and moving mechanism (10, 11, 12, 13), specifically including: a first motor and moving mechanism (10), a second motor and moving mechanism (11), a third motor and moving mechanism (12), and a fourth motor and moving mechanism (13). The moving mechanism (i.e., the moving actuator) is controlled by the main control board, driving the corresponding sensing plate (baffle) to make precise linear translation within a preset stroke at the front end of the sensor, thereby simulating the displacement detection process of the sensor under actual working conditions.

[0046] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A four-channel displacement analog sensor test bench, characterized in that: Includes the following modules: Displacement execution module: Drives four stepper motors through an STM32F103C8T6 processor to control the corresponding baffle to move back and forth in front of the sensor; Signal acquisition and conditioning module: The sensor outputs a corresponding analog voltage based on the distance between itself and the baffle, and sends the analog voltage to the A / D conversion input port of STM32 after voltage division and conditioning; Control calculation module: Converts analog quantities into digital quantities, calculates the corresponding voltage values, and then transmits them to the configuration screen to display the corresponding sensor voltages through the display interface; Performance testing and evaluation module: Constructs a displacement-voltage synchronous data sequence using the sensor voltage and the displacement output from the displacement execution module to perform three-dimensional performance testing and evaluation of the sensor; The STM32F103C8T6 processor and A4988 driver module are both powered by a power supply circuit. Specifically, the power supply circuit is as follows: an external 24VDC power supply is introduced through connector P1 and overcurrent protection is provided by a 24V / 1A fuse F1. The 24V power supply mainly powers the stepper motor and its A4988 driver. The core component is a 5V step-down to 3.3V power supply module, which first reduces the input 24V voltage to 5V to power some peripherals, and then further regulates it to the 3.3V required by the system core to power the STM32 microcontroller and other logic chips. The STM32F103C8T6 processor also includes GPIO, ADC, timers, and USART; Among them, GPIO: generates pulse and direction signals to control the A4988 driver, precisely controlling the rotation steps and direction of the four stepper motors; ADC: It integrates a 12-bit ADC. The conditioned analog voltage signals from the four sensors are connected to the ADC pin of the STM32F103C8T6 processor and converted into digital quantities for calculation. Timer: Used to precisely generate pulse signals to control the A4988; the pulse frequency directly determines the running speed of the stepper motor. USART: Serial Port 2: As the main communication interface, it connects to the configuration panel. The STM32F103C8T6 processor receives speed settings and start / stop commands from the configuration panel through it, and sends real-time collected voltage data to the configuration panel. Serial Port 1: As a debugging interface, it connects to the PC. Developers can use this port to print program running status and variable value information using a serial port debugging assistant tool. The A4988 driver is specifically: Drive core: The system adopts a four-channel A4988 stepper motor drive module. The A4988 is a DMOS micro-stepping driver with converter and overcurrent protection. Control signals: Each A4988 module receives two types of signals from the STM32: STEP signal: Each pulse drives the motor to rotate one microstep; DIR signal: High / low level controls the forward / reverse rotation of the motor; Microstep settings: Each A4988 module is equipped with a three-position DIP switch. By setting different switch combinations, the driver can be microstepped, achieving precise and smooth control of the baffle movement. The voltage divider conditioning is achieved through a sensor signal conditioning circuit, specifically as follows: It mainly consists of a resistor voltage divider network, including an operational amplifier for signal buffering, to ensure that the entire voltage range output by the sensor at different distances can be accurately acquired by the STM32 without saturation or damage, and to adapt the voltage range output by different sensors to the safe input range of the STM32 ADC. The process of constructing the displacement-voltage synchronous data sequence adopts a spatial trigger latching mechanism: while driving the stepper motor and the processor maintains the pulse accumulation count value in real time, the ADC module is configured to perform high-frequency continuous scanning in the background using the DMA mechanism to form a dynamic data pool; the real-time pulse accumulation value of each motor is used as the sampling reference, and whenever the count value reaches the preset spatial displacement step size, the latching instruction is executed instantaneously and the corresponding analog voltage sampling point is extracted from the dynamic data pool; through this displacement event-driven mapping method, the analog voltage is precisely aligned with the real-time physical coordinates, thereby establishing the displacement-voltage synchronous data sequence and ensuring that the sampling points are evenly distributed on the displacement axis.

2. The four-channel displacement analog sensor test bench according to claim 1, characterized in that: The running speed of each of the four stepper motors can be controlled and set through the display interface of the configuration screen. After the STM32F103C8T6 processor receives the control command, it controls the running speed of the stepper motor and controls the forward and backward movement speed of the upper baffle of the motor in front of the sensor. The start and stop of each of the four stepper motors can be controlled through the display interface of the configuration screen. After the STM32F103C8T6 processor receives the start and stop control command, it can control the stop and start of the stepper motor.

3. The four-channel displacement analog sensor test bench according to claim 1, characterized in that: The configuration screen is equipped with a waveform display function, which can generate time-voltage curves for the received voltage data and track the relationship between the sensor's output voltage and distance.

4. The four-channel displacement analog sensor test bench according to claim 1, characterized in that: The process of the control-corresponding baffle moving back and forth at the front end of the sensor is as follows: The user sets the motor speed, sends start / stop commands, and selects the waveform display channels on the configuration screen. The configuration screen sends the instructions to the STM32F103C8T6 processor via serial port 2. The STM32F103C8T6 processor parses the instructions and generates pulse signals of the corresponding frequency through a timer according to the speed instructions, which are then sent to the corresponding A4988 driver module. The A4988 drives the stepper motor to rotate according to the pulse frequency and ensures smooth operation through microstepping settings. The motor drives the baffle to move linearly in front of the sensor.

5. The four-channel displacement analog sensor test bench according to claim 1, characterized in that: The process of conducting three-dimensional performance testing and evaluation of the sensor is as follows: Sensitivity analysis: The processor uses the least squares method to perform linear fitting on the above displacement-voltage data sequence and calculates the slope of the fitted line. This slope is defined as the sensitivity value of the sensor under test, which is used to evaluate the sensor's response strength to displacement changes. Linearity analysis: The processor calculates the maximum deviation between the measured voltage at each measurement point and the fitted straight line, and uses the ratio of the maximum deviation value to the full-scale output value of the sensor as a linearity index to evaluate the linear proportional relationship between the sensor output signal and the displacement input. Repeatability analysis: The processor controls the actuator to drive the baffle to perform multiple reciprocating strokes, automatically extracting multiple voltage sampling data at the same displacement coordinate point, and evaluating the output repeatability of the sensor by calculating the range or standard deviation of the voltage sampling data.

Citation Information

Patent Citations

  • Method and system for field application and calibration of reflection fiber optic displacement sensor

    CN104048610A