Current detection method and circuit, printed circuit board assembly and electronic equipment
By using PCB trace resistors for current detection in the current detection circuit, the problem of excessive size of multi-channel current detection circuits is solved, achieving miniaturization and improved accuracy of the circuit.
Patent Information
- Application Number
- CN202411138973.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-26
AI Technical Summary
Existing current detection circuits suffer from large circuit size when detecting the current of multiple load modules, especially due to the large package size of the sampling resistor, resulting in multi-channel current detection circuits occupying a lot of equipment space.
The printed circuit board (PCB) trace resistor is used as the PCB mirror trace resistor and connected in series with the load module. By detecting the voltage drop and temperature of the PCB mirror trace resistor and combining the relationship between temperature and resistance, the current of the load module is calculated. Current detection is performed using both standard PCB trace resistors and PCB mirror trace resistors, reducing circuit size.
While achieving multi-channel current detection, it reduces circuit size, minimizes space occupation, and improves the accuracy and miniaturization of current detection.
Smart Images

Figure CN119024037A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to a current detection method, a circuit, a printed circuit board assembly and an electronic equipment. Background Art
[0002] Current electronic devices usually have a current detection circuit to detect the power consumption / charge amount of the electronic device. Current current detection circuits usually use a sampling resistor connected in series to the positive or negative electrode of the battery to collect the current flowing through the sampling resistor over a period of time to calculate the power consumption / charge amount of the electronic device. For example, Figure 1 As shown, the current current detection circuit generally includes: a battery 101, a sampling resistor 102 and a fuel gauge 103. The positive electrode of the battery 101 is connected in series with the sampling resistor 102, and the sampling resistor 102 is used to connect to the overall load 20 of the electronic device. The fuel gauge 103 is connected in parallel with the sampling resistor 102. In another example, Figure 2 As shown, the current current detection circuit generally includes: a battery 101, a sampling resistor 102 and a fuel gauge 103. The negative electrode of the battery 101 is connected in series with the sampling resistor 102, and the sampling resistor 102 is used to connect to the overall load 20 of the electronic device. The fuel gauge 103 is connected in parallel with the sampling resistor 102 to collect the current flowing through the sampling resistor 102 to calculate the power consumption of the overall load 20 of the electronic device.
[0003] With the development of electronic devices, users begin to pay attention to the power consumption of different load modules of electronic devices. For example, users begin to pay attention to the power consumption of multiple load modules such as system modules, display modules, radio frequency modules, sensor modules, etc.
[0004] At present, in order to detect the current of different load modules and determine the power consumption of different modules, each different load module is usually connected to an external device such as Figure 1 or Figure 2 The current detection circuit shown is used to detect the current of the load module connected in series with the sampling current 102. However, the sampling resistor in the current detection circuit is a discrete component, and its package volume is relatively large. For example, the package size of a 10 megohm (mΩ) sampling resistor is 0805: 2.03×1.27×0.61 millimeter (mm). Obviously, if more load modules need to be detected, the more sampling resistors are required, resulting in the problem of a large circuit volume in the current multi-channel current detection circuit used to detect the current of multiple load modules. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a current detection method, circuit, printed circuit board assembly and electronic device, which can solve the problem of large circuit volume in the current multi-channel current detection circuit used to detect the current of multiple load modules.
[0006] In a first aspect, an embodiment of the present application provides a current detection method, and the current detection method is applied to a current detection circuit, wherein the current detection circuit includes: a sampling control unit, a reference power supply, a discrete resistor, a temperature detection unit, and at least one printed circuit board (PCB) resistor group, wherein the PCB resistor group includes at least one PCB standard routing resistor and at least one PCB mirror routing resistor arranged on the same PCB routing layer; each of the PCB mirror routing resistors is used to be connected in series with a first load module; the sampling control unit is respectively connected to the discrete resistor, the PCB standard routing resistor, and the PCB mirror routing resistor, and is used to detect the voltage drop of the discrete resistor, the PCB standard routing resistor, and the PCB mirror routing resistor; the temperature detection unit is used to detect the temperature of the PCB routing standard resistor and the PCB mirror routing resistor; the positive electrode of the reference power supply is respectively connected to one end of each of the PCB standard routing resistors through the discrete resistor; or, the positive electrode of the reference power supply is connected to one end of each of the PCB standard routing resistors, and the other end of each of the PCB standard routing resistors is connected to the discrete resistor; the method includes:
[0007] In the case of detecting the current of any of the first load modules, obtaining a target voltage drop of a target mirror resistor detected by the sampling control unit and a target temperature of the target mirror resistor detected by the temperature detection unit, wherein the target mirror resistor is the PCB mirror wiring resistor connected in series with the detected first load module;
[0008] Obtaining a correspondence between the temperature and the resistance of the target mirror resistor, wherein the correspondence is determined according to a correspondence between the temperature and the resistance of the target standard resistor and a resistance conversion coefficient of the target mirror resistor, wherein the resistance conversion coefficient is determined according to a wiring length ratio and a wiring width ratio of the target standard resistor and the target mirror resistor;
[0009] Determining a target resistance value of the target mirror resistor according to a corresponding relationship between a temperature and a resistance value of the target mirror resistor and the target temperature;
[0010] According to the target resistance value and the target voltage drop, the current passing through the target mirror resistor is calculated to obtain the current of the first load module.
[0011] In a second aspect, an embodiment of the present application provides a current detection circuit, the current detection circuit comprising: a control unit, a reference power supply, a discrete resistor, a temperature detection unit, and at least one printed circuit board PCB resistor group, the PCB resistor group comprising at least one PCB standard routing resistor and at least one PCB mirror routing resistor arranged on the same PCB routing layer;
[0012] Each of the PCB mirror wiring resistors is used to be connected in series with a first load module;
[0013] The temperature detection unit is used to detect the temperature of the PCB standard wiring resistance and the PCB mirror wiring resistance;
[0014] The positive electrode of the reference power supply is connected to one end of each of the PCB standard wiring resistors through the discrete resistors; or, the positive electrode of the reference power supply is connected to one end of each of the PCB standard wiring resistors, and the other end of each of the PCB standard wiring resistors is connected to the discrete resistor, and the reference power supply is used to provide current to each of the PCB standard wiring resistors;
[0015] The sampling control unit is respectively connected to the discrete resistor, the PCB standard routing resistor and the PCB mirror routing resistor, and the sampling control unit is used to detect the voltage drop of the discrete resistor, the PCB standard routing resistor and the PCB mirror routing resistor; the sampling control unit is also used to calculate the current passing through the PCB mirror routing resistor according to the voltage drop and temperature of the PCB mirror routing resistors in the same group, and the corresponding relationship between the resistance value and temperature of the PCB standard routing resistor, so as to obtain the current of the first load module connected in series with the PCB mirror routing resistor.
[0016] In a third aspect, an embodiment of the present application provides a PCB assembly, the PCB assembly comprising: a PCB and any current detection circuit described in the second aspect, the PCB comprising a plurality of routing layers and a plurality of insulating medium layers, the routing layers and the insulating medium layers being arranged in an alternating and stacked manner;
[0017] The reference power supply, the discrete resistor, the sampling control unit and the first load module are arranged on the surface layer of the PCB, the PCB standard routing resistor and the PCB mirror routing resistor of the same resistor group are arranged on the same target routing layer, and the target routing layer is any routing layer of the multiple routing layers. The temperature detection unit is connected to the PCB standard routing resistor and the PCB mirror routing resistor, or the temperature detection unit is arranged near the PCB standard routing resistor and the PCB mirror routing resistor.
[0018] In a fourth aspect, an embodiment of the present application provides an electronic device, which includes the current detection circuit described in the second aspect, or includes the PCB assembly described in the third aspect.
[0019] In a fifth aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0020] In a sixth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0021] In a seventh aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0022] In an eighth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0023] In an embodiment of the present application, the current detection circuit includes: a sampling control unit, a reference power supply, a discrete resistor, a temperature detection unit and at least one PCB resistor group. The PCB resistor group includes at least one PCB standard routing resistor and at least one PCB mirror routing resistor arranged on the same PCB routing layer. Each PCB mirror routing resistor is used to be connected in series with a first load module. The sampling control unit is used to detect the voltage drop of the discrete resistor, the PCB standard routing resistor and the PCB mirror routing resistor; the temperature detection unit is used to detect the temperature of the PCB routing standard resistor and the PCB mirror routing resistor. In the current detection circuit, the sampling control unit can obtain the target voltage drop of the target mirror resistor detected by the sampling control unit and the target temperature of the target mirror resistor detected by the temperature detection unit when detecting the current of any first load module, wherein the target mirror resistor is a PCB mirror wiring resistor connected in series with the detected first load module; obtain the corresponding relationship between the temperature and the resistance of the target mirror resistor, wherein the corresponding relationship is determined according to the corresponding relationship between the temperature and the resistance of the target standard resistor and the resistance conversion coefficient of the target mirror resistor, wherein the resistance conversion coefficient is determined according to the wiring length ratio and the wiring width ratio of the target standard resistor and the target mirror resistor; determine the target resistance of the target mirror resistor according to the corresponding relationship between the temperature and the resistance of the target mirror resistor and the target temperature; and then calculate the current passing through the target mirror resistor according to the target resistance and the target voltage drop to obtain the current of the first load module, thereby realizing current detection of the first load module connected to the current detection circuit. Compared with the related art, the current detection circuit of the present application mainly uses PCB standard routing resistors and PCB mirror routing resistors for current detection, and the volume of PCB standard routing resistors and PCB mirror routing resistors is smaller than that of discrete resistors, and the number of resistor groups, and / or the number of PCB mirror routing resistors in a single resistor group can be multiple, and the current of multiple first load modules connected in series with multiple PCB mirror routing resistors can be detected to realize multi-channel current sampling. Therefore, in the technical solution of the present application, the current detection circuit that uses the resistor group for current detection reduces the circuit volume and the circuit's occupation of equipment space on the basis of realizing multi-channel current sampling, and improves the miniaturization of the multi-channel current detection circuit. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is one of the structural diagrams of the current detection circuit provided by the related art;
[0025] Figure 2 This is the second structural diagram of the current detection circuit provided by the related technology;
[0026] Figure 3 This is one of the resistivity-temperature variation schematic diagrams provided in the embodiments of the present application;
[0027] Figure 4It is one of the parameter schematic diagrams of PCB mirror wiring resistance and PCB standard wiring resistance provided in the embodiment of the present application;
[0028] Figures 5 to 18 They are respectively structural diagrams 1 to 14 of the current detection circuit provided in the embodiments of the present application;
[0029] Figure 19 to Figure 20 , Fig. 22 They are respectively the first to third structural diagrams of the PCB assembly provided in the embodiments of the present application;
[0030] Fig.21 It is one of the schematic diagrams of the PCB mirror trace resistance on the PCB assembly provided in the embodiment of the present application;
[0031] Fig.23 This is one of the temperature distribution diagrams of the PCB assembly provided in the embodiment of the present application;
[0032] Fig.24 This is the second schematic diagram of the PCB mirror trace resistance on the PCB assembly provided in the embodiment of the present application;
[0033] Figure 25 to Figure 27 They are respectively the fifteenth to seventeenth structural diagrams of the current detection circuit provided in the embodiments of the present application;
[0034] Fig.28 It is one of the schematic diagrams of the power supply tree provided in the embodiment of the present application;
[0035] Fig.29 This is one of the flow charts of the current detection method provided in the embodiment of the present application;
[0036] Fig.30 is one of the block diagrams of the current detection device provided in the embodiment of the present application;
[0037] Fig.31 It is one of the block diagrams of the electronic device provided in the embodiment of the present application;
[0038] Fig.32 This is one of the hardware structure diagrams of the electronic device according to the embodiment of the present application. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0040] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0041] The current detection method, circuit, printed circuit board assembly and electronic device provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0042] For ease of understanding, some principles involved in the technical solution of this application are explained below.
[0043] The technical solution of the present application mainly utilizes part of the printed circuit board (Printed Circuit Board, PCB) routing as a PCB mirror routing resistor in series with the load module, and then calculates the current through the PCB mirror routing resistor by detecting the voltage drop of the PCB mirror routing resistor, that is, the voltage difference at both ends of the PCB mirror routing resistor, and the resistance value of the PCB mirror routing resistor, so as to obtain the current of the load module connected in series with the PCB mirror routing resistor. Among them, the resistance value of the PCB mirror routing resistor can be determined according to the PCB standard routing resistor with a relatively close distance to the PCB mirror routing resistor and equal routing thickness. Due to the small volume of the PCB standard routing resistor and the PCB mirror routing resistor. Therefore, the PCB standard routing resistor and the PCB mirror routing resistor are suitable for miniaturized, multi-channel current detection.
[0044] The theoretical resistance value R of PCB trace resistance (including PCB standard trace resistance and PCB mirror trace resistance) _pcb_n It is related to the resistivity ρ of the PCB trace material, the width W, length L, and thickness H of the PCB trace resistance.
[0045] Specifically: R _pcb_n =ρ×L / S=ρ×L / (H×W). _pcb_n It represents the theoretical resistance value of the PCB trace resistor. ρ represents the resistivity of the PCB trace material. L represents the length of the PCB trace resistor, that is, the trace length. S represents the cross-sectional area of the PCB trace resistor. H represents the trace thickness of the PCB trace resistor. If the PCB trace material is copper, then H represents the copper thickness of the PCB trace resistor. W represents the trace width of the PCB trace resistor.
[0046] However, the resistance accuracy of PCB trace resistors is easily affected by PCB trace manufacturing tolerances (e.g., trace width manufacturing tolerances, trace thickness manufacturing tolerances, etc.), the resistivity of PCB trace materials, the temperature of PCB trace resistors, etc. See the following analysis:
[0047] First, the manufacturing tolerance of the copper thickness (i.e., the thickness of the routing layer) of a single-layer PCB objectively exists. For example, as shown in Table 1, Table 1 shows the copper thickness design values and copper thickness design tolerance values of different routing layers of the PCB. It can be seen from Table 1 that the design tolerance of the copper thickness of the PCB can be as bad as 40%, and the measured tolerance is also close to 24%. In addition, the manufacturing tolerances of PCB routing of different manufacturers and the manufacturing tolerances of routing of different PCBs of the same manufacturer are also different. For example, the maximum manufacturing tolerance under the PCB process capability of a certain PCB manufacturer does not exceed ±20% of the line width, and the maximum line width tolerance does not exceed 20um. Therefore, it can be seen that, limited by the manufacturing tolerance of the PCB routing, the actual resistance value of the PCB routing resistor is different from its theoretical resistance value.
[0048]
[0049] Table 1
[0050] Secondly, the resistivity of the material of the PCB trace usually changes greatly with temperature. For example, take the copper foil material as an example. As shown in Table 2, the resistivity of the copper foil material at -20°C changes by -16% compared to the resistivity of the copper foil material at 20°C; the resistivity of the copper foil material at -10°C changes by -12% compared to the resistivity of the copper foil material at 20°C, etc. It can be seen from Table 2 that the maximum resistivity change rate with temperature can be 23.6%.
[0051]
[0052] Table 2
[0053] The internal working environment temperature range of electronic equipment is usually wide, for example, between -20℃ and 65℃, and the working environment temperature of different areas on the PCB in the electronic equipment also changes with the different usage of the electronic equipment. Therefore, it can be seen that the temperature of the PCB trace resistance has a greater impact on the actual resistance value of the PCB trace resistance.
[0054] Based on this, the actual resistance value of the PCB trace resistor during use is different from the theoretical value of the PCB trace resistor due to the temperature of the PCB trace resistor, manufacturing tolerance, etc. Therefore, some embodiments of the present application provide a circuit calibration process to determine the actual resistance value of the PCB trace resistor at different temperatures.
[0055] The basic principle of calibration in the circuit calibration process is:
[0056] For the standard PCB trace resistance, its theoretical resistance value is R _pcb_n satisfy:
[0057] R _pcb_n =ρ×L / S=ρ×L / (H×W) (Formula 1)
[0058] Where, ρ is the resistivity of the trace material of the PCB standard trace resistor. L is the trace length of the PCB standard trace resistor. W is the trace width of the PCB standard trace resistor. H is the trace thickness of the PCB standard trace resistor.
[0059] In addition, since the resistivity ρ is greatly affected by the temperature T, the resistivity ρ of the PCB trace material has a high linearity with the temperature T. Therefore, according to the resistivity of the PCB trace material at each temperature, a linear function can be used to fit the resistivity-temperature relationship. The resistivity-temperature relationship is:
[0060] ρ(T)=aT+C (Formula 2)
[0061] Where ρ(T) represents the resistivity of the PCB trace material at temperature T. a represents the temperature coefficient. T represents the temperature of the PCB trace material. C represents the adjustment constant. For example, a linear function is used to fit the resistivity-temperature data shown in Table 2 to obtain Figure 3 Specifically, the maximum error of the resistivity in the temperature range of -20°C to 80°C is 0.4%.
[0062] Therefore, by substituting Formula 2 into Formula 1, the relationship between the resistance of the PCB standard trace resistance and the temperature is:
[0063]
[0064] For the same section of PCB standard trace resistance, the trace length L, trace thickness H, and trace width W are fixed values. Therefore, the relationship between the resistance value of the PCB standard trace resistance and the temperature can be rewritten as:
[0065]
[0066] in, R _pcb_n (T) represents the actual resistance value of the PCB standard trace resistance at temperature T. T represents the temperature of the PCB standard trace resistance.
[0067] As can be seen from the above formula 4, if the ambient temperature range during the application of the PCB standard trace resistance is large, the impact of the ambient temperature on the PCB standard trace resistance cannot be ignored. In addition, for PCB traces of different PCBs, PCB traces of different layers, and even PCB traces at different positions on the same layer, the value of L / H×W has a large manufacturing tolerance, so that even when the PCB traces are at the same temperature, the resistance deviation of the PCB standard trace resistance made by PCB traces at different positions is also large. Although the manufacturing tolerance of the trace length L and the trace width W can be controlled and reduced through trace design, the manufacturing tolerance of the trace thickness H will continue to increase under the trend of PCB lightweight design, and it is difficult to reduce it further.
[0068] It should be noted that for PCB standard trace resistors with irregular traces, the trace length L and trace width W of each trace segment in the PCB standard trace resistor can also be controlled to reduce the impact of manufacturing tolerances on the PCB standard trace resistor. For example, in order to reduce the impact of the manufacturing tolerances of the trace length L and trace width W of the PCB standard trace resistor on the PCB standard trace resistor, the design ideas of the trace length L and trace width W of the PCB standard trace resistor can be: L>L_tolerance; W>W_tolerance. Among them, L_tolerance represents the manufacturing tolerance of the trace length of the PCB trace where the PCB standard trace resistor is located. W_tolerance represents the manufacturing tolerance of the trace width of the PCB trace where the PCB standard trace resistor is located. For example, by designing the trace length L of the PCB standard trace resistor to be 20mm and the trace width W to be 20mm, the impact of the manufacturing tolerance of the trace length L and the manufacturing tolerance of the trace width W on the resistance of the PCB standard trace resistor can be reduced to 0.1%.
[0069] Based on this, if the actual resistance of the standard PCB trace resistor at two different temperatures after manufacturing can be determined, the actual resistance at different temperatures can be substituted into Formula 4 to calculate the parameters k and b, and then the temperature-resistance relationship of the standard PCB trace resistor can be obtained.
[0070] For the PCB mirror trace resistor, the change of its resistance with temperature also satisfies the above formula 4. In this way, the resistivity of the PCB mirror trace resistor and the PCB standard trace resistor (for example, the PCB mirror trace resistor and the PCB standard trace resistor set in the trace layer of the same PCB) with equal trace thickness H changes in the same proportion with temperature. Therefore, the resistance ratio of the PCB mirror trace resistor and the PCB standard trace resistor with equal trace thickness H is related to the trace length ratio and the trace width ratio of the two. It is not difficult to understand that at the same temperature, for the PCB mirror trace resistor and the PCB standard trace resistor with equal trace thickness H, the trace length L and the trace width W of the PCB standard trace resistor can be enlarged or reduced according to a certain ratio by design, so as to obtain PCB mirror trace resistors with different resistance values. Among them, the resistance ratio of the PCB mirror trace resistor and the PCB standard trace resistor is the resistance conversion coefficient of the two. The resistance conversion coefficient is determined according to the trace length ratio and the trace width ratio of the PCB mirror trace resistor and the PCB standard trace resistor.
[0071] For example, Figure 4 As shown, there are a first PCB mirror trace resistor Ln_pcb_1, a second PCB mirror trace resistor Ln_pcb_2, and a PCB standard trace resistor pcb_n set on the trace layer of the same PCB. The trace length, trace width, and trace thickness of the first PCB mirror trace resistor Ln_pcb_1, the second PCB mirror trace resistor Ln_pcb_2, and the PCB standard trace resistor pcb_n satisfy the following relationship:
[0072] H _pcb_n =H _Ln_pcb_1 =H _Ln_pcb_2 ;
[0073] L _Ln_pcb_1 =A _Ln_pcb_1 ×L _pcb_n , W _Ln_pcb_1 =B _Ln_pcb_1 ×W _pcb_n ;
[0074] L _Ln_pcb_2 =A _Ln_pcb_2 ×W _pcb_n , W _Ln_pcb_2 =B _Ln_pcb_2 ×W _pcb_n .
[0075] Among them, H _pcb_n Indicates the thickness of the standard PCB trace pcb_n. _Ln_pcb_1 Indicates the trace thickness of the first PCB mirror trace resistor Ln_pcb_1. _Ln_pcb_2 Indicates the trace thickness of the second PCB mirror trace resistor Ln_pcb_2._pcb_n Indicates the length of the standard PCB trace pcb_n. _pcb_n Indicates the trace width of the PCB standard trace pcb_n. _Ln_pcb_1 Indicates the trace length of the first PCB mirror trace resistor Ln_pcb_1. _Ln_pcb_1 Indicates the ratio of the first PCB mirror wiring resistance Ln_pcb_1 to the wiring length of the PCB standard wiring resistance pcb_n. _Ln_pcb_1 Indicates the trace width of the first PCB mirror trace resistor Ln_pcb_1. _Ln_pcb_1 Indicates the ratio of the first PCB mirror trace resistance Ln_pcb_1 to the trace width of the PCB standard trace resistance pcb_n. _Ln_pcb_2 Indicates the trace length of the second PCB mirror trace resistor Ln_pcb_2. _Ln_pcb_2 Indicates the ratio of the second PCB mirror wiring resistance Ln_pcb_2 to the wiring length of the PCB standard wiring resistance pcb_n. _Ln_pcb_2 Indicates the trace width of the second PCB mirror trace resistor Ln_pcb_2. _Ln_pcb_2 Indicates the ratio of the trace width of the second PCB mirror trace resistor Ln_pcb_2 to the trace width of the PCB standard trace resistor pcb_n.
[0076] At the same temperature as the first PCB mirror trace resistor Ln_pcb_1, the second PCB mirror trace resistor Ln_pcb_2, and the PCB standard trace resistor pcb_n, the resistance value R of the first PCB mirror trace resistor Ln_pcb_1 is _Ln_pcb_1 And the resistance value of the second PCB mirror trace resistor Ln_pcb_2 R _Ln_pcb_2 satisfy:
[0077]
[0078]
[0079] Among them, R _pcb_n Indicates the resistance value of the PCB standard trace pcb_n. _Ln_pcb_1 Indicates the resistance value of the first PCB mirror trace resistor Ln_pcb_1. _Ln_pcb_2 Indicates the resistance value of the second PCB mirror trace resistor Ln_pcb_2. The resistance conversion coefficient between the first PCB mirror trace resistor Ln_pcb_1 and the PCB standard trace resistor pcb_n is: A _Ln_pcb_1 / B _Ln_pcb_1 The resistance conversion coefficient between the second PCB mirror trace resistance Ln_pcb_2 and the PCB standard trace resistance pcb_n is: A _Ln_pcb_2 / B _Ln_pcb_2 .
[0080] Based on this, the PCB mirror trace resistance L is set on the same layer as the PCB standard trace resistance pcb_n. n_pcb_n , its resistance R _Ln_pcb_n satisfy:
[0081]
[0082] Among them, R _Ln_pcb_n Indicates the PCB mirror trace resistance L n_pcb_n The resistance value. _Ln_pcb_n Indicates the PCB mirror trace resistance L n_pcb_n The ratio of the trace length of the PCB standard trace resistance pcb_n, that is, A _Ln_pcb_n =L _Ln_pcb_n / L _pcb_n . B _Ln_pcb_n Indicates the PCB mirror trace resistance L n_pcb_n The ratio of the trace width to the trace width of the PCB standard trace resistance pcb_n, that is, B _Ln_pcb_n =W _Ln_pcb_n / W _pcb_n .
[0083] Substituting Formula 7 into Formula 4, we can get the PCB mirror trace resistance L n_pcb_n The resistance value R _Ln_pcb_n satisfy:
[0084]
[0085] in,
[0086] It should be noted that the same problem exists as the aforementioned PCB standard trace resistor: the manufacturing tolerance of the trace length and trace width of the PCB mirror trace resistor has an impact on the resistance value of the PCB mirror trace resistor. For example, in order to reduce the impact of the manufacturing tolerance of the trace length L and trace width W of the PCB mirror trace resistor on the PCB mirror trace resistor, the design idea of the trace length L and trace width W of the PCB mirror trace resistor can also be: L>L_tolerance; W>W_tolerance. Among them, L_tolerance represents the manufacturing tolerance of the trace length of the PCB trace where the PCB standard mirror resistor is located. W_tolerance represents the manufacturing tolerance of the trace width of the PCB trace where the PCB standard mirror resistor is located. For example, by designing the trace length L of the PCB mirror trace resistor to be 10mm and the trace width W to be 5mm, the impact of the manufacturing tolerance of the trace length and trace width on the resistance value of the PCB mirror trace resistor is reduced to 0.6%. For the PCB standard trace resistance and PCB mirror resistance of irregular traces, the influence of manufacturing tolerance on the PCB standard trace resistance can also be reduced by controlling the trace length and trace width of each trace segment in the PCB mirror trace resistance.
[0087] In this way, in the process of current detection using the PCB mirror trace resistor, the current resistance value of the PCB standard trace resistor can be obtained more accurately through the actual temperature of the PCB standard trace resistor and the temperature-resistance relationship, and then the resistance value of the PCB mirror trace resistor with a setting distance close to the PCB standard trace and equal trace thickness can be obtained more accurately, so as to facilitate the subsequent accurate calculation of the current. In addition, the more accurate resistance value of the PCB standard trace resistor can be determined through the aforementioned circuit calibration process, and then the resistance value of the PCB mirror trace resistor with a setting distance close to the PCB standard trace and equal trace thickness can be determined more accurately, reducing the resistance deviation of the PCB standard trace resistor and the PCB mirror trace resistor caused by temperature and PCB trace manufacturing tolerance, so as to improve the resistance accuracy of the PCB standard trace resistor and the PCB mirror trace resistor, and then improve the sampling accuracy of the PCB mirror trace resistor for the current flowing through it, and meet the accuracy requirements of multi-channel current sampling (such as the accuracy requirement of 5%).
[0088] In addition, the resistance error of the PCB mirror trace resistor mainly comes from: first, the resistance error of the PCB standard trace resistor in the same resistor group as the PCB mirror trace resistor. Second, the error in the size ratio relationship between the trace length and the trace width between the PCB mirror trace resistor and the PCB standard trace resistor (i.e., the manufacturing tolerance of the actual trace length and width). Therefore, according to the current sampling accuracy requirements of each first load module, the trace length and trace width of the corresponding PCB mirror trace resistor and the PCB standard trace resistor can be designed to reduce the impact of manufacturing tolerances and improve the current sampling accuracy using the PCB mirror trace resistor.
[0089] It should be noted that the calibration basic principle of the circuit calibration process is described by taking the linear function as an example to fit the resistivity-temperature relationship. Of course, polynomials, high-order functions, etc. can also be used to fit the resistivity-temperature relationship to obtain a more accurate resistivity-temperature relationship. In this way, the derived relationship between the resistance value of the PCB standard trace resistance and the temperature (Formula 4) is also replaced by a polynomial, high-order function, etc. about the resistance value and temperature.
[0090] Please refer to Figure 5 and Figure 6 , which shows a schematic diagram of the structure of two current detection circuits provided in an embodiment of the present application. Figure 5 and Figure 6 As shown, the current detection circuit includes: a control unit 501, a reference power supply 502, a discrete resistor (also known as a precision resistor) 503, a temperature detection unit, and at least one PCB resistor group. Each PCB resistor group includes: at least one PCB standard routing resistor 505 and at least one PCB mirror routing resistor 506 arranged on the same PCB routing layer. Optionally, each PCB resistor group may include a PCB standard routing resistor 505 and at least one PCB mirror routing resistor 506. Further optionally, the setting distance between the PCB mirror routing resistor 506 and the PCB standard routing resistor 505 of the same group is less than a distance threshold, so that the temperature of the PCB mirror routing resistor 506 is approximately equal to the temperature of the PCB standard routing resistor 505.
[0091] Each PCB mirror trace resistor 506 is used to be connected in series with a first load module 20. Optionally, the PCB mirror trace resistor 506 can reuse the PCB power trace of the first load module 20, or the PCB return trace. It should be noted that, Figure 5 and Figure 6In the example, a current detection circuit includes a resistor group, and the resistance value includes a PCB standard routing resistor 505 and n PCB mirror routing resistors set on the same PCB routing layer, where n is a positive integer greater than 2. Accordingly, each PCB mirror routing resistor can be connected in series with n first load modules 20 to collect n channel currents passing through n PCB mirror routing resistors to obtain the currents of n first load modules 20. Optionally, the load module 20 can be a central processing unit (CPU) system module, a wireless fidelity (WIreless Fidelity, WIFI) module, a radio frequency 4G / 5G module, an intelligent power amplifier module, a display module, a camera module, a sensor module, etc.
[0092] The temperature detection unit is used to detect the temperature of the PCB standard wiring resistor 505 and the PCB mirror wiring resistor 506. Optionally, the temperature detection unit can be connected to the PCB standard wiring resistor 505 and the PCB mirror wiring resistor 506. Or, the temperature detection unit can be arranged near the PCB standard wiring resistor 505 and the PCB mirror wiring resistor 506. For example, the temperature detection unit can be a temperature sensor. In an optional case, the temperature detection unit can also be connected to the sampling control unit 501 to transmit the detected temperature to the sampling control unit 501. For example, the temperature detection unit can also reuse the temperature sensor including thermistor (NTC) originally included in the electronic device where the current detection circuit is located.
[0093] The positive pole of the reference power supply 502 is connected to one end of each PCB standard wiring resistor 505 through a discrete resistor 503. Alternatively, the positive pole of the reference power supply 502 is connected to one end of each PCB standard wiring resistor 505, and the other end of each PCB standard wiring resistor 505 is connected to the discrete resistor 503. The reference power supply 502 is used to provide current to each PCB standard wiring resistor 505 to provide a reference current (a general term for the subsequent first reference current and the second reference current) of the discrete resistor 503. Optionally, the reference power supply 502 can supply power to at least one module. The reference power supply 502 can be a lithium-ion battery, a linear regulated power supply (DC-DC), a low dropout regulated power supply (Low Dropout Regulaor, LDO), a charge pump (charge Pump), a current source, etc.
[0094] It should be noted that, in an optional case, Figure 5 As shown, the positive electrode of the reference power supply 502 is connected to one end of each PCB standard wiring resistor 505 through a discrete resistor 503, and the negative electrode of the reference power supply 502 and the other end of each PCB standard wiring resistor 505 are grounded. In another optional case, as Figure 6 As shown, the positive electrode of the reference power supply 502 is connected to one end of each PCB standard wiring resistor 505, the other end of each PCB standard wiring resistor 505 is grounded through a discrete resistor 503, and the negative electrode of the reference power supply 502 is grounded. In another optional case, the positive electrode of the reference power supply 502 is connected to one end of each PCB standard wiring resistor 505 through a discrete resistor 503, and the other end of each PCB standard wiring resistor 505 is connected to the negative electrode of the reference power supply 502. In another optional case, the positive electrode of the reference power supply 502 is connected to one end of each PCB standard wiring resistor 505, and the other end of each PCB standard wiring resistor 505 is grounded to the reference power supply 502 through a discrete resistor 503.
[0095] The sampling control unit 501 is respectively connected to the discrete resistor 503, each PCB standard routing resistor 505 and each PCB mirror routing resistor 506. The sampling control unit 501 is used to detect the voltage drop and temperature of the discrete resistor 503, each PCB standard routing resistor 505 and each PCB mirror routing resistor 506, as well as the corresponding relationship between the resistance value and temperature of the PCB standard routing resistor 505, calculate the current passing through the PCB mirror routing resistor 506, and obtain the current of the first load module 20 connected in series with the PCB mirror routing resistor 506. Optionally, the sampling control unit 501 may include an analog-to-digital converter (ADC) and a microcontroller unit (MCU).
[0096] Optionally, the sampling control unit 501 is used to execute the current detection method provided in the embodiment of the present application, so as to calculate the current passing through the PCB mirror wiring resistor 506 according to the voltage drop and temperature of the same group of PCB mirror wiring resistors 506, and the corresponding relationship between the resistance value and the temperature of the PCB standard wiring resistor 505. It should be noted that, in the case where a single resistor group includes at least two PCB standard wiring resistors, the sampling control unit 501 can calculate the current passing through the PCB mirror wiring resistor 506 of the same group according to the corresponding relationship between the resistance value and the temperature of any PCB standard wiring resistor 505 of the at least two PCB standard wiring resistors.
[0097] Specifically, optionally, the sampling control unit 501 is used to obtain a target voltage drop of the target mirror resistor detected by the sampling control unit, and a target temperature of the target mirror resistor detected by the temperature detection unit; obtain the correspondence between the temperature and the resistance of the target mirror resistor; determine the target resistance of the target mirror resistor based on the correspondence between the temperature and the resistance of the target mirror resistor and the target temperature; calculate the current passing through the target mirror resistor based on the target resistance and the target voltage drop, and obtain the current of the first load module.
[0098] Wherein, the target mirror resistor is a PCB mirror wiring resistor connected in series with the first load module to be detected. The target standard resistor is any PCB standard wiring resistor in the same group as the target mirror resistor. After obtaining the corresponding relationship between the temperature and the resistance of the target mirror resistor, the sampling control unit 501 can determine the resistance corresponding to the target temperature according to the corresponding relationship between the temperature and the resistance of the target mirror resistor, and obtain the target resistance of the mirror resistor. Furthermore, the sampling control unit 501 uses the current-voltage formula (current = voltage / resistance) to calculate the current passing through the target mirror resistor according to the target voltage drop and the target resistance, and obtain the current of the first load module.
[0099] In the embodiment of the present application, the corresponding relationship between the temperature and the resistance of the target mirror resistor is determined according to the corresponding relationship between the temperature and the resistance of the target standard resistor and the resistance conversion coefficient of the target mirror resistor. The resistance conversion coefficient is determined according to the wiring length ratio and the wiring width ratio of the target standard resistor and the target mirror resistor. It is not difficult to understand that the resistance of the PCB mirror resistor in the embodiment of the present application is the data obtained by converting the PCB standard wiring resistor of the same group using the resistance conversion coefficient.
[0100] In an optional case, as can be seen from the above principle, the resistance conversion coefficient g satisfies: g = A / B. A represents the ratio of the wiring length of the target mirror resistor to the wiring length of the target standard resistor. B represents the ratio of the wiring width of the target mirror resistor to the wiring width of the target standard resistor. As can be seen from the above principle, at the same temperature, the resistance of the target mirror resistor is: the product of the resistance of the target standard resistor and the resistance conversion coefficient of the target mirror resistor.
[0101] It should be noted that if the PCB mirror trace resistance and the PCB standard trace resistance are regular traces, the trace length ratio of the two can be the ratio of the actual trace lengths of the two, and the trace width ratio can be the actual trace width ratio of the two. If the PCB mirror trace resistance and the PCB standard trace resistance are irregular traces, the resistance difference between the two is mainly caused by the trace length and trace width of each tiny end. Then the trace length ratio and trace width ratio of the two can be simulation values. In another optional case, the resistance conversion coefficient is also the ratio of the resistance of the target standard resistor and the resistance of the target mirror resistor at the same temperature determined by simulation.
[0102] In an optional case, the sampling control unit 501 may store a correspondence between the temperature and resistance of each PCB mirror wiring resistor. The correspondence records the actual resistance of the PCB mirror wiring resistor at various temperatures. When detecting the current of any first load module, the sampling control unit 501 obtains the target voltage drop and target temperature of the target mirror resistor, as well as the correspondence between the temperature and resistance of the target mirror resistor. According to the correspondence between the temperature and resistance of the target mirror resistor, the target resistance corresponding to the current target temperature of the target mirror resistor is determined. According to the target resistance and target voltage drop of the target mirror resistor, the current passing through the target mirror resistor, that is, the current of the first load module, is obtained.
[0103] In another optional case, the sampling control unit 501 may store the corresponding relationship between the temperature and the resistance of each PCB standard wiring resistor. The process in which the sampling control unit 501 obtains the corresponding relationship between the temperature and the resistance of the target mirror resistor may include: obtaining the corresponding relationship between the temperature and the resistance of the target standard resistor, and converting the corresponding relationship between the temperature and the resistance of the target standard resistor into the corresponding relationship between the temperature and the resistance of the target mirror resistor according to the resistance conversion coefficient of the target mirror resistor. For example, the sampling control unit 501 may multiply the resistance corresponding to each temperature in the corresponding relationship of the target standard resistor by the resistance conversion coefficient, determine the resistance corresponding to the target mirror resistor at each temperature, and obtain the corresponding relationship between the temperature and the resistance of the target mirror resistor.
[0104] In an optional case, the resistance value in the corresponding relationship between the temperature and the resistance value of the PCB standard trace resistor (including the target standard resistor) can be: the theoretical resistance value of the PCB standard trace resistor at the corresponding temperature. In another optional case, the resistance value in the corresponding relationship between the temperature and the resistance value of the PCB standard trace resistor can be: the resistance value of the PCB standard trace resistor at the corresponding temperature calculated and determined by the circuit calibration process. The implementation method of determining the corresponding relationship between the temperature and the resistance value of the PCB standard trace resistor through the circuit calibration process is described in detail below and will not be described in detail here.
[0105] It should be noted that the first load module 20 is connected to a power supply, which supplies power to the first load module. The positive electrode of the power supply is connected in series with the PCB mirror wiring resistor and the first load module 20, and the negative electrodes of the first load module 20 and the power supply are also grounded. The power supply of the first load module 20 can be the same power supply as the reference power supply 502, or the power supply of the first load module 20 and the reference power supply 502 are different power supplies. Figure 1Take the PCB mirror trace resistor and the PCB standard trace resistor of the same resistor group connected to the same power supply (i.e., reference power supply 502) as an example. Of course, the PCB mirror trace resistor can also be connected to other power supplies so that the current passing through the PCB mirror trace resistor powers the first load module 20 connected thereto.
[0106] In an embodiment of the present application, a current detection circuit includes: a sampling control unit, a reference power supply, a discrete resistor, a temperature detection unit, and at least one PCB resistor group. The PCB resistor group includes at least one PCB standard routing resistor and at least one PCB mirror routing resistor arranged on the same PCB routing layer. Each PCB mirror routing resistor is used to be connected in series with a first load module. The sampling control unit is used to detect the voltage drop of the discrete resistor, the PCB standard routing resistor, and the PCB mirror routing resistor. The temperature detection unit is used to detect the temperature of the PCB routing standard resistor and the PCB mirror routing resistor. In the current detection circuit, the sampling control unit can obtain the target voltage drop and target temperature of the target mirror resistor connected to the first load module when detecting the current of any first load module. Then, according to the corresponding relationship between the temperature and the resistance value of the target mirror resistor and the target temperature, the target resistance value of the target mirror resistor is determined, so as to calculate the current passing through the target mirror resistor according to the target resistance value and the target voltage drop of the target mirror resistor, and obtain the current of the first load module, so as to realize current detection by using each PCB mirror resistor to which the first load module is connected. Among them, since the PCB mirror routing resistors and the PCB standard routing resistors of the same group are arranged on the same routing layer. Therefore, the trace thickness of the PCB mirror trace resistor and the PCB standard trace resistor of the same group is equal, so that the corresponding relationship between the temperature and the resistance of the target mirror resistor can be determined according to the corresponding relationship between the temperature and the resistance of the target standard resistor and the resistance conversion coefficient of the target mirror resistor. The resistance conversion coefficient is data determined according to the trace length ratio and trace width ratio of the target standard resistor and the target mirror resistor.
[0107] Compared with the related art, the current detection circuit of the present application mainly uses PCB standard routing resistors and PCB mirror routing resistors for current detection, and because the number of resistor groups and / or the number of PCB mirror routing resistors in a single resistor group can be multiple, each PCB mirror routing resistor can realize current detection of the first load module connected to it, and the volume of PCB standard routing resistors and PCB mirror routing resistors is smaller than that of discrete resistors. Therefore, in the technical solution of the present application, the current detection circuit that uses a resistor group for current detection reduces the circuit volume and the circuit's occupation of equipment space on the basis of realizing multi-channel current sampling, thereby improving the miniaturization of the multi-channel current detection circuit.
[0108] In an optional case, the sampling control unit 501 can also perform a circuit calibration process to obtain the corresponding relationship between the temperature and the resistance of each PCB standard wiring resistor. Specifically, the sampling control unit 501 is also used to control the difference between the target channel current and the first reference current to be less than the first difference threshold for any one of the at least one PCB standard wiring resistors; collect the first voltage drop of the wiring resistor when the wiring resistor is at multiple different temperatures, and the second voltage drop of the discrete resistor to obtain multiple groups of first calibration data; calculate the first resistance calibration value of the wiring resistor corresponding to each group of first calibration data according to the resistance of the discrete resistor, the first voltage drop and the second voltage drop in the multiple groups of first calibration data; according to the temperature corresponding to the multiple groups of first calibration data and the first resistance calibration value, fit the first temperature-resistance relationship of the wiring resistor to obtain the first temperature-resistance relationship of each PCB standard wiring resistor.
[0109] Wherein, the target channel current is the current flowing into the routing resistor. The first reference current is the current passing through the discrete resistor. The first temperature-resistance relationship of the PCB standard routing resistor indicates the corresponding relationship between the temperature and the resistance of the PCB standard routing resistor. Accordingly, in an optional case, the sampling control unit 501 is used to obtain the target voltage drop of the target mirror resistor detected by the sampling control unit and the target temperature of the target mirror resistor detected by the temperature detection unit when detecting the current of any first load module; according to the resistance conversion coefficient of the target mirror resistor, the first temperature-resistance relationship is converted into the first temperature-resistance relationship of the target mirror resistor; according to the first temperature-resistance relationship of the target mirror resistor and the target temperature, the target resistance of the target mirror resistor is calculated and determined; according to the target resistance and the target voltage drop, the current passing through the target mirror resistor is calculated to obtain the current of the first load module. Wherein, the first temperature-resistance relationship of the target mirror resistor indicates the corresponding relationship between the temperature and the resistance of the target mirror resistor. The sampling control unit 501 can substitute the target temperature into the first temperature-resistance relationship of the target mirror resistor to calculate the target resistance of the target mirror resistor.
[0110] In another optional case, the sampling control unit 501 is also used for, after obtaining the first temperature-resistance relationship of any PCB standard wiring resistor, for any mirror resistor in at least one PCB mirror wiring resistor in the same group as the PCB standard wiring resistor, converting the first temperature-resistance relationship of the PCB standard wiring resistor into the first temperature-resistance relationship of the mirror resistor according to the resistance conversion coefficient of the mirror resistor and the PCB standard wiring resistor, obtaining the first temperature-resistance relationship of the mirror resistor, and obtaining and storing the first temperature-resistance relationship of each PCB mirror wiring resistor in the same group as the PCB standard wiring resistor. Further, when the sampling control unit 501 obtains the first temperature-resistance relationship of each PCB standard wiring resistor, it can obtain the first temperature-resistance relationship of each PCB mirror wiring resistor in each resistor group. Among them, the first temperature-resistance relationship of the PCB mirror wiring resistor indicates the corresponding relationship between the temperature and the resistance of the PCB mirror wiring resistor. Accordingly, in an optional case, the sampling control unit 501 is used to obtain the target voltage drop of the target mirror resistor detected by the sampling control unit and the target temperature of the target mirror resistor detected by the temperature detection unit when detecting the current of any first load module, and obtain the first temperature-resistance relationship of the stored target mirror resistor; calculate and determine the target resistance of the target mirror resistor according to the first temperature-resistance relationship of the target mirror resistor and the target temperature; calculate the current passing through the target mirror resistor according to the target resistance and the target voltage drop of the target mirror resistor, and obtain the current of the first load module. The first temperature-resistance relationship of the target mirror resistor indicates the corresponding relationship between the temperature and the resistance of the target mirror resistor.
[0111] It should be noted that at least one resistor group includes one resistor group and at least two resistor groups. Each resistor group includes at least one PCB standard routing resistor and at least one PCB mirror routing resistor. In the case where a single resistor group includes at least two PCB standard routing resistors, the sampling control unit 501 can obtain the first temperature-resistance relationship of each PCB standard routing resistor in the same group according to the first temperature-resistance relationship of any PCB standard routing resistor, and convert it to obtain the first temperature-resistance relationship of each PCB mirror routing resistor in the same resistor group. The following takes a single resistor group including a PCB standard routing resistor and at least one PCB mirror routing resistor as an example to schematically illustrate the current detection circuit provided in an embodiment of the present application.
[0112] In the case where the current detection circuit includes a resistor group, and the single resistor group includes a PCB standard trace resistor and at least one PCB mirror resistor, the current detection circuit includes a PCB standard trace resistor and at least one PCB mirror resistor. Figures 5 to 10In the current detection circuit shown, the current passing through the wiring resistor is equal to the first reference current, and the difference between the two is less than the first difference threshold. The first reference current flowing through the discrete resistor 503 satisfies:
[0113]
[0114] Among them, I _ref represents the first reference current. Rsense0 represents the resistance value of the discrete resistor 503. ΔV _Rsense0 represents the voltage drop of discrete resistor 503, that is, the voltage difference across discrete resistor 503, ΔV _Rsense0 =V _Rsn0+ -V _Rsn0- . V _Rsn0+ 、V _Rsn0- Respectively represent the voltage across the discrete resistor 503. ΔV _pcb_n It represents the voltage drop of the trace resistance (any standard PCB trace resistance), that is, the voltage difference across the trace resistance, ΔV _pcb_n =V _Rsnn+ -V _Rsnn -. V _Rsnn+ 、V _Rsnn - respectively represent the voltage across the trace resistance. R _pcb_n Indicates the resistance value of the trace resistance.
[0115] By transforming formula 9, the resistance of the wiring resistance satisfies:
[0116]
[0117] For any one of at least one PCB standard trace resistor:
[0118] The sampling control unit 501 is used to collect the first voltage drop of the wiring resistor and the second voltage drop of the discrete resistor when the wiring resistor is at multiple different temperatures to obtain multiple groups of first calibration data. The N groups of first calibration data include: (ΔV Rsense0 1, ΔV _pcb_n 1, T1), (ΔV Rsense0 2, T2), ..., (ΔV Rsense0 N, ΔV _pcb_n N, TN). Among them, the first calibration data (ΔV Rsense0 N, ΔV _pcb_n N, TN) means: when the temperature of the wiring resistance is TN, the first voltage drop ΔV of the wiring resistance _pcb_n N, the second voltage drop of the discrete resistor ΔV Rsense0 N. N is a positive integer greater than 2.
[0119] The sampling control unit 501 is used to calculate a first resistance calibration value of the wiring resistor corresponding to each set of first calibration data according to the resistance value of the discrete resistor, the first voltage drop and the second voltage drop in the plurality of sets of first calibration data.
[0120] Optionally, for each set of first calibration data, the sampling control unit 501 calculates the first resistance calibration value R of the wiring resistor corresponding to the first calibration data according to formula 10, the resistance value of the discrete resistor, the first voltage drop and the second voltage drop in the first calibration data. _pcb_n For example, the sampling control unit 501 converts the i-th group of first calibration data (ΔV Rsense0 i, ΔV _pcb_n i, Ti) and the jth set of first calibration data (ΔV Rsense0 j, ΔV _pcb_n j, Tj) into formula 10 to obtain the R corresponding to the first calibration data of the i-th group _pcb_n (Ti), and R corresponding to the jth group of first calibration data _pcb_n (Tj). Among them, Ti≠Tj.
[0121] Further optionally, when a linear function is used for resistivity-temperature fitting as described above, that is, when the relationship between the resistance value of the PCB standard trace resistance and the temperature is expressed as Formula 4, the sampling control unit 501 can select two sets of first calibration data with different temperatures from multiple sets of first calibration data. Then, according to the resistance value of the discrete resistor, the first voltage drop and the second voltage drop in the two sets of first calibration data, the first resistance calibration value of the trace resistance corresponding to each set of first calibration data is calculated. For example, the two sets of first calibration data selected by the sampling control unit 501 are: the i-th set of first calibration data (ΔV Rsense0 i, ΔV _pcb_n i, Ti) and the jth set of first calibration data (ΔV Rsense0 j, ΔV _pcb_n j, Tj). Accordingly, the R corresponding to the i-th group of first calibration data is obtained. _pcb_n (Ti), and R corresponding to the jth group of first calibration data _pcb_n (Tj).
[0122] in,
[0123] The sampling control unit 501 is used to fit the first temperature-resistance relationship of the wiring resistance according to the temperature and the first resistance calibration value corresponding to the multiple groups of first calibration data, and obtain the first temperature-resistance relationship of each PCB standard wiring resistance.
[0124] Optionally, as described above, by fitting the resistivity-temperature relationship of the PCB routing material, the relationship is substituted into the theoretical resistance calculation formula 1 of the PCB standard routing resistor to obtain a relationship between the resistance of the PCB standard routing resistor with unknown parameters and temperature. The sampling control unit 501 imports the temperature and the first resistance calibration value corresponding to the multiple sets of first calibration data into the relationship to obtain the value of the unknown parameter in the relationship, and then obtains the first temperature-resistance relationship of the PCB standard routing resistor. The first temperature-resistance relationship of the PCB standard routing resistor is a relationship between the resistance value and the temperature after the value of the unknown parameter is substituted.
[0125] As an example, when a linear function is used for resistivity-temperature fitting as described above, that is, the relationship between the resistance value of the PCB standard trace resistance and the temperature is expressed as Formula 4, the sampling control unit 501 calculates the temperature Ti corresponding to the i-th group of first calibration data and the first resistance calibration value R _pcb_n Substituting (Ti) into Formula 4, we get Formula 11. The sampling control unit 501 calculates the temperature Tj and the first resistance calibration value R corresponding to the jth group of first calibration data. _pcb_n Substituting (Tj) into Formula 4, we get Formula 12. According to Formula 11 and Formula 12, we can solve the unknown parameter k and unknown parameter b.
[0126] R _pcb_n (Ti) = kTi + b (Formula 11)
[0127] R _pcb_n (Tj) = kTj + b (Formula 12)
[0128] After obtaining the value of the unknown parameter k and the value of the unknown parameter b, the sampling control unit 501 substitutes the value of the unknown parameter k and the value of the unknown parameter b into Formula 4 to obtain the first temperature-resistance relationship of the wiring resistance: R _pcb_n (T) = kT + b.
[0129] The sampling control unit 501 is also used to convert the first temperature-resistance relationship of the routing resistor into the first temperature-resistance relationship of the mirror resistor according to the resistance conversion coefficient of the mirror resistor and the routing resistor for any mirror resistor in at least one PCB mirror routing resistor in the same group as the routing resistor, so as to obtain the first temperature-resistance relationship of the mirror resistor and the first temperature-resistance relationship of each PCB mirror routing resistor.
[0130] For any mirror resistor in at least one PCB mirror routing resistor in the same group as the routing resistor, the sampling control unit 501 substitutes the resistance conversion coefficient of the mirror resistor and the routing resistor and the obtained first temperature-resistance relationship of the routing resistor into Formula 8 to obtain the first temperature-resistance relationship of the mirror resistor:
[0131] in, Indicates the resistance conversion coefficient between mirror resistance and trace resistance. _Ln_pcb_n Indicates the trace length of the mirror resistor Ln_pcb_n and the trace length L of the trace resistor pcb_n _pcb_n The ratio of A _Ln_pcb_n =L _Ln_pcb_n / L _pcb_n . B _Ln_pcb_n Indicates the trace width W of the mirror resistor Ln_pcb_n _Ln_pcb_n The trace width W of the trace resistance pcb_n _pcb_n The ratio of B _Ln_pcb_n =W _Ln_pcb_n / W _pcb_n .
[0132] In another example, after solving the value of the unknown parameter k and the value of the unknown parameter b, the sampling control unit 501 can also directly obtain the unknown parameter k in the first temperature-resistance relationship of the mirror resistor according to formula 8 and the resistance conversion coefficient of the mirror resistor and the wiring resistor. _Ln_pcb_n and unknown parameter b _Ln_pcb_n , the unknown parameter k _Ln_pcb_n The value of and unknown parameter b _Ln_pcb_n Substituting the value of into formula 8, we get the first temperature-resistance relationship of the mirror resistor: R _Ln_pcb_n =k _Ln_pcb_n ×T+b _Ln_pcb_ .
[0133] Among them, the unknown parameter k _Ln_pcb_n and unknown parameter b _Ln_pcb_n satisfy: k and b are unknown parameters in the first temperature-resistance relationship of the aforementioned wiring resistor.
[0134] In some embodiments of the present application, the ratio of the resistance values of the PCB standard trace resistances at different temperatures should be equal to the ratio of the resistivity, that is,
[0135] R _pcb_n (T1) represents the resistance value of the PCB standard trace resistance at temperature T1. _pcb_n(T2) represents the resistance of the PCB standard trace resistor at temperature T2. ρ(T1) represents the resistivity of the PCB standard trace resistor at temperature T1. ρ(T2) represents the resistivity of the PCB standard trace resistor at temperature T2, T1≠T2. Therefore, before fitting the first temperature-resistance relationship of the trace resistor according to the temperature and the first resistance calibration value corresponding to the multiple sets of first calibration data, the sampling control unit 501 can also use the characteristic that "the ratio of the resistance of the PCB standard trace resistor at different temperatures should be equal to the ratio of the resistivity" to verify whether the multiple sets of first calibration data are valid, so as to fit the first temperature-resistance relationship according to the temperature and the first resistance calibration value corresponding to the valid first calibration data.
[0136] Specifically, optionally, the sampling control unit 501 is used to obtain the correspondence between the resistivity and temperature of the wiring resistance; according to the correspondence between the resistivity and the temperature, determine the target resistivity corresponding to the temperature in each group of first calibration data, and obtain the target resistivity corresponding to each group of first calibration data; according to the temperature, target resistivity and first resistance calibration value corresponding to each group of first calibration data, calculate the ratio of the first resistance calibration value to the target resistivity at the same temperature, and obtain ratios corresponding to multiple different temperatures; select multiple groups of first target data from the multiple groups of first calibration data, and the difference between the ratios corresponding to each two groups of first target data at different temperatures is less than the second difference threshold.
[0137] Correspondingly, the sampling control unit 501 is used to fit a first temperature-resistance relationship according to the temperatures and first resistance calibration values corresponding to the multiple groups of first target data.
[0138] Wherein, the sampling control unit 501 is used to obtain the corresponding relationship between the resistivity of the routing resistor and the temperature. Optionally, the sampling control unit 501 may store the corresponding relationship between the resistivity of the routing material of the PCB standard routing resistor and the temperature, so as to obtain the corresponding relationship between the resistivity of the routing resistor and the temperature. It should be noted that if the routing material of each PCB standard routing resistor in the current detection circuit is the same. Then the corresponding relationship between the resistivity and temperature of each PCB standard routing resistor is the same.
[0139] The sampling control unit 501 is used to determine the target resistivity corresponding to the temperature in each set of first calibration data according to the corresponding relationship between the resistivity of the wiring resistor and the temperature, and obtain the target resistivity corresponding to each set of first calibration data.
[0140] Optionally, the sampling control unit 501 searches for the corresponding relationship between the resistivity of the wiring resistor and the temperature, determines the target resistivity corresponding to the temperature in each set of first calibration data, and then obtains the target resistivity corresponding to each set of first calibration data. For example, the plurality of sets of first calibration data include: the i-th set of first calibration data (ΔV Rsense0 i, Ti) and the jth set of first calibration data (ΔV Rsense0 j, The sampling control unit 501 obtains the target resistivity ρ(Ti) corresponding to the i-th group of first calibration data and the target resistivity ρ(Tj) corresponding to the j-th group of first calibration data according to the corresponding relationship between the resistivity of the wiring resistor and the temperature.
[0141] The sampling control unit 501 is used to calculate the ratio of the first resistance calibration value to the target resistivity at the same temperature according to the temperature, target resistivity and first resistance calibration value corresponding to each set of first calibration data, and obtain ratios corresponding to multiple different temperatures.
[0142] Since the ratio of the resistance value of the standard PCB trace resistance at different temperatures should be equal to the ratio of the resistivity, the ratio of the resistance value of the standard PCB trace resistance to the target resistivity at the same temperature is also the same. For example, continuing with the above example, the first resistance calibration value R at the same temperature Ti is calculated. _pcb_n The ratio of the target resistivity ρ(Ti) to the target resistivity ρ(Ti), and the first resistance calibration value R at the same temperature Tj _pcb_n The ratio of (Tj) to the target resistivity ρ(Tj).
[0143] The sampling control unit 501 is used to select multiple groups of first target data from multiple groups of first calibration data. The difference of the ratios corresponding to each two groups of first target data at different temperatures is less than the second difference threshold.
[0144] Optionally, the ratios of the first target data of each two groups with different temperatures are equal. _pcb_n The ratio of (Ti) to the target resistivity ρ(Ti) is equal to the first resistance calibration value R _pcb_n The ratio of (Tj) to the target resistivity ρ(Tj), that is, In the case of Rsense0 i, ΔV _pcb_n i, Ti) and the jth set of first calibration data (ΔV Rsense0 j, ΔV _pcb_n j, Tj) are all first target data, and then the first temperature-resistance relationship of the wiring resistance is obtained.
[0145] In some embodiments of the present application, the magnitude of the current flowing through the discrete resistor may also affect the sampling accuracy of the discrete resistor and the PCB standard trace resistor.
[0146] The sampling control unit 501 is also used to perform resistance accuracy calibration processing for multiple different second reference currents for any routing resistor in at least one PCB standard routing resistor, and obtain a second resistance calibration value of the routing resistor corresponding one-to-one to the multiple different second reference currents at the same set temperature.
[0147] Among them, the resistance accuracy calibration process includes:
[0148] The output current of the reference power supply is adjusted to adjust the second reference current passing through the discrete resistor, and the difference between the target channel current and the second reference current is controlled to be less than the first difference threshold, and the first voltage drop of the wiring resistor and the second voltage drop of the discrete resistor are collected when the wiring resistor is at a set temperature, and the second calibration resistance value of the wiring resistor corresponding to a second reference current at the set temperature is calculated according to the resistance value of the discrete resistor and the first voltage drop and the second voltage drop collected at the set temperature. Among them, the sampling control unit 501 can calculate the second calibration resistance value of the wiring resistor corresponding to a second reference current at the set temperature according to Formula 6, the resistance value of the discrete resistor, and the first voltage drop and the second voltage drop collected at the set temperature.
[0149] Optionally, the sampling control unit 501 adjusts the second reference current I_ref1 passing through the discrete resistor 503, collects the first voltage drop of the wiring resistor and the second voltage drop of the discrete resistor when the wiring resistor is at a set temperature, and calculates the first voltage drop ΔV according to the resistance value of the discrete resistor and the first voltage drop ΔV collected at the set temperature. _pcb_n 1 and the second voltage drop ΔV Rsense0 1. Calculate the second calibration resistance value of the wiring resistance corresponding to a second reference current at the set temperature k
[0150] The sampling control unit 501 adjusts the second reference current I_ref2 passing through the discrete resistor 503 to collect the first voltage drop ΔV of the wiring resistor when the wiring resistor is at the set temperature. _pcb_n 2 and the second voltage drop ΔV of the discrete resistor Rsense0 2. According to the resistance value of the discrete resistor and the first voltage drop ΔV collected at the set temperature Rsense0 i and the second voltage drop ΔV _pcb_n i, calculate the second calibration resistance value of the wiring resistance corresponding to a second reference current at the set temperature k ......The sampling control unit 501 adjusts the second reference current I_refp passing through the discrete resistor 503, and calculates the second calibration resistance value of the wiring resistance corresponding to a second reference current at the set temperature k
[0151] Optionally, the accuracy of discrete resistor 503 is different under different power consumption conditions. If the resistance accuracy of discrete resistor 503 is greater than the accuracy threshold within the target current range. Then the values of multiple second reference currents are all within the target current range. For example, assuming that the current passing through discrete resistor 503 is between 1A and 10A, the resistance accuracy of discrete resistor 503 is higher. Multiple second resistor calibration values when the second reference current is in the range of 1A to 10A can be used as a reference benchmark for consistency differences. That is, multiple second reference currents can be selected from the range of 1A to 10A.
[0152] For example, assuming that the set temperature k is 20° C. The sampling control unit 501 sequentially adjusts the second reference currents I_ref1, I_ref2, and I_refp passing through the discrete resistor 503 to obtain p sets of data. The p sets of data include: (ΔV Rsense0 1, ΔV _pcb_n 1, 20℃), (ΔV Rsense0 2. ΔV _pcb_n 2, 20℃),......,(ΔV Rsense0 i, ΔV _pcb_n i, 20°C). The sampling control unit 501 calculates the multiple second calibration resistance values corresponding to the multiple second reference currents at the set temperature k according to the resistance value of the discrete resistor and the first voltage drop and the second voltage drop of each set of data:
[0153] Correspondingly, the sampling control unit 501 is also used to obtain the target voltage drop of the target mirror resistor detected by the sampling control unit, and the target temperature of the target mirror resistor detected by the temperature detection unit; obtain the corresponding relationship between the temperature and the resistance of the target mirror resistor; obtain the current voltage drop of the discrete resistor detected by the sampling control unit, and calculate the target current passing through the discrete resistor; determine the ratio of the first target calibration value to the second target calibration value; determine the target resistance of the target mirror resistor according to the corresponding relationship between the temperature and the resistance of the target mirror resistor, the target temperature, and the ratio of the first target calibration value to the second target calibration value; calculate the current passing through the target mirror resistor according to the target resistance and the target voltage drop, and obtain the current of the first load module.
[0154] The first target calibration value is: a second resistance calibration value corresponding to a second reference current having a value equal to the target current, and the second target calibration value is: a second resistance calibration value corresponding to a second reference current having a value equal to the first reference current. Optionally, the sampling control unit 501 can calculate and determine the target current passing through the discrete resistor based on the current voltage drop of the discrete resistor and its resistance value.
[0155] In an optional case, the sampling control unit 501 is also used to obtain the current voltage drop of the discrete resistor detected by the sampling control unit, calculate the target current passing through the discrete resistor; determine the ratio of the first target calibration value to the second target calibration value; calculate the first resistance corresponding to the target temperature according to the first temperature-resistance relationship of the target mirror resistor; calculate the first resistance corresponding to the target current according to the ratio of the first target calibration value to the second target calibration value and the first resistance, and obtain the target resistance of the target mirror resistor. Among them, the first resistance corresponding to the target current, that is, the target resistance of the target mirror resistor satisfies:
[0156]
[0157] in, It represents the second resistance calibration value corresponding to the second reference current whose value is equal to the target current I_ref1i at the set temperature k. Indicates the second resistance calibration value corresponding to the second reference current whose value is equal to the first reference current I_ref2i at the set temperature k. _Ln_pcb_n (I_ref1i, k0) represents the first resistance value corresponding to the target current I_ref1i at the target temperature k0, that is, the target resistance value of the target mirror resistor. _Ln_pcb_n (I_ref2i, k0) represents the first resistance value corresponding to the target temperature.
[0158] In this way, by collecting the second resistance calibration values of the PCB standard trace resistance at the same temperature under multiple second reference currents, the ratio of the second resistance calibration values corresponding to different second reference currents at the same temperature can be obtained. Since the resistance ratio of the PCB standard trace resistance and the PCB mirror trace resistance in the same resistor group is mainly related to the trace length ratio and the trace width ratio. Therefore, the ratio of the second resistance calibration values corresponding to different second reference currents at the same temperature is, that is, the resistance ratio of the PCB mirror trace resistance corresponding to different second reference currents at the same temperature. Therefore, according to the ratio of the second resistance calibration values corresponding to different second reference currents at the same temperature, the target resistance of the PCB mirror trace resistance is corrected, which can effectively correct the error caused by the resistance calculation of the PCB standard trace resistance due to the different currents flowing through the discrete resistors, and then the resistance error of the PCB mirror trace resistance, thereby improving the resistance determination accuracy of the PCB mirror trace resistance, so as to improve the current detection accuracy.
[0159] It should be noted that Figures 5 to 10 The current detection circuit includes a resistor group, and the resistor group includes a PCB standard wiring resistor. Figures 7 to 10 The PCB mirror trace resistors in the same group as this resistor group are not shown. Figures 7 to 10As shown, the current detection circuit includes: a control unit 501 , a reference power supply 502 , a discrete resistor (also called a precision resistor) 503 , a temperature detection unit 504 and a PCB standard trace resistor 505 . Figures 7 to 10 In the figure, the temperature detection unit 504 is taken as the temperature sensor 504 for illustration.
[0160] In an alternative case, if Figure 7 and Figure 8 As shown, the current detection circuit may further include a second load module 30. Optionally, the second load module 30 may be a current limiting resistor, a 0 ohm resistor or a power consumption function module.
[0161] In an alternative case, Figure 7 As shown, the positive electrode of the reference power supply 502 is connected to one end of the PCB standard wiring resistor 505 through the discrete resistor 503, and the negative electrode of the reference power supply 502 is grounded. The other end of the PCB standard wiring resistor 505 is grounded through the load module 20. In this case, the PCB standard wiring resistor 505 can reuse the PCB power supply wiring of the second load module 30. In another optional case, as Figure 8 As shown, the negative pole of the reference power supply 502 is grounded. The positive pole of the reference power supply 502 is connected to one end of the PCB standard trace resistor 505 through the load module 20, and the other end of the PCB standard trace resistor 505 is grounded through the discrete resistor 503. In this case, the PCB standard trace resistor 505 can reuse the PCB return trace of the second load module 30. In another optional case, the negative pole of the reference power supply 502 is grounded. The positive pole of the reference power supply 502 is connected to one end of the PCB standard trace resistor 505, and the other end of the PCB standard trace resistor 505 is connected in series with the load module 20 and the discrete resistor 503 in sequence, and is grounded through the discrete resistor 503. Figures 5 to 8 In the current detection circuit shown, the sampling control unit 501 can be used to control the reference power supply to supply power to the routing resistor and the discrete resistor, so as to control the difference between the target channel current and the first reference current to be smaller than the first difference threshold.
[0162] In another alternative case, if Fig. 9 and Fig.10 As shown, the current detection circuit may further include a switch element 507. In an optional case, as Fig. 9 As shown, the positive electrode of the reference power supply 502 is connected to one end of the PCB standard wiring resistor 505 through the discrete resistor 503, and the negative electrode of the reference power supply 502 is grounded. The other end of the PCB standard wiring resistor 505 is grounded through the switch 507. In another optional case, Fig.10As shown, the negative electrode of the reference power supply 502 is grounded. The positive electrode of the reference power supply 502 is connected to one end of the PCB standard wiring resistor 505 through the switch 507, and the other end of the PCB standard wiring resistor 505 is grounded through the discrete resistor 503.
[0163] Among them, the PCB standard trace resistor 505 can be an independent PCB trace. The switch 507 is used to control the conduction or disconnection of the PCB standard trace resistor 505, the discrete resistor 503, and the reference power supply 502. For example, during the circuit calibration process, the sampling control unit 501 can preferentially control the switch 507 to conduct the PCB standard trace resistor 505, the discrete resistor 503, and the reference power supply 502 to control the difference between the target channel current and the first reference current to be less than the first difference threshold. Optionally, the switch 507 can be an electronic switch or a power tube, etc.
[0164] It should be noted that the resistance of the PCB standard trace resistance / PCB mirror trace resistance is determined by the material resistivity and the size of the PCB trace. Therefore, the trace thickness H of the PCB standard trace resistance / PCB mirror trace resistance can be effectively estimated. For example, the trace thickness H of the PCB standard trace resistance satisfies:
[0165]
[0166] Where ρ(T) represents the resistivity of the standard PCB trace resistor at temperature T. L represents the trace length of the standard PCB trace resistor. W represents the trace width of the standard PCB trace resistor. Rsense0 represents the resistance value of the discrete resistor. ΔV Rsense0 Represents the voltage drop across a discrete resistor. ΔV _PCB_n Represents the voltage drop across the resistance of a standard PCB trace.
[0167] In the implementation method where the current sampling resistor includes a resistor group, and a single resistor group includes a PCB standard routing resistor and at least one PCB mirror routing resistor, the error of the first temperature-resistance relationship of the PCB standard routing resistor determined by the circuit calibration process mainly comes from: first, the error caused by the detection accuracy of the first reference current of the discrete resistor. This error is mainly determined by the resistance accuracy of the discrete resistor and the voltage sampling error of the sampling control unit on the discrete resistor. For example, if a discrete resistor with an accuracy of ±0.5% is used in the current detection circuit, and the sampling control unit has a voltage acquisition error of ±0.5% on the discrete resistor, the accuracy of the first reference current is about ±1%.
[0168] Secondly, the sampling control unit has an error in the sampling accuracy of the voltage of the standard PCB wiring resistor. For example, the sampling control unit has an error of about ±0.5% in the voltage sampling of a standard PCB wiring resistor.
[0169] Again, the temperature of the PCB standard wiring resistor and the first resistor calibration value fit the fitting error of the first temperature-resistance relationship. For example, the PCB copper foil mentioned above has a fitting deviation of ±0.4% in its resistivity change rate with temperature. And under a temperature acquisition error of ±3°C, the PCB copper foil has a resistivity deviation of ±0.1%. Based on this, the first temperature-resistance relationship of the fitted PCB standard wiring resistor has a resistance accuracy error of about ±2% for the PCB standard wiring resistor. Then, the first temperature-resistance relationship of the fitted PCB mirror wiring resistor has a resistance accuracy error of about ±2% for the PCB mirror wiring resistor. In this way, using the first temperature-resistance relationship of the PCB mirror wiring resistor, the current sampling error of the calibrated PCB mirror wiring resistor is affected by the voltage acquisition error (about ±0.5%) of the sampling control unit and the resistance accuracy error (about ±2%) of the PCB mirror wiring resistor. The current sampling accuracy error using the PCB mirror wiring resistor can be controlled within 5%, meeting the accuracy requirements of multi-channel current sampling.
[0170] In the case where the current detection circuit includes a resistor group, and the single resistor group includes at least two PCB standard routing resistors and at least one PCB mirror resistor. The current detection circuit includes at least two PCB standard routing resistors and at least one PCB mirror resistor arranged on the same PCB routing layer.
[0171] In the case where the current detection circuit includes at least two resistor groups, and a single resistor group includes at least one PCB standard wiring resistor and at least one PCB mirror resistor. The current detection circuit includes at least two PCB standard wiring resistors and at least two PCB mirror resistors. The at least two PCB standard wiring resistors are distributed in at least two different PCB wiring layers.
[0172] In both cases, Figures 11 to 16 As shown, in the current detection circuit, at least two PCB standard trace resistors 505 are connected in parallel. The reference power supply 502 and the discrete resistor 503 are arranged on the main line. The sampling control unit 501 is connected to each PCB standard trace resistor 505. The sampling control unit 501 is used to control the difference between the target channel current passing through the PCB standard trace resistor and the first reference current flowing through the discrete resistor 503 to be less than the first current threshold value during the circuit calibration process for any PCB standard trace resistor, so as to obtain the first temperature-resistance relationship of the PCB standard trace resistor. Furthermore, the sampling control unit 501 is also used for the PCB mirror trace resistor and the PCB standard trace resistor of the same resistor group, according to the resistance conversion coefficient of the PCB mirror trace resistor and the PCB standard trace resistor in the same resistor group, to convert the first temperature-resistance relationship of the PCB standard trace resistor into the first temperature-resistance relationship of the PCB mirror trace resistor.
[0173] It should be noted that Figures 11 to 16 The current detection circuit includes n PCB standard wiring resistors as an example. In the former case where the current detection circuit includes one resistor group, the n PCB standard wiring resistors are arranged on the same PCB wiring layer. In the latter case where the current detection circuit includes at least two resistor groups, the n PCB standard wiring resistors are arranged on at least two PCB wiring layers. And, Figures 11 to 16 The PCB mirror trace resistors in the same resistor group as the PCB standard trace resistors, as well as the first load module and power supply connected to each PCB mirror trace resistor are not shown. The power supply supplies power to the PCB mirror trace resistors and the first load module.
[0174] In an optional implementation, Figures 11 to 14 As shown, the current detection circuit further includes: a switch unit. A first end of the switch unit is connected to a reference power supply 501. At least two second ends of the switch unit are connected to PCB standard wiring resistors 505 in a one-to-one correspondence. The switch unit is used to control a PCB standard wiring resistor 505 connected to the reference power supply 501 and the discrete resistor 503.
[0175] The sampling control unit 501 is used to control the first end of the switch unit to be connected to the second end corresponding to the routing resistor 505 during the circuit calibration process for any PCB standard routing resistor (i.e., routing resistor) 505, and to control the first end of the switch unit to be disconnected from the second end corresponding to the other PCB resistors, so as to control the difference between the target channel current and the first reference current to be less than the first difference threshold. Wherein, the other PCB resistors are the PCB standard routing resistors other than the routing resistor 505 among the at least two PCB standard routing resistors 505. In this way, the sampling control unit 501 controls only the first end of the switch unit to be connected to the second end corresponding to the routing resistor 505, so that the reference power supply 501 and the discrete resistor 503 are only connected to the routing resistor 505, thereby achieving the purpose of controlling the difference between the target channel current and the first reference current to be less than the first difference threshold.
[0176] Specifically, the sampling control unit 501 is used to control the first end of the switch unit to be connected to the second end corresponding to the routing resistor 505 for any one of the at least one PCB standard routing resistors, and to control the first end of the switch unit to be disconnected from the second ends corresponding to other PCB resistors; collect the first voltage drop of the routing resistor and the second voltage drop of the discrete resistor when the routing resistor is at multiple different temperatures to obtain multiple groups of first calibration data; calculate the first resistance calibration value of the routing resistor corresponding to each group of first calibration data according to the resistance value of the discrete resistor, the first voltage drop and the second voltage drop in the multiple groups of first calibration data; and fit the first temperature-resistance relationship of the routing resistor according to the temperature corresponding to the multiple groups of first calibration data and the first resistance calibration value to obtain the first temperature-resistance relationship of each PCB standard routing resistor.
[0177] In an alternative case, if Fig.11 As shown, the switch unit includes a switch element 507. The switch element 507 includes a first end and n second ends. The first end of the switch element 507 is connected to the reference power supply 501, and the second end is connected to the corresponding PCB standard wiring resistor 505. The switch element 507 is used to control the second end connected to the first end to control a PCB standard wiring resistor 505 connected to the reference power supply 501 and the discrete resistor 503.
[0178] As an example, the first end of the switch 507 can be connected to the positive electrode of the reference power supply 501 through the discrete resistor 503, and the negative electrode of the reference power supply 501 is grounded. The second end is connected to the corresponding PCB standard wiring resistor 505 and is grounded through the corresponding PCB standard wiring resistor 505.
[0179] In another example, the first end of the switch 507 can be directly connected to the positive electrode of the reference power supply 501, and the negative electrode of the reference power supply 501 is grounded. The second end is connected to the corresponding PCB standard trace resistor 505, and each PCB standard trace resistor 505 is connected to one end of the discrete resistor 503, and the other end of the discrete resistor 503 is grounded.
[0180] In another alternative case, if Figure 12 to Figure 14As shown, the switch unit includes: at least two switch elements 507 corresponding to at least two PCB standard trace resistors 505. The first end of each switch element 507 is connected to the reference power supply 502. The second end of each switch element 507 is connected to the corresponding PCB standard trace resistor 505. Each switch element 507 is used to control the reference power supply 502 connected to its first end and the PCB standard trace resistor 505 connected to the second end to be turned on or off. Further optionally, each switch element 507 is also connected to the sampling control unit 501. The sampling control unit 501 is also used to control the first end of the switch element 507 corresponding to the trace resistor 505 to be connected to the second end during the circuit calibration process for any PCB standard trace resistor (i.e., trace resistor) 505, and the first end corresponding to other PCB resistors to be disconnected from the second end, so as to control the difference between the target channel current and the first reference current to be less than the first difference threshold. By way of example, the switch element 507 can be an electronic switch element, or a power tube. It should be noted that, Figure 12 to Figure 14 Take the current detection circuit including n PCB standard wiring resistors 505 as an example. Accordingly, the switch unit includes n switch elements 507 corresponding to the n PCB standard wiring resistors 505 one by one.
[0181] As an example, Fig.12 As shown, each switch element 507 is connected to the positive electrode of the reference power supply 501, and the negative electrode of the reference power supply 501 is grounded. Each switch element 507 is also connected to one end of its corresponding PCB standard wiring resistor 505. The other end of each PCB standard wiring resistor 505 is grounded through a discrete resistor 503.
[0182] Another example is, Fig.13 As shown, the switch element 507 is a power tube 507. The positive electrode of the reference power supply 501 is connected to one end of each PCB standard trace resistor 505 through a discrete resistor 503. The other end of each PCB standard trace resistor 505 is connected to the second end of its corresponding switch element 507. The first end of the switch element 507 and the negative electrode of the reference power supply 501 are grounded.
[0183] As another example, Fig.14 As shown, the switch element 507 is a power tube 507. Each switch element 507 is connected in series with its corresponding PCB standard wiring resistor 505. The positive electrode of the reference power supply 501 is connected to each switch element 507. Each switch element 507 is also connected to one end of its corresponding PCB standard wiring resistor 505, and the other end of the PCB standard wiring resistor 505 is connected to one end of the discrete resistor 503. The other end of the discrete resistor 503 and the negative electrode of the reference power supply 501 are grounded.
[0184] In the embodiment of the present application, Figures 11 to 14The current detection circuit structure and control method shown are simple and have high versatility. In addition, each PCB connection layer can utilize the PCB standard trace resistors arranged in the vacant positions of the PCB, without limiting the arrangement positions of the PCB standard trace resistors, and the arrangement flexibility of the PCB standard trace resistors is high. For example, the PCB standard trace resistors can also be arranged close to the motherboard temperature detection sensor of the electronic device, so as to reuse the motherboard temperature detection sensor and further simplify the circuit structure.
[0185] In another optional implementation, Figure 15 to Figure 16 As shown, the current detection circuit also includes: a second load module 30 corresponding to the PCB standard routing resistor 505 one by one. Each PCB standard routing resistor 505 is connected in series with its corresponding second load module 30. At least two series circuits including the PCB standard routing resistor 505 and the second load module 30 are connected in parallel. The reference power supply 502 and the discrete resistor 503 are arranged on the main line. The sampling control unit 501 is also connected to each second load module 30. The sampling control unit 501 is used to control the second load module 30 to be in a normal working state, or in a closed state, or in a low power consumption working state. Optionally, the PCB standard routing resistor 505 can reuse a section of the PCB power supply routing or PCB return routing of the second load module 30. It should be noted that Figure 15 to Figure 16 Take the current detection circuit including n PCB standard wiring resistors 505 as an example. Accordingly, the current detection circuit also includes n second load modules 30 corresponding to the n PCB standard wiring resistors 505 one by one.
[0186] As an example, Fig.15 As shown, the positive electrode of the reference power supply 502 is connected to one end of each PCB standard wiring resistor 505 through a discrete resistor 503. The other end of each PCB standard wiring resistor 505 is respectively connected in series with a second load module 30. The negative electrode of the reference power supply 502 and each second load module 30 are grounded. In this case, the PCB standard wiring resistor 505 reuses a section of the PCB power supply wiring of the second load module 30.
[0187] Another example is, Fig.16 As shown, the positive electrode of the reference power supply 502 is connected to one end of each second load module 30, and the other end of each second load module 30 is respectively connected in series with its corresponding PCB standard routing resistor 505. Each PCB standard routing resistor 505 is connected to one end of the discrete resistor 503. The other end of the discrete resistor 503 and the negative electrode of the reference power supply 502 are grounded. In this case, the PCB standard routing resistor 505 reuses a section of the PCB return routing of the second load module 30.
[0188] The sampling control unit 501 is used to control the second load module 30 connected in series with the routing resistor 505 to be in a normal working state during the circuit calibration process for any PCB standard routing resistor (i.e., routing resistor) 505, and control the second load module 30 connected in series with other PCB resistors to be in a closed state or a low-power working state, so that the total current passing through the other PCB resistors is less than the first difference threshold, and the difference between the target channel current and the first reference current is controlled to be less than the first difference threshold.
[0189] Specifically, the sampling control unit 501 is also used for controlling the second load module connected in series with the routing resistor to be in a normal working state for any one of the at least two PCB standard routing resistors, and controlling the second load module connected in series with the other PCB resistors to be in a closed state or a low-power working state, so that the total current passing through the other PCB resistors is less than the first difference threshold; collecting the first voltage drop of the routing resistor and the second voltage drop of the discrete resistor when the routing resistor is at multiple different temperatures, and obtaining multiple groups of first calibration data; calculating the first resistance calibration value of the routing resistor corresponding to each group of first calibration data according to the resistance value of the discrete resistor, the first voltage drop and the second voltage drop in the multiple groups of first calibration data; fitting the first temperature-resistance relationship of the routing resistor according to the temperature corresponding to the multiple groups of first calibration data and the first resistance calibration value, and obtaining the first temperature-resistance relationship of each PCB standard routing resistor. Wherein, the other PCB resistor is the PCB standard routing resistor other than the routing resistor among the at least two PCB standard routing resistors in the current detection circuit.
[0190] When the second load module connected in series with the wiring resistor is in normal working state and the second load modules connected in series with other PCB resistors are in off state or low power working state, the output current of the reference power supply 502 mainly flows into the wiring resistor. In this case, the difference between the target channel current and the first reference current is less than the first difference threshold ΔI2. The first reference current flowing through the discrete resistor 503 satisfies:
[0191]
[0192] The channel current flowing through the trace resistance satisfies:
[0193]
[0194] Furthermore, the first reference current flowing through the discrete resistor 503 also satisfies:
[0195] I_ref=I_ref_1+I_ref_2+……+I_ref_n (Formula 11)
[0196] Wherein, I_ref represents the first reference current flowing through the discrete resistor 503. I_ref_n represents the channel current flowing through the PCB standard trace resistor n.
[0197] When the wiring resistance is a PCB standard wiring resistance 2, the first reference current flowing through the discrete resistor 503 also satisfies: I_ref_2 represents the channel current flowing through the PCB standard trace resistance 2 (i.e., trace resistance). And the sum of the channel currents of the PCB standard trace resistances other than the PCB standard trace resistance 2 is much smaller than the first reference current.
[0198] The sampling control unit 501 is also used to collect the first voltage drop of the wiring resistor and the second voltage drop of the discrete resistor when the wiring resistor is at multiple different temperatures to obtain multiple groups of first calibration data. The N groups of first calibration data are: (ΔV Rsense0 1, T1)、(ΔV Rsense0 2, T2), ..., (ΔV Rsense0 N, TN).
[0199] Among them, the first calibration data (ΔV Rsense0 N, TN) means: when the temperature of the wiring resistor (i.e., wiring resistor PCB2) is TN, the first voltage drop of the PCB standard wiring resistor 2 The second voltage drop of the discrete resistor ΔV Rsense0 N. N is a positive integer greater than 2.
[0200] The sampling control unit 501 converts the i-th group of first calibration data (ΔV Rsense0 i, ΔV _pcb_2 i, Ti) and the jth set of first calibration data (ΔV Rsense0 j, ΔV _pcb_2 j, Tj) into formula 6 to obtain the first resistance calibration value R corresponding to the i-th group of first calibration data _pcb_2 (Ti), and the first resistance calibration value R corresponding to the jth group of first calibration data _pcb_2 (Tj).
[0201] The sampling control unit 501 calculates the temperature Ti and the first resistance calibration value R corresponding to the i-th group of first calibration data. _pcb_2 Substitute (Ti) into Formula 4, and replace the temperature Tj and the first resistance calibration value R corresponding to the jth group of first calibration data _pcb_2 Substitute (Tj) into formula 4 to solve for the unknown parameter k and the unknown parameter b.
[0202] After obtaining the value of the unknown parameter k and the value of the unknown parameter b, the sampling control unit 501 substitutes the value of the unknown parameter k and the value of the unknown parameter b into Formula 4 to obtain the first temperature-resistance relationship of the wiring resistance: R _pcb_n (T) = kT + b.
[0203] It should be noted that, in an optional case, the sampling control unit 501 is also used to control the second load module connected in series with the routing resistor to be in a normal working state, control the second load module connected in series with the known routing resistor to be in a normal working state, and control the second load module connected in series with other PCB resistors to be in a closed state or a low-power working state, so that the total current passing through the other PCB resistors is less than the first difference threshold; collect the first voltage drop of the routing resistor when the routing resistor is at multiple different temperatures, the second voltage drop of the discrete resistor, and the fifth voltage drop of the known routing current to obtain multiple groups of first calibration data; calculate the first resistance calibration value of the routing resistor corresponding to each group of first calibration data according to the resistance value of the discrete resistor, the first voltage drop, the second voltage drop and the fifth voltage drop in the multiple groups of first calibration data; according to the temperature corresponding to the multiple groups of first calibration data and the first resistance calibration value, fit the first temperature-resistance relationship of the routing resistor to obtain the first temperature-resistance relationship of each PCB standard routing resistor.
[0204] The other PCB resistor is a PCB standard trace resistance other than the trace resistance and the known trace resistance among the at least two PCB standard trace resistances in the current detection circuit. The known trace resistance is a PCB standard trace resistance whose temperature-resistance relationship is determined through resistance calibration.
[0205] When the second load module connected in series with the wiring resistor is in normal working state, the second load module connected in series with the known wiring resistor is controlled to be in normal working state, and the second load module connected in series with other PCB resistors is controlled to be in a closed state or a low power consumption working state, the output current of the reference power supply 502 mainly flows into the wiring resistor and the known wiring circuit. In this case, the difference between the target channel current and the first reference current is less than the first difference threshold ΔI2. The first reference current flowing through the discrete resistor 503 also satisfies:
[0206] I_ref=I_ref_1+I_ref_2+……+I_ref_n+I0 (Formula 12)
[0207] Wherein, I_ref represents the first reference current flowing through the discrete resistor 503. I_ref_n represents the channel current flowing through the PCB standard wiring resistance n. I0 represents the current passing through the known wiring resistance.
[0208] In this case, the difference between the sum of the target channel current and the known channel current and the first reference current is less than the sum of the first difference threshold and the known channel current. The known channel current is the current passing through the known wiring resistance.
[0209] The sampling control unit 501 is also used to collect the first voltage drop of the routing resistor when the routing resistor is at multiple different temperatures, as well as the second voltage drop of the discrete resistor and the fifth voltage drop of the known routing current to obtain multiple groups of first calibration data; according to the resistance value of the discrete resistor, the first voltage drop, the second voltage drop and the fifth voltage drop in the multiple groups of first calibration data, the first resistance calibration value of the routing resistor corresponding to each group of first calibration data is calculated.
[0210] The sampling control unit 501 is further used to calculate the first resistance calibration value of the wiring resistor corresponding to each set of first calibration data according to formula 13 and formula 14, the resistance value of the discrete resistor, the first voltage drop, the second voltage drop, and the fifth voltage drop in multiple sets of first calibration data. Specifically, for any set of first calibration data, the first resistance calibration value of the wiring resistor corresponding to the first calibration data is calculated according to formula 13 and formula 14, the resistance value of the discrete resistor, the first voltage drop, the second voltage drop, and the fifth voltage drop in the first calibration data. Formula 13 and formula 14 are respectively:
[0211]
[0212]
[0213] Among them, I_ ref (Ti) represents the current flowing through the discrete resistor at Ti temperature. I_ ref_已知 (Ti) represents the current flowing through a known trace resistance at temperature Ti. I_ ref走线电阻 (Ti) represents the current flowing through the wiring resistance at the Ti temperature. Ti represents the temperature of the first calibration data. ΔV Rsense0 Represents the second voltage drop of the discrete resistor in the first calibration data. ΔV 已知 (Ti) represents the fifth voltage drop of the known trace resistance at temperature Ti in the first calibration data. 已知 (Ti) represents the resistance value of the known trace resistance at temperature Ti. ΔV _pcb_走线电阻 (Ti) represents the first voltage drop of the trace resistance at the Ti temperature in the first calibration data. _pcb走线电阻 (Ti) represents the first resistance calibration value of the trace resistance at the Ti temperature, that is, the first resistance calibration value of the trace resistance corresponding to the first calibration data is calculated.
[0214] The sampling control unit 501 is also used to substitute the temperature and the first resistance calibration value corresponding to the multiple sets of first calibration data into Formula 4 to solve the unknown parameter k and the unknown parameter b. Substituting the value of the unknown parameter k and the value of the unknown parameter b into Formula 4, the first temperature-resistance relationship of the wiring resistance is obtained: R _pcb_n (T) = kT + b.
[0215] For example, the wiring resistance is PCB standard wiring resistance 2, and the known wiring resistance is PCB standard wiring resistance 1. The first reference current flowing through the discrete resistor 503 in the current detection circuit satisfies:
[0216]
[0217] The channel current flowing through the trace resistance (i.e., the PCB standard trace resistance 2) satisfies:
[0218]
[0219] The known channel current flowing through a known trace current (i.e., PCB standard trace resistance 1) satisfies:
[0220]
[0221] Furthermore, the first reference current flowing through the discrete resistor 503 also satisfies:
[0222] I_ref=I_ref_1+I_ref_2+……+I_ref_n (Formula 11)
[0223] The first reference current flowing through the discrete resistor 503 also satisfies: And the sum of the channel currents of the PCB standard trace resistances other than the PCB standard trace resistance 2 and the PCB standard trace resistance 1 is much smaller than the first reference current.
[0224] The sampling control unit 501 is also used to collect the first voltage drop of the wiring resistor, the fifth voltage drop of the known wiring resistor, and the second voltage drop of the discrete resistor when the wiring resistor is at multiple different temperatures, to obtain multiple groups of first calibration data. The N groups of first calibration data are: (ΔV Rsense0 1, ΔV _pcb_2 1, ΔV _pcb_1 1, T1), (ΔV Rsense0 2. ΔV _pcb_2 2. ΔV _pcb_1 2, T2), ..., (ΔV Rsense0 N, ΔV _pcb_2 N, ΔV _pcb_1 N, TN).
[0225] Among them, the first calibration data (ΔVRsense0 N, ΔV _pcb_2 N, ΔV _pcb_1 N, TN) means: when the temperature of the wiring resistance is TN, the first voltage drop ΔV of the PCB standard wiring resistance 2 _pcb_2 N, the fifth voltage drop ΔV of the known trace resistance _pcb_ 1N, the second voltage drop of discrete resistor ΔV Rsense0 N. N is a positive integer greater than 2.
[0226] The sampling control unit 501 calculates the first calibration data (ΔV Rsense0 i, ΔV _pcb_2 i, ΔV _pcb_1 i, Ti) and formula 13, formula 14, formula 4, get formula 17; According to the jth group of first calibration data (ΔV Rsense0 j, ΔV _pcb_2 , ΔV _pcb_1 j, Tj) and Formula 13, Formula 14, Formula 4, get Formula 18, and solve the unknown parameters k and unknown parameters b according to Formula 17 and Formula 18.
[0227]
[0228]
[0229] After solving the value of the unknown parameter k and the value of the unknown parameter b, the sampling control unit 501 substitutes the value of the unknown parameter k and the value of the unknown parameter b into Formula 4 to obtain the first temperature-resistance relationship of the trace resistance (i.e., the PCB standard trace resistance 2): R_pcb_2(T)=kT+b.
[0230] In another optional implementation, for Fig.15 and Fig.16 The current sensing circuit is shown.
[0231] The sampling control unit 501 is further used to collect the temperature of the PCB standard wiring resistor, the third voltage drop of each PCB standard wiring resistor, and the fourth voltage drop of the discrete resistor for any one wiring resistor of at least one PCB standard wiring resistor at multiple different operating times of the second load module to obtain multiple groups of second calibration data;
[0232] and for calculating the channel current of each PCB standard trace resistor and the third reference current of the discrete resistor corresponding to each set of second calibration data according to the initial design resistance value of each PCB standard trace resistor and the resistance value of the discrete resistor;
[0233] and for screening multiple groups of second target data from the multiple groups of second calibration data, wherein the difference between the third reference current corresponding to each group of second target data and the channel current of the wiring resistance is less than the third difference threshold, and the temperature corresponding to each group of second target data is different;
[0234] and for calculating a third resistance calibration value of the routing resistance corresponding to each set of second target data according to the resistance value of the discrete resistor, the third voltage drop and the fourth voltage drop in the plurality of sets of second target data;
[0235] And it is used to fit the second temperature-resistance relationship of the wiring resistance according to the temperature and the third resistance calibration value corresponding to the multiple groups of second target data, and obtain the second temperature-resistance relationship of each PCB standard wiring resistance.
[0236] Correspondingly, the sampling control unit 501 is further used to obtain a second temperature-resistance relationship of the target standard resistor.
[0237] It should be noted that the at least one PCB standard trace resistor includes: one PCB standard trace resistor and at least two PCB standard trace resistors. The following is an example in which the current detection circuit includes at least two PCB standard trace resistors. For any one of the at least two PCB standard trace resistors,
[0238] The sampling control unit 501 is also used to collect the temperature of the PCB standard wiring resistor, the third voltage drop of each PCB standard wiring resistor and the fourth voltage drop of the discrete resistor at multiple different operating times of the second load module to obtain multiple groups of second calibration data.
[0239] Optionally, the sampling control unit 501 can collect the temperature of the PCB standard wiring resistor, the third voltage drop of each PCB standard wiring resistor, and the fourth voltage drop of the discrete resistor when the electronic device to which the second load module belongs is in different working scenes, and obtain multiple sets of second calibration data. The second calibration data includes the temperature of the PCB standard wiring resistor, the third voltage drop of each PCB standard wiring resistor, and the fourth voltage drop of the discrete resistor at a certain operating moment of the second load module. For example, the working scene may include a startup scene, a shutdown scene, a phone call scene, a game scene, a standby scene, a sleep scene, etc. The sampling control unit 501 can collect the second calibration data at multiple different operating moments of the second load module when the electronic device to which the second load module belongs is in different working scenes.
[0240] The sampling control unit 501 is further used to calculate the channel current of each PCB standard wiring resistor and the third reference current of the discrete resistor corresponding to each set of second calibration data according to the initial design resistance value of each PCB standard wiring resistor and the resistance value of the discrete resistor.
[0241] Optionally, the initial design resistance value may be a theoretical resistance value. Alternatively, the initial design resistance value may also be a resistance value calculated based on a first temperature-resistance relationship of the wiring resistance. In an optional implementation, the initial design resistance value of the PCB standard wiring resistance may be determined based on the total power consumption requirement of the total load detected by the current detection circuit and the power consumption requirement of the second load module detected by the PCB standard wiring resistance. For example, the design may be based on the resistivity reference at 20°C.
[0242] For example, for each set of second calibration data, the sampling control unit 501 can calculate the ratio of the third voltage drop of each PCB standard trace resistor to its initial design resistance value to obtain the channel current corresponding to each PCB standard trace resistor, and calculate the ratio of the fourth voltage drop of the discrete resistor to its resistance value to obtain the third reference current of the discrete resistor, so as to obtain the channel current of each PCB standard trace resistor corresponding to the second calibration data and the third reference current of the discrete resistor, thereby obtaining the channel current of each PCB standard trace resistor corresponding to each second calibration data and the third reference current of the discrete resistor.
[0243] For example, the current detection circuit includes n PCB standard trace resistors for detecting the current of n second load modules. The N sets of second calibration data include:
[0244] <ΔV Rsense0 (t0), ΔV _pcb_1 (t0), ΔV _pcb_2 (t0), ..., ΔV _pcb_n (t0), T(t0)>,
[0245] <ΔV Rsense0 (t1), ΔV _pcb_1 (t1), ΔV _pcb_2 (t1), ..., ΔV _pcb_n (t1), T(t1)>,
[0246] ……<ΔV Rsense0 (ti), ΔV _pcb_1 (ti), ΔV _pcb_2 (ti), ..., ΔV _pcb_n (ti), T(ti)>,
[0247] ......<ΔV Rsense0 (tj), ΔV _pcb_1 (tj), ΔV _pcb_2 (tj), ..., ΔV _pcb_n (tj), T(tj)>,
[0248] ......<ΔVRsense0 (tN), ΔV _pcb_1 (tN), ΔV _pcb_2 (tN), ..., ΔV _pcb_n (tN), T(tN)>.
[0249] Where <ΔV Rsense0 (tN), ΔV _pcb_1 (tN), ΔV _pcb_2 (tN), ..., ΔV _pcb_n (tN), T(tN)> represents the temperature T(tN) of the PCB standard wiring resistance collected at the operating time tN of the n second load modules, the third voltage drop ΔV of the n PCB standard wiring resistances _pcb_1 (tN), ΔV _pcb_2 (tN), ..., ΔV _pcb_n (tN), and the fourth voltage drop of the discrete resistor ΔV Rsense0 (tN). Where, ΔV _pcb_1 (tN) represents the third voltage drop of the PCB standard trace resistance 1. ΔV _pcb_2 (tN) represents the third voltage drop of the PCB standard trace resistance 2. ΔV _pcb_n (tN) represents the third voltage drop of the PCB standard trace resistance n.
[0250] The n channel currents and the third reference current corresponding to the N groups of second calibration data include:
[0251] <I_ref(t0),I_ref_1(t0),I_ref_2(t0),……,I_ref_n(t0),T(t0)> ,
[0252] <I_ref(t1),I_ref_1(t1),I_ref_2(t1),……,I_ref_n(t1),T(t1)> ,
[0253] <I_ref(t2),I_ref_1(t2),I_ref_2(t2),……,I_ref_n(t2),T(t2)> ,
[0254] …<I_ref(ti),I_ref_1(ti),I_ref_2(ti),……,I_ref_n(ti),T(ti)> ,
[0255] …<I_ref(tj),I_ref_1(tj),I_ref_2(tj),……,I_ref_n(tj),T(tj)> ,
[0256] …<I_ref(tN),I_ref_1(tN),I_ref_2(tN),……,I_ref_n(tN),T(tN)> .
[0257] in,<I_ref(tN),I_ref_1(tN),I_ref_2(tN),……,I_ref_n(tN),T(tN)> It represents the temperature T(tN) of the PCB standard wiring resistor collected at the operating time tN of the n second load modules, the channel currents I_ref_1(tN), I_ref_2(tN), ..., I_ref_n(tN) of the n PCB standard wiring resistors, and the third reference current I_ref(tN) of the discrete resistor. Among them, I_ref_1(tN) represents the channel current of the PCB standard wiring resistor 1. I_ref_2(tN) represents the channel current of the PCB standard wiring resistor 2. I_ref_n(tN) represents the channel current of the PCB standard wiring resistor n. I_ref_n(tN) is the ratio of the third voltage drop of the PCB standard wiring resistor n to its initial resistance at the operating time tN.
[0258] The sampling control unit 501 is also used to screen multiple groups of second target data from multiple groups of second calibration data. The difference between the third reference current corresponding to each group of second target data and the channel current of the wiring resistance is less than the third difference threshold, and the temperature corresponding to each group of second target data is different. Optionally, the temperature corresponding to each group of second target data differs by at least a temperature threshold T0. For example, the temperature threshold T0 can be 2°C, 3°C, etc.
[0259] Among them, the difference between the third reference current I_ref(tN) corresponding to each set of second target data and the channel current of the routing resistor is less than the third difference threshold ΔI_n_i. That is, in the data corresponding to each set of second target data, the sum of the channel currents of other PCB standard routing resistors except the routing resistor in at least two PCB standard routing resistors is less than the third difference threshold. In other words, the channel current of each PCB standard routing resistor corresponding to each set of second target data and the third reference current of the discrete resistor indicate that the current passing through the discrete resistor mainly flows to the routing resistor. That is, if the routing resistor is the PCB standard routing resistor n, then I_ref_1(ti)+I_ref_2(ti)+…+I_ref_n-1(ti)<ΔI_n_i. In this case,
[0260] For example, the sampling control unit 501 is further configured to select two sets of second target data from the plurality of sets of second calibration data: <ΔV Rsense0 (ti), ΔV _pcb_1 (ti), ΔV _pcb_2 (ti), ..., ΔV_pcb_n (ti), T(ti)> and <ΔV Rsense0 (tj), ΔV _pcb_1 (tj), ΔV _pcb_2 (tj), ..., ΔV _pcb_n (tj), T(tj)>. Among them, T(ti)-T(tj)>3℃.
[0261] The sampling control unit 501 is also used to calculate the third resistance calibration value of the wiring resistance corresponding to each set of second target data according to the resistance value of the discrete resistor, the third voltage drop and the fourth voltage drop in the multiple sets of second target data, and to fit the second temperature-resistance relationship of the wiring resistance according to the temperature corresponding to the multiple sets of second target data and the third resistance calibration value, and obtain the second temperature-resistance relationship of each PCB standard wiring resistance.
[0262] Among them, the sampling control unit 501 obtains the second temperature-resistance relationship according to the resistance of the discrete resistor, the third voltage drop and the fourth voltage drop in multiple sets of second target data. The implementation method can refer to the aforementioned sampling control unit 501 obtaining the first temperature-resistance relationship according to the resistance of the discrete resistor, the first voltage drop and the second voltage drop in multiple sets of first calibration data. The implementation process is not elaborated in the embodiments of the present application.
[0263] In the embodiment of the present application, the calibration process of the PCB standard wiring resistance, that is, the determination process of the second temperature-resistance relationship, can be performed in the actual use of the electronic device where the second load module is located, so as to accurately obtain the power consumption of each second load module. In addition, as mentioned above, the initial design resistance involved in the implementation method can be the resistance calculated based on the first temperature-resistance relationship of the wiring resistance. In this way, the second temperature-resistance relationship can be considered to be determined on the basis of the first temperature-resistance relationship, thereby further ensuring the accuracy of the PCB standard wiring resistance indicated by the second temperature-resistance relationship, thereby further ensuring the accuracy of the current of the second load module detected using the PCB standard wiring resistance.
[0264] In some embodiments of the present application, the number of PCB standard wiring resistors is at least two. The sampling control unit 501 is also used to obtain the current voltage drop of the discrete resistor detected by the sampling control unit 501 and calculate the target current passing through the discrete resistor when detecting the total current of the second load module connected in series with at least two PCB standard wiring resistors respectively; when the target current is greater than or equal to the current threshold, determine the total current of the plurality of second load modules as the target current; when the target current is less than or equal to the current threshold, detect the current of the second load module connected in series with each PCB standard wiring resistor, obtain the current of each second load module, calculate the sum of the currents of the plurality of second load modules, and obtain the total current of the plurality of second load modules.
[0265] Optionally, the sampling control unit 501 can obtain the current voltage drop of the discrete resistor, calculate the ratio of the current voltage drop of the discrete resistor and its resistance, and obtain the target current passing through the discrete resistor when detecting the total current of the second load module in which at least two PCB standard wiring resistors are respectively connected in series. It is judged whether the target current is less than the current threshold. When the target current is greater than or equal to the current threshold, the total current of multiple second load modules is determined to be the target current. When the target current is less than the current threshold, the current of each second load module connected in series with the PCB standard wiring resistor is detected to obtain the current of each second load module, and the sum of the currents of the multiple second load modules is calculated to obtain the total current of the multiple second load modules. Among them, the current threshold can be determined according to the resistance accuracy of the discrete resistor, the sampling accuracy of the sampling control unit for the voltage drop of the discrete resistor, etc.
[0266] For example, when the target current is greater than or equal to 10 milliamperes (mA), the voltage drop of the discrete resistor 203 is greater than 20uV, and its sampling accuracy meets the voltage sampling requirements of the sampling control unit. When the target current is between 500uA and 10mA, the voltage drop of the discrete resistor 203 is between 1uV and 20uV, and its sampling accuracy does not meet the voltage sampling requirements of the sampling control unit.
[0267] Based on this, the current threshold may be 10 mA. When the target current is greater than or equal to 10 mA, the sampling control unit 501 determines that the target current passing through the discrete resistor 203 is the total current of the plurality of second load modules. When the target current is less than 10 mA, the sum of the currents of the plurality of second load modules is determined to be the sum of the currents of the plurality of second load modules.
[0268] In some embodiments of the present application, the current detection circuit further includes: a load power supply. The load power supply is connected to the PCB standard wiring resistor 505 through the second load module 20. The load power supply is generally used to supply power to the second load module.
[0269] In one example, the temperature detection unit 504 is a temperature sensor 504. Fig.17 As shown, the negative electrode of the load module 508 is grounded. The positive electrode of the load module 508 is connected in series with one end of the PCB standard wiring resistor 505 through the second load module 30. The negative electrode of the reference power supply 502 is grounded. The positive electrode of the reference power supply 502 is connected to one end of the PCB standard wiring resistor 505 through the discrete resistor 503. The other end of the PCB standard wiring resistor 505 is grounded. In addition, the PCB standard wiring resistor 505 is also connected to the temperature sensor 504. The second load module 20 is also connected to the sampling control unit 501.
[0270] Another example, Fig.18 As shown, the negative electrode of the load module 508 is grounded. The positive electrode of the load module 508 is respectively connected to one end of the n second load modules 30. The other ends of the n second load modules 30 are respectively connected to one end of the n PCB standard wiring resistors 505. The negative electrode of the reference power supply 502 is grounded. The positive electrode of the reference power supply 502 is connected to the switch element 507 through the discrete resistor 503. The switch element 507 is also connected to one end of the n PCB standard wiring resistors 505. The other end of the n PCB standard wiring resistors 505 is grounded. In addition, the n second load modules 30 are also respectively connected to the sampling control unit 501.
[0271] In some embodiments of the present application, Figure 4 As shown, the sampling points Ln_sn_0- / Ln_sn_0+ at both ends of the PCB standard wiring resistor pcb_n are respectively connected to the sampling control unit 501. The length L of the PCB standard wiring resistor 505 _pcb_n is the length between the sampling points at both ends of the PCB standard trace resistance pcb_n. In addition, Figure 4 The trace width W of the PCB standard trace resistor pcb_n is also marked. _pcb_n and trace thickness H _pcb_n Similarly, there are a first PCB mirror trace resistor Ln_pcb_1 and a second PCB mirror trace resistor Ln_pcb_2 set on the same trace layer as the PCB standard trace resistor pcb_n. The sampling points Ln_sn_1- / Ln_sn_1- at both ends of the first PCB mirror trace resistor Ln_pcb_1 are respectively connected to the sampling control unit 501. The length L of the first PCB mirror trace resistor Ln_pcb_1 _Ln_pcb_1 is the length between the sampling points at both ends of the first PCB mirror wiring resistor Ln_pcb_1. The sampling points Ln_sn_2- / Ln_sn_2- at both ends of the second PCB mirror wiring resistor Ln_pcb_2 are connected to the sampling control unit 501 respectively. The length L of the first PCB mirror wiring resistor Ln_pcb_2 _Ln_pcb_2is the length between the sampling points at both ends of the first PCB mirror trace resistor Ln_pcb_2. In addition, Figure 4 The trace width W of the first PCB mirror trace resistor Ln_pcb_1 is also marked. _Ln_pcb_1 and trace thickness H _Ln_pcb_1 , and the trace width W of the second PCB mirror trace resistor Ln_pcb_2 _Ln_pcb_2 and trace thickness H _Ln_pcb_2 Among them, the length of the PCB standard trace resistance and the PCB mirror trace resistance, that is, the length between the two ends of the sampling point, and the trace width can be jointly designed and determined by the requirements such as the load current and the sampling resistance value.
[0272] Optionally, the electric field direction of the PCB standard routing resistor after power-on is consistent with the length direction of the PCB standard routing resistor. The electric field direction of the PCB mirror routing resistor after power-on is consistent with the length direction of the PCB mirror routing resistor. For example, when the PCB standard routing resistor is a regular routing, the electric field direction of the PCB standard routing resistor after power-on is the current direction, and the current direction is consistent with the length direction of the PCB standard routing resistor. When the PCB mirror routing resistor is a regular routing, the electric field direction of the PCB mirror routing resistor after power-on is the current direction, and the current direction is consistent with the length direction of the PCB mirror routing resistor.
[0273] In some embodiments of the present application, design parameters such as trace length, trace width, and trace thickness for detecting the PCB mirror trace resistance of the first load module can be determined based on the power consumption sampling requirement (i.e., current sampling requirement) of the first load module and the total power consumption sampling requirement of the current detection circuit, i.e., the total power consumption sampling requirement (total current sampling requirement) of multiple first load modules connected to the current detection circuit. For example, take the sampling voltage accuracy of the sampling control module as ±20uV as an example.
[0274] Assume that the current detection circuit is used to detect the current of three first load modules (1-3). The total power consumption sampling requirement of the three first load modules is 500uA~10A. The power consumption sampling requirement of the first load module 1 is 100uA~1A. The power consumption sampling requirement of the first load module 2 is 200uA~2A. The power consumption sampling requirement of the first load module 3 is 400uA~3A. Based on this, the design value of the resistance of the PCB mirror wiring resistor 1 connected in series with the first load module 1 is 200mΩ, which can meet the current sampling requirement of the first load module 1, the minimum voltage drop on the PCB mirror wiring resistor 1 is 20uV, and the maximum loss during sampling is 0.2W. The design value of the resistance of the PCB mirror wiring resistor 2 connected in series with the first load module 2 is 100mΩ, which can meet the current sampling requirement of the first load module 2, the minimum voltage drop on the PCB mirror wiring resistor 2 is 20uV, and the maximum loss during sampling is 0.2W. The resistance of the PCB mirror wiring resistor 3 connected in series with the first load module 3 is designed to be 50mΩ, which can meet the current sampling requirements of the first load module 3. The minimum voltage drop on the PCB mirror wiring resistor 3 is 20uV, and the maximum loss during sampling is 0.15W. In addition, the discrete resistor can be a discrete resistor with a resistance of 2mΩ.
[0275] In summary, the current detection circuit provided in the embodiment of the present application includes: a sampling control unit, a reference power supply, a discrete resistor, a temperature detection unit and at least one PCB resistor group. The PCB resistor group includes at least one PCB standard routing resistor and at least one PCB mirror routing resistor arranged on the same PCB routing layer. Each PCB mirror routing resistor is used to be connected in series with a first load module. The sampling control unit is used to detect the voltage drop of the discrete resistor, the PCB standard routing resistor and the PCB mirror routing resistor; the temperature detection unit is used to detect the temperature of the PCB routing standard resistor and the PCB mirror routing resistor. In the current detection circuit, the sampling control unit can obtain the target voltage drop of the target mirror resistor detected by the sampling control unit and the target temperature of the target mirror resistor detected by the temperature detection unit when detecting the current of any first load module, wherein the target mirror resistor is a PCB mirror wiring resistor connected in series with the detected first load module; obtain the corresponding relationship between the temperature and the resistance of the target mirror resistor, wherein the corresponding relationship is determined according to the corresponding relationship between the temperature and the resistance of the target standard resistor and the resistance conversion coefficient of the target mirror resistor, wherein the resistance conversion coefficient is determined according to the wiring length ratio and the wiring width ratio of the target standard resistor and the target mirror resistor; determine the target resistance of the target mirror resistor according to the corresponding relationship between the temperature and the resistance of the target mirror resistor and the target temperature; and then calculate the current passing through the target mirror resistor according to the target resistance and the target voltage drop to obtain the current of the first load module, thereby realizing current detection of the first load module connected to the current detection circuit. Compared with the related art, the current detection circuit of the present application mainly uses PCB standard routing resistors and PCB mirror routing resistors for current detection, and the volume of PCB standard routing resistors and PCB mirror routing resistors is smaller than that of discrete resistors, and the number of resistor groups, and / or the number of PCB mirror routing resistors in a single resistor group can be multiple, and the current of multiple first load modules connected in series with multiple PCB mirror routing resistors can be detected to realize multi-channel current sampling. Therefore, in the technical solution of the present application, the current detection circuit that uses the resistor group for current detection reduces the circuit volume and the circuit's occupation of equipment space on the basis of realizing multi-channel current sampling, and improves the miniaturization of the multi-channel current detection circuit.
[0276] Please refer to Figure 19 to Figure 20 , which respectively show a block diagram of a PCB assembly provided by an embodiment of the present application. Figure 19 to Figure 20 As shown, the PCB assembly includes: the current detection circuit provided in the embodiment of the present application and the PCB, the PCB includes multiple routing layers and multiple insulating dielectric layers. The routing layers and the insulating dielectric layers are arranged in an alternating manner. The routing layers are also called PCB routing layers and metal layers.
[0277] The reference power supply 502, the discrete resistor 503, the sampling control unit 501 and the first load module 20 are arranged on the surface layer of the PCB. The PCB standard routing resistor 505 and the PCB mirror routing resistor 506 of the same resistor group are arranged on the same target routing layer. The target routing layer is any routing layer among the multiple routing layers. The temperature detection unit 504 is connected to the PCB standard routing resistor 505 and the PCB mirror routing resistor 506, or the temperature detection unit 504 is arranged near the PCB standard routing resistor 505 and the PCB mirror routing resistor 506. Optionally, the reference power supply 502, the discrete resistor 503 and the sampling control unit 501 are arranged on a surface layer of the PCB. The first load module 20 is arranged on another surface layer of the PCB. Among them, the PCB standard routing resistor 505 and the PCB mirror routing resistor 506 can be an independent section of PCB routing, or, can also be a PCB power supply routing or return routing of the load module. For example, the PCB mirror trace resistor 506 is connected in series with the first load module 20 and the power supply of the first load module 20. The PCB mirror trace resistor 506 can be a PCB power trace or a return trace of the first load module 20.
[0278] As an example, Fig.19 As shown, the current detection circuit includes three resistor groups, which can be distributed in the routing layer L1, the routing layer L3 and the routing layer L7 among the routing layers L1-L8. Fig.19 In the PCB assembly shown, the routing layer L1 is provided with a PCB mirror routing resistor 506 and a PCB standard routing resistor 505 of the same resistor group, and the routing layer L3 is provided with a PCB mirror routing resistor 506 of the same resistor group ( Fig.19 ) and PCB standard wiring resistor 505, the wiring layer L7 is provided with PCB mirror wiring resistor 506 ( Fig.19 ) and PCB standard trace resistance 505.
[0279] Another example is, Fig. 20 As shown, the PCB assembly includes N routing layers. The reference power supply 502, the discrete resistor 503 and the sampling control unit 501 are arranged on the upper surface layer of the PCB. The first load module 20 is arranged on the lower surface layer of the PCB. The PCB mirror routing resistor 506 and the PCB standard routing resistor 505 are arranged on the routing layer Ln-1. And, Fig.21 In the embodiment, the power supply of the first load module 20 is not the same as the reference power supply 502. The power supply of the first load module 20 is connected in series with the PCB mirror trace resistor 506 and the first load module 20 in sequence, and the PCB mirror trace resistor 506 is the PCB power supply trace of the first load module 20. The current detection circuit includes a switch 507. One end of the switch 507 is connected to the PCB standard trace resistor 505, and the other end of the switch 507 is grounded.
[0280] It should be noted that Figure 19 to Figure 20 The PCB components include the number of routing layers, the number of PCB mirror routing resistors, and the number of PCB standard routing resistors, which are all schematic illustrations.
[0281] In the embodiment of the present application, a section of independent PCB trace in the PCB assembly can be used as a PCB standard trace resistor and a PCB mirror trace resistor (collectively referred to as a sampling resistor). The section of PCB trace can be located on the surface or inner layer of the PCB. Alternatively, a section of PCB power supply trace or return trace of a load module in the PCB assembly can be used as a PCB standard trace resistor and a PCB mirror trace resistor.
[0282] Optionally, the electric field direction of the PCB standard routing resistor 505 after power-on can be consistent with the length direction of the PCB standard routing resistor. The electric field direction of the PCB mirror routing resistor 506 after power-on is consistent with the length direction of the PCB mirror routing resistor 506. For example, when the PCB standard routing resistor 505 is a regular routing, the electric field direction of the PCB standard routing resistor 505 after power-on is the current direction, and the current direction is consistent with the length direction of the PCB standard routing resistor 505. When the PCB mirror routing resistor 506 is a regular routing, the electric field direction of the PCB mirror routing resistor 506 after power-on is the current direction, and the current direction is consistent with the length direction of the PCB mirror routing resistor. In this way, the electric field direction of the current passing through the PCB standard routing resistor is designed to be consistent with the length direction of the PCB standard routing resistor, so as to improve the current sampling accuracy of the PCB standard routing resistor. Similarly, the electric field direction of the current passing through the PCB mirror routing resistor is designed to be consistent with the length direction of the PCB mirror routing resistor, so as to improve the current sampling accuracy of the PCB mirror routing resistor.
[0283] Optionally, please continue to refer to Fig. 20 The sampling control unit 501 can be connected to each PCB standard wiring resistor 505 and the PCB mirror wiring resistor 506 through a via.
[0284] Further optionally, the sampling points at both ends of the PCB standard wiring resistor 505 are respectively connected to the sampling control unit 501. The length of the PCB standard wiring resistor 505 is the length between the sampling points at both ends of the PCB standard wiring resistor. The sampling points at both ends of the PCB mirror wiring resistor 506 are respectively connected to the sampling control unit 501. The length of the PCB mirror wiring resistor 506 is the length between the sampling points at both ends of the PCB mirror wiring resistor.
[0285] Optionally, the PCB mirror trace resistor 506 and the PCB standard trace resistor 505 can be irregular traces, and the resistance difference between the two is mainly caused by the trace length and trace width of each tiny end. Then the trace length ratio and trace width ratio of the two can be simulation values. Alternatively, the resistance conversion coefficient can also be the ratio of the resistance of the CB mirror trace resistor 506 and the PCB standard trace resistor 505 at the same temperature determined by simulation. For example, Fig.21 As shown, the PCB assembly includes PCB power supply trace VDDQ, PCB power supply trace VDD_2L, PCB power supply trace VDD_2H and PCB power supply trace VDD_1. The PCB mirror trace resistor 506 can be an irregular trace on the PCB power supply trace VDD_1.
[0286] Further optionally, the shape and size of the PCB mirror wiring resistor 506 can be the same as the shape and size of the PCB standard wiring resistor 505, or they can be scaled in proportion, so as to improve the resistance sampling accuracy of the PCB mirror wiring resistor 506. In particular, when the PCB standard wiring resistor 505 and the PCB mirror wiring resistor 506 are irregularly wired, the shapes and sizes of the two are the same or scaled in proportion, which is more conducive to ensuring the resistance sampling accuracy of the PCB mirror wiring resistor 506.
[0287] In an embodiment of the present application, the temperature detection unit 504 is connected to the PCB standard routing resistor 505 and the PCB mirror routing resistor 506 , or the temperature detection unit 504 is arranged near the PCB standard routing resistor 505 and the PCB mirror routing resistor 506 .
[0288] For example, Fig. 22 As shown, the temperature detection unit 504 can be arranged near the PCB standard wiring resistor 505 and the PCB mirror wiring resistor 506 to improve the detection accuracy of the temperature detection unit 504 on the temperature of the PCB standard wiring resistor 505 and the PCB mirror wiring resistor 506, so as to reduce the influence of the temperature deviation on the sampling accuracy of the resistance value of the PCB standard wiring resistor 505 and the PCB mirror wiring resistor 506, thereby ensuring the detection accuracy of the current passing through the PCB mirror wiring resistor 506, and improving the current detection accuracy of the first load module 20. For example, the temperature detection deviation of the temperature detection unit 504 can be controlled at ±3°C to ensure the temperature detection accuracy.
[0289] Optionally, the PCB assembly of the electronic device is usually configured with multiple negative temperature coefficient thermistors (NTC) resistors, which can be used to detect temperature. The temperature detection unit 504 in the current detection circuit can reuse the NTC resistor to reduce the circuit cost of the current detection circuit. Of course, the temperature detection unit 504 can also be configured separately. However, whether the temperature detection unit 504 is configured separately or the NTC resistor is reused, the requirement that the temperature detection unit 504 is set near the PCB standard wiring resistor 505 and the PCB mirror wiring resistor 506 must be met.
[0290] For example, the temperature distribution of each point on the PCB component is as follows: Fig.23 As shown. Fig.23 It can be seen that the PCB board temperature at each position in area one of the PCB assembly is close, and the PCB board temperature at each position in area two is close. Based on this, the NTC resistor in area one can be selected as the temperature detection unit 504 to detect the PCB standard wiring resistance 505 and the PCB mirror wiring resistance 506 in area one. In addition, the NTC resistor in area two is selected as the temperature detection unit 504 to detect the PCB standard wiring resistance 505 and the PCB mirror wiring resistance 506 in area two. Of course, it is also possible to arrange a temperature sensor as the temperature detection unit 504 in area one to detect the PCB standard wiring resistance 505 and the PCB mirror wiring resistance 506 in area one; and arrange a temperature sensor as the temperature detection unit 504 in area two to detect the PCB standard wiring resistance 505 and the PCB mirror wiring resistance 506 in area two.
[0291] In some embodiments of the present application, the PCB standard trace resistor is a section of an independent PCB trace. Alternatively, the PCB standard trace resistor may also be a section of a PCB power trace or a PCB return trace of the reference power supply 503. Similar to the connection relationship in the aforementioned current detection circuit, the positive electrode of the reference power supply 502 may be connected to the PCB trace at one end of each PCB standard trace resistor 505 through a discrete resistor 503. The PCB trace at the other end of each PCB standard trace resistor 505 is grounded.
[0292] Alternatively, the positive electrode of the reference power supply 502 is connected to the PCB trace at one end of each PCB standard trace resistor 505 through a discrete resistor 503. The PCB trace at the other end of each PCB standard trace resistor 505 is connected to the negative electrode of the reference power supply 502.
[0293] Alternatively, the positive electrode of the reference power source 502 is connected to the PCB trace at one end of each PCB standard trace resistor 505. The PCB trace at the other end of each PCB standard trace resistor 505 is grounded through a discrete resistor 503.
[0294] Alternatively, the positive electrode of the reference power supply 502 is connected to the PCB trace at one end of each PCB standard trace resistor 505. The PCB trace at the other end of each PCB standard trace resistor 505 is connected to the negative electrode of the reference power supply 502 through a discrete resistor 503. It should be noted that, Fig. 20 For example, the positive electrode of the reference power supply 502 can be connected to the PCB trace at one end of the PCB standard trace resistor 505 through the discrete resistor 503, and the PCB trace at the other end of the PCB standard trace resistor 505 is grounded through the switch 507.
[0295] In some embodiments of the present application, on each routing layer in the PCB assembly, the PCB mirror routing resistor 506 may be a section of an independent PCB routing. Alternatively, the PCB mirror routing resistor 506 may be a section of a PCB power routing of the first load module 30. Alternatively, the PCB mirror routing resistor 506 may be a section of a PCB return routing of the first load module 30.
[0296] For example, Fig.24 As shown, the 7th wiring layer L7 of the PCB assembly includes: PCB power supply trace VDD_2H of other modules, PCB power supply trace VDD0_VCCQ2 of the UFS module, PCB power supply trace VDD0_VCCQ and PCB power supply trace VCC. A section of the PCB power supply trace VCC of the UFS module can be used as a PCB mirror trace resistor 506 to detect the current of the UFS module.
[0297] In some embodiments of the present application, the current detection circuit can be used for current sampling of multiple load modules after multi-stage power conversion, so as to solve the problem that some load modules of electronic equipment need to be powered by voltage after multi-stage power conversion and have stricter power integrity requirements, and cannot directly use precision resistors (i.e., discrete resistors, such as power meter precision resistors) for current sampling.
[0298] Optionally, in the current detection circuit, the PCB mirror trace resistor and the PCB standard trace resistor of the same resistor group can be connected to the same power supply. For example, the current sampling circuit includes 1 resistor group, and the resistor group includes n PCB mirror trace resistors and 1 PCB standard trace resistor. The n PCB mirror trace resistors 506 are respectively connected in series with n first load modules 20. Fig.25As shown, one end of the single PCB mirror trace resistor 506 and the first load module 20 connected in series is connected to the positive electrode of the reference power supply 502 through the discrete resistor 503. The other end of the single PCB mirror trace resistor 506 and the first load module 20 connected in series is grounded. In addition, one end of the PCB standard trace resistor 505 is connected to the reference power supply 502 through the discrete resistor 503, and the other end of the PCB standard trace resistor 505 is grounded through the switch 507. The negative electrode of the reference power supply 502 is grounded.
[0299] like Fig.26 As shown, one end of the single PCB mirror trace resistor 506 and the first load module 20 connected in series is connected to the positive electrode of the reference power supply 502. The other end of the single PCB mirror trace resistor 506 and the first load module 20 connected in series is grounded. In addition, one end of the PCB standard trace resistor 505 is connected to the reference power supply 502, and the other end of the PCB standard trace resistor 505 is grounded through the discrete resistor 503 and the switch 507. The negative electrode of the reference power supply 502 is grounded. Fig.25 and Fig.26 In the current detection circuit shown, the output current of the reference power supply 502 is divided into a system power supply current I_sys and a first reference current I_ref. The system power supply current I_sys flows to the first load module 20 through the PCB mirror wiring resistor 506. The first reference current I_ref flows through the PCB standard wiring resistor 505 and the discrete resistor 503.
[0300] The sampling control unit 501 is used to control the switch 507 to conduct the reference power supply 502 and the PCB standard wiring resistor 505 during the circuit calibration process for any PCB standard wiring resistor (i.e., wiring resistor) 505. In addition, the first load module 20 is controlled to be in an off state or a low-power working state so that the total current passing through the first load module 20 is less than the first difference threshold, and the difference between the target channel current passing through the wiring resistor and the first reference current passing through the discrete resistor is controlled to be less than the first difference threshold.
[0301] Specifically, the sampling control unit 501 is also used to control the switch element 501 connected in series with the routing resistor to be turned on for any one of the at least one PCB standard routing resistors, and control the first load module 20 of the PCB mirror routing resistor in the same resistor group as the routing resistor to be in a closed state or a low-power working state, so that the total current passing through the first load module 20 is less than the first difference threshold, and the difference between the target channel current passing through the routing resistor and the first reference current passing through the discrete resistor is less than the first difference threshold; collect the first voltage drop of the routing resistor and the second voltage drop of the discrete resistor when the routing resistor is at multiple different temperatures to obtain multiple groups of first calibration data; calculate the first resistance calibration value of the routing resistor corresponding to each group of first calibration data according to the resistance value of the discrete resistor, the first voltage drop and the second voltage drop in the multiple groups of first calibration data; fit the first temperature-resistance relationship of the routing resistor according to the temperature corresponding to the multiple groups of first calibration data and the first resistance calibration value, and obtain the first temperature-resistance relationship of each PCB standard routing resistor. The other PCB resistor is a PCB standard wiring resistor other than the wiring resistor among at least two PCB standard wiring resistors in the current detection circuit.
[0302] It should be noted that the current detection circuit may also include at least two resistor groups. The PCB mirror wiring resistor and the PCB standard wiring resistor in the same resistor group may be connected to the same reference power supply 502. The circuit calibration process of the sampling control unit 501 for any PCB standard wiring resistor in the current detection circuit may refer to the aforementioned implementation method. Similarly, the determination method for the corresponding relationship between the resistance value and temperature of any PCB mirror wiring resistor in the current detection circuit may also refer to the aforementioned implementation method, and the embodiments of the present application will not be repeated here.
[0303] As an example, Fig. 27 As shown, the current detection circuit is applied to a mobile terminal. The current detection circuit includes a resistor group arranged on the routing layer L7 of the PCB assembly, and the resistor group includes n PCB mirror routing resistors and 1 PCB standard routing resistor. The reference power supply 502 is the battery of the mobile terminal, and its supply voltage is 4V. The discrete resistor 503 is the sampling resistor of the power meter of the mobile terminal, and its resistance value is 5mΩ.
[0304] The negative electrode of the reference power supply 502 is grounded. The positive electrode of the reference power supply 502 is connected to a plurality of battery management chips (power management ICs, PMICs) through a discrete resistor 503. Each battery management chip is respectively connected to a PCB mirror wiring resistor 506 and a first load module 20 corresponding to the power supply of the battery management chip. The first load module 20 includes: a system on chip (System on Chip, SOC) module, a double data rate synchronous dynamic random access memory (Double Data Rate, DDR) module and a universal flash storage (Universal Flash Storage, UFS) module, etc.
[0305] The positive electrode of the reference power supply 502 is also connected to the current limiting resistor 508 through the discrete resistor 503. The current limiting resistor 508 is grounded in turn through the PCB standard wiring resistor 505 and the switch 507. In addition, the discrete resistor 503, the PCB mirror wiring resistor 506 and the PCB standard wiring resistor 505 are all connected to the sampling control unit 501. Among them, the resistance value of the current limiting resistor 508 is 5Ω, which is used to limit the current flowing into the PCB standard wiring resistor 505.
[0306] The sampling control unit 501 is also used to control the switch 507 to be turned on (i.e., closed) when the mobile terminal enters the flight mode so that the first load module is in an off state or a low power consumption state and the power supply current I_sys is less than 5mA. At this time, the current passing through the discrete resistor 503 mainly flows to the PCB standard wiring resistor 505. The current passing through the discrete resistor 503 (i.e., the target channel current) and the first reference current I_ref passing through the PCB standard wiring resistor 505 satisfy: The circuit calibration process of the PCB standard trace resistor 505 is performed to obtain the first temperature-resistance relationship of the PCB standard trace resistor 505, and then obtain the first temperature-resistance relationship of each PCB mirror trace resistor 506. The sampling control unit 501 controls the switch 507 to be disconnected, and uses the PCB mirror trace resistor 506 to detect the current passing through each first load module 20 of the mobile terminal.
[0307] For another example, see Fig.28 , which shows a partial power supply tree of a mobile terminal. The power supply tree illustrates the connection relationship of the PCB power supply lines of some load modules on the mobile terminal. Fig.28 As shown, the mobile terminal includes: a total power supply VDD_VPH. The total power supply VDD_VPH has three power supply branches, and the total power supply VDD_VPH is connected to a discrete resistor 503 .
[0308] On the first power supply branch, the main power supply VDD_VPH is connected to the PCB power supply trace VDD_1. The PCB power supply trace VDD_1 is connected to the PCB power supply trace VDD_1_L24 and the PCB power supply trace VDD_1_L23 through the PCB standard trace resistor 505A.
[0309] The PCB power supply trace VDD_1_L24 is connected to the PCB power supply trace UFS_2L_VCC of the UFS module (first load module A) through the PCB mirror trace resistor 506A. The PCB power supply trace VDD_11_L24 is also connected to the PCB power supply trace EMMC_VCC of the embedded multimedia card (EMMC) module (first load module B).
[0310] The PCB power supply line VDD_1_L23 is respectively connected to the PCB power supply line ZC_VDD of the first load module C and the PCB power supply line ZD_VDD of the first load module D through the PCB mirror line resistor 506B. The PCB power supply line VDD_11_L23 is also connected to the PCB power supply line ZE_VDD of the first load module E.
[0311] On the second power supply branch, the total power supply VDD_VPH is respectively connected to the PCB power supply trace LED_B of the light-emitting diode (LED) LED B, the PCB power supply trace LED_G of the LED G, and the PCB power supply trace LED_R of the LED R through the PCB standard trace resistor 505B.
[0312] PCB power supply trace LED_B is connected to PCB power supply trace LED_B_VCC. PCB power supply trace LED_G is connected to PCB power supply trace LED_G_VCC. PCB power supply trace LED_R is connected to PCB power supply trace LED_R_VCC.
[0313] On the third power supply branch, the total power supply VDD_VPH is respectively connected to the PCB power supply trace OLED_B of the organic light-emitting diode (OLED) OLED B, the PCB power supply trace ELVDD of the power supply voltage terminal ELVDD, and the PCB power supply trace ELVSS of the common power supply terminal ELVSS through the PCB standard trace resistor 505C.
[0314] The PCB power supply trace OLED_B is connected to the PCB power supply trace OLED_B_1 and the PCB power supply trace OLED_B_2. The PCB power supply trace ELVDD is connected to the PCB power supply trace ELVDD_1 and the PCB power supply trace ELVDD_2. The PCB power supply trace ELVSS is connected to the PCB power supply trace ELVSS_1 and the PCB power supply trace ELVSS_2.
[0315] Among them, the discrete resistor 503 can be a sampling resistor of the power meter of the mobile terminal, or the discrete resistor 503 can be an independently configured resistor. The resistance of the discrete resistor 503 is 10mΩ. The resistance of the PCB standard trace resistor 505A is 40mΩ. The resistance of the PCB standard trace resistor 505B is 2Ω. The resistance of the PCB standard trace resistor 505C is 50mΩ. The resistance of the PCB mirror trace resistor 506A is 50mΩ. The resistance of the PCB mirror trace resistor 506B is 100mΩ. It should be noted that, Fig.28 The input voltage and input current of the total power supply VDD_VPH and each PCB power supply trace are also marked. In addition, the output voltage and output current of the total power supply VDD_VPH and some PCB power supply traces are also marked. For example, the input voltage of the total power supply VDD_VPH is 3.7V, the input current is 57008.26mA, the output voltage is 3.7V, and the output current is 57008.26mA. The input voltage of the PCB power supply trace VDD_1 is 3.7V, the input current is 1460.1mA, the output voltage is 3.7V, and the output current is 1460.1mA. The input voltage of the PCB power supply trace EMMC_VCC is 2.96V and the input current is 570mA.
[0316] In summary, the current detection circuit provided in the embodiment of the present application includes: a sampling control unit, a reference power supply, a discrete resistor, a temperature detection unit and at least one PCB resistor group. The PCB resistor group includes at least one PCB standard routing resistor and at least one PCB mirror routing resistor arranged on the same PCB routing layer. Each PCB mirror routing resistor is used to be connected in series with a first load module. The sampling control unit is used to detect the voltage drop of the discrete resistor, the PCB standard routing resistor and the PCB mirror routing resistor; the temperature detection unit is used to detect the temperature of the PCB routing standard resistor and the PCB mirror routing resistor. In the current detection circuit, the sampling control unit can obtain the target voltage drop of the target mirror resistor detected by the sampling control unit and the target temperature of the target mirror resistor detected by the temperature detection unit when detecting the current of any first load module, wherein the target mirror resistor is a PCB mirror wiring resistor connected in series with the detected first load module; obtain the corresponding relationship between the temperature and the resistance of the target mirror resistor, wherein the corresponding relationship is determined according to the corresponding relationship between the temperature and the resistance of the target standard resistor and the resistance conversion coefficient of the target mirror resistor, wherein the resistance conversion coefficient is determined according to the wiring length ratio and the wiring width ratio of the target standard resistor and the target mirror resistor; determine the target resistance of the target mirror resistor according to the corresponding relationship between the temperature and the resistance of the target mirror resistor and the target temperature; and then calculate the current passing through the target mirror resistor according to the target resistance and the target voltage drop to obtain the current of the first load module, thereby realizing current detection of the first load module connected to the current detection circuit. Compared with the related art, the current detection circuit of the present application mainly uses PCB standard routing resistors and PCB mirror routing resistors for current detection, and the volume of PCB standard routing resistors and PCB mirror routing resistors is smaller than that of discrete resistors, and the number of resistor groups, and / or the number of PCB mirror routing resistors in a single resistor group can be multiple, and the current of multiple first load modules connected in series with multiple PCB mirror routing resistors can be detected to realize multi-channel current sampling. Therefore, in the technical solution of the present application, the current detection circuit that uses the resistor group for current detection reduces the circuit volume and the circuit's occupation of equipment space on the basis of realizing multi-channel current sampling, and improves the miniaturization of the multi-channel current detection circuit.
[0317] An embodiment of the present application also provides an electronic device, which includes the current detection circuit provided by the embodiment of the present application, or the electronic device includes the PCB assembly provided by the embodiment of the present application.
[0318] Please refer to Fig.29 , which shows a flow chart of a current detection method provided by an embodiment of the present application. The current detection method is applied to the current detection circuit provided by an embodiment of the present application. Optionally, the current detection method can be executed by a sampling control unit. For example, the current detection method can be applied to Figures 5 to 20 , Figure 25 to Figure 27 Any of the current sensing circuits shown. Fig.29 As shown, the current detection method includes:
[0319] Step 2901: When detecting the current of any first load module, obtain a target voltage drop of a target mirror resistor detected by a sampling control unit and a target temperature of a target mirror resistor detected by a temperature detection unit. The target mirror resistor is a PCB mirror wiring resistor connected in series with the detected first load module.
[0320] Step 2902: Obtain the corresponding relationship between the temperature and the resistance of the target mirror resistor. The corresponding relationship is determined based on the corresponding relationship between the temperature and the resistance of the target standard resistor and the resistance conversion coefficient of the target mirror resistor, and the resistance conversion coefficient is determined based on the wiring length ratio and wiring width ratio of the target standard resistor and the target mirror resistor.
[0321] Step 2903: Determine a target resistance value of the target mirror resistor according to the corresponding relationship between the temperature and the resistance value of the target mirror resistor and the target temperature.
[0322] Step 2904: Calculate the current passing through the target mirror resistor according to the target resistance value and the target voltage drop to obtain the current of the first load module.
[0323] In an embodiment of the present application, when detecting the current of any first load module, a target voltage drop of a target mirror resistor detected by a sampling control unit and a target temperature of a target mirror resistor detected by a temperature detection unit are obtained, where the target mirror resistor is a PCB mirror wiring resistor connected in series with the detected first load module; a corresponding relationship between the temperature and the resistance of the target mirror resistor is obtained, where the corresponding relationship is determined based on a corresponding relationship between the temperature and the resistance of a target standard resistor and a resistance conversion coefficient of the target mirror resistor, where the resistance conversion coefficient is determined based on a wiring length ratio and a wiring width ratio of the target standard resistor and the target mirror resistor; a target resistance of the target mirror resistor is determined based on a corresponding relationship between the temperature and the resistance of the target mirror resistor and the target temperature; and a current passing through the target mirror resistor is calculated based on the target resistance and the target voltage drop to obtain the current of the first load module, thereby realizing current detection of the first load module connected to the current detection circuit. Compared with the related art, the current detection circuit of the present application mainly uses PCB standard routing resistors and PCB mirror routing resistors for current detection, and the volume of PCB standard routing resistors and PCB mirror routing resistors is smaller than that of discrete resistors, and the number of resistor groups, and / or the number of PCB mirror routing resistors in a single resistor group can be multiple, and the current of multiple first load modules connected in series with multiple PCB mirror routing resistors can be detected to realize multi-channel current sampling. Therefore, in the technical solution of the present application, the current detection circuit that uses the resistor group for current detection reduces the circuit volume and the circuit's occupation of equipment space on the basis of realizing multi-channel current sampling, and improves the miniaturization of the multi-channel current detection circuit.
[0324] Optionally, before detecting the current of any first load module, the method further includes:
[0325] For any routing resistor of at least one PCB standard routing resistor, controlling the difference between a target channel current and a first reference current to be less than a first difference threshold, the target channel current being the current flowing into the routing resistor, and the first reference current being the current passing through the discrete resistor;
[0326] Collecting a first voltage drop of the wiring resistor and a second voltage drop of the discrete resistor when the wiring resistor is at a plurality of different temperatures to obtain a plurality of groups of first calibration data;
[0327] Calculate a first resistance calibration value of the wiring resistor corresponding to each set of first calibration data according to the resistance value of the discrete resistor, the first voltage drop and the second voltage drop in the plurality of sets of first calibration data;
[0328] According to the temperatures and first resistance calibration values corresponding to the multiple groups of first calibration data, a first temperature-resistance relationship of the wiring resistance is obtained by fitting, and a first temperature-resistance relationship of each PCB standard wiring resistance is obtained;
[0329] Obtaining the corresponding relationship between the temperature and the resistance of the target mirror resistor includes: obtaining a first temperature-resistance relationship formula of the target standard resistor; and converting the first temperature-resistance relationship formula into a first temperature-resistance relationship formula of the target mirror resistor according to a resistance conversion coefficient.
[0330] Optionally, the number of PCB standard wiring resistors is at least two; the current detection circuit also includes: a switch unit; a first end of the switch unit is connected to a reference power supply, and at least two second ends of the switch unit are connected to the PCB standard wiring resistors one-to-one; controlling the difference between the target channel current and the first reference current to be less than a first difference threshold, including: controlling the first end to be connected to the second end corresponding to the wiring resistor, and controlling the first end to be disconnected from the second end corresponding to other PCB resistors, and the other PCB resistors are PCB standard wiring resistors other than the wiring resistors among the at least two PCB standard wiring resistors.
[0331] Optionally, the switch unit includes: at least two switch elements corresponding to at least two PCB standard routing resistors one by one, the first end of each switch element is connected to a reference power supply, and the second end of each switch element is connected to the corresponding PCB standard routing resistor; controlling the first end to be connected to the second end corresponding to the routing resistor, and controlling the first end to be disconnected from the second end corresponding to other PCB resistors, including: controlling the first end of the switch element corresponding to the routing resistor to be connected to the second end, and controlling the first end corresponding to other PCB resistors to be disconnected from the second end.
[0332] Optionally, the number of PCB standard routing resistors is at least two, and each PCB standard routing resistor is used to be connected in series with a second load module; controlling the difference between the target channel current and the first reference current to be less than a first difference threshold includes: controlling the second load module connected in series with the routing resistor to be in a normal working state, and controlling the second load module connected in series with other PCB resistors to be in a closed state or a low-power working state, so that the total current passing through the other PCB resistors is less than the first difference threshold.
[0333] Optionally, the method further comprises:
[0334] Obtain the corresponding relationship between the resistivity of the trace resistance and the temperature;
[0335] According to the corresponding relationship between resistivity and temperature, a target resistivity corresponding to the temperature in each set of first calibration data is determined to obtain a target resistivity corresponding to each set of first calibration data;
[0336] According to the temperature, the target resistivity and the first resistance calibration value corresponding to each set of first calibration data, the ratio of the first resistance calibration value to the target resistivity at the same temperature is calculated to obtain ratios corresponding to multiple different temperatures;
[0337] Selecting multiple groups of first target data from multiple groups of first calibration data, wherein the difference between the ratios corresponding to each two groups of first target data at different temperatures is less than a second difference threshold;
[0338] According to the temperatures and first resistance calibration values corresponding to the multiple sets of first calibration data, a first temperature-resistance relationship of the wiring resistance is fitted, including: according to the temperatures and first resistance calibration values corresponding to the multiple sets of first target data, a first temperature-resistance relationship is fitted.
[0339] Optionally, the ratios corresponding to every two groups of first target data at different temperatures are equal.
[0340] Optionally, the method further comprises:
[0341] For the wiring resistance, a resistance accuracy calibration process for multiple different second reference currents is performed to obtain a second resistance calibration value of the wiring resistance corresponding to the multiple different second reference currents at the same set temperature. The resistance accuracy calibration process includes:
[0342] The output current of the reference power supply is adjusted to adjust the second reference current passing through the discrete resistor, and the difference between the target channel current and the second reference current is controlled to be less than a first difference threshold value.
[0343] The first voltage drop of the wiring resistance and the second voltage drop of the discrete resistor are collected when the wiring resistance is at the set temperature.
[0344] According to the resistance value of the discrete resistor, and the first voltage drop and the second voltage drop collected at the set temperature, a second calibration resistance value of the wiring resistance corresponding to a second reference current at the set temperature is calculated.
[0345] Optionally, the target resistance of the target mirror resistor is determined according to the correspondence between the temperature and the resistance of the target mirror resistor and the target temperature, including: obtaining the current voltage drop of the discrete resistor detected by the sampling control unit, and calculating the target current passing through the discrete resistor; determining the ratio of a first target calibration value to a second target calibration value, the first target calibration value being: a second resistor calibration value of a second reference current equal to the target current, and the second target calibration value being: a second resistor calibration value of a second reference current equal to the first reference current; determining the target resistance of the target mirror resistor according to the correspondence between the temperature and the resistance of the target mirror resistor, the target temperature, and the ratio of the first target calibration value to the second target calibration value.
[0346] Optionally, the target resistance of the target mirror resistor is determined according to the corresponding relationship between the temperature and the resistance of the target mirror resistor, the target temperature, and the ratio of the first target calibration value to the second target calibration value, including: calculating the first resistance corresponding to the target temperature according to a first temperature-resistance relationship of the target mirror resistor; calculating the first resistance corresponding to the target current according to the ratio of the first target calibration value to the second target calibration value and the first resistance, to obtain the target resistance of the target mirror resistor.
[0347] Optionally, the method further comprises:
[0348] For any one of the at least one PCB standard trace resistors, at a plurality of different operating moments of the current detection circuit, the temperature of the PCB standard trace resistor, the third voltage drop of each PCB standard trace resistor, and the fourth voltage drop of the discrete resistor are collected to obtain a plurality of sets of second calibration data;
[0349] Calculating the channel current of each PCB standard trace resistor and the third reference current of the discrete resistor corresponding to each set of second calibration data according to the initial design resistance value of each PCB standard trace resistor and the resistance value of the discrete resistor;
[0350] Screening multiple groups of second target data from the multiple groups of second calibration data, wherein a difference between a third reference current corresponding to each group of second target data and a channel current of the wiring resistance is less than a third difference threshold, and each group of second target data corresponds to a different temperature;
[0351] Calculate a third resistance calibration value of the routing resistance corresponding to each set of second target data according to the resistance value of the discrete resistor, the third voltage drop and the fourth voltage drop in the plurality of sets of second target data;
[0352] According to the temperatures and third resistance calibration values corresponding to the multiple sets of second target data, a second temperature-resistance relationship of the wiring resistance is obtained by fitting, and the second temperature-resistance relationship of each PCB standard wiring resistance is obtained.
[0353] Obtaining the corresponding relationship between the temperature and the resistance of the target wiring resistor includes: obtaining a second temperature-resistance relationship formula of the target standard resistor; and converting the first temperature-resistance relationship formula into a first temperature-resistance relationship formula of the target mirror resistor according to a resistance conversion coefficient.
[0354] It should be noted that the explanation and implementation of each step in the embodiment of the method side can refer to the relevant introduction in the aforementioned embodiment, and the embodiment of the present application will not go into details.
[0355] In an embodiment of the present application, when detecting the current of any first load module, a target voltage drop of a target mirror resistor detected by a sampling control unit and a target temperature of a target mirror resistor detected by a temperature detection unit are obtained, where the target mirror resistor is a PCB mirror wiring resistor connected in series with the detected first load module; a corresponding relationship between the temperature and the resistance of the target mirror resistor is obtained, where the corresponding relationship is determined based on a corresponding relationship between the temperature and the resistance of a target standard resistor and a resistance conversion coefficient of the target mirror resistor, where the resistance conversion coefficient is determined based on a wiring length ratio and a wiring width ratio of the target standard resistor and the target mirror resistor; a target resistance of the target mirror resistor is determined based on a corresponding relationship between the temperature and the resistance of the target mirror resistor and the target temperature; and a current passing through the target mirror resistor is calculated based on the target resistance and the target voltage drop to obtain the current of the first load module, thereby realizing current detection of the first load module connected to the current detection circuit. Compared with the related art, the current detection circuit of the present application mainly uses PCB standard routing resistors and PCB mirror routing resistors for current detection, and the volume of PCB standard routing resistors and PCB mirror routing resistors is smaller than that of discrete resistors, and the number of resistor groups, and / or the number of PCB mirror routing resistors in a single resistor group can be multiple, and the current of multiple first load modules connected in series with multiple PCB mirror routing resistors can be detected to realize multi-channel current sampling. Therefore, in the technical solution of the present application, the current detection circuit that uses the resistor group for current detection reduces the circuit volume and the circuit's occupation of equipment space on the basis of realizing multi-channel current sampling, and improves the miniaturization of the multi-channel current detection circuit.
[0356] The current detection method provided in the embodiment of the present application can be executed by a current detection device. In the embodiment of the present application, the current detection method is taken as an example to illustrate the current detection device provided in the embodiment of the present application.
[0357] Please refer to Fig.30 , which shows a block diagram of a current detection device provided in an embodiment of the present application. The current detection device is applied to the current detection circuit provided in an embodiment of the present application. Optionally, the current detection device can be applied to the sampling control unit of the current detection circuit provided in an embodiment of the present application. Fig.30 As shown, the current detection device 3000 includes: an acquisition module 3001 , a determination module 3002 and a calculation module 3003 .
[0358] An acquisition module 3001 is used to acquire a target voltage drop of a target mirror resistor detected by a sampling control unit and a target temperature of a target mirror resistor detected by a temperature detection unit when detecting a current of any first load module, wherein the target mirror resistor is a PCB mirror wiring resistance connected in series with the detected first load module;
[0359] The acquisition module 3001 is further used to obtain the corresponding relationship between the temperature and the resistance of the target mirror resistor, the corresponding relationship is determined according to the corresponding relationship between the temperature and the resistance of the target standard resistor and the resistance conversion coefficient of the target mirror resistor, and the resistance conversion coefficient is determined according to the wiring length ratio and wiring width ratio of the target standard resistor and the target mirror resistor;
[0360] A determination module 3002, configured to determine a target resistance value of the target mirror resistor according to a corresponding relationship between a temperature and a resistance value of the target mirror resistor and a target temperature;
[0361] The calculation module 3003 is used to calculate the current passing through the target mirror resistor according to the target resistance value and the target voltage drop, so as to obtain the current of the first load module.
[0362] In an embodiment of the present application, when detecting the current of any first load module, a target voltage drop of a target mirror resistor detected by a sampling control unit and a target temperature of a target mirror resistor detected by a temperature detection unit are obtained, where the target mirror resistor is a PCB mirror wiring resistor connected in series with the detected first load module; a corresponding relationship between the temperature and the resistance of the target mirror resistor is obtained, where the corresponding relationship is determined based on a corresponding relationship between the temperature and the resistance of a target standard resistor and a resistance conversion coefficient of the target mirror resistor, where the resistance conversion coefficient is determined based on a wiring length ratio and a wiring width ratio of the target standard resistor and the target mirror resistor; a target resistance of the target mirror resistor is determined based on a corresponding relationship between the temperature and the resistance of the target mirror resistor and the target temperature; and a current passing through the target mirror resistor is calculated based on the target resistance and the target voltage drop to obtain the current of the first load module, thereby realizing current detection of the first load module connected to the current detection circuit. Compared with the related art, the current detection circuit of the present application mainly uses PCB standard routing resistors and PCB mirror routing resistors for current detection, and the volume of PCB standard routing resistors and PCB mirror routing resistors is smaller than that of discrete resistors, and the number of resistor groups, and / or the number of PCB mirror routing resistors in a single resistor group can be multiple, and the current of multiple first load modules connected in series with multiple PCB mirror routing resistors can be detected to realize multi-channel current sampling. Therefore, in the technical solution of the present application, the current detection circuit that uses the resistor group for current detection reduces the circuit volume and the circuit's occupation of equipment space on the basis of realizing multi-channel current sampling, and improves the miniaturization of the multi-channel current detection circuit.
[0363] Optionally, the current detection device 3000 further includes: a control module, configured to control the difference between the target channel current and the first reference current to be less than a first difference threshold for any routing resistor of at least one PCB standard routing resistor, the target channel current being the current flowing into the routing resistor, and the first reference current being the current passing through the discrete resistor;
[0364] The acquisition module is used to acquire a first voltage drop of the wiring resistor and a second voltage drop of the discrete resistor when the wiring resistor is at a plurality of different temperatures, so as to obtain a plurality of groups of first calibration data;
[0365] The calculation module 3003 is further used to calculate the first resistance calibration value of the wiring resistor corresponding to each set of first calibration data according to the resistance value of the discrete resistor and the first voltage drop and the second voltage drop in the plurality of sets of first calibration data;
[0366] The current detection device 3000 further includes: a fitting module, for fitting a first temperature-resistance relationship of the wiring resistance according to the temperature and the first resistance calibration value corresponding to the plurality of sets of first calibration data, and obtaining a first temperature-resistance relationship of each PCB standard wiring resistance;
[0367] The acquisition module 3001 is further used to acquire a first temperature-resistance relationship equation of a target standard resistor; and convert the first temperature-resistance relationship equation into a first temperature-resistance relationship equation of a target mirror resistor according to a resistance conversion coefficient.
[0368] Optionally, the number of PCB standard wiring resistors is at least two; the current detection circuit also includes: a switch unit; a first end of the switch unit is connected to a reference power supply, and at least two second ends of the switch unit are connected to the PCB standard wiring resistors one-to-one; a control module, further used to control the first end to be connected to the second end corresponding to the wiring resistor, and control the first end to be disconnected from the second end corresponding to other PCB resistors, and the other PCB resistors are PCB standard wiring resistors other than the wiring resistors among the at least two PCB standard wiring resistors.
[0369] Optionally, the switch unit includes: at least two switch elements corresponding to at least two PCB standard routing resistors one by one, the first end of each switch element is connected to a reference power supply, and the second end of each switch element is connected to the corresponding PCB standard routing resistor; the control module is also used to control the first end of the switch element corresponding to the routing resistor to be connected to the second end, and the first end corresponding to other PCB resistors to be disconnected from the second end.
[0370] Optionally, the number of PCB standard routing resistors is at least two, and each PCB standard routing resistor is used to be connected in series with a second load module; the control module is also used to control the second load module connected in series with the routing resistor to be in a normal working state, and to control the second load module connected in series with other PCB resistors to be in a closed state or a low-power working state, so that the total current passing through the other PCB resistors is less than the first difference threshold.
[0371] Optionally, the acquisition module 3001 is further used to obtain a corresponding relationship between the resistivity of the wiring resistance and the temperature;
[0372] The determination module 3002 is further used to determine the target resistivity corresponding to the temperature in each set of first calibration data according to the corresponding relationship between the resistivity and the temperature, so as to obtain the target resistivity corresponding to each set of first calibration data;
[0373] The calculation module 3003 is further used to calculate the ratio of the first resistance calibration value to the target resistivity at the same temperature according to the temperature, the target resistivity and the first resistance calibration value corresponding to each set of the first calibration data, so as to obtain the ratios corresponding to a plurality of different temperatures;
[0374] The current detection device 3000 further includes: a screening module, configured to screen multiple groups of first target data from multiple groups of first calibration data, wherein the difference between the ratios corresponding to each two groups of first target data at different temperatures is less than a second difference threshold;
[0375] The fitting module is also used to fit a first temperature-resistance relationship according to the temperatures and first resistance calibration values corresponding to the multiple sets of first target data.
[0376] Optionally, the ratios corresponding to every two groups of first target data at different temperatures are equal.
[0377] Optionally, the current detection device 3000 further includes: a calibration processing module, which is used to perform resistance accuracy calibration processing for a plurality of different second reference currents for the wiring resistance, and obtain a second resistance calibration value of the wiring resistance corresponding to the plurality of different second reference currents at the same set temperature. The resistance accuracy calibration processing includes:
[0378] The output current of the reference power supply is adjusted to adjust the second reference current passing through the discrete resistor, and the difference between the target channel current and the second reference current is controlled to be less than the first difference threshold. When the wiring resistor is at a set temperature, the first voltage drop of the wiring resistor and the second voltage drop of the discrete resistor are collected. According to the resistance value of the discrete resistor and the first voltage drop and the second voltage drop collected at the set temperature, a second calibration resistance value of the wiring resistor corresponding to a second reference current at the set temperature is calculated.
[0379] Optionally, the determination module 3002 is also used to: obtain the current voltage drop of the discrete resistor detected by the sampling control unit, and calculate the target current passing through the discrete resistor; determine the ratio of the first target calibration value to the second target calibration value, the first target calibration value being: the second resistor calibration value of the second reference current equal to the target current, and the second target calibration value being: the second resistor calibration value of the second reference current equal to the first reference current; determine the target resistance of the target mirror resistor based on the corresponding relationship between the temperature and the resistance of the target mirror resistor, the target temperature, and the ratio of the first target calibration value to the second target calibration value.
[0380] Optionally, the determination module 3002 is also used to: calculate the first resistance corresponding to the target temperature according to the first temperature-resistance relationship of the target mirror resistor; calculate the first resistance corresponding to the target current according to the ratio of the first target calibration value to the second target calibration value and the first resistance, so as to obtain the target resistance of the target mirror resistor.
[0381] Optionally, the acquisition module is further used to acquire the temperature of the PCB standard trace resistor, the third voltage drop of each PCB standard trace resistor, and the fourth voltage drop of the discrete resistor for any one of the at least one PCB standard trace resistor at multiple different operating times of the current detection circuit to obtain multiple groups of second calibration data;
[0382] The calculation module 3003 is further used to calculate the channel current of each PCB standard wiring resistor and the third reference current of the discrete resistor corresponding to each set of second calibration data according to the initial design resistance value of each PCB standard wiring resistor and the resistance value of the discrete resistor;
[0383] A screening module, used for screening multiple groups of second target data from multiple groups of second calibration data, wherein the difference between the third reference current corresponding to each group of second target data and the channel current of the wiring resistance is less than a third difference threshold, and the temperature corresponding to each group of second target data is different;
[0384] The calculation module 3003 is further used to calculate the third resistance calibration value of the routing resistance corresponding to each set of second target data according to the resistance value of the discrete resistor, the third voltage drop and the fourth voltage drop in the plurality of sets of second target data;
[0385] A fitting module, used for fitting a second temperature-resistance relationship of the wiring resistance according to the temperature and the third resistance calibration value corresponding to the plurality of sets of second target data, and obtaining the second temperature-resistance relationship of the wiring resistance of each PCB standard wiring resistance;
[0386] The acquisition module 3001 is also used to acquire a second temperature-resistance relationship of the target standard resistor; and convert the first temperature-resistance relationship into a first temperature-resistance relationship of the target mirror resistor according to the resistance conversion coefficient.
[0387] In an embodiment of the present application, when detecting the current of any first load module, a target voltage drop of a target mirror resistor detected by a sampling control unit and a target temperature of a target mirror resistor detected by a temperature detection unit are obtained, where the target mirror resistor is a PCB mirror wiring resistor connected in series with the detected first load module; a corresponding relationship between the temperature and the resistance of the target mirror resistor is obtained, where the corresponding relationship is determined based on a corresponding relationship between the temperature and the resistance of a target standard resistor and a resistance conversion coefficient of the target mirror resistor, where the resistance conversion coefficient is determined based on a wiring length ratio and a wiring width ratio of the target standard resistor and the target mirror resistor; a target resistance of the target mirror resistor is determined based on a corresponding relationship between the temperature and the resistance of the target mirror resistor and the target temperature; and a current passing through the target mirror resistor is calculated based on the target resistance and the target voltage drop to obtain the current of the first load module, thereby realizing current detection of the first load module connected to the current detection circuit. Compared with the related art, the current detection circuit of the present application mainly uses PCB standard routing resistors and PCB mirror routing resistors for current detection, and the volume of PCB standard routing resistors and PCB mirror routing resistors is smaller than that of discrete resistors, and the number of resistor groups, and / or the number of PCB mirror routing resistors in a single resistor group can be multiple, and the current of multiple first load modules connected in series with multiple PCB mirror routing resistors can be detected to realize multi-channel current sampling. Therefore, in the technical solution of the present application, the current detection circuit that uses the resistor group for current detection reduces the circuit volume and the circuit's occupation of equipment space on the basis of realizing multi-channel current sampling, and improves the miniaturization of the multi-channel current detection circuit.
[0388] The current detection device in the embodiment of the present application may be a component such as an integrated circuit or a chip. The current detection device in the embodiment of the present application may be a device with an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application. The current detection device provided in the embodiment of the present application can realize Fig.29 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0389] Optionally, an embodiment of the present application further provides an electronic device. The electronic device may include the current detection circuit provided in the embodiment of the present application. Alternatively, the electronic device includes the PCB assembly provided in the embodiment of the present application. For example, the electronic device includes Figures 5 to 20 , Figure 25 to Figure 27 Any of the current sensing circuit / PCB assemblies shown.
[0390] Alternatively, if Fig.31As shown, the electronic device 3100 provided in the embodiment of the present application also includes a processor 3101 and a memory 3102. The memory 3102 stores programs or instructions that can be executed on the processor 3101. When the program or instructions are executed by the processor 3101, the various steps of the above-mentioned current detection method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0391] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices described above. For example, the electronic device may be a terminal, or may be other devices other than a terminal. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and may also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiments of the present application.
[0392] Fig.32 A schematic diagram of the hardware structure of an electronic device for implementing an embodiment of the present application. The electronic device 3200 includes, but is not limited to, components such as a radio frequency unit 3201, a network module 3202, an audio output unit 3203, an input unit 3204, a sensor 3205, a display unit 3206, a user input unit 3207, an interface unit 3208, a memory 3209, and a processor 3210. The electronic device 3200 also includes a current detection circuit provided in an embodiment of the present application. Alternatively, the electronic device 3200 also includes a PCB assembly provided in an embodiment of the present application.
[0393] Those skilled in the art will appreciate that the electronic device 3200 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 3210 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.32The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0394] Among them, the processor 3210 is used to: when detecting the current of any first load module, obtain the target voltage drop of the target mirror resistor detected by the sampling control unit and the target temperature of the target mirror resistor detected by the temperature detection unit, where the target mirror resistor is a PCB mirror wiring resistor connected in series with the detected first load module; obtain the corresponding relationship between the temperature and the resistance of the target mirror resistor, the corresponding relationship is determined according to the corresponding relationship between the temperature and the resistance of the target standard resistor and the resistance conversion coefficient of the target mirror resistor, and the resistance conversion coefficient is determined according to the wiring length ratio and the wiring width ratio of the target standard resistor and the target mirror resistor; determine the target resistance of the target mirror resistor according to the corresponding relationship between the temperature and the resistance of the target mirror resistor and the target temperature; calculate the current passing through the target mirror resistor according to the target resistance and the target voltage drop, and obtain the current of the first load module.
[0395] In an embodiment of the present application, when detecting the current of any first load module, a target voltage drop of a target mirror resistor detected by a sampling control unit and a target temperature of a target mirror resistor detected by a temperature detection unit are obtained, where the target mirror resistor is a PCB mirror wiring resistor connected in series with the detected first load module; a corresponding relationship between the temperature and the resistance of the target mirror resistor is obtained, where the corresponding relationship is determined based on a corresponding relationship between the temperature and the resistance of a target standard resistor and a resistance conversion coefficient of the target mirror resistor, where the resistance conversion coefficient is determined based on a wiring length ratio and a wiring width ratio of the target standard resistor and the target mirror resistor; a target resistance of the target mirror resistor is determined based on a corresponding relationship between the temperature and the resistance of the target mirror resistor and the target temperature; and a current passing through the target mirror resistor is calculated based on the target resistance and the target voltage drop to obtain the current of the first load module, thereby realizing current detection of the first load module connected to the current detection circuit. Compared with the related art, the current detection circuit of the present application mainly uses PCB standard routing resistors and PCB mirror routing resistors for current detection, and the volume of PCB standard routing resistors and PCB mirror routing resistors is smaller than that of discrete resistors, and the number of resistor groups, and / or the number of PCB mirror routing resistors in a single resistor group can be multiple, and the current of multiple first load modules connected in series with multiple PCB mirror routing resistors can be detected to realize multi-channel current sampling. Therefore, in the technical solution of the present application, the current detection circuit that uses the resistor group for current detection reduces the circuit volume and the circuit's occupation of equipment space on the basis of realizing multi-channel current sampling, and improves the miniaturization of the multi-channel current detection circuit.
[0396] Optionally, the processor 3210 is further used to: for any routing resistor in at least one PCB standard routing resistor, control the difference between the target channel current and the first reference current to be less than a first difference threshold, the target channel current is the current flowing into the routing resistor, and the first reference current is the current passing through the discrete resistor; collect the first voltage drop of the routing resistor and the second voltage drop of the discrete resistor when the routing resistor is at multiple different temperatures, and obtain multiple groups of first calibration data; calculate the first resistance calibration value of the routing resistor corresponding to each group of first calibration data according to the resistance value of the discrete resistor, the first voltage drop and the second voltage drop in the multiple groups of first calibration data; according to the temperature corresponding to the multiple groups of first calibration data and the first resistance calibration value, fit the first temperature-resistance relationship of the routing resistor to obtain the first temperature-resistance relationship of each PCB standard routing resistor;
[0397] The processor 3210 is further configured to: obtain a first temperature-resistance relationship equation of the target standard resistor; and convert the first temperature-resistance relationship equation into a first temperature-resistance relationship equation of the target mirror resistor according to a resistance conversion coefficient.
[0398] Optionally, the number of PCB standard routing resistors is at least two; the current detection circuit also includes: a switch unit; a first end of the switch unit is connected to a reference power supply, and at least two second ends of the switch unit are connected one-to-one with the PCB standard routing resistors; the processor 3210 is also used to control the first end to be connected to the second end corresponding to the routing resistor, and to control the first end to be disconnected from the second end corresponding to other PCB resistors, and the other PCB resistors are PCB standard routing resistors other than the routing resistors among the at least two PCB standard routing resistors.
[0399] Optionally, the switch unit includes: at least two switch elements corresponding to at least two PCB standard routing resistors one by one, the first end of each switch element is connected to a reference power supply, and the second end of each switch element is connected to the corresponding PCB standard routing resistor; the processor 3210 is also used to control the first end of the switch element corresponding to the routing resistor to be connected to the second end, and the first end corresponding to other PCB resistors to be disconnected from the second end.
[0400] Optionally, the number of PCB standard routing resistors is at least two, and each PCB standard routing resistor is used to be connected in series with a second load module; the processor 3210 is also used to control the second load module connected in series with the routing resistor to be in a normal working state, and control the second load module connected in series with other PCB resistors to be in a closed state or a low-power working state, so that the total current passing through the other PCB resistors is less than the first difference threshold.
[0401] Optionally, the processor 3210 is also used to: obtain the corresponding relationship between the resistivity and temperature of the routing resistance; determine the target resistivity corresponding to the temperature in each group of first calibration data according to the corresponding relationship between the resistivity and the temperature, and obtain the target resistivity corresponding to each group of first calibration data; calculate the ratio of the first resistance calibration value to the target resistivity at the same temperature according to the temperature, target resistivity and first resistance calibration value corresponding to each group of first calibration data, and obtain ratios corresponding to multiple different temperatures; screen multiple groups of first target data from the multiple groups of first calibration data, and the difference between the ratios corresponding to each two groups of first target data at different temperatures is less than the second difference threshold.
[0402] The processor 3210 is further configured to obtain a first temperature-resistance relationship by fitting according to the temperatures and first resistance calibration values corresponding to the multiple sets of first target data.
[0403] Optionally, the ratios corresponding to every two groups of first target data at different temperatures are equal.
[0404] Optionally, the processor 3210 is further configured to perform resistance accuracy calibration processing for a plurality of different second reference currents for the wiring resistance, and obtain second resistance calibration values of the wiring resistance corresponding to the plurality of different second reference currents at the same set temperature, wherein the resistance accuracy calibration processing includes:
[0405] The output current of the reference power supply is adjusted to adjust the second reference current passing through the discrete resistor, and the difference between the target channel current and the second reference current is controlled to be less than a first difference threshold value.
[0406] The first voltage drop of the wiring resistance and the second voltage drop of the discrete resistor are collected when the wiring resistance is at the set temperature.
[0407] According to the resistance value of the discrete resistor, and the first voltage drop and the second voltage drop collected at the set temperature, a second calibration resistance value of the wiring resistance corresponding to a second reference current at the set temperature is calculated.
[0408] Optionally, the processor 3210 is further used to: obtain a current voltage drop of the discrete resistor detected by the sampling control unit, and calculate a target current passing through the discrete resistor; determine a ratio of a first target calibration value to a second target calibration value, the first target calibration value being: a second resistor calibration value of a second reference current equal to the target current, and the second target calibration value being: a second resistor calibration value of a second reference current equal to the first reference current; and determine a target resistance of the target mirror resistor based on a correspondence between a temperature and a resistance of the target mirror resistor, the target temperature, and the ratio of the first target calibration value to the second target calibration value.
[0409] Optionally, the processor 3210 is further used to: calculate a first resistance corresponding to the target temperature according to a first temperature-resistance relationship of the target mirror resistor; calculate a first resistance corresponding to the target current according to a ratio of the first target calibration value to the second target calibration value and the first resistance, to obtain a target resistance of the target mirror resistor.
[0410] Optionally, the processor 3210 is further used to: for any one of the at least one PCB standard trace resistors, at multiple different operating times of the current detection circuit, collect the temperature of the PCB standard trace resistor, the third voltage drop of each PCB standard trace resistor, and the fourth voltage drop of the discrete resistor to obtain multiple groups of second calibration data; calculate the channel current of each PCB standard trace resistor and the third reference current of the discrete resistor corresponding to each group of second calibration data according to the initial design resistance value of each PCB standard trace resistor and the resistance value of the discrete resistor; select multiple groups of second target data from the multiple groups of second calibration data, the difference between the third reference current corresponding to each group of second target data and the channel current of the trace resistor is less than the third difference threshold, and the temperature corresponding to each group of second target data is different; calculate the third resistance calibration value of the trace resistor corresponding to each group of second target data according to the resistance value of the discrete resistor, the third voltage drop and the fourth voltage drop in the multiple groups of second target data; and fit the second temperature-resistance relationship of the trace resistor according to the temperature corresponding to the multiple groups of second target data and the third resistance calibration value to obtain the second temperature-resistance relationship of each PCB standard trace resistor.
[0411] The processor 3210 is further configured to: obtain a second temperature-resistance relationship equation of the target standard resistor; and convert the first temperature-resistance relationship equation into a first temperature-resistance relationship equation of the target mirror resistor according to the resistance conversion coefficient.
[0412] In an embodiment of the present application, when detecting the current of any first load module, a target voltage drop of a target mirror resistor detected by a sampling control unit and a target temperature of a target mirror resistor detected by a temperature detection unit are obtained, where the target mirror resistor is a PCB mirror wiring resistor connected in series with the detected first load module; a corresponding relationship between the temperature and the resistance of the target mirror resistor is obtained, where the corresponding relationship is determined based on a corresponding relationship between the temperature and the resistance of a target standard resistor and a resistance conversion coefficient of the target mirror resistor, where the resistance conversion coefficient is determined based on a wiring length ratio and a wiring width ratio of the target standard resistor and the target mirror resistor; a target resistance of the target mirror resistor is determined based on a corresponding relationship between the temperature and the resistance of the target mirror resistor and the target temperature; and a current passing through the target mirror resistor is calculated based on the target resistance and the target voltage drop to obtain the current of the first load module, thereby realizing current detection of the first load module connected to the current detection circuit. Compared with the related art, the current detection circuit of the present application mainly uses PCB standard routing resistors and PCB mirror routing resistors for current detection, and the volume of PCB standard routing resistors and PCB mirror routing resistors is smaller than that of discrete resistors, and the number of resistor groups, and / or the number of PCB mirror routing resistors in a single resistor group can be multiple, and the current of multiple first load modules connected in series with multiple PCB mirror routing resistors can be detected to realize multi-channel current sampling. Therefore, in the technical solution of the present application, the current detection circuit that uses the resistor group for current detection reduces the circuit volume and the circuit's occupation of equipment space on the basis of realizing multi-channel current sampling, and improves the miniaturization of the multi-channel current detection circuit.
[0413] It should be understood that in the embodiment of the present application, the input unit 3204 may include a graphics processor (Graphics Processing Unit, GPU) 32041 and a microphone 32042, and the graphics processor 32041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 3206 may include a display panel 32061, and the display panel 32061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 3207 includes a touch panel 32071 and at least one of other input devices 32072. The touch panel 32071 is also called a touch screen. The touch panel 32071 may include two parts: a touch detection device and a touch controller. Other input devices 32072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0414] The memory 3209 can be used to store software programs and various data. The memory 3209 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 3209 may include a volatile memory or a non-volatile memory, or the memory 3209 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 3209 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0415] The processor 3210 may include one or more processing units; optionally, the processor 3210 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 3210.
[0416] The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by the processor, each process of the above-mentioned current detection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a disk or an optical disk, etc.
[0417] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned current detection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0418] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0419] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the current detection method embodiment as described above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0420] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0421] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0422] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A current detection method, characterized in that: The invention is applied to a current detection circuit, wherein the current detection circuit comprises: a sampling control unit, a reference power supply, a discrete resistor, a temperature detection unit and at least one printed circuit board (PCB) resistor group, wherein the PCB resistor group comprises at least one PCB standard routing resistor and at least one PCB mirror routing resistor arranged on the same PCB routing layer; each of the PCB mirror routing resistors is used to be connected in series with a first load module; the sampling control unit is respectively connected to the discrete resistor, the PCB standard routing resistor and the PCB mirror routing resistor to detect the voltage drop of the discrete resistor, the PCB standard routing resistor and the PCB mirror routing resistor; the temperature detection unit is used to detect the temperature of the PCB standard routing resistor and the PCB mirror routing resistor; the positive electrode of the reference power supply is respectively connected to one end of each of the PCB standard routing resistors through the discrete resistor; or the positive electrode of the reference power supply is connected to one end of each of the PCB standard routing resistors, and the other end of each of the PCB standard routing resistors is connected to the discrete resistor; the method comprises: In the case of detecting the current of any of the first load modules, obtaining a target voltage drop of a target mirror resistor detected by the sampling control unit and a target temperature of the target mirror resistor detected by the temperature detection unit, wherein the target mirror resistor is the PCB mirror wiring resistor connected in series with the detected first load module; Obtaining a correspondence between the temperature and the resistance of the target mirror resistor, wherein the correspondence is determined according to a correspondence between the temperature and the resistance of the target standard resistor and a resistance conversion coefficient of the target mirror resistor, wherein the resistance conversion coefficient is determined according to a wiring length ratio and a wiring width ratio of the target standard resistor and the target mirror resistor; Determining a target resistance value of the target mirror resistor according to a corresponding relationship between a temperature and a resistance value of the target mirror resistor and the target temperature; According to the target resistance value and the target voltage drop, the current passing through the target mirror resistor is calculated to obtain the current of the first load module.
2. The method according to claim 1, characterized in that Before detecting the current of any of the first load modules, the method further includes: For any routing resistor of the at least one PCB standard routing resistor, controlling the difference between a target channel current and a first reference current to be less than a first difference threshold, the target channel current being the current flowing into the routing resistor, and the first reference current being the current passing through the discrete resistor; Collecting a first voltage drop of the wiring resistor and a second voltage drop of the discrete resistor when the wiring resistor is at a plurality of different temperatures to obtain a plurality of groups of first calibration data; Calculate a first resistance calibration value of the routing resistor corresponding to each set of the first calibration data according to the resistance value of the discrete resistor, the first voltage drop and the second voltage drop in the plurality of sets of the first calibration data; According to the temperatures and first resistance calibration values corresponding to the plurality of groups of the first calibration data, a first temperature-resistance relationship equation of the wiring resistor is obtained by fitting, and a first temperature-resistance relationship equation of each of the PCB standard wiring resistors is obtained; The obtaining of the corresponding relationship between the temperature and the resistance of the target mirror resistor comprises: obtaining a first temperature-resistance relationship of the target standard resistor; The first temperature-resistance relationship is converted into a first temperature-resistance relationship of the target mirror resistor according to the resistance conversion coefficient.
3. The method according to claim 2, characterized in that The number of the PCB standard wiring resistors is at least two; the current detection circuit further includes: a switch unit; a first end of the switch unit is connected to the reference power supply, and at least two second ends of the switch unit are connected to the PCB standard wiring resistors in a one-to-one correspondence; the difference between the control target channel current and the first reference current is less than a first difference threshold, including: The first end is controlled to be connected to the second end corresponding to the routing resistor, and the first end is controlled to be disconnected from the second end corresponding to other PCB resistors, where the other PCB resistors are PCB standard routing resistors other than the routing resistor among at least two of the PCB standard routing resistors.
4. The method according to claim 3, characterized in that The switch unit comprises: at least two switch elements corresponding to at least two PCB standard wiring resistors one by one, a first end of each switch element being connected to the reference power supply, and a second end of each switch element being connected to the corresponding PCB standard wiring resistor; the first end being controlled to be connected to the second end corresponding to the wiring resistor, and the first end being controlled to be disconnected from the second end corresponding to the other PCB resistors, comprising: The first end of the switch element corresponding to the routing resistor is controlled to be connected to the second end, and the first end corresponding to the other PCB resistor is disconnected from the second end.
5. The method according to claim 2, characterized in that: The number of the PCB standard wiring resistors is at least two, and each of the PCB standard wiring resistors is used to be connected in series with a second load module; The controlling the difference between the target channel current and the first reference current to be smaller than a first difference threshold value comprises: The second load module connected in series with the routing resistor is controlled to be in a normal working state, and the second load module connected in series with other PCB resistors is controlled to be in a closed state or a low-power working state, so that the total current passing through the other PCB resistors is less than the first difference threshold.
6. The method according to claim 2, characterized in that The method further comprises: Obtaining a corresponding relationship between the resistivity of the wiring resistance and the temperature; Determine, according to the correspondence between the resistivity and the temperature, a target resistivity corresponding to the temperature in each set of the first calibration data, to obtain a target resistivity corresponding to each set of the first calibration data; According to the temperature corresponding to each set of the first calibration data, the target resistivity, and the first resistance calibration value, calculating a ratio of the first resistance calibration value to the target resistivity at the same temperature, to obtain ratios corresponding to a plurality of different temperatures; Selecting multiple groups of first target data from multiple groups of first calibration data, wherein the difference between the ratios corresponding to each two groups of the first target data at different temperatures is less than a second difference threshold; The fitting of the first temperature-resistance relationship of the routing resistance according to the temperature and the first resistance calibration value corresponding to the multiple sets of the first calibration data includes: fitting the first temperature-resistance relationship according to the temperature and the first resistance calibration value corresponding to the multiple sets of the first target data.
7. The method according to claim 6, characterized in that The ratios corresponding to each two groups of the first target data at different temperatures are equal.
8. The method according to claim 2, characterized in that: The method further comprises: For the wiring resistance, a resistance accuracy calibration process for a plurality of different second reference currents is performed to obtain a second resistance calibration value of the wiring resistance corresponding to the plurality of different second reference currents at the same set temperature, wherein the resistance accuracy calibration process includes: adjusting the output current of the reference power supply to adjust the second reference current passing through the discrete resistor, and controlling the difference between the target channel current and the second reference current to be less than a first difference threshold, collecting a first voltage drop of the wiring resistor and a second voltage drop of the discrete resistor when the wiring resistor is at the set temperature, A second calibration resistance value of the wiring resistance corresponding to the second reference current at the set temperature is calculated based on the resistance value of the discrete resistor and the first voltage drop and the second voltage drop collected at the set temperature.
9. The method according to claim 8, characterized in that The step of determining the target resistance of the target mirror resistor according to the corresponding relationship between the temperature and the resistance of the target mirror resistor and the target temperature includes: Acquire a current voltage drop of the discrete resistor detected by the sampling control unit, and calculate a target current passing through the discrete resistor; Determine a ratio of a first target calibration value to a second target calibration value, wherein the first target calibration value is: a second resistance calibration value of the second reference current having a value equal to the target current, and the second target calibration value is: a second resistance calibration value of the second reference current having a value equal to the first reference current; The target resistance of the target mirror resistor is determined according to the corresponding relationship between the temperature and the resistance of the target mirror resistor, the target temperature, and the ratio of the first target calibration value to the second target calibration value.
10. The method according to claim 9, characterized in that The determining the target resistance of the target mirror resistor according to the correspondence between the temperature and the resistance of the target mirror resistor, the target temperature, and the ratio of the first target calibration value to the second target calibration value includes: Calculating a first resistance value corresponding to the target temperature according to a first temperature-resistance value relationship of the target mirror resistor; The first resistance value corresponding to the target current is calculated according to the ratio of the first target calibration value to the second target calibration value and the first resistance value, so as to obtain the target resistance value of the target mirror resistor.
11. The method according to claim 1, characterized in that: The method further comprises: For any one of the at least one PCB standard wiring resistors, at a plurality of different operating moments of the current detection circuit, the temperature of the PCB standard wiring resistor, the third voltage drop of each of the PCB standard wiring resistors, and the fourth voltage drop of the discrete resistor are collected to obtain a plurality of sets of second calibration data; Calculating the channel current of each of the PCB standard wiring resistors and the third reference current of the discrete resistor corresponding to each set of the second calibration data according to the initial design resistance value of each of the PCB standard wiring resistors and the resistance value of the discrete resistor; Screening a plurality of groups of second target data from the plurality of groups of second calibration data, wherein a difference between the third reference current and the channel current of the routing resistor corresponding to each group of the second target data is less than a third difference threshold, and each group of the second target data corresponds to a different temperature; Calculating a third resistance calibration value of the routing resistor corresponding to each set of the second target data according to the resistance value of the discrete resistor, the third voltage drop and the fourth voltage drop in the plurality of sets of the second target data; According to the temperature and the third resistance calibration value corresponding to the plurality of groups of the second target data, a second temperature-resistance relationship formula of the wiring resistance is obtained by fitting, and a second temperature-resistance relationship formula of each of the PCB standard wiring resistances is obtained; The obtaining of the corresponding relationship between the temperature and the resistance of the target wiring resistor comprises: obtaining a second temperature-resistance relationship of the target standard resistor; The first temperature-resistance relationship is converted into a first temperature-resistance relationship of the target mirror resistor according to the resistance conversion coefficient.
12. A current detection circuit, characterized in that: The current detection circuit comprises: a control unit, a reference power supply, a discrete resistor, a temperature detection unit and at least one printed circuit board (PCB) resistor group, wherein the PCB resistor group comprises at least one PCB standard routing resistor and at least one PCB mirror routing resistor arranged on the same PCB routing layer; Each of the PCB mirror wiring resistors is used to be connected in series with a first load module; The temperature detection unit is used to detect the temperature of the PCB standard wiring resistance and the PCB mirror wiring resistance; The positive electrode of the reference power supply is connected to one end of each of the PCB standard wiring resistors through the discrete resistors; or, the positive electrode of the reference power supply is connected to one end of each of the PCB standard wiring resistors, and the other end of each of the PCB standard wiring resistors is connected to the discrete resistor, and the reference power supply is used to provide current to each of the PCB standard wiring resistors; The sampling control unit is respectively connected to the discrete resistor, the PCB standard routing resistor and the PCB mirror routing resistor, and the sampling control unit is used to detect the voltage drop of the discrete resistor, the PCB standard routing resistor and the PCB mirror routing resistor; the sampling control unit is also used to calculate the current passing through the PCB mirror routing resistor according to the voltage drop and temperature of the PCB mirror routing resistors in the same group, and the corresponding relationship between the resistance value and temperature of the PCB standard routing resistor, so as to obtain the current of the first load module connected in series with the PCB mirror routing resistor.
13. The current detection circuit according to claim 12, characterized in that: The number of the PCB standard wiring resistors is at least two, and the current detection circuit further includes: a switch unit; The first end of the switch unit is connected to the reference power supply, and at least two second ends of the switch unit are connected to the PCB standard wiring resistors in a one-to-one correspondence. The switch unit is used to control the PCB standard wiring resistors that are connected to the reference power supply.
14. The current detection circuit according to claim 13, characterized in that: The switch unit includes: at least two switch elements corresponding to at least two PCB standard wiring resistors one by one, a first end of each switch element is connected to the reference power supply, and a second end of each switch element is connected to the corresponding PCB standard wiring resistor; the switch element is used to control the PCB standard wiring resistor that is connected to the reference power supply.
15. The current detection circuit according to claim 12, characterized in that: The sampling points at both ends of the PCB standard wiring resistor are respectively connected to the sampling control unit, and the wiring length of the PCB standard wiring resistor is the length between the sampling points at both ends of the PCB standard wiring resistor; The sampling points at both ends of the PCB mirror wiring resistor are respectively connected to the sampling control unit, and the wiring length of the PCB mirror wiring resistor is the length between the sampling points at both ends of the PCB mirror wiring resistor.
16. The current detection circuit according to claim 12, characterized in that: The electric field direction of the PCB standard wiring resistor after power-on is consistent with the length direction of the PCB standard wiring resistor; The electric field direction of the PCB mirror wiring resistor after power-on is consistent with the length direction of the PCB mirror wiring resistor.
17. A printed circuit board (PCB) assembly, characterized in that: The PCB assembly comprises: a PCB and a current detection circuit as described in any one of claims 12 to 16, wherein the PCB comprises a plurality of wiring layers and a plurality of insulating medium layers, and the wiring layers and the insulating medium layers are alternately stacked; The reference power supply, the discrete resistor, the sampling control unit and the first load module are arranged on the surface layer of the PCB, the PCB standard routing resistor and the PCB mirror routing resistor of the same resistor group are arranged on the same target routing layer, and the target routing layer is any routing layer of the multiple routing layers. The temperature detection unit is connected to the PCB standard routing resistor and the PCB mirror routing resistor, or the temperature detection unit is arranged near the PCB standard routing resistor and the PCB mirror routing resistor.
18. The PCB assembly according to claim 17, characterized in that: The sampling points at both ends of the PCB standard wiring resistor are respectively connected to the sampling control unit, and the wiring length of the PCB standard wiring resistor is the length between the sampling points at both ends of the PCB standard wiring resistor; The sampling points at both ends of the PCB mirror wiring resistor are respectively connected to the sampling control unit, and the wiring length of the PCB mirror wiring resistor is the length between the sampling points at both ends of the PCB mirror wiring resistor.
19. The PCB assembly according to claim 18, characterized in that: The positive electrode of the reference power supply is connected to the PCB trace at one end of each of the PCB standard trace resistors through the discrete resistors, and the PCB trace at the other end of each of the PCB standard trace resistors is grounded; Alternatively, the positive electrode of the reference power supply is connected to the PCB trace at one end of each of the PCB standard trace resistors through the discrete resistors, and the PCB trace at the other end of each of the PCB standard trace resistors is connected to the negative electrode of the reference power supply; Alternatively, the positive electrode of the reference power supply is connected to the PCB trace at one end of each of the PCB standard trace resistors, and the PCB trace at the other end of each of the PCB standard trace resistors is grounded through the discrete resistor; Alternatively, the positive electrode of the reference power supply is connected to the PCB trace at one end of each of the PCB standard trace resistors, and the PCB trace at the other end of each of the PCB standard trace resistors is connected to the negative electrode of the reference power supply through the discrete resistor.
20. The PCB assembly according to claim 17, wherein: The electric field direction of the PCB standard wiring resistor after power-on is consistent with the length direction of the PCB standard wiring resistor; The electric field direction of the PCB mirror wiring resistor after power-on is consistent with the length direction of the PCB mirror wiring resistor.
21. The PCB assembly according to claim 17, wherein: The reference power source, the discrete resistor and the sampling control unit are arranged on one surface layer of the PCB, and the first load module is arranged on another surface layer of the PCB.
22. The PCB assembly according to claim 17, characterized in that: The PCB standard routing resistor is connected to the discrete resistor through a via, the PCB mirror routing resistor is connected to the first load module through a via, and the sampling control unit is connected to the PCB standard routing resistor and the PCB mirror routing resistor through a via.
23. An electronic device, characterized in that: The electronic device comprises the current detection circuit according to any one of claims 12 to 16, or comprises the printed circuit board (PCB) assembly according to any one of claims 17 to 22.
