Test method and test system of printed circuit board
The testing system, which uses a test board to work in conjunction with a host computer, solves the problems of complex and inefficient printed circuit board testing, realizes automated and integrated testing, and improves testing efficiency and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-03-10
AI Technical Summary
Existing printed circuit board testing methods are complex, and the separation of internal response and external data acquisition increases the difficulty of synchronization. Any changes require redevelopment from scratch, resulting in long development cycles and low testing efficiency.
The testing system, which uses a test board and a host computer to work together, starts the testing process through a test fixture trigger signal. The test board performs the test operation and acquires data, and the host computer judges the rationality of the data based on the configuration information, thus realizing the automation and integration of testing.
It simplifies testing complexity, shortens debugging time, improves testing efficiency, reduces development costs and post-maintenance complexity, and enhances the smoothness of human-computer interaction and the reliability of test results.
Smart Images

Figure CN121633795A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of testing technology, and in particular to a testing method and testing system for printed circuit boards. Background Technology
[0002] In related technologies, when testing a printed circuit board (PCB), it is usually necessary to develop and run a test program specifically written for that PCB on a host computer to send test signals and acquire the PCB's internal response signals and external data, thereby determining whether the PCB is functioning properly.
[0003] The above testing methods have obvious limitations: on the one hand, the separation of internal response and external data acquisition increases the complexity of the testing system and the difficulty of synchronization; on the other hand, any change to the printed circuit board means that the test program needs to be developed from scratch, resulting in a long development cycle and low testing efficiency. Summary of the Invention
[0004] In view of the above, it is necessary to provide a testing method and system for printed circuit boards that can solve the technical problems of complex testing, long development cycle and poor testing efficiency of printed circuit boards.
[0005] On one hand, this application provides a testing method for printed circuit boards. The method is applied to a testing system, which includes a host computer and a test support board. The method includes: responding to a signal triggered when a printed circuit board is placed on a test fixture; the test support board sending a test start signal to the host computer; responding to the test start signal; the host computer generating a test control command according to preset configuration information and sending the test control command to the test support board; the test support board performing test operations on the printed circuit board according to the test control command; acquiring test data of the printed circuit board and sending the test data to the host computer; the test data including external measurement data and internal operating data of the printed circuit board; and the host computer determining the rationality of the test data according to the judgment rules defined by the configuration information and obtaining the test result of the printed circuit board.
[0006] In some embodiments of this application, the host computer generating test control instructions based on preset configuration information includes: the host computer determining the relays in the test board and their corresponding states based on the relay control logic defined in the configuration information, and generating relay control instructions for the relays based on the states; the host computer generating communication instructions based on the interface parameters of the printed circuit board defined in the configuration information; and the host computer determining the data acquisition resources in the test board based on the data acquisition rules defined in the configuration information, and generating instructions for calling the data acquisition resources.
[0007] In some embodiments of this application, the test board performs test operations on the printed circuit board according to the test control command to obtain test data of the printed circuit board, including: the test board responds to the relay control command to configure the relay to a corresponding state, so that the printed circuit board is in the test condition corresponding to the relay; the test board responds to the communication command to establish a communication connection with the printed circuit board; and in each test condition, the test board responds to the call command to call the data acquisition resource to acquire the test data.
[0008] In some embodiments of this application, the data acquisition resource includes a communication interface, the calling instruction includes a first calling instruction corresponding to the communication interface, and the test board responds to the calling instruction to call the data acquisition resource to acquire the test data, including: the test board responds to the first calling instruction to call the communication interface to acquire the internal operating data from the printed circuit board.
[0009] In some embodiments of this application, the external measurement data includes the electrical parameters of the printed circuit board, the data acquisition resources include an analog-to-digital converter and a power meter, the calling instruction includes a second calling instruction corresponding to the analog-to-digital converter and a third calling instruction corresponding to the power meter, and the test board responds to the calling instruction by calling the data acquisition resources to acquire the test data, including: the test board responds to the second calling instruction by calling the analog-to-digital converter to acquire the first electrical parameters of the printed circuit board, and the test board responds to the third calling instruction by calling the power meter to acquire the second electrical parameters of the printed circuit board.
[0010] In some embodiments of this application, the judgment rule defines a judgment criterion for each test data. The host computer determines the rationality of the test data according to the judgment rule defined by the configuration information, including: when the test data meets the corresponding judgment criterion, the host computer determines that the test data is reasonable; when the test data does not meet the corresponding judgment criterion, the host computer determines that the test data is unreasonable.
[0011] In some embodiments of this application, the host computer obtains the configuration information by any of the following methods: the host computer reads the configuration information in the pre-stored configuration file from the local storage device according to a preset path; the host computer reads the configuration information in the configuration file sent by the test board; the host computer obtains the tag of the test fixture; and reads the configuration information in the configuration file corresponding to the tag from the local storage device or a server connected to the host computer.
[0012] On the other hand, this application provides a testing method for a printed circuit board, which is applied to a test board and communicates with a host computer. The method includes: responding to a signal triggered when a test fixture places a printed circuit board, sending a test start signal to the host computer, causing the host computer to respond to the test start signal, generate a test control command according to preset configuration information, and send the test control command to the test board; performing test operations on the printed circuit board according to the test control command, and obtaining test data of the printed circuit board; the test data includes external measurement data and internal operating data of the printed circuit board; sending the test data to the host computer, causing the host computer to determine the rationality of the test data according to the judgment rules defined by the configuration information, and obtaining the test result of the printed circuit board.
[0013] On the other hand, this application provides a testing method for a printed circuit board, the method being applied to a host computer, the host computer being communicatively connected to a test board, the method comprising: receiving a test start signal sent from the test board, wherein the test board sends the test start signal in response to a signal triggered when a test fixture is placed on the printed circuit board; responding to the test start signal, generating a test control command according to preset configuration information; sending the test control command to the test board, causing the test board to perform test operations on the printed circuit board according to the test control command; acquiring test data of the printed circuit board; and sending the test data to the host computer, the test data including external measurement data and internal operating data of the printed circuit board; determining the rationality of the test data according to the judgment rules defined by the configuration information; and obtaining the test result of the printed circuit board.
[0014] On the other hand, this application provides a testing system for printed circuit boards, the testing system including a test board and a host computer: the test board is used to send a test start signal to the host computer in response to a signal triggered when a test fixture is placed on a printed circuit board; the host computer is used to generate test control instructions according to preset configuration information in response to the test start signal, and send the test control instructions to the test board; the test board is also used to perform test operations on the printed circuit board according to the test control instructions, obtain test data of the printed circuit board, and send the test data to the host computer; the test data includes external measurement data and internal operating data of the printed circuit board; the host computer is also used to determine the rationality of the test data according to the judgment rules defined by the configuration information, and obtain the test results of the printed circuit board.
[0015] In the printed circuit board (PCB) testing scheme of this embodiment, the test companion board responds to the signal triggered when the PCB is placed on the test fixture and sends a test start signal to the host computer, which enhances the smoothness and reliability of human-computer interaction. Responding to the test start signal, the host computer generates test control commands based on preset configuration information. This allows for updating only the configuration information when replacing the PCB or test fixture, without modifying the main program in the host computer, enabling configurable and agile test preparation and significantly shortening test adaptation and deployment time. The test companion board performs tests on the PCB and acquires test data based on the test control commands sent from the host computer, improving the integration and automation of testing, thereby reducing manual intervention and operational errors, and improving test consistency and reliability. As an intelligent intermediary, the test companion board uniformly collects the internal operating data and external measurement data of the PCB, providing integrated data to the host computer. This effectively simplifies the host computer's processing logic, enabling the host computer to quickly determine the rationality of the test data and generate test results based on judgment rules. This not only reduces testing complexity, shortens debugging time, and improves testing efficiency, but also lowers the technical threshold for testing, reduces the development cost of dedicated testing systems, and reduces the complexity of later maintenance and upgrades of testing systems. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of a test system provided in an embodiment of this application.
[0017] Figure 2 A flowchart of a testing method for printed circuit boards provided in one embodiment of this application.
[0018] Figure 3 This is a flowchart of a testing method for a printed circuit board provided in another embodiment of this application.
[0019] Figure 4This is a flowchart of a testing method for a printed circuit board provided in another embodiment of this application.
[0020] Figure 5 This is a schematic diagram of the structure of a test plate provided in one embodiment of this application.
[0021] Figure 6 This is a schematic diagram of the structure of a host computer provided in an embodiment of this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the application will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0023] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.
[0024] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0025] This application provides a testing method and system for printed circuit boards, which can reduce testing complexity, shorten debugging time and improve testing efficiency.
[0026] like Figure 1 The diagram shown is a schematic representation of a testing system provided in an embodiment of this application. Figure 1 The testing system includes a test board 10 and a host computer 20, wherein the test board 10 and the host computer 20 are connected in communication.
[0027] This application embodiment does not limit the communication connection method between the test board 10 and the host computer 20. For example, the test board 20 can communicate with the host computer 20 via Universal Serial Bus (USB), Ethernet, or mobile communication network.
[0028] In some embodiments of this application, the test board 10 can be used to perform test operations on the printed circuit board according to test control commands sent from the host computer 20, to obtain test data, and to send the test data to the host computer 20 for analysis and evaluation. The printed circuit board can be held by a test fixture, and the test data can include external measurement data and internal state data of the printed circuit board. Printed circuit boards can be widely used in various devices, and this application does not limit the application of printed circuit boards. For example, printed circuit boards can be used in self-moving devices such as lawnmowers and cleaning robots.
[0029] The test board 10 can integrate components such as a controller, communication interface, relay, analog-to-digital converter (ADC), and power meter.
[0030] In some embodiments, the controller may be a microcontroller unit (MCU), or other types of controllers or processors, such as a microprocessor (MPU), programmable logic controller (PLC), digital signal processor (DSP), system-on-chip (SoC), or field-programmable gate array (FPGA), etc., and this application embodiment does not impose any limitations on this. The controller can be used to parse test control commands, coordinate the various components of the test board 10 to test the printed circuit board, manage the test process, and collect test data, etc.
[0031] In some embodiments, the communication interface can be used to establish a communication connection between the test board 10 and external devices such as printed circuit boards, so as to obtain internal status data sent by the communication interface of the printed circuit board.
[0032] In some embodiments, relays can be integrated into the test board 10 in an array. By controlling the opening and closing of the relays, different test paths and test conditions can be flexibly constructed. For example, the relays can be used to achieve one or more of the following functions: 1. Switching electrical paths or routes. For example, by controlling the opening and closing of relays (status setting), an analog-to-digital converter (ADC) can be connected to a designated measurement point on a printed circuit board, enabling the ADC to perform measurements and data acquisition at the corresponding measurement point. For instance, closing relay A can connect or switch the ADC to measurement point a, and closing relay B can connect or switch the ADC to measurement point b.
[0033] 2. Connecting Test Excitation and Load. For example, by controlling the opening and closing of a relay (state setting), a power supply or load can be connected to a designated measurement point on the printed circuit board. For instance, closing relay C connects a 5V power supply or load to measurement point c on the printed circuit board.
[0034] 3. Simulate switching conditions in real-world working environments. For example, by controlling the opening and closing of relays (state settings), various scenarios of printed circuit boards in actual applications can be simulated. These include power-on tests, power-off tests, and function switching tests.
[0035] In some embodiments, the analog-to-digital converter can be used to acquire first electrical parameters of measurement points on a printed circuit board. For example, the first electrical parameters may include relevant data such as voltage and current of the measurement points on the printed circuit board.
[0036] In some embodiments, the power meter can be used to collect a second electrical parameter of the printed circuit board. For example, the second electrical parameter may include the input voltage, output voltage, input current, output current, power factor of the printed circuit board, and power-related data such as input power and output power calculated based thereon.
[0037] The first and second electrical parameters mentioned above are merely examples of external measurement data. In practical applications, external measurement data may include more or less data.
[0038] In other embodiments of this application, the test board 10 may adopt a modular design combining a core board and an expansion board to improve the flexibility and scalability of the hardware configuration of the test board 10. The core board may integrate a minimum system, such as a microcontroller and a general communication interface; while functional components such as analog-to-digital converters, relay arrays, and power meter interfaces are provided as pluggable modules, facilitating flexible combination and upgrades according to testing requirements.
[0039] In some embodiments of this application, in addition to sending test control commands to the test board 10, the host computer 20 can also be used to evaluate the test data sent from the test board 10, determine the rationality of the test data, thereby obtaining the test results of the printed circuit board, and generating a test result report of the printed circuit board based on the test results, etc.
[0040] The host computer 20 can be an electronic device such as a computer, tablet, mobile phone, server (e.g., cloud server), personal digital assistant (PDA), game console, interactive network television (Internet Protocol Television, IPTV), or smart wearable device. This application embodiment does not limit the specific type of host computer.
[0041] like Figure 2 The diagram shown is a flowchart of a testing method for a printed circuit board according to an embodiment of this application. The testing method for the printed circuit board is applied to a testing system, for example... Figure 1 The test system shown includes a test board and a host computer that communicates with the test board. The order of steps in this flowchart can be adjusted according to different requirements, and some steps can be omitted. The test method for the printed circuit board includes the following steps: S11, in response to the signal triggered when the printed circuit board is placed in the test fixture, the test board sends a test start signal to the host computer.
[0042] In some embodiments of this application, the test start signal can be used to notify the host computer to start the test process. Printed circuit boards can be widely used in various types of devices, and this application does not limit the application of printed circuit boards. For example, printed circuit boards can be used in self-moving devices such as lawnmowers and cleaning robots.
[0043] In some embodiments, the test panel can be configured to send a test start signal to the host computer under specific conditions. For example, in a mechanical contact-based triggering method, when the printed circuit board is placed in the test fixture and the probe plate or probe of the test fixture connects to a designated detection point on the test panel (e.g., a designated button on the test panel is pressed), the test panel sends a test start signal to the host computer. The test panel may integrate a preset test sequence, which the test panel can execute to generate and send the test start signal to the host computer.
[0044] In this embodiment, the test board responds to the signal triggered when the test fixture places a printed circuit board and sends a test start signal to the host computer, which can enhance the smoothness and reliability of human-computer interaction.
[0045] The above method of sending a test start signal to the host computer via mechanical contact triggering the test board is only one example of how to notify the host computer to start the test process. In practical applications, various methods can be used to notify the host computer to start the test process according to actual needs.
[0046] For example, in one embodiment, an optical triggering mechanism can also be used to trigger the test board to send a test start signal to the host computer, thereby notifying the host computer to start the test process. For instance, when the test fixture presses down due to the placement of the printed circuit board, blocking a preset photosensitive sensor, the test board is triggered to send a test start signal to the host computer, thereby notifying the host computer to start the test process.
[0047] The photosensitive sensor can be mounted on a test fixture and the test fixture is communicatively connected to the test board, or it can be mounted on the test board or on other devices that are communicatively connected to the test board. This application does not limit this.
[0048] In another embodiment, a magnetic induction or proximity induction mechanism can be used to trigger the test support board to send a test start signal to the host computer, thereby notifying the host computer to start the test process. For example, a Hall sensor or proximity switch can be used to detect the position of the test fixture. When the test fixture falls to a specific position, the test support board is triggered to send a test start signal to the host computer, thereby notifying the host computer to start the test process.
[0049] Among them, magnetic induction components such as Hall sensors and proximity sensing components such as proximity switches can be set on the test fixture and the test fixture is communicatively connected to the test board, or they can be set on the test board, or they can be set on other devices that are communicatively connected to the test board. This application does not limit this.
[0050] In another embodiment, the test process can be initiated by the host computer responding to touch operations on the user interface or by pressing a foot switch.
[0051] In some embodiments of this application, the test board can communicate with the host computer in various ways. This application does not limit the communication connection method between the test board and the host computer. For example, the test board can communicate with the host computer via a universal serial bus, Ethernet, Bluetooth, or mobile communication networks.
[0052] S12, in response to the test start signal, the host computer generates test control commands based on the preset configuration information.
[0053] In some embodiments of this application, the configuration information may define the interface parameters of the printed circuit board (e.g., serial port parameters), test item sequences, relay control logic, data acquisition rules, and judgment rules.
[0054] The interface parameters configure the communication method between the test board and the printed circuit board, enabling them to establish a correct communication connection. The test item sequence defines the test items, the order of each test step, and the specific operations for each step. The relay control logic specifies the on / off states of relays to achieve electrical path switching or external condition loading. Data acquisition rules guide the test board in acquiring external measurement data and internal operating data from the printed circuit board, defining the specific acquisition methods. For example, the rules may instruct the test board to acquire external measurement data from which channel of the analog-to-digital converter and from which interface of the power meter; they may also instruct the test board to send which commands through which communication interface to acquire internal operating data. Judgment rules instruct the host computer to analyze and judge the test data returned by the test board and generate corresponding test results.
[0055] For example, the configuration information can indicate the following test procedure: 1. After the test starts, the test board first closes relay A; 2. Then it reads data from the serial port of the printed circuit board and reads the voltage value from channel 1 of the analog-to-digital converter; 3. The test board packages both data and sends them to the host computer; 4. After receiving the test data, the host computer compares whether it is within the reasonable range preset in the configuration information; 5. Finally, based on the comparison result, the host computer outputs the conclusion of whether the test passed or failed to the user in a visual manner.
[0056] In some embodiments of this application, the host computer generates test control instructions based on preset configuration information, including: the host computer can analyze the test item sequence, determine the relays and their corresponding states in the test board according to the relay control logic defined in the configuration information, and generate relay control instructions for the relays according to the states; the host computer can generate communication instructions according to the interface parameters of the printed circuit board defined in the configuration information; and the host computer can determine the data acquisition resources in the test board according to the data acquisition rules defined in the configuration information, and generate instructions for calling the data acquisition resources.
[0057] The configuration information for the relay control logic can include relay logic identifiers and status parameters. The host computer can determine the status of the relay (down to the relay's output channel) based on the relay logic identifier and corresponding status parameters.
[0058] For example, configuration information indicating relay control logic may include "set_rly_out 0 0", where "rly_out 0" is a logic identifier used to specify the output channel of the relay; the second "0" can be a status parameter used to specify the off state, and "set_rly_out 0 0" can instruct the test board to set the specified output channel in the relay to the off state.
[0059] Interface parameters can include the interface type of the printed circuit board (such as UART, SPI, etc.), communication rate, and data format. For example, interface parameters can include serial port baud rate, data bits, stop bits, and parity bits. For instance, a test board can establish serial communication with the printed circuit board through parameters such as serial port baud rate.
[0060] Data acquisition resources include, but are not limited to: communication interfaces, analog-to-digital converters (down to the specific channels of the analog-to-digital converter), and power meters (down to the specific interfaces of the power meters). Configuration information indicating data acquisition rules may include logical identifiers for the data acquisition resources and related operations. The host computer can determine the data acquisition resources in the test board based on the logical identifiers and other information.
[0061] For example, the configuration information corresponding to the data acquisition rule may include "get_adc 1", where "adc 1" can be a logical identifier used to specify the channel of the analog-to-digital converter. "get_adc 1" can instruct the test board to call the analog-to-digital converter to perform data acquisition and obtain the data collected by channel 1 of the analog-to-digital converter.
[0062] Among them, the logical identifier, also known as the logical name, can be a unique code for the software-level virtualization and unified abstraction of resources such as relays (down to the output channel of the relay), digital I / O ports, analog-to-digital converters (down to the channel of the analog-to-digital converter), and power meters (down to the interface of the power meters) on the test board, so that the access to resources in the test board can be unaffected by changes in hardware wiring.
[0063] In this embodiment, by defining abstract logical identifiers for resources such as relays (down to the relay's output channel), digital I / O ports, analog-to-digital converters (down to the analog-to-digital converter's channel), and power meters (down to the power meter's interface) on the test board in the configuration information, software-based abstraction and unified management of the test board's resources are achieved. Based on this, the test solution of this application can flexibly adapt to future new printed circuit boards and test fixtures, enabling rapid deployment and compatibility extension, thereby extending the lifecycle of the test solution and improving its scalability and adaptability.
[0064] In some embodiments of this application, the relay control instructions, communication instructions, and data acquisition resource call instructions described above are only some examples of test control instructions. In actual applications, test control instructions may include more instructions.
[0065] In some embodiments of this application, the host computer can obtain configuration information through any of the following methods: the host computer reads or loads configuration information from a pre-stored configuration file from a local storage device according to a preset path; the host computer reads configuration information from a configuration file sent by the test board; the host computer obtains the tag of the test fixture, and reads the configuration information from the configuration file corresponding to the tag from the local storage device or a server connected to the host computer.
[0066] The storage device can be a storage chip integrated into the host computer, such as an EEPROM or a TF card. This application does not limit the specific type of storage device.
[0067] The configuration file can be in JSON or XML format, and this application embodiment does not limit the specific format of the configuration file. The configuration file can be associated with the test fixture, so that the host computer can quickly obtain the configuration file and configuration information based on the association or correspondence between the test fixture and the configuration file.
[0068] The labels on the test fixtures can be radio frequency identification (RFID) tags or QR codes, etc. This application embodiment does not limit the type of label.
[0069] In this embodiment, the host computer generates test control commands based on preset configuration information. This allows for the replacement of printed circuit boards or test fixtures by simply updating the configuration information, without modifying the main program in the host computer. This enables configurable and agile test preparation, significantly reducing test adaptation and deployment time. For example, the test adaptation work for newly developed printed circuit boards can be shortened from a day-long cycle relying on code development to hours or even minutes, which can be completed simply by writing configuration information.
[0070] S13, the host computer sends the test control command to the test board.
[0071] In some embodiments of this application, the host computer can send test control commands such as relay control commands, communication commands, and call commands to the test board.
[0072] S14, the test board performs test operations on the printed circuit board according to the test control instructions and obtains the test data of the printed circuit board.
[0073] In some embodiments of this application, the test board performs test operations on the printed circuit board according to test control instructions and obtains test data of the printed circuit board, including: the test board responds to relay control instructions to configure the relay to the corresponding state, so that the printed circuit board is in the test condition corresponding to the relay; the test board responds to communication instructions to establish a communication connection with the printed circuit board; and in each test condition, the test board responds to call instructions to call data acquisition resources to acquire test data.
[0074] The descriptions of the test conditions can be found in the following references. Figure 1 This describes the functions that relays can perform.
[0075] For example, the test board can respond to communication commands and establish serial communication with the printed circuit board.
[0076] Each data acquisition resource can have a corresponding invocation instruction. For example, if the data acquisition resources include a communication interface, an analog-to-digital converter (which can be specified down to the channel of the analog-to-digital converter), and a power meter (which can be specified down to the channel of the power meter), the invocation instructions can include a first invocation instruction corresponding to the communication interface, a second invocation instruction corresponding to the analog-to-digital converter, and a third invocation instruction corresponding to the power meter. The first to third invocation instructions mentioned above are only some examples of invocation instructions; in practical applications, invocation instructions for more resources can also be included.
[0077] In some embodiments, the test board responds to a call instruction and calls data acquisition resources to acquire test data, including: the test board responds to a first call instruction and calls a communication interface to acquire internal operating data from the printed circuit board.
[0078] In this system, the test board, responding to the first call command, can invoke the communication interface to send data acquisition commands to the printed circuit board and obtain internal operating data sent by the printed circuit board through the interface. For example, in response to the first call command, the test board can obtain the internal operating data of the printed circuit board through the serial port.
[0079] Internal operating data can include parameters that reflect the operating status of the printed circuit board, such as voltage, current, temperature, signal frequency, digital status, or register values.
[0080] In some embodiments, the external measurement data includes electrical parameters of the printed circuit board, the data acquisition resources include an analog-to-digital converter and a power meter, the calling instructions include a second calling instruction corresponding to the analog-to-digital converter and a third calling instruction corresponding to the power meter, the test board responds to the calling instructions and calls the data acquisition resources to acquire test data, including: responding to the second calling instruction to call the analog-to-digital converter to acquire the first electrical parameters of the printed circuit board, and responding to the third calling instruction to call the power meter to acquire the second electrical parameters of the printed circuit board.
[0081] The first electrical parameter may include relevant data such as voltage and current at measurement points on the printed circuit board. For example, in response to the second call command, the test board calls channel 1 of the analog-to-digital converter to acquire the voltage value of the printed circuit board and reads the voltage value acquired by channel 1 of the analog-to-digital converter.
[0082] The second electrical parameters may include the printed circuit board's input voltage, output voltage, input current, output current, power factor, and power-related data such as input power and output power calculated based on these parameters. For example, in response to the second call command, the test board calls the power meter's interface to collect the power value of the printed circuit board and reads the power value collected by the power meter's interface.
[0083] In some embodiments, the acquisition of external measurement data and internal operating data can be performed simultaneously or sequentially. This application embodiment does not restrict the order of acquisition of external measurement data and internal operating data.
[0084] In this embodiment, the test board performs tests on the printed circuit board and acquires test data based on test control commands sent from the host computer. This improves the integration and automation of the testing process, thereby reducing manual intervention and operational errors, and enhancing the consistency and reliability of the tests. As an intelligent intermediary, the test board uniformly collects the internal operating data and external measurement data of the printed circuit board, providing integrated data to the host computer and effectively simplifying its processing logic.
[0085] In some embodiments of this application, the test board can use components such as indicator lights to indicate the test status and provide feedback to the user. For example, the test board can control onboard indicator lights to represent the test progress and results with different colors or flashing patterns: a solid green light indicates a successful test, a solid red light indicates a failed test, and a flashing yellow light indicates that the test is in progress. Furthermore, more specific status codes can be displayed using multi-color light-emitting diodes (LEDs) or digital tubes to facilitate quick identification of the current test stage or type of error by the user.
[0086] S15, the test board sends the test data to the host computer.
[0087] In some embodiments of this application, the test board can directly send the test data to the host computer, or it can perform data fusion on the test data and send the fused test data to the host computer.
[0088] Data fusion of test data includes, but is not limited to: filtering and denoising, format unification, merging or combining.
[0089] S16, the host computer determines the rationality of the test data based on the judgment rules defined in the configuration information and obtains the test results of the printed circuit board.
[0090] In some embodiments of this application, the judgment rule can define the judgment criteria corresponding to each test data.
[0091] The judgment criteria can include expected numerical range, expected value, expected string, etc. For example, the judgment rule can specify that "the voltage of measurement point a should be between 2.4V and 2.6V", then "2.4V-2.6V" is the judgment criterion for the voltage of measurement point a; the judgment rule can specify that "the return value of measurement point b should be "OK", then "OK" is the judgment criterion for the return value of measurement point b; the judgment rule can specify that "the power of measurement point c should be between 3.2W and 3.6W", then "3.2W-3.6W" is the judgment criterion for the power of measurement point c.
[0092] The host computer determines the reasonableness of the test data based on the judgment rules defined in the configuration information. This includes: when the test data meets the corresponding judgment criteria, the host computer determines that the test data is reasonable; when the test data does not meet the corresponding judgment criteria, the host computer determines that the test data is unreasonable.
[0093] Among them, test data falling within the corresponding expected value range, test data matching the corresponding expected value or expected string, etc., can all be considered as test data meeting the corresponding judgment criteria.
[0094] For example, if the standard for judging the voltage at measurement point a is 2.4V-2.6V, when the voltage at measurement point a is 2.5V, the host computer can determine that the voltage at measurement point a is reasonable, and when the voltage at measurement point a is 1.5V, the host computer can determine that the voltage at measurement point a is unreasonable.
[0095] For example, if the criterion for judging the return value of measurement point b is "OK", the host computer can determine that the return value of measurement point b is reasonable when the return value of measurement point b is "OK".
[0096] In some embodiments, the host computer can generate a corresponding Boolean value based on the comparison result of the test data with the corresponding judgment criteria to indicate whether the test data is reasonable. For example, when the test data meets the corresponding judgment criteria, a Boolean value of true can be generated to indicate that the test data is reasonable; when the test data does not meet the corresponding judgment criteria, a Boolean value of false can be generated to indicate that the test data is unreasonable.
[0097] In some embodiments of this application, the host computer can determine whether the test data meets the corresponding judgment criteria item by item, and determine the test results of the printed circuit board based on the test data meeting the corresponding judgment criteria, and generate a test report.
[0098] The test results for the printed circuit board can include passing and failing the test. For example, the host computer can determine that the printed circuit board has passed the test when a preset number of test data meet the corresponding judgment criteria, and determine that the printed circuit board has failed the test when no preset number of test data meets the corresponding judgment criteria. The preset number can be less than or equal to the total number of test data, and the preset number can be customized. This application does not impose any restrictions on this.
[0099] In some embodiments of this application, the host computer can present the comparison between each test data item and the corresponding judgment standard through the user interface, such as presenting the corresponding Boolean value, so that the user can understand the test details and judgment basis in real time.
[0100] In other embodiments of this application, the step of determining the reasonableness of test data based on the judgment rules defined in the configuration information can be performed by other devices. For example, the test board can determine the reasonableness of the test data based on the judgment rules defined in the configuration information, and send the comparison results of the test data with the corresponding judgment criteria to the host computer so that the host computer can determine the test results of the printed circuit board.
[0101] In this embodiment, the host computer can quickly determine whether the test data is reasonable and generate test results according to the judgment rules, thereby improving the testing efficiency of printed circuit boards.
[0102] In the printed circuit board (PCB) testing scheme of this embodiment, the test companion board responds to the signal triggered when the PCB is placed on the test fixture and sends a test start signal to the host computer, which enhances the smoothness and reliability of human-computer interaction. Responding to the test start signal, the host computer generates test control commands based on preset configuration information. This allows for updating only the configuration information when replacing the PCB or test fixture, without modifying the main program in the host computer, enabling configurable and agile test preparation and significantly shortening test adaptation and deployment time. The test companion board performs tests on the PCB and acquires test data based on the test control commands sent from the host computer, improving the integration and automation of testing, thereby reducing manual intervention and operational errors, and improving test consistency and reliability. As an intelligent intermediary, the test companion board uniformly collects the internal operating data and external measurement data of the PCB, providing integrated data to the host computer. This effectively simplifies the host computer's processing logic, enabling the host computer to quickly determine the rationality of the test data and generate test results based on judgment rules. This not only reduces testing complexity, shortens debugging time, and improves testing efficiency, but also lowers the technical threshold for testing, reduces the development cost of dedicated testing systems, and reduces the complexity of later maintenance and upgrades of testing systems.
[0103] In some embodiments of this application, in order to more clearly illustrate the testing method for printed circuit boards applied to host computers and test boards, the following will be combined with Figure 3 and Figure 4 Please provide a detailed explanation.
[0104] For example, such as Figure 3 The diagram shown is a flowchart of a testing method for a printed circuit board according to another embodiment of this application. Depending on different requirements, the order of the steps in this flowchart can be adjusted according to actual needs, and some steps can be omitted. The testing method for the printed circuit board is applied to a test board and includes the following steps: S21, the test board responds to the signal triggered when the test fixture is placed with a printed circuit board, and sends a test start signal to the host computer, so that the host computer responds to the test start signal, generates test control instructions according to the preset configuration information, and sends the test control instructions to the test board.
[0105] In some embodiments, the description of features such as test start signal, configuration information, and test control instructions can be referred to the description in steps S11 to S13.
[0106] S22, the test board performs test operations on the printed circuit board according to the test control instructions and obtains the test data of the printed circuit board.
[0107] In some embodiments, the description of features such as the method for performing tests on the printed circuit board and the method for acquiring test data for the test board can be referred to the description of step S14.
[0108] S23, the test board sends the test data to the host computer, which then determines the rationality of the test data based on the judgment rules defined in the configuration information, and obtains the test results of the printed circuit board.
[0109] In some embodiments, the description of features such as the test board sending test data to the host computer and the host computer judging whether the test data is reasonable can be referred to the description of steps S15 to S16.
[0110] In the printed circuit board (PCB) testing scheme of this embodiment, the test companion board responds to the signal triggered when the PCB is placed on the test fixture, sending a test start signal to the host computer, which enhances the smoothness and reliability of human-computer interaction. Through the test start signal, the host computer generates test control commands based on preset configuration information. When changing the PCB or test fixture, only the configuration information needs to be updated, without modifying the main program in the host computer, thus achieving configurable and agile test preparation and significantly shortening test adaptation and deployment time. The test companion board performs tests on the PCB and acquires test data based on the test control commands sent from the host computer, improving the integration and automation of testing, thereby reducing manual intervention and operational errors, and improving test consistency and reliability. As an intelligent intermediary, the test companion board uniformly collects the internal operating data and external measurement data of the PCB, providing integrated data to the host computer, effectively simplifying the host computer's processing logic, enabling the host computer to quickly determine the rationality of the test data and generate test results based on judgment rules. This not only reduces testing complexity, shortens debugging time, and improves testing efficiency, but also lowers the technical threshold for testing, reduces the development cost of dedicated testing systems, and reduces the complexity of later maintenance and upgrades of testing systems.
[0111] For example, such as Figure 4 The diagram shown is a flowchart of a testing method for a printed circuit board according to another embodiment of this application. Depending on different requirements, the order of the steps in this flowchart can be adjusted according to actual needs, and some steps can be omitted. The testing method for the printed circuit board is applied to a host computer and includes the following steps: S31, the host computer receives the test start signal sent from the test board, whereby the test board sends the test start signal in response to the signal triggered when the test fixture is placed on the printed circuit board.
[0112] In some embodiments, the description of features such as the transmission of the test start signal can be referred to the description of step S11.
[0113] S32, the host computer responds to the test start signal and generates test control commands based on the preset configuration information.
[0114] In some embodiments, the method for the host computer to generate test control instructions based on configuration information and the description of the test control instructions can be referred to the explanation of step S12.
[0115] S33, the host computer sends test control commands to the test board, so that the test board performs test operations on the printed circuit board according to the test control commands, obtains the test data of the printed circuit board, and sends the test data to the host computer.
[0116] In some embodiments, the method for performing test operations on the printed circuit board according to test control instructions and obtaining test data of the printed circuit board can be referred to the description of steps S13 to S15.
[0117] S34: The host computer determines the rationality of the test data based on the judgment rules defined in the configuration information and obtains the test results of the printed circuit board.
[0118] In some embodiments, the method for the host computer to determine the reasonableness of test data according to the judgment rules can be referred to the description of step S16.
[0119] In the printed circuit board (PCB) testing scheme of this embodiment, in response to the test start signal sent by the test support board, the host computer generates test control commands based on preset configuration information. This allows for the replacement of PCBs or test fixtures only requiring updates to the configuration information, without modifying the main program in the host computer. This enables configurable and agile test preparation, significantly shortening test adaptation and deployment time. Sending test control commands to the test support board allows it to perform tests on the PCB and acquire test data, improving test integration and automation, reducing manual intervention and operational errors, and enhancing test consistency and reliability. The test support board, acting as an intelligent intermediary, uniformly collects internal operating data and external measurement data from the PCB, providing integrated data to the host computer. This effectively simplifies the host computer's processing logic, enabling it to quickly determine the rationality of test data and generate test results based on judgment rules. This not only reduces test complexity, shortens debugging time, and improves test efficiency, but also lowers the technical threshold for testing, reduces the development cost of dedicated test systems, and reduces the complexity of later maintenance and upgrades of the test system.
[0120] For example, such as Figure 5 The diagram shown is a structural schematic of a test plate provided in one embodiment of this application. Figure 5 In the test board 10, there are microcontrollers 101, communication interfaces 102, relays 103, analog-to-digital converters 104, and power meters 105. The microcontroller 101 is communicatively connected to the communication interface 102, the relays 103, the analog-to-digital converters 104, and the power meters 105.
[0121] The microcontroller 101 can be used to parse test control commands, coordinate the various components of the test board 10 to test the printed circuit board, and acquire test data of the printed circuit board to implement the printed circuit board testing method described in this application embodiment. The printed circuit board can be held by a test fixture, and the test data can include internal operating data and external measurement data. The external measurement data can include electrical parameters measured by the analog-to-digital converter 103 and the power meter 105, etc.
[0122] The communication interface 102 can be used to establish a communication connection between the test board 10 and external devices such as printed circuit boards, so as to obtain the internal status data sent by the communication interface of the printed circuit board.
[0123] The relays 103 can be integrated into the test board 10 in an array. By controlling the opening and closing of the relays 103, different test paths and test conditions can be flexibly constructed. For example, the relays can be used to switch electrical paths or routes, connect test excitations and loads, and simulate switching conditions in actual working environments.
[0124] The analog-to-digital converter 104 can be used to acquire first electrical parameters of measurement points on a printed circuit board. For example, the first electrical parameters may include relevant data such as voltage and current of the measurement points on the printed circuit board.
[0125] The power meter 105 can be used to collect second electrical parameters of the printed circuit board. For example, the second electrical parameters may include the input voltage, output voltage, input current, output current, power factor of the printed circuit board, and power-related data such as input power and output power calculated based on these parameters.
[0126] In other embodiments of this application, the test board 10 may adopt a modular design combining a core board and an expansion board to improve the flexibility and scalability of the hardware configuration of the test board 10. The core board may integrate a minimum system, such as a microcontroller and a general communication interface; while functional components such as analog-to-digital converters, relay arrays, and power meter interfaces are provided as pluggable modules, facilitating flexible combination and upgrades according to testing requirements.
[0127] It is understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the test board 10. In other embodiments of this application, the test board 10 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0128] like Figure 6 The diagram shown is a schematic representation of the structure of a host computer provided in one embodiment of this application. The host computer 20 can be an electronic device such as a computer, server (e.g., cloud server), mobile phone, tablet computer, laptop computer, vehicle-mounted equipment, or remote control. This embodiment of the application does not impose any restrictions on the specific type of the host computer 20.
[0129] exist Figure 6The host computer 20 may include a communication module 201, a storage device 202, a processing device 203, an input / output (I / O) interface 204, and a bus 205. The processing device 203 is coupled to the communication module 201, the storage device 202, and the input / output interface 204 via the bus 205.
[0130] Communication module 201 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions such as Universal Serial Bus (USB) and Controller Area Network (CAN). The wireless communication module may provide one or more wireless communication solutions such as Wireless Fidelity (Wi-Fi), Bluetooth (BT), mobile communication networks, Frequency Modulation (FM), Near Field Communication (NFC), and Infrared (IR).
[0131] Storage device 202 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by processing device 203, and can be used to store executable programs (e.g., machine instructions) of other running programs, as well as user and application data. The RAM may include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), etc.
[0132] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by processing device 203. Non-volatile memory can include disk storage devices and flash memory.
[0133] Storage device 202 is used to store one or more computer programs. The one or more computer programs are configured to be executed by processing device 203. The one or more computer programs include multiple instructions, which, when executed by processing device 203, enable a testing method for a printed circuit board to be executed on host computer 20.
[0134] In other embodiments, such as Figure 6 The host computer 20 shown also includes an external memory interface for connecting to an external memory to expand the storage capacity of the host computer 20.
[0135] The processing device 203 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0136] The processing device 203 provides computing and control capabilities. For example, the processing device 203 is used to execute computer programs stored in the storage device 202 to implement the above-described printed circuit board testing method.
[0137] The input / output interface 204 is used to provide a channel for user input or output. For example, the input / output interface 204 can be used to connect various input / output devices, such as a mouse, keyboard, touch device, display screen, etc., so that users can enter information or visualize information.
[0138] Bus 205 is used to provide a channel for communication between the communication module 201, storage device 202, processing device 203, and input / output interface 204 in the host computer 20.
[0139] It is understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the host computer 20. In other embodiments of this application, the host computer 20 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0140] This application also provides a computer-readable storage medium storing a computer program, which includes program instructions. When the program instructions are executed, the method implemented can refer to the printed circuit board testing method in the above embodiments of this application.
[0141] The computer-readable storage medium can be the internal memory of the test board or host computer as described in the above embodiments, such as the hard disk or memory of the test board or host computer. Alternatively, the computer-readable storage medium can be an external storage device of the test board or host computer, such as a pluggable hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the test board or host computer.
[0142] In some embodiments, a computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, etc.; and the data storage area may store data created based on the use of the test board or a host computer, etc.
[0143] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0144] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0145] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method of testing a printed circuit board, characterized by, The method is applied to a test system comprising a host computer and a test board, and the method comprises: In response to a signal triggered by the test fixture when the printed circuit board is placed, the test board sends a test start signal to the host computer; In response to the test start signal, the host computer generates a test control instruction according to preset configuration information and sends the test control instruction to the test board; The test board performs a test operation on the printed circuit board according to the test control instruction, acquires test data of the printed circuit board, and sends the test data to the host computer, wherein the test data comprises external measurement data and internal operation data of the printed circuit board; The host computer determines the rationality of the test data according to a judgment rule defined by the configuration information, and obtains a test result of the printed circuit board.
2. The method of testing a printed circuit board of claim 1, wherein, The host computer generates a test control instruction according to preset configuration information, which comprises: The host computer determines a relay in the test board and a state corresponding to the relay according to a relay control logic defined in the configuration information, and generates a relay control instruction for the relay according to the state; The host computer generates a communication instruction according to an interface parameter of the printed circuit board defined in the configuration information; The host computer determines a data acquisition resource in the test board according to a data acquisition rule defined in the configuration information, and generates a calling instruction for the data acquisition resource.
3. The method of testing a printed circuit board of claim 2, wherein, The test board performs a test operation on the printed circuit board according to the test control instruction, acquires test data of the printed circuit board, which comprises: The test board configures the relay to a corresponding state in response to the relay control instruction, so that the printed circuit board is in a test working condition corresponding to the relay; The test board constructs a communication connection with the printed circuit board in response to the communication instruction; In each test working condition, the test board acquires the test data by calling the data acquisition resource in response to the calling instruction.
4. The method of testing a printed circuit board of claim 3, wherein, The data acquisition resource comprises a communication interface, and the calling instruction comprises a first calling instruction corresponding to the communication interface, and the test board acquires the test data by calling the data acquisition resource in response to the calling instruction, which comprises: The test board acquires the internal operation data from the printed circuit board by calling the communication interface in response to the first calling instruction.
5. The method of testing a printed circuit board as recited in claim 3, wherein, The external measurement data comprises electrical parameters of the printed circuit board, the data acquisition resource comprises an analog-to-digital converter and a power meter, the calling instruction comprises a second calling instruction corresponding to the analog-to-digital converter and a third calling instruction corresponding to the power meter, and the test board acquires the test data by calling the data acquisition resource in response to the calling instruction, which comprises: The test board acquires a first electrical parameter of the printed circuit board by calling the analog-to-digital converter in response to the second calling instruction; The test board acquires a second electrical parameter of the printed circuit board by calling the power meter in response to the third calling instruction.
6. The method of testing a printed circuit board as defined in claim 1, wherein, The judgment rule defines a judgment standard corresponding to each test data, and the host computer determines the rationality of the test data according to the judgment rule defined by the configuration information, including: When the test data meets the corresponding judgment standard, the host computer determines that the test data is reasonable; When the test data does not meet the corresponding judgment standard, the host computer determines that the test data is unreasonable.
7. The method of testing a printed circuit board as recited in claim 1, wherein, The host computer obtains the configuration information by any one of the following methods: The host computer reads the configuration information in the pre-stored configuration file from the local storage device according to a preset path; The host computer reads the configuration information in the configuration file sent by the test board; The host computer obtains the label of the test fixture, and reads the configuration information in the configuration file corresponding to the label from the local storage device or a server in communication connection with the host computer.
8. A method of testing a printed circuit board, characterized by, The method is applied to a test board, and the test board is in communication connection with a host computer, and the method includes: In response to a signal triggered by a test fixture when a printed circuit board is placed, a test start signal is sent to the host computer, so that the host computer generates a test control instruction according to preset configuration information in response to the test start signal, and sends the test control instruction to the test board; According to the test control instruction, a test operation is performed on the printed circuit board to obtain test data of the printed circuit board; the test data includes external measurement data and internal running data of the printed circuit board; The test data is sent to the host computer, so that the host computer determines the rationality of the test data according to the judgment rule defined by the configuration information, and obtains the test result of the printed circuit board.
9. A method of testing a printed circuit board, characterized by, The method is applied to a host computer, and the host computer is in communication connection with a test board, and the method includes: Receive a test start signal sent from the test board, wherein the test board sends the test start signal in response to a signal triggered by a test fixture when a printed circuit board is placed; In response to the test start signal, a test control instruction is generated according to preset configuration information; The test control instruction is sent to the test board, so that the test board performs a test operation on the printed circuit board according to the test control instruction to obtain test data of the printed circuit board, and sends the test data to the host computer, wherein the test data includes external measurement data and internal running data of the printed circuit board; According to the judgment rule defined by the configuration information, the rationality of the test data is determined, and the test result of the printed circuit board is obtained.
10. A test system for printed circuit boards, characterized in that The test system includes a host computer and a test board: The test board is used to send a test start signal to the host computer in response to a signal triggered by a test fixture when a printed circuit board is placed; The host computer is used to generate a test control instruction according to preset configuration information in response to the test start signal, and send the test control instruction to the test board; The test board is also used for performing a test operation on the printed circuit board according to the test control instruction, obtaining test data of the printed circuit board, and sending the test data to the host computer, wherein the test data comprises external measurement data and internal operation data of the printed circuit board. The host computer is also used for determining the rationality of the test data according to a judgment rule defined by the configuration information, and obtaining a test result of the printed circuit board.