A creepage distance inspection method, device and equipment based on PCB
Through automated PCB creepage distance inspection methods and devices, the problems of low accuracy and low efficiency of manual inspection are solved, and comprehensive and accurate creepage distance inspection of PCB boards are achieved, improving inspection efficiency and quality.
Patent Information
- Application Number
- CN202411932904.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-01
AI Technical Summary
In the prior art, creepage distance inspection in PCB design mainly relies on manual measurement, resulting in low accuracy, low efficiency, and easy to miss and incorrectly check.
It provides a method and device for crawl distance inspection based on PCB. By obtaining PCB design data, determining the inspection type and target network collection, automatically calculating the creepage distance inside and on the board, with a comprehensive coverage range, and improving inspection accuracy and efficiency.
It realizes automatic creepage distance inspection of PCB boards, improves the accuracy and range of inspections, reduces inspection time, improves efficiency and quality, shortens the R&D cycle, and avoids waste of resources.
Smart Images

Figure CN119738691A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of printed circuit boards, and in particular relates to a creepage distance inspection method and device based on PCB. Background Art
[0002] Creepage distance is the shortest distance between two conductive parts along the surface of solid insulating material. In the design and layout of PCB, creepage distance is a key factor that must be carefully considered. It is not only related to the performance of the circuit board, but also directly related to the electrical safety and reliability of the entire product. If the creepage distance is insufficient, it may cause electrical breakdown and leakage, which may lead to equipment failure or safety accidents.
[0003] Specifically, the impact of the creepage distance of the PCB board on the circuit board includes the following aspects:
[0004] 1) Circuit performance and stability: Insufficient creepage distance may lead to electrical breakdown, causing circuit short circuit or burning components, affecting the normal function and performance of the circuit.
[0005] 2) Safety issues: Unreasonable creepage distance may increase safety risks such as fire and electric shock, posing potential threats to users and equipment.
[0006] 3) Reliability and durability: Proper creepage distance design helps improve the reliability and durability of the circuit board, reducing maintenance costs and failure rates.
[0007] 4) Compliance with standard requirements: Many industry standards and specifications require that the creepage distance of PCBs must meet specific values to ensure that the product complies with relevant certification and testing standards.
[0008] In other words, creepage distance inspection in PCB design is very necessary. At present, creepage distance inspection is mainly done manually. Manual creepage distance measurement is complicated and prone to omissions and errors, low accuracy, and low inspection efficiency. Therefore, how to automatically and efficiently inspect creepage distance is very important. Summary of the invention
[0009] In order to solve the above problems existing in the prior art, the present invention provides a creepage distance inspection method and device based on PCB.
[0010] The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0011] The present invention provides a creepage distance inspection method based on a PCB, comprising:
[0012] Acquire PCB design data of the PCB to be inspected, wherein the PCB design data includes coordinates of each slot and coordinates of multiple network graphics;
[0013] Determine a creepage distance inspection type and a target network set, wherein the target network set includes at least two target networks, and one target network is a network graph; the creepage distance inspection type includes an in-board creepage distance inspection and a board edge creepage distance inspection;
[0014] When performing the creepage distance inspection within the board, based at least on the coordinates of the target network, the creepage distance between each two target networks of different positional relationship categories with a voltage difference is inspected to obtain the in-board inspection result, wherein the positional relationship categories include: located on the same layer of the PCB board and on both sides of the slot, located on different layers of the PCB board and on both sides of the slot, and located on different layers of the PCB board and on one side of the slot;
[0015] When performing a board edge creepage distance check, based on the coordinates of the target network, network mapping is performed by extending outward from the edge of the PCB to be inspected to 1 / 2 of the board thickness, and a creepage distance check of the target network is performed to obtain a board edge inspection result.
[0016] The present invention also provides a creepage distance inspection device based on a PCB, comprising:
[0017] An acquisition module is used to acquire PCB design data of the PCB to be inspected, wherein the PCB design data includes the coordinates of each slot and the coordinates of multiple network graphics;
[0018] A determination module, used to determine a creepage distance inspection type and a target network set, wherein the target network set includes at least two target networks, and one target network is a network graph; the creepage distance inspection type includes an in-board creepage distance inspection and a board edge creepage distance inspection;
[0019] The board creepage distance inspection module is used to inspect the creepage distance between each two target networks of different position relationship categories with voltage difference based on at least the coordinates of the target network, and obtain the board inspection result, wherein the position relationship categories include: located in the same layer of the PCB to be inspected and distributed on both sides of the slot, located in different layers of the PCB to be inspected and distributed on both sides of the slot, and located in different layers of the PCB to be inspected and distributed on one side of the slot;
[0020] The board edge creepage distance inspection module is used to perform creepage distance inspection of the target network based on the coordinates of the target network by extending 1 / 2 board thickness outward along the edge of the PCB to be inspected to obtain a board edge inspection result.
[0021] The present invention also provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0022] The memory is used to store computer programs;
[0023] The processor is used to implement the steps of the above-mentioned PCB-based creepage distance inspection method when executing the program stored in the memory.
[0024] Compared with the prior art, the present invention has the following beneficial effects:
[0025] The present invention can automatically check the creepage distance within the board and the creepage distance at the edge of the board for the network on the PCB board to be inspected, so that the creepage distance inspection of the entire PCB board can be realized; and when the creepage distance within the board is inspected, the creepage distances of the network to be inspected located on the same layer of the PCB board and on both sides of the slot, located on different layers of the PCB board and on both sides of the slot, located on different layers of the PCB board and on one side of the slot, and located on the same layer of the PCB board and on the same side of the slot can be automatically calculated and inspected, and the coverage range is very comprehensive, and the network to be inspected at any location will not be missed; compared with manual creepage distance inspection, not only the inspection accuracy and inspection range are greatly improved, but also the inspection time is greatly reduced, so that the inspection efficiency and quality are greatly improved, thereby shortening the research and development cycle and avoiding waste of resources such as manpower and material resources.
[0026] The present invention will be further described in detail below with reference to the accompanying drawings and specific implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a flow chart of a creepage distance inspection method based on PCB provided by an embodiment of the present invention;
[0028] Figure 2 This is a schematic diagram of a situation where a slot exists on a connection line with the shortest distance provided by an embodiment of the present invention;
[0029] Figure 3 It is a schematic diagram of a calculation principle of the shortest distance between two networks located on the same layer of a PCB board and distributed on both sides of a slot provided by an embodiment of the present invention;
[0030] Figure 4 It is a schematic diagram of a calculation principle of the shortest distance between two networks located on different layers of a PCB board and distributed on one side of a slot provided by an embodiment of the present invention;
[0031] Figure 5 It is a schematic diagram of the board edge mapping principle provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0033] Figure 1 FIG. 1 is a flow chart of a PCB-based creepage distance inspection method provided by an embodiment of the present invention. Figure 1 As shown, the method includes:
[0034] S101, obtaining PCB design data of the PCB to be inspected, wherein the PCB design data includes coordinates of each slot and coordinates of multiple network graphics.
[0035] Here, the PCB design data includes the board thickness of the PCB, the coordinates of each slot, and the signal layer graphic data, and the signal layer graphic data includes the coordinates of multiple network graphics. The coordinates of the slots and the coordinates of the network graphics are all located in the same coordinate system, and the coordinate system is a two-dimensional coordinate system in the horizontal plane where the board surface of the PCB to be inspected is located. Specifically, the coordinates of each slot are the coordinates of the various points that constitute the slot; for each slot, the size of the slot can be obtained according to the coordinates of the slot. Each network graphic is a graphic with electrical network properties. A network graphic can include routing, copper foil, pads, etc., and the coordinates of a network graphic are the coordinates of the various points that constitute the routing, copper foil, pads, etc. in the network graphic; according to the coordinates of the network graphic, the length of the routing, the size of the copper foil, the size of the pad, etc. included in the network graphic can be obtained.
[0036] The PCB to be inspected in the present invention is a double-sided board, each network pattern is located on the top layer or the bottom layer of the PCB to be inspected, and the slots described in the present invention are through slots that penetrate the top layer and the bottom layer of the PCB to be inspected.
[0037] S102, determining a creepage distance inspection type and a target network set, wherein the target network set includes at least two target networks, and one target network is a network graph; the creepage distance inspection type includes an in-board creepage distance inspection and a board edge creepage distance inspection.
[0038] Here, the creepage distance check type and the network graph to be checked can be determined by receiving an external control instruction, or can be determined according to inherent setting information. The target network set can be a part of the multiple network graphs mentioned above, or can be all the network graphs in the PCB design data mentioned above, and the present invention does not limit this.
[0039] It should be noted that the target network set includes at least one group of networks with a voltage difference, and each group of networks with a voltage difference is composed of two target networks with a voltage difference, wherein one target network is a low voltage network and the other target network is a high voltage network, and the two target networks with a voltage difference have the same group tag and voltage difference tag, and the group tag and voltage difference tag are used to indicate that the two target networks constitute a group of networks with a voltage difference and the specific voltage difference value between the two target networks. In some embodiments, the group tag and the voltage difference tag can be manually marked and added in advance.
[0040] S103. When performing creepage distance inspection within the board, based at least on the coordinates of the target network, the creepage distance between every two target networks of different positional relationship categories with voltage difference is inspected to obtain the inspection result within the board, wherein the positional relationship categories include: located on the same layer of the PCB board and on both sides of the slot, located on different layers of the PCB board and on both sides of the slot, and located on different layers of the PCB board and on one side of the slot.
[0041] S104, when performing board edge creepage distance inspection, based on the coordinates of the target network, network mapping is performed by extending outward from the edge of the PCB to be inspected to 1 / 2 of the board thickness, and creepage distance inspection of the target network is performed to obtain board edge inspection results.
[0042] It should be noted that the above S103 and S104 may be executed simultaneously, sequentially, or selectively, and the present invention is not limited thereto.
[0043] The present invention can automatically check the creepage distance within the board and the creepage distance at the edge of the board for the network on the PCB board to be inspected, so that the creepage distance inspection of the entire PCB board can be realized; and when the creepage distance within the board is inspected, the creepage distances of the network to be inspected located on the same layer of the PCB board and on both sides of the slot, located on different layers of the PCB board and on both sides of the slot, located on different layers of the PCB board and on one side of the slot, and located on the same layer of the PCB board and on the same side of the slot can be automatically calculated and inspected, and the coverage range is very comprehensive, and the network to be inspected at any location will not be missed; compared with manual creepage distance inspection, not only the inspection accuracy and inspection range are greatly improved, but also the inspection time is greatly reduced, so that the inspection efficiency and quality are greatly improved, thereby shortening the research and development cycle and avoiding waste of resources such as manpower and material resources.
[0044] In the present invention, when the target network set includes multiple groups of networks with voltage differences, the target network set can be divided into multiple different network subsets according to different voltage differences, and different network subsets correspond to different voltage differences, and the voltage difference between every two networks with voltage difference in each network subset is the voltage difference corresponding to the network subset; for example, when the target network set is divided into two network subsets, and the voltage difference corresponding to the first network subset is 10V, and the voltage difference corresponding to the second network subset is 20V, then the voltage difference between every two networks with voltage difference in the first network subset is 10V, and the voltage difference between every two networks with voltage difference in the second network subset is 20V. In addition, each network subset also corresponds to a first preset value and a second preset value, and the first preset values corresponding to different network subsets are different, and the first preset value corresponding to each network subset is less than or equal to the second preset value corresponding to the network subset. It should be noted that the first preset value is the shortest creepage distance required by safety regulations, and the larger the corresponding voltage difference of the network subset, the larger the first preset value corresponding to it. For example, the first preset value corresponding to the network subset with a corresponding voltage difference of 10V is smaller than the first preset value corresponding to the network subset with a corresponding voltage difference of 20V.
[0045] In some embodiments, the above-mentioned step of “at least based on the coordinates of the target network, checking the creepage distance between each two target networks of different position relationship categories with voltage difference to obtain the in-board inspection result” in S103 can be implemented by the following steps:
[0046] S1031. Based on the coordinates of each slot and the coordinates of the target network in each network subset, determine whether the shortest distance between every two networks with a voltage difference in the network subset is less than the corresponding first preset value, and whether there is a slot on each connecting line with the shortest distance less than the corresponding first preset value.
[0047] Here, for each network subset, the shortest distance between each two networks with a voltage difference can be calculated based on the coordinates of each target network in the network subset, and then it is determined whether the shortest distance between each two networks with a voltage difference is greater than or equal to the corresponding first preset value; when there is a shortest distance less than the corresponding first preset value, for each shortest distance less than the corresponding first preset value, according to the coordinates of a pair of target networks with a voltage difference corresponding to the shortest distance, and the coordinates of each slot, collision detection is performed through a collision algorithm. If the line of the shortest distance has no graphic collision with each slot, it means that there is no slot on the line of the shortest distance. If the line of the shortest distance has a graphic collision with a certain slot, it means that the slot exists on the line of the shortest distance. Exemplarily, Figure 2Schematic diagram of a situation where there is a slot on the shortest distance line, wherein N1 and N2 are two networks, and the white line L is the shortest distance line between N1 and N2.
[0048] Specifically, when the shortest distance between every two networks with a voltage difference in all network subsets is greater than or equal to the corresponding first preset value, it is characterized that the creepage distances between these target networks with a voltage difference in all network subsets meet the safety regulations, thereby obtaining an in-board inspection result that the in-board creepage distances of the target networks of the PCB to be inspected meet the safety regulations. For each network subset, when the shortest distance between a pair of target networks with a voltage difference is less than the corresponding first preset value, and there is no slot on the connection line of the shortest distance between the pair of target networks, it indicates that the creepage distance between the pair of target networks does not meet the safety regulations, thereby obtaining an in-board inspection result that the in-board creepage distance between the pair of target networks does not meet the safety regulations. When the shortest distance between a pair of target networks with a voltage difference is less than the corresponding first preset value, but there is a slot on the shortest distance line between the pair of target networks, since the creepage distance is the shortest distance between two conductive components along the surface of the solid insulating material, if there is a slot, since the slot connects the PCB board, the calculation of the creepage distance needs to consider the impact of the slot on different signal layers and needs to be recalculated. Therefore, the following step S1032 can be executed next.
[0049] Exemplarily, when calculating the shortest distance between every two networks having a voltage difference, any one of the following three methods may be used for calculation:
[0050] 1) Obtain the distance between the coordinates of each point of each two networks by traversing;
[0051] 2) Use Minkowski distance algorithm to obtain;
[0052] 3) Use the boost distance method to calculate.
[0053] S1032: When there is a slot on the shortest distance connection line between a pair of target networks with a voltage difference, select a first key network corresponding to the pair of target networks from the network subset according to the coordinates of the slot and a second preset value corresponding to the network subset.
[0054] Specifically, when the shortest distance between a pair of target networks with a voltage difference is less than the corresponding first preset value, and there is a slot on the line of the shortest distance of the pair of target networks, the shortest distance between each target network in the network subset and the slot is calculated according to the coordinates of the slot and the coordinates of each target network in the network subset, and then the target network whose shortest distance to the slot is less than or equal to the corresponding second preset value is screened out from the network subset, thereby obtaining the first key network corresponding to the pair of target networks. Since the second preset value corresponding to the network subset is greater than or equal to the corresponding first preset value, the distance between the target network whose shortest distance to the slot is greater than the corresponding second preset value and the slot is greater than the required shortest creepage distance, which meets the safety regulations. By screening out the target network whose shortest distance to the slot is less than or equal to the second preset value corresponding to the network subset from the network subset for inspection, the amount of calculation can be saved, thereby improving the inspection efficiency while meeting the safety requirements.
[0055] S1033. Calculate the shortest distance between every two networks with a voltage difference in the first key network corresponding to the pair of target networks according to the position relationship category between every two networks with a voltage difference in the first key network corresponding to the pair of target networks, and obtain multiple shortest distances corresponding to the pair of target networks.
[0056] It should be noted that, for the case where two networks with a voltage difference are located on the same layer of the PCB board and on one side of the slot, the calculation and judgment process of the shortest distance between the two networks with a voltage difference in this case has been completed and executed through the above-mentioned S1031. Therefore, in order to avoid repetition, the calculation and judgment process of the shortest distance in this case will not be described separately below, but the calculation and judgment process of the shortest distance between the two networks with a voltage difference in three cases: located on the same layer of the PCB board and on both sides of the slot, located on different layers of the PCB board and on both sides of the slot, and located on different layers of the PCB board and on one side of the slot will be described.
[0057] In some embodiments, when the positional relationship category between two networks with a voltage difference in the first key network corresponding to a pair of target networks with a voltage difference is: located on the same layer of the PCB board and on both sides of the slot, and the two networks are the first network and the second network, the shortest distance between the first network and the second network can be calculated through steps S10 to S14; for example, the first network and the second network can be simultaneously on the top layer or the bottom layer of the PCB to be inspected.
[0058] S10. Calculate the shortest distances from the first network to the first end and the second end of the slot according to the coordinates of the first network and the coordinates of the slot, and calculate the shortest distances from the second network to the first end and the second end of the slot according to the coordinates of the second network and the coordinates of the slot; wherein the first end and the second end are the two ends in the extension direction of the slot.
[0059] S11. According to the coordinates of the first network, the second network and the slot, calculate the distance of the first network in the shortest distance from the first end of the slot to the second network in contact with the slot, and calculate the distance of the first network in the shortest distance from the second end of the slot to the second network in contact with the slot.
[0060] S12, calculating the shortest distance between the first network and the second network and the first end of the slot, and the sum of the shortest distance between the first network and the slot, bypassing the first end of the slot and reaching the second network, to obtain a first distance.
[0061] S13, calculating the shortest distance between the first network and the second network and the second end of the slot, and the sum of the shortest distance between the first network and the second network and the slot, to obtain a second distance.
[0062] S14. Taking the minimum value of the first distance and the second distance as the shortest distance between the first network and the second network.
[0063] For example, Figure 3 The diagram shows the calculation principle of the shortest distance between two networks NET1 and NET2 located on the same layer of the PCB board and distributed on both sides of the slot. The shortest distances between NET1 and both ends of the slot are d1 and d2 respectively, and the shortest distances between NET2 and both ends of the slot are d3 and d4 respectively. The shortest distance between NET1 and the slot is ds( Figure 3 The shortest distance that NET1 takes to reach NET2 by bypassing the lower end of the slot is dx( Figure 3 (not shown in the figure), therefore, the shortest creepage distance between NET1 and NET2 is: D(min)=min((d1+d3+ds),(d2+d4+dx)).
[0064] In some embodiments, when the positional relationship category between two networks with a voltage difference in the first key network corresponding to a pair of target networks with a voltage difference is: located on different layers of the PCB board and on both sides of the slot, and the two networks are the first network and the second network, the shortest distance between the first network and the second network can be calculated through steps S20 to S24:
[0065] S20. Calculate the shortest distances from the first network to the first end and the second end of the slot according to the coordinates of the first network and the coordinates of the slot, and calculate the shortest distances from the second network to the first end and the second end of the slot according to the coordinates of the second network and the coordinates of the slot; wherein the first end and the second end are the two ends in the extension direction of the slot.
[0066] S21. According to the coordinates of the first network, the second network and the slot, calculate the distance of the first network in the shortest distance from the first end of the slot to the second network in contact with the slot, and calculate the distance of the first network in the shortest distance from the second end of the slot to the second network in contact with the slot.
[0067] S22, calculating the shortest distances between the first network and the second network and the first end of the slot, and the sum of the shortest distances between the first network and the second network that are in contact with the slot and that are bypassing the first end of the slot, to obtain a first distance.
[0068] S23, calculating the shortest distance between the first network and the second network and the second end of the slot, and the sum of the shortest distance between the first network and the second network that contacts the slot, to obtain a second distance.
[0069] S24, taking the sum of the minimum value of the first distance and the second distance and the board thickness of the PCB to be inspected as the shortest distance between the first network and the second network.
[0070] In some embodiments, when the positional relationship category between two networks with a voltage difference in the first key network corresponding to a pair of target networks with a voltage difference is: located on different layers of the PCB board and on one side of the slot, and the two networks are the first network and the second network, the shortest distance between the first network and the second network can be calculated through steps S30 to S32, and the shortest distance between the first network and the second network can also be calculated through steps S40 to S41.
[0071] Specifically, steps S30 to S32 are as follows:
[0072] S30, taking the side of the slot close to the first network and the second network as the axis, symmetrically mapping any one of the first network and the second network to the other side of the slot to obtain the coordinates of a symmetrical network.
[0073] For example, a matrix transformation method can be used to symmetrically map any one of the first network and the second network to the other side of the slot based on the coordinates of the network, with the side of the slot close to the first network and the second network as the axis, so as to obtain the coordinates of the symmetrical network. In this way, the symmetrically mapped network and the unmapped network can be placed on the same plane.
[0074] S31. Calculate the shortest distance between the unmapped network in the first network and the second network and the symmetric network according to the coordinates of the unmapped network in the first network and the second network and the coordinates of the symmetric network.
[0075] S32: taking the sum of the shortest distance between the unmapped network and the symmetric network in the first network and the second network and the board thickness of the PCB to be inspected as the shortest distance between the first network and the second network.
[0076] For example, Figure 4 The schematic diagram shows the calculation principle of the shortest distance between two networks NET3 and NET4 located on different layers of the PCB board and distributed on one side of the slot, where Y is a part of the symmetrical network NET3' obtained by symmetrically mapping NET3 to the other side of the slot, and NET3' and NET4 are on the same layer, then the shortest creepage distance between NET3 and NET4 is: D(min) = (d5 + d6 + PCB board thickness) = (d7 + PCB board thickness)), where d5 + d6 is the sum of the shortest distances of NET3 and NET4 from the slot on the same horizontal plane, d5 and d6 are the distances of NET3 and NET4 from the slot in the sum of the shortest distances, and d7 is the shortest distance between NET3' and NET4.
[0077] Specifically, steps S40 to S41 are as follows:
[0078] S40, taking the edge of the slot on one side close to the first network and the second network extending outward from 1 / 2 of the plate thickness as the axis, symmetrically map any one of the first network and the second network to the other side of the slot to obtain the coordinates of a symmetrical network.
[0079] Exemplarily, when performing symmetric mapping, a matrix transformation method may be used to map the coordinates of the network to be mapped, so as to obtain the coordinates of the mapped network.
[0080] S41. Calculate the shortest distance between the unmapped network in the first network and the second network and the symmetric network according to the coordinates of the unmapped network in the first network and the second network and the coordinates of the symmetric network to obtain the shortest distance between the first network and the second network.
[0081] In the present invention, when checking the creepage distance within the board, different calculation principles are used to calculate the shortest distance according to the different types of positional relationships between each two networks. The thickness of the PCB board, the distance around the groove, etc. can be fully considered, so that the calculated shortest distance is more precise, thereby making the inspection result more accurate.
[0082] S1034. Obtain an in-board inspection result corresponding to the pair of target networks according to a size relationship between a minimum value among a plurality of shortest distances corresponding to the pair of target networks and a first preset value corresponding to the network subset.
[0083] S1035. Take all the on-board inspection results corresponding to the target network in the network subset, in which there are slots on the connection lines with voltage difference and shortest distance, as the on-board inspection results of the network subset, and take the on-board inspection results of all network subsets as the on-board inspection results of the PCB to be inspected.
[0084] Here, for each network subset, after calculating the shortest distance between every two networks with a voltage difference in the first key network corresponding to a pair of target networks with a voltage difference, the minimum value of the shortest distances between every two networks with a voltage difference in all the first key networks corresponding to the pair of target networks can be selected, and the minimum value can be compared with the first preset value corresponding to the network subset to which the pair of target networks belongs. If the minimum value is greater than or equal to the corresponding first preset value, it means that the board creepage distances between the target networks with a voltage difference in the first key network corresponding to the pair of target networks all meet the safety regulations, and when there are slots on the connecting lines with a voltage difference and the shortest distance in all network subsets, in the first key networks corresponding to all pairs of target networks, When the in-board creepage distances between the target networks with voltage differences all meet the safety regulations, it means that the in-board creepage distances between the target networks of the PCB to be inspected all meet the safety regulations, thereby obtaining an in-board inspection result that the in-board creepage distances of the target networks of the PCB to be inspected meet the safety regulations; if the minimum value of the shortest distances between every two networks with voltage differences in the first key network corresponding to the pair of target networks is less than the corresponding first preset value, the in-board creepage distances between the target networks with voltage differences in the first key network corresponding to the pair of target networks do not meet the safety regulations, indicating that the in-board creepage distances between the target networks of the PCB to be inspected do not meet the safety regulations, thereby obtaining an in-board inspection result that the in-board creepage distances of the target networks of the PCB to be inspected do not meet the safety regulations.
[0085] In some embodiments, when an in-board inspection result is obtained that the in-board creepage distance of a target network of the PCB to be inspected does not meet the safety requirements, this result can be reported to modify the PCB design data of the PCB to be inspected, and the target network whose in-board creepage distance does not meet the safety requirements can be indicated in the reported result.
[0086] In some embodiments, each network subset further corresponds to a third preset value, and the first preset value corresponding to each network subset is less than or equal to the third preset value corresponding to the network subset. Based on this, S104 can be implemented by the following steps:
[0087] S1041. According to the coordinates of the target network in each network subset, a target network whose shortest distance to the edge of the PCB to be inspected is less than or equal to a third preset value corresponding to the network subset is selected from the network subset to obtain a second key network of the network subset.
[0088] Here, board edge creepage is creepage between high and low voltage networks along the edge of the PCB, and this creepage mode is the same as the creepage within the board. Since the third preset value is greater than or equal to the first preset value, in each network subset, the board edge creepage distance between networks whose shortest distance to the edge of the PCB to be inspected is greater than the corresponding third preset value must be greater than the creepage distance specified by safety. Therefore, from each network subset, the networks whose shortest distance to the edge of the PCB to be inspected is less than or equal to the corresponding third preset value are selected to perform board edge creepage distance inspection, which can save the amount of calculation, thereby improving the inspection efficiency while meeting the safety requirements.
[0089] S1042, taking the position extending outward from the edge of the PCB to be inspected by 1 / 2 of the board thickness as the axis, symmetrically map the networks located on different layers of the PCB to be inspected in the second key network of the network subset to the same layer to obtain at least one mapped network.
[0090] In some embodiments, when the second key network of a network subset includes both the network located at the top layer of the PCB to be tested and the network located at the bottom layer of the PCB to be tested, for each network located at the top layer of the PCB to be tested in the second key network of the network subset, the network can be symmetrically mapped to the bottom layer with the edge of the PCB to be tested closest to the network extending outward by 1 / 2 of the board thickness as the axis, so that one or more mapped networks can be obtained, and the one or more mapped networks and the unmapped networks in the second key network of the network subset are simultaneously located at the bottom layer of the PCB to be tested. In some embodiments, when the second key network of a network subset includes both the network located at the top layer of the PCB to be tested and the network located at the bottom layer of the PCB to be tested, for each network located at the bottom layer of the PCB to be tested in the second key network of the network subset, the network can be symmetrically mapped to the top layer with the edge of the PCB to be tested closest to the network extending outward by 1 / 2 of the board thickness as the axis, so that one or more mapped networks can be obtained, and the one or more mapped networks and the unmapped networks in the second key network of the network subset are simultaneously located at the top layer of the PCB to be tested. The specific mapping method can be selected according to actual needs.
[0091] Exemplarily, when performing symmetric mapping, a matrix transformation method may be used to map the coordinates of the network to be mapped, so as to obtain the coordinates of the mapped network.
[0092] For example, Figure 5 This is a schematic diagram of the board edge mapping principle. Figure 5 The black area is the background, the area circled by the red frame is the PCB to be inspected, and the red frame is the edge of the PCB to be inspected, the blue area is a k1 range area, and the k1 range area indicates an area with a second preset distance corresponding to a network subset from the edge of the PCB to be inspected, w1~w6 are six different networks in the network subset that are located at the bottom layer of the PCB to be inspected, and since w1~w6 are all located in the k1 range area, w1~w6 are all networks in the second key network of the network subset. Therefore, for each network in w1~w6, the network can be symmetrically mapped to the top layer of the PCB to be inspected, with the edge of the PCB to be inspected closest to the network extending outward by 1 / 2 of the board thickness as the axis, so as to obtain the corresponding mapping network w1' of w1, the mapping network w2' of w2, the mapping network w3' of w3, the mapping network w4' of w4, the mapping network w5' of w5, and the mapping network w6' of w6, so as to facilitate the subsequent shortest distance calculation.
[0093] S1043. Determine the shortest distance between each pair of networks to be calculated in the network subset according to the coordinates of each mapped network and each unmapped network in the second key network of the network subset, and obtain the board edge creepage distance inspection result of the network subset according to the relationship between the minimum value of the obtained shortest distances and the corresponding first preset value; wherein each pair of networks to be calculated includes a mapped network and an unmapped network having a voltage difference with the mapped network.
[0094] S1044. The board edge creepage distance inspection results of all network subsets are used as the board edge inspection results of the PCB to be inspected.
[0095] Continue with Figure 5 For example, if the second key network of the network subset also includes two networks w7 and w8 located on the top layer of the PCB to be tested (w7 and w8 are in Figure 5 (not shown), and when each network in w1'~w6' has a voltage difference with w7 and w8 respectively, the shortest distance between each network in w1'~w6' and w7 and w8 respectively can be calculated, and the minimum value can be determined from the obtained 12 shortest distances.
[0096] Here, for the second key network of each network subset, since the mapped network and the unmapped network in the second key network are on the same plane, the shortest distance between each mapped network and an unmapped network having a voltage difference with the mapped network can be calculated according to the coordinates of the two networks. In this way, multiple shortest distances can be obtained. Then, the minimum value of the multiple shortest distances obtained is compared with the first preset value corresponding to the network subset. If the minimum value is greater than or equal to the corresponding first preset value, the board edge creepage distances between the target networks in the network subset meet the safety requirements, and when When the board edge creepage distances between the target networks in all network subsets meet the safety regulations, it means that the board edge creepage distances between the target networks of the PCB to be inspected all meet the safety regulations, thereby obtaining a board edge inspection result that the board edge creepage distances of the target networks of the PCB to be inspected meet the safety regulations; if the minimum value is less than the corresponding first preset value, the board edge creepage distances between the target networks in the network subset do not meet the safety regulations, which means that the board edge creepage distances between the target networks of the PCB to be inspected do not meet the safety regulations, thereby obtaining a board edge inspection result that the board edge creepage distances of the target networks of the PCB to be inspected do not meet the safety regulations.
[0097] In some embodiments, when a board edge inspection result is obtained that the board edge creepage distance of a target network of the PCB to be inspected does not meet safety requirements, this result can be reported to modify the PCB design data of the PCB to be inspected, and the target network whose board edge creepage distance does not meet safety requirements can be indicated in the reported result.
[0098] Here, by extending the edge of the PCB to be inspected outward by 1 / 2 of the board thickness as the axis for network mapping, and calculating the creepage distance based on the mapped network, the thickness of the PCB board can be fully considered when calculating the board edge creepage distance, so that the calculated creepage distance is more accurate.
[0099] The present invention also provides a creepage distance inspection device based on a PCB, comprising: an acquisition module, a determination module, an intra-board creepage distance inspection module and a board edge creepage distance inspection module.
[0100] The acquisition module is used to acquire the PCB design data of the PCB to be inspected, wherein the PCB design data includes the coordinates of each slot and the coordinates of multiple network graphics.
[0101] The determination module is used to determine the creepage distance inspection type and the target network set, the target network set includes at least two target networks, and one target network is a network graph; the creepage distance inspection type includes the creepage distance inspection within the board and the creepage distance inspection at the edge of the board.
[0102] The board creepage distance inspection module is used to inspect the creepage distance between every two target networks of different position relationship categories with voltage difference based on at least the coordinates of the target network, and obtain the board inspection result, wherein the position relationship categories include: located in the same layer of the PCB to be inspected and distributed on both sides of the slot, located in different layers of the PCB to be inspected and distributed on both sides of the slot, and located in different layers of the PCB to be inspected and distributed on one side of the slot.
[0103] The board edge creepage distance inspection module is used to check the creepage distance of the target network based on the coordinates of the target network, by extending the network mapping outward from the edge of the PCB to be inspected to 1 / 2 of the board thickness, and obtain the board edge inspection result.
[0104] It should be noted that the specific principles of the above-mentioned modules are the same as the principles of the corresponding steps in the above-mentioned PCB-based creepage distance inspection method, and will not be repeated here.
[0105] The present invention also provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; the memory is used to store computer programs; the processor is used to implement the steps of the above-mentioned PCB-based creepage distance inspection method when executing the program stored in the memory.
[0106] It should be noted that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0107] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification.
[0108] In the specification, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality of components. Certain measures are recorded in different embodiments, but this does not mean that these measures cannot be combined to produce good effects.
[0109] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A creepage distance inspection method based on PCB, characterized in that: include: Acquire PCB design data of the PCB to be inspected, wherein the PCB design data includes coordinates of each slot and coordinates of multiple network graphics; Determine a creepage distance inspection type and a target network set, wherein the target network set includes at least two target networks, and one target network is a network graph; the creepage distance inspection type includes an in-board creepage distance inspection and a board edge creepage distance inspection; When performing the creepage distance inspection within the board, based at least on the coordinates of the target network, the creepage distance between each two target networks of different positional relationship categories with a voltage difference is inspected to obtain the in-board inspection result, wherein the positional relationship categories include: located on the same layer of the PCB board and on both sides of the slot, located on different layers of the PCB board and on both sides of the slot, and located on different layers of the PCB board and on one side of the slot; When performing a board edge creepage distance check, based on the coordinates of the target network, network mapping is performed by extending outward from the edge of the PCB to be inspected to 1 / 2 of the board thickness, and a creepage distance check of the target network is performed to obtain a board edge inspection result.
2. The PCB-based creepage distance inspection method according to claim 1, characterized in that: The target network set includes a plurality of different network subsets, different network subsets correspond to different voltage differences, and the voltage difference between each two target networks with a voltage difference in each network subset is the same; each network subset also corresponds to a first preset value and a second preset value, different network subsets correspond to different first preset values, and the first preset value corresponding to each network subset is less than or equal to the second preset value corresponding to the network subset; at least based on the coordinates of the target network, the creepage distance between each two target networks of different position relationship categories with a voltage difference is inspected to obtain the in-board inspection result, including: Based on the coordinates of each slot and the coordinates of the target network in each network subset, determine whether the shortest distance between each two networks with a voltage difference in the network subset is less than the corresponding first preset value, and whether there is a slot on each connecting line with the shortest distance less than the corresponding first preset value; When there is a slot on the shortest distance connection line between a pair of target networks with a voltage difference, a first key network corresponding to the pair of target networks is screened out from the network subset according to the coordinates of the slot and a second preset value corresponding to the network subset; According to the positional relationship category between every two networks with a voltage difference in the first key network corresponding to the pair of target networks, the shortest distance between every two networks with a voltage difference in the first key network corresponding to the pair of target networks is calculated to obtain multiple shortest distances corresponding to the pair of target networks; Obtaining the in-board inspection result corresponding to the pair of target networks according to the size relationship between the minimum value of the multiple shortest distances corresponding to the pair of target networks and the first preset value corresponding to the network subset; All the in-board inspection results corresponding to the target network in the network subset where there are slots on the connection lines with voltage difference and shortest distance are used as the in-board inspection results of the network subset, and the in-board inspection results of all network subsets are used as the in-board inspection results of the PCB to be inspected.
3. The PCB-based creepage distance inspection method according to claim 2, characterized in that: When there is a slot on the shortest distance connection line between a pair of target networks having a voltage difference, selecting a first key network corresponding to the pair of target networks from the network subset according to the coordinates of the slot and a second preset value corresponding to the network subset includes: When there is a slot on the shortest distance line between a pair of target networks with a voltage difference, the shortest distance between each target network in the network subset and the slot is calculated according to the coordinates of the slot and the coordinates of each target network in the network subset; A target network whose shortest distance to the slot is less than or equal to a second preset value corresponding to the network subset is selected from the network subset to obtain a first key network corresponding to the target network.
4. The PCB-based creepage distance inspection method according to claim 2, characterized in that: When the positional relationship category between two networks with a voltage difference in the first key network corresponding to a pair of target networks is: located in the same layer of the PCB board and on both sides of the slot, and the two networks with a voltage difference are the first network and the second network, the shortest distance calculation between each two networks with a voltage difference in the first key network corresponding to the pair of target networks is performed according to the positional relationship category between each two networks with a voltage difference in the first key network corresponding to the pair of target networks, and multiple shortest distances corresponding to the pair of target networks are obtained, including: According to the coordinates of the first network and the coordinates of the slot, respectively calculate the shortest distances of the first network from the first end and the second end of the slot, and according to the coordinates of the second network and the coordinates of the slot, respectively calculate the shortest distances of the second network from the first end and the second end of the slot; wherein the first end and the second end are two ends in the extension direction of the slot; According to the coordinates of the first network, the second network and the slot, calculating the distance of the first network that contacts the slot in the shortest distance from the first end of the slot to the second network, and calculating the distance of the first network that contacts the slot in the shortest distance from the second end of the slot to the second network; Calculate the shortest distance between the first network and the second network and the first end of the slot, and the sum of the shortest distance between the first network and the second network and the slot, to obtain a first distance; Calculate the shortest distance between the first network and the second network and the second end of the slot, and the sum of the shortest distance between the first network and the second network and the slot, to obtain a second distance; The minimum value of the first distance and the second distance is used as the shortest distance between the first network and the second network.
5. The PCB-based creepage distance inspection method according to claim 4, characterized in that: The PCB design data also includes: the board thickness of the PCB to be inspected; when the positional relationship category between two networks with a voltage difference in the first key network corresponding to a pair of target networks is: located in different layers of the PCB board and on both sides of the slot, the shortest distance calculation between each two networks with a voltage difference in the first key network corresponding to the pair of target networks is performed according to the positional relationship category between each two networks with a voltage difference in the first key network corresponding to the pair of target networks, and multiple shortest distances corresponding to the pair of target networks are obtained, including: The sum of the minimum value of the first distance and the second distance and the board thickness of the PCB to be inspected is taken as the shortest distance between the first network and the second network.
6. The PCB-based creepage distance inspection method according to claim 2, characterized in that: The PCB design data also includes: the board thickness of the PCB to be inspected; when the positional relationship category between two networks with a voltage difference in the first key network corresponding to a pair of target networks is: located in different layers of the PCB board and on one side of the slot, and the two networks with a voltage difference are the first network and the second network, the shortest distance calculation between each two networks with a voltage difference in the first key network corresponding to the pair of target networks is performed according to the positional relationship category between each two networks with a voltage difference in the first key network corresponding to the pair of target networks, and multiple shortest distances corresponding to the pair of target networks are obtained, including: Taking the side of the slot close to the first network and the second network as the axis, symmetrically map any one of the first network and the second network to the other side of the slot to obtain the coordinates of a symmetrical network; Calculating the shortest distance between the unmapped network in the first network and the second network and the symmetric network according to the coordinates of the unmapped network in the first network and the second network and the coordinates of the symmetric network; The sum of the shortest distance between the unmapped network in the first network and the second network and the symmetric network and the board thickness of the PCB to be inspected is taken as the shortest distance between the first network and the second network.
7. The PCB-based creepage distance inspection method according to claim 2, characterized in that: The method further comprises: When the shortest distance between every two target networks with a voltage difference in all network subsets is greater than or equal to the corresponding first preset value, an in-board inspection result is obtained that indicates that the in-board creepage distance of the target network of the PCB to be inspected meets the safety regulations; or, For each network subset, when there is no slot on the shortest distance connection line between a pair of target networks, an in-board inspection result indicating that the in-board creepage distance between the pair of target networks does not meet the safety regulations is obtained.
8. The PCB-based creepage distance inspection method according to claim 2, characterized in that: Each network subset also corresponds to a third preset value, and the first preset value corresponding to each network subset is less than or equal to the third preset value corresponding to the network subset; based on the coordinates of the target network, network mapping is performed by extending outward from the edge of the PCB to be inspected to 1 / 2 of the board thickness, and creepage distance inspection of the target network is performed to obtain a board edge inspection result, including: According to the coordinates of the target network in each network subset, a target network whose shortest distance to the edge of the PCB to be inspected is less than or equal to a third preset value corresponding to the network subset is selected from the network subset to obtain a second key network of the network subset; Taking the position extending outward from the edge of the PCB to be inspected by 1 / 2 of the board thickness as the axis, symmetrically map the networks in different layers of the PCB to be inspected in the second key network of the network subset to the same layer to obtain the coordinates of at least one mapped network; According to the coordinates of each mapped network and each unmapped network in the second key network of the network subset, the shortest distance between each pair of networks to be calculated in the network subset is determined, and according to the size relationship between the minimum value of the obtained shortest distances and the corresponding first preset value, the board edge creepage distance inspection result of the network subset is obtained; wherein each pair of networks to be calculated includes a mapped network and an unmapped network having a voltage difference with the mapped network; The board edge creepage distance inspection results of all network subsets are used as the board edge inspection results of the PCB to be inspected.
9. A creepage distance inspection device based on PCB, characterized in that: include: An acquisition module is used to acquire PCB design data of the PCB to be inspected, wherein the PCB design data includes the coordinates of each slot and the coordinates of multiple network graphics; A determination module, used to determine a creepage distance inspection type and a target network set, wherein the target network set includes at least two target networks, and one target network is a network graph; the creepage distance inspection type includes an in-board creepage distance inspection and a board edge creepage distance inspection; The board creepage distance inspection module is used to inspect the creepage distance between each two target networks of different position relationship categories with voltage difference based on at least the coordinates of the target network, and obtain the board inspection result, wherein the position relationship categories include: located in the same layer of the PCB to be inspected and distributed on both sides of the slot, located in different layers of the PCB to be inspected and distributed on both sides of the slot, and located in different layers of the PCB to be inspected and distributed on one side of the slot; The board edge creepage distance inspection module is used to perform creepage distance inspection of the target network based on the coordinates of the target network by extending 1 / 2 board thickness outward along the edge of the PCB to be inspected to obtain a board edge inspection result.
10. An electronic device comprising a processor, a communication interface, a memory and a communication bus, characterized in that: The processor, the communication interface and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to implement the method steps described in any one of claims 1-8 when executing the program stored in the memory.