Button switch test system and test method
Through the drive board that integrates motor drive, grating ruler and pressure sensor, the complexity and accuracy of the existing push-button switch testing system is solved, and a low-cost and efficient testing method is realized, suitable for different types of push-button switch testing.
Patent Information
- Application Number
- CN202411129310.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-11-12
AI Technical Summary
The existing push button switch test system has complex operation, low accuracy, long test time, and high cost, making it difficult to achieve flexible switching of driving methods.
The system is adopted that includes a top computer, motor driver, stepper motor, pressure sensor, grating ruler and drive board. The drive board integrates motor driver, grating ruler and pressure sensor to achieve flexible driving and real-time monitoring of buttons, simplifying the testing process.
It reduces testing costs, shortens testing time, improves testing accuracy and operation convenience, and can flexibly switch driving methods, which are suitable for different types of push-button switch testing.
Smart Images

Figure CN118937983A_ABST
Abstract
Description
Technical Field
[0001] The present invention is applied to the technical field of button testing, and in particular relates to a button switch testing system and a testing method. Background Art
[0002] Buttons and switches are not just simple components that realize functions, they are also the key to the interaction between users and devices. For example, a button needs to apply appropriate force to trigger. Pressing it too easily may lead to misoperation, while pressing it too hard may cause inconvenience to users. In addition, the stroke of the button is also a key factor, which determines the feedback felt by the user when pressing the button. The tactile test of buttons and switches is based on measuring parameters such as touch force, click force and button stroke to evaluate the sensitivity, comfort and reliability of their operation, so as to ensure that the product design meets user expectations and provides an excellent user experience. There are two common testing methods. One is to use a proportional valve with a cylinder to understand the critical point force of the button switch, set the size of the proportional valve output gas, and then enable the cylinder to realize the button switch from open circuit to conduction; the other is to use a drive motor to gradually apply pressure to the button until the button is turned on; both methods can use a grating ruler to monitor the stroke of the button. The first method can only obtain data from the button from open circuit to conduction. There is no way to obtain the detailed force changes and stroke between the processes. It is not suitable for precision buttons. The second method can select the stroke of the press according to the needs, and can obtain detailed data during the process.
[0003] like Fig.19As shown in the figure, this curve is the actual force curve of the button during the process of applying pressure. The vertical axis is force, the horizontal axis is stroke, and the straight line represents the switch state of the button. The stroke from the beginning of the product force to the change of the button switch state is the stroke of the switch button. For the button switch conduction test, although the proportional valve + cylinder method is simple to operate, the accuracy is not high. The motor drive method is relatively complicated, among which stepper motors or servo motors can be selected. The stepper motor operation tracking implementation characteristics are better than those of the servo motor. Since the stepper motor moves an angle for each pulse, the pulse signal motor will move without delay. The servo motor is a closed-loop control. After the pulse is sent and the encoding is returned for comparison processing, if there is an overshoot, it will turn back with a certain delay, and the tracking characteristics are worse than those of the stepper motor. For example: when using an engraving machine to draw a circle, the pattern drawn by the stepper motor drive is better than that drawn by the servo motor drive. The drive setting of the stepper motor is simple, and only the current and subdivision need to be set; the servo driver has hundreds of parameter settings, and the setting is more cumbersome. In the scenario of push button switch conduction test, closed-loop control is not required to control the pressure at a dynamic balance point. Therefore, from the actual situation, stepper motors are more suitable. In the prior art, the host computer and each device of the test equipment mostly communicate independently, which takes a long time, thereby extending the test time of the entire system. Therefore, it is necessary to provide a push button switch test system and test method with low cost, easy operation, reduced test time, modular integration, and flexible switching of drive modes. Summary of the invention
[0004] The technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide a push button switch testing system and testing method which are low in cost, easy to operate, reduce testing time, have modular integration, and can flexibly switch driving modes.
[0005] The technical solution adopted by the present invention is: the present invention includes a host computer, a motor driver, a drive board, a stepper motor, a pressure sensor, an adapter board and a product, the motor driver is communicatively connected with the stepper motor, the stepper motor is provided with a grating ruler and a reading head, the output shaft of the stepper motor is transmission-connected with the pressure sensor, the pressure sensor is press-fitted with the button top of the product through the pressure head, the product is communicatively connected with the drive board through the adapter board, the pressure sensor, the reading head and the motor driver are all communicatively connected with the drive board, and the drive board is communicatively connected with the host computer; The driver board outputs a pulse + level to be connected to the motor driver to drive the stepper motor. The pressure sensor monitors the pressure of the pressure head contacting the product. The driver board processes the analog signal of the pressure sensor and converts it into a digital signal. The grating ruler and the reading head detect the real-time stroke of the stepper motor and the button stroke of the product. The reading head is directly connected to the driver board after passing through a subdivision box, and the driver board processes the signal of the reading head. After the pressure head presses the button of the product, the switch signal is connected to the driver board through the adapter board to detect the conduction status of the product, and finally the data is transmitted to the host computer.
[0006] It can be seen from the above scheme that the motor drive, grating scale distance measurement and pressure sensor distance measurement are integrated in the driver board, which can not only reduce the test time but also reduce the cost. The driver board is integrated and can realize all functions in the entire test process; the motor driving mode can be flexibly switched, and the entire test process is simplified and efficient. The grating scale stroke test and the pressure sensor pressure test are integrated into the driver board, which can save the grating scale encoder and the pressure sensor amplifier, greatly reducing the cost and making the operation more convenient.
[0007] A preferred solution is that the driving board includes a microcontroller, the microcontroller is connected to an analog-to-digital converter, the analog-to-digital converter is connected to an RC filter, the Force_IN_P pin and Force_IN_N pin of the RC filter are connected to the signal line of the pressure sensor, and the ADC_IN1 pin and ADC_IN2 pin of the RC filter are connected to the corresponding port of the analog-to-digital converter.
[0008] A preferred solution is that the driving board also includes an op amp follower, the output end of the op amp follower is connected to the AIN3 pin of the analog-to-digital converter, and the same-direction input end of the op amp follower is communicatively connected to the button of the product.
[0009] A preferred solution is that the driver board also includes an interface and a differential transceiver, the interface is connected to the subdivision box of the grating ruler, the Grating_A_P pin, Grating_A_N pin, Grating_B_P pin, Grating_B_P pin, and Grating_E_EXT pin of the interface are respectively connected to the differential transceiver, and the 1Y pin and 2Y pin of the differential transceiver are connected to the corresponding pins of the microcontroller.
[0010] A preferred solution is that the driver board also includes a memory chip, the A0 pin, A1 pin, and A2 pin of the memory chip are all address selection pins, and the SCL pin and SDA pin of the memory chip are both connected to corresponding pins of the microcontroller.
[0011] A preferred solution is that the driving board also includes a first MOS tube and a second MOS tube, the drain of the first MOS tube and the drain of the second MOS tube are both connected to PP5V, the gate of the first MOS tube is connected to the timer of the microcontroller, and the gate of the second MOS tube is connected to the IO port of the microcontroller.
[0012] A preferred solution is that the driver board also includes an RS485 transceiver, and the 485_RE / DE pin, 485_USART2_RX pin, 485_INV pin, and 485_USART2_TX pin of the RS485 transceiver are respectively connected to the corresponding pins of the microcontroller, and the 485_A pin and 485_B pin of the RS485 transceiver are respectively connected to the motor driver via the RS485 interface.
[0013] A preferred solution is that the driving board further includes an Ethernet controller, and the Ethernet controller is connected to the microcontroller.
[0014] A preferred solution is that the driving board also includes a first power management chip, a second power management chip and a third power management chip. The first power management chip serves as the power supply of the driving board. The input power supply of the first power management chip is 24V. The output voltage of the first power management chip is 9V. The second power management chip serves as the power supply of the pressure sensor and the analog-to-digital converter. The second power management chip reduces PP9V to 5V. The third power management chip is used for the reference voltage PP2V5_REF of the analog-to-digital converter.
[0015] A preferred embodiment is that the test method is as follows: A. The driving board sends a command for the stepping motor to return to the origin to the motor driver through the RS485 interface. After the stepping motor returns to the origin, the target pressure value to be applied to the button is written into the storage chip; B. The motor driver is switched to the external pulse mode, the driving board drives the stepper motor to work, the stepper motor is connected to the pressure head through a screw rod, and the pressure head quickly approaches the button of the product; C. The stepper motor moves in a single step, and the pressure value is further read once for each line. When the pressure value is greater than 20g, it is determined that the button of the product is in contact. D. The grating ruler is reset to zero, thereby recording the stroke of the button, and the stepper motor continues to press down in a single step, recording the pressure value of the pressure sensor, the stroke of the stepper motor, and the conduction signal of the button of the product every time; E. Until the pressure value is greater than the set pressure target value, the movement direction of the stepper motor is switched, and the stepper motor moves back in a single step. At the same time, the stroke of the stepper motor, the conduction signal of the button of the product and the pressure value of the pressure sensor are tested until the force is less than 20g. Finally, the stepper motor return to origin instruction is sent back through the RS485 interface. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a schematic diagram of the present invention; Figure 2 is a schematic diagram of the driving board; Figure 3 is a circuit schematic diagram of the microcontroller; Figure 4 is a circuit schematic diagram of the analog-to-digital converter; Figure 5 is a circuit schematic diagram of the operational amplifier follower; Figure 6 is a circuit schematic diagram of the interface and the differential transceiver; Figure 7 is a circuit schematic diagram of the memory chip; Figure 8 is a circuit schematic diagram of the first MOS tube and the second MOS tube; Fig. 9 It is the circuit schematic diagram of the RS485 transceiver; Fig.10 is a circuit schematic diagram of the Ethernet controller; Fig.11 is a circuit schematic diagram of the first power management chip, the second power management chip and the third power management chip; Fig.12 is a flow chart of the first part of the test method; Fig.13 is a flow chart of the second part of the test method; Fig.14 is a flow chart of the third part of the test method; Fig.15 is a pulse output waveform diagram of the driving board; Fig.16 is a measurement data graph of the pressure sensor; Fig.17 is a data diagram of the stepping motor stroke measured by the grating ruler; Fig.18 It is a data graph of the button of the product 7 in actual application test; Fig.19 It is a curve graph of the actual force applied to the button during the process of applying pressure. DETAILED DESCRIPTION
[0017] like Figure 1 to Figure 2 As shown, in this embodiment, the present invention includes a host computer 1, a motor driver 2, a drive board 3, a stepper motor 4, a pressure sensor 5, an adapter board 6 and a product 7, the motor driver 2 is communicatively connected to the stepper motor 4, the stepper motor 4 is provided with a grating ruler 8 and a reading head 9, the output shaft of the stepper motor 4 is transmission-connected to the pressure sensor 5, the pressure sensor 5 is press-fitted with the button top of the product 7 through the pressure head 10, the product 7 is communicatively connected to the drive board 3 via the adapter board 6, the pressure sensor 5, the reading head 9 and the motor driver 2 are all communicatively connected to the drive board 3, and the drive board 3 is communicatively connected to the host computer 1; The driving board 3 outputs a pulse + level mode connected to the motor driver 2 to drive the stepper motor 4. The pressure sensor 5 monitors the pressure of the pressure head 10 contacting the product 7. The driving board 3 processes the analog signal of the pressure sensor 5 and converts it into a digital signal. The grating ruler 8 and the reading head 9 detect the real-time stroke of the stepper motor 4 and the button stroke of the product 7. The reading head 9 is directly connected to the driving board 3 after passing through a subdivision box, and the signal of the reading head 9 is processed by the driving board 3. After the pressure head 10 presses the button of the product 7, the switch signal is connected to the driving board 3 through the adapter board 6 to detect the conduction status of the product 7, and finally the data is transmitted to the host computer 1.
[0018] The working modes of the motor driver 2 are divided into two modes: internal external pulse and external pulse. In the present application, the external pulse mode is selected, and the driving board 3 outputs pulse + level to connect to the motor driver 2 to drive the stepper motor 4. The pressure sensor 5 monitors the pressure when the pressure head 10 contacts the product 7. Its signal line is connected to the driving board 3, and the driving board 3 processes its analog signal and converts it into a digital signal. The grating ruler 8 and the reading head 9 detect the real-time stroke of the stepper motor 4 and the button stroke of the product 7. The reading head 9 is directly connected to the driving board 3 after passing through the subdivision box, and the driving board 3 processes the signal of the reading head 9. After the pressure head 10 presses the button of the product 7, the switch signal is connected to the driving board 3 through the adapter board 6 to detect the conduction status of the product 7, and finally the data is transmitted to the host computer 1.
[0019] The stepper motor 4 is TBX4015-F2N-K28, a stepper motor with a stroke of 15mm and a repeated positioning accuracy of ±1um; the motor driver 2 is iD254-MDFA, which supports PWM constant current bipolar subdivision drive, supports two high-speed inputs (editable to pulse + direction), has an RS485 communication interface, supports MODBUS protocol / RTU protocol, and supports closed-loop control and open-loop control of motors; the grating ruler 8 is Renishaw's A-9407-0100, and the reading head 9 is Renishaw's ATOM4T0-300, which is used to measure the position and movement of objects. It consists of a light source and a grating. The grating ruler 8 and the reading head 9 measure the displacement or position change of the object through the interaction between the grating and the light source. When used with Renishaw's interpolation box - Ri0400A12B, the number of pulses per unit length is increased to improve measurement accuracy and resolution; the driver board 3 is the core part of the entire system and is compatible with the measurement control and communication parts.
[0020] like Figure 3 to Figure 4 As shown, in this embodiment, the driving board 3 includes a microcontroller U701, the microcontroller U701 is connected to an analog-to-digital converter U801, the analog-to-digital converter U801 is connected to an RC filter, the Force_IN_P pin and Force_IN_N pin of the RC filter are connected to the signal line of the pressure sensor 5, and the ADC_IN1 pin and ADC_IN2 pin of the RC filter are connected to the corresponding ports of the analog-to-digital converter U801.
[0021] The power supply of the driver board 3 is selected as 24V input, which is then converted into the working voltage of each component of the circuit. The microcontroller U701 uses STM32F103ZET6, and uses the FT232RL chip to convert UART to USB communication. This interface is used for FW download and debugging; the analog-to-digital converter U801 uses AD7190, which is a low-noise complete analog front end suitable for high-precision measurement applications. It integrates a low-noise, 24-bit Σ-Δ analog-to-digital converter (ADC). The on-chip low-noise gain stage means that small signals can be directly input. This design is used for the pressure sensor 5 and the switch signal level measurement of the product 7. The switch level signal of the product 7 can choose to use the analog-to-digital converter to directly measure the voltage signal, or use the IO port of the microcontroller U701 to detect the level signal.
[0022] The microcontroller U701 is a 32-bit microcontroller based on the ARM Cortex-M3 core. By using its universal serial interface, it can not only complete data interaction with the host computer 1, but also complete communication with ICs compatible with I2C and SPI communication protocols. It can complete various required functions, pressure measurement, network port communication, etc. At the same time, it can use its various timers to realize pulse output and grating ruler stroke measurement.
[0023] like Figure 5 As shown, in this embodiment, the driving board 3 also includes an op amp follower U803, the output end of the op amp follower U803 is connected to the AIN3 pin of the analog-to-digital converter U801, and the non-inverting input end of the op amp follower U803 is connected to the button communication of the product 7. After the switch signal of the product 7 passes through the op amp follower U803, it can be connected to the AIN3 pin of the analog-to-digital converter U801 to directly test the voltage value of the signal, and it can also be connected to the IO port of the microcontroller U701 after passing through the MOS tube to only detect the logic level of the signal.
[0024] like Figure 6 As shown, in this embodiment, the driving board 3 also includes an interface J1301 and a differential transceiver U1301, the interface J1301 is connected to the subdivision box of the grating ruler 8, the Grating_A_P pin, Grating_A_N pin, Grating_B_P pin, Grating_B_P pin, and Grating_E_EXT pin of the interface J1301 are respectively connected to the differential transceiver U1301, and the 1Y pin and 2Y pin of the differential transceiver U1301 are connected to the corresponding pins of the microcontroller U701.
[0025] The model of the differential transceiver U1301 is AM26LV32EIPWR, which is a four-way low-level differential transceiver, which converts the 5V differential pulse signal of the interface J1301 into a 3V3 single-ended pulse signal, so that the microcontroller U701 can capture the number of pulses through the timer to achieve the stroke measurement of the grating ruler 8. The reading head of the grating ruler 8 outputs two groups of pulse signals with phase difference, which increase the number of pulses per unit length after passing through the subdivision box to improve the measurement accuracy and resolution, and then are connected to the interface J1301.
[0026] like Figure 7As shown, in this embodiment, the driver board 3 also includes a storage chip U903, and the A0 pin, A1 pin, and A2 pin of the storage chip U903 are all address selection pins, and the SCL pin and SDA pin of the storage chip U903 are connected to the corresponding pins of the microcontroller U701. The model of the storage chip U903 is CAT24C32YI-GT3, which is an EEPROM chip compatible with I2C communication. A0, A1, and A2 are the address selection pins of the chip. A set of I2C can drive up to 8 CAT24s. This circuit is used to record the calibration parameters of the pressure sensor 5 and other related data.
[0027] like Figure 8 As shown, in this embodiment, the driving board 3 also includes a first MOS tube Q901 and a second MOS tube Q902, the drain of the first MOS tube Q901 and the drain of the second MOS tube Q902 are both connected to PP5V, the gate of the first MOS tube Q901 is connected to the timer of the microcontroller U701, and the gate of the second MOS tube Q902 is connected to the IO port of the microcontroller U701.
[0028] The motor driver 2 is compatible with internal, external and external pulse (pulse + direction) working modes. "PWM_OUT1" is a 3V3 pulse signal generated by the microcontroller U701 using a timer. After passing through the first MOS tube Q901, the 3V3 pulse signal can be converted into a 5V pulse signal. "MOTOR_DIR" is controlled by the IO port of the microcontroller U701 to control the 3V3 high and low levels. Similarly, after passing through the second MOS tube Q902, the level is converted to 5V, which can meet the external pulse working mode of the motor driver 2.
[0029] like Fig. 9 As shown, in this embodiment, the driving board 3 also includes an RS485 transceiver U901, and the 485_RE / DE pin, 485_USART2_RX pin, 485_INV pin, and 485_USART2_TX pin of the RS485 transceiver U901 are respectively connected to the corresponding pins of the microcontroller U701, and the 485_A pin and 485_B pin of the RS485 transceiver U901 are respectively connected to the motor driver 2 via the RS485 interface.
[0030] The RS485 transceiver U901 is an isolated RS485 transceiver. RxD and TxD are connected to the UART4 interface of the microcontroller U701. After UART4 is initialized, when RS485 communication is needed, RE is pulled low first, and the output A / B pins are connected to the RS485 interface. Then, RS485 data can be sent and received normally. In this application, it is used for the RS485 interface communication between the microcontroller U701 and the motor driver 2. Various instructions can be sent to the motor driver 2, the working mode can be set, the alarm can be cleared, and the origin can be returned.
[0031] like Fig.10 As shown, in this embodiment, the driving board 3 further includes an Ethernet controller U1001, and the Ethernet controller U1001 is connected to the microcontroller U701.
[0032] The model of the Ethernet controller U1001 is W5500. W5500 is a full hardware TCP / IP embedded Ethernet controller that provides a simpler Internet connection solution for embedded systems. W5500 integrates TCP / IP protocol stack, 10 / 100M Ethernet data link layer (MAC) and physical layer (PHY), allowing users to expand network connections in their applications using a single chip. W5500 provides SPI (Peripheral Serial Interface) so that it can be more easily integrated with peripheral MCU. W5500 uses a new and efficient SPI protocol to support 80MHz rate, so as to better realize high-speed network communication. W5500 realizes network port communication between the host computer and the slave computer. Among them, the S1001 dip switch is used for the IP address selection of the driver board, which can realize that the host computer can communicate with up to 32 driver boards at the same time.
[0033] like Fig.11 As shown, in this embodiment, the driving board 3 further includes a first power management chip U601, a second power management chip U602 and a third power management chip U603. The first power management chip U601 is used as the power supply of the driving board 3. The input power supply of the first power management chip U601 is 24V. The output voltage of the first power management chip U601 is 9V. The second power management chip U602 is used as the power supply of the pressure sensor 5 and the analog-to-digital converter U801. The second power management chip U602 reduces PP9V to 5V; the third power management chip U603 is used for the reference voltage PP2V5_REF of the analog-to-digital converter U801. The model of the first power management chip U601 is TPS5430DDA; the model of the second power management chip U602 is LM317DCYR; the model of the third power management chip U603 is REF3025AIDBZR.
[0034] like Figure 12 to Figure 14 As shown, in this embodiment, the testing method is as follows: A. The driving board 3 sends a command for the stepping motor 4 to return to the origin to the motor driver 2 through the RS485 interface. After returning to the origin, the target pressure value to be applied to the button is written to the storage chip U903; B. The motor driver 2 is switched to the external pulse mode, the driving board 3 drives the stepping motor 4 to work, the stepping motor 4 is connected to the pressing head 10 through a screw rod, and the pressing head 10 quickly approaches the button of the product 7; C. The stepper motor 4 moves in a single step, and the pressure value is further read once for each line, until the pressure value is greater than 20g, it is determined that the button of the product 7 is in contact. D. The grating ruler 8 is reset to zero, thereby recording the stroke of the button, and the stepper motor 4 continues to press down in a single step, recording the pressure value of the pressure sensor 5, the stroke of the stepper motor 4 and the conduction signal of the button of the product 7 each time; E. Until the pressure value is greater than the set pressure target value, switch the movement direction of the stepper motor 4, and the stepper motor 4 moves back in a single step. At the same time, test the stroke of the stepper motor 4, the conduction signal of the button of the product 7 and the pressure value of the pressure sensor 5 until the force is less than 20g. Finally, send back the stepper motor 4 return to origin instruction through the RS485 interface.
[0035] like Fig.15 As shown, in this embodiment, the driver board 3 uses the master-slave mode of two timers, the master timer outputs pulses, the slave timer counts, and when the count overflows, the master timer is turned off, so that the expected number of pulses can be output. 10 pulse outputs are enabled, and 10 waveforms are captured using an oscilloscope, and the pulse output function is realized.
[0036] like Fig.16 As shown, in this embodiment, after the driving plate 3 and the pressure sensor 5 are calibrated with weights, 100 sets of data are measured using 200 / 300 / 1000g weights respectively. The deviation of the 200g / 300g force is <±1g, and the deviation of the 1000g force is less than ±1%, which can meet the test requirements.
[0037] like Fig.17As shown, in this embodiment, the driving board 3 is used to drive the stepper motor 4 in a single step, and the stepper motor 4 reads the stroke of the grating ruler 8 every time it moves. The stroke of the stepper motor 4 in one circle is 1mm, and the subdivision is set to 1000, that is, the step of the stepper motor 4 is 1um, and the step length of a single pulse is measured. In 7000 sets of data, the average step length is 0.99958um, the maximum value is 1.2998um, the minimum value is 0.7998um, the number of pulses is 7000, and the stroke distance of the grating ruler 8 is 6998.5, which is only 1.5um different. Therefore, it is reliable to measure the stroke distance by measuring the grating ruler 8 and the reading head 9 by the timer of the microcontroller U701.
[0038] like Fig.18 As shown, in this embodiment, using RS485 to control the motor driver 2 can make the actual use of the stepper motor 4 more flexible. The zero point of the stepper motor 4 can be set, the real-time position of the stepper motor 4 can be read, and the internal and external pulse working modes of the motor driver 2 can be switched. This function only needs to ensure the normal use of the RS485 communication function.
[0039] When the target force is set to 500g, starting from the moment the pressure head 10 contacts the button of the product 7 with a force of 20g, the force, stroke, and switch state are collected. Press is the data during the pressing process of the stepper motor 4, and Release is the data when the stepper motor 4 moves back after completing the pressing, until the force applied by the pressure head 10 on the button is less than 20g. The curve records the force during the Press and Release process of the button and the stroke of the stepper motor 4. The straight line part records the switch state of the button and the stroke of the stepper motor 4 during the Press and Release process of the button. 1 represents the open circuit state, and 0 represents the on state. The test time of the entire process only takes 5S. The main factor affecting the time of the entire test process is the data conversion time of the analog-to-digital converter U801, that is, it mainly depends on the sampling rate selection of the analog-to-digital converter U801. The higher the sampling rate, the shorter the data conversion time, but the test accuracy will be reduced accordingly. The lower the sampling rate, the longer the data conversion time, but the test accuracy will be improved, and the data volatility will be smaller. Therefore, it is necessary to make a trade-off between accuracy and time. The sampling rate of the analog-to-digital converter U801 is selected as 960HZ. This sampling rate can meet the test accuracy while also meeting the test time requirements.
[0040] Although the embodiments of the present invention are described with practical solutions, they do not constitute limitations on the meaning of the present invention. For those skilled in the art, it is obvious to modify the implementation scheme and combine it with other solutions based on this description.
Claims
1. A push button switch test system, Features: It comprises a host computer (1), a motor driver (2), a drive board (3), a stepper motor (4), a pressure sensor (5), an adapter board (6) and a product (7), wherein the motor driver (2) is communicatively connected to the stepper motor (4), the stepper motor (4) is provided with a grating ruler (8) and a reading head (9), the output shaft of the stepper motor (4) is transmission-connected to the pressure sensor (5), the pressure sensor (5) is press-fitted with a button of the product (7) through a pressure head (10), the product (7) is communicatively connected to the drive board (3) via the adapter board (6), the pressure sensor (5), the reading head (9) and the motor driver (2) are all communicatively connected to the drive board (3), and the drive board (3) is communicatively connected to the host computer (1); The drive board (3) outputs a pulse + level mode and is connected to the motor driver (2) to drive the stepper motor (4). The pressure sensor (5) monitors the pressure of the pressure head (10) in contact with the product (7). The drive board (3) processes the analog signal of the pressure sensor (5) and converts it into a digital signal. The grating ruler (8) and the reading head (9) detect the real-time stroke of the stepper motor (4) and the button stroke of the product (7). The reading head (9) is directly connected to the drive board (3) after passing through a subdivision box. The signal of the reading head (9) is processed by the drive board (3). After the pressure head (10) presses the button of the product (7), the switch signal is connected to the drive board (3) through the adapter board (6) to detect the conduction status of the product (7). Finally, the data is transmitted to the host computer (1).
2. A push button switch testing system according to claim 1, Features: The driving board (3) comprises a microcontroller (U701), the microcontroller (U701) is connected to an analog-to-digital converter (U801), the analog-to-digital converter (U801) is connected to an RC filter, the Force_IN_P pin and the Force_IN_N pin of the RC filter are connected to a signal line of the pressure sensor (5), and the ADC_IN1 pin and the ADC_IN2 pin of the RC filter are connected to corresponding ports of the analog-to-digital converter (U801).
3. A push button switch testing system according to claim 2, Features: The driving board (3) further comprises an operational amplifier follower (U803), wherein an output end of the operational amplifier follower (U803) is connected to an AIN3 pin of the analog-to-digital converter (U801), and a non-inverting input end of the operational amplifier follower (U803) is communicatively connected to a button of the product (7).
4. A push button switch testing system according to claim 2, Features: The driver board (3) further comprises an interface (J1301) and a differential transceiver (U1301), wherein the interface (J1301) is connected to the subdivision box of the grating ruler (8), the Grating_A_P pin, Grating_A_N pin, Grating_B_P pin, Grating_B_P pin, and Grating_E_EXT pin of the interface (J1301) are respectively connected to the differential transceiver (U1301), and the 1Y pin and 2Y pin of the differential transceiver (U1301) are connected to corresponding pins of the microcontroller (U701).
5. A push button switch testing system according to claim 4, Features: The driver board (3) further comprises a memory chip (U903), wherein the A0 pin, the A1 pin and the A2 pin of the memory chip (U903) are all address selection pins, and the SCL pin and the SDA pin of the memory chip (U903) are both connected to corresponding pins of the microcontroller (U701).
6. A push button switch testing system according to claim 2, Features: The driving board (3) further comprises a first MOS tube (Q901) and a second MOS tube (Q902), the drain of the first MOS tube (Q901) and the drain of the second MOS tube (Q902) are both connected to PP5V, the gate of the first MOS tube (Q901) is connected to the timer of the microcontroller (U701), and the gate of the second MOS tube (Q902) is connected to the IO port of the microcontroller (U701).
7. A push button switch testing system according to claim 5, Features: The driving board (3) further comprises an RS485 transceiver (U901), wherein the 485_RE / DE pin, 485_USART2_RX pin, 485_INV pin and 485_USART2_TX pin of the RS485 transceiver (U901) are respectively connected to corresponding pins of the microcontroller (U701), and the 485_A pin and 485_B pin of the RS485 transceiver (U901) are respectively connected to the motor driver (2) via an RS485 interface.
8. A push button switch testing system according to claim 2, Features: The driving board (3) further comprises an Ethernet controller (U1001), and the Ethernet controller (U1001) is connected to the microcontroller (U701).
9. A push button switch testing system according to claim 2, Features: The driving board (3) further comprises a first power management chip (U601), a second power management chip (U602) and a third power management chip (U603); the first power management chip (U601) serves as the power supply of the driving board (3); the input power supply of the first power management chip (U601) is 24V; the output voltage of the first power management chip (U601) is 9V; the second power management chip (U602) serves as the power supply of the pressure sensor (5) and the analog-to-digital converter (U801); the second power management chip (U602) reduces PP9V to 5V; the third power management chip (U603) is used for the reference voltage PP2V5_REF of the analog-to-digital converter (U801). The first power management chip (U601), the second power management chip (U602) and the third power management chip (U603) are used, wherein the first power management chip (U601) is used as the power supply of the driving board (3), the input power supply of the first power management chip (U601) is 24V, the output voltage of the first power management chip (U601) is 9V, the second power management chip (U602) is used as the power supply of the pressure sensor (5) and the analog-to-digital converter (U801), and the second power management chip (U602) reduces PP9V to 5V; and the third power management chip (U603) is used for the reference voltage PP2V5_REF of the analog-to-digital converter (U801).
10. A method for testing a push button switch testing system as claimed in claim 7, It is characterized in that The test method is as follows: A. The driving board (3) sends a command for the stepping motor (4) to return to the origin to the motor driver (2) via the RS485 interface. After the stepping motor (4) returns to the origin, the target pressure value to be applied to the button is written into the storage chip (U903); B. The motor driver (2) is switched to an external pulse mode, the drive board (3) drives the stepper motor (4) to work, the stepper motor (4) is connected to the pressing head (10) through a screw rod, and the pressing head (10) quickly approaches the button of the product (7); C. The stepper motor (4) moves in a single step and further reads the pressure value once for each line until the pressure value is greater than 20g, and it is determined that the button of the product (7) is in contact; D. The grating ruler (8) is reset to zero, thereby recording the stroke of the button, and the stepper motor (4) continues to press down in a single step, recording the pressure value of the pressure sensor (5), the stroke of the stepper motor (4) and the conduction signal of the button of the product (7) every time; E. until the pressure value is greater than the set pressure target value, the movement direction of the stepper motor (4) is switched, and the stepper motor (4) moves back in a single step, while testing the stroke of the stepper motor (4), the conduction signal of the button of the product (7) and the pressure value of the pressure sensor (5) until the force is less than 20g, and finally sending back a return-to-origin instruction to the stepper motor (4) through the RS485 interface.
