Disclosure of Invention
In order to solve the above problems, the present invention provides a power consumption testing apparatus and method for a communication module, which can improve the triangular wave symmetry of the output triangular wave symmetry output.
The technical scheme adopted for solving the technical problems is as follows:
on one hand, the power consumption testing device of the communication module provided by the embodiment of the invention comprises a testing tool, a power supply conversion circuit, a current sampling circuit and a voltage acquisition circuit; the power supply conversion circuit supplies power to the communication module to be tested through the current sampling circuit, and the current sampling circuit samples the current of the communication module in real time to obtain a current value I of the communication moduleloadAnd sending the voltage to the test tool, and the voltage acquisition circuit samples the real-time voltage of the communication module to acquire a module voltage value VloadAnd sending the power consumption to the test tool, wherein the test tool calculates the real-time power consumption of the communication module.
As a possible implementation manner of this embodiment, the control chip of the test fixture is an STM32F series single chip microcomputer;
the power conversion circuit comprises a power conversion chip and a peripheral circuit thereof, the current sampling circuit is an AD8212 current sampling chip and a peripheral circuit thereof, and the communication module is an HPLC module.
As a possible implementation manner of this embodiment, the current value I of the communication moduleloadThe calculation formula of (2) is as follows:
wherein, VoutIs the output voltage, V, of the AD8212 current sampling chipaThe internal reference voltage of the AD8212 current sampling chip is obtained, and R is the resistance value of the communication module.
As a possible implementation manner of this embodiment, the voltage acquisition circuit includes a first resistor R36 and a second resistor R40 connected in series, and the other end of the first resistor R36 is connected to the voltage acquisition circuitA communication module voltage value V with the communication moduleloadThe other end of the second resistor R40 is grounded; the output voltage V of the voltage acquisition circuitADCH4Is connected between the first resistor R36 and the second resistor R40;
the communication module voltage value VloadThe calculation formula of (2) is as follows:
as a possible implementation manner of this embodiment, a power consumption calculation formula of the communication module is as follows:
Pload=Vload*Iload。
as a possible implementation manner of this embodiment, the communication module has a super capacitor;
the power consumption calculation formula of the communication module is as follows:
Pk=Vload*Iload*δ(k)
wherein, delta (k) is the power consumption coefficient of the super capacitor.
As a possible implementation manner of this embodiment, the power consumption of the communication module includes static power consumption and dynamic power consumption; the static power consumption of the communication module is the power consumption of the communication module after being electrified, and the dynamic power consumption of the communication module is the power consumption of the networking transmitting state of the communication module.
On the other hand, a power consumption testing method for a communication module provided by the embodiment of the present invention includes:
testing the static power consumption of the communication module;
and testing the dynamic power consumption of the communication module.
As a possible implementation manner of this embodiment, the process of testing the static power consumption of the communication module includes the following steps:
the upper computer sends a power-on command to the testing tool, the testing tool completes the power-on action after receiving the command and enables the communication module to be connected with working voltage, the testing tool starts to detect the real-time power consumption of the communication module and obtains a stable average value, and the upper computer waits for reading;
the upper computer sends a command for reading a static power consumption result;
the test tool receives the command, performs data acquisition and power consumption processing and sends a power consumption calculation result to the upper computer to judge the qualification of the numerical value;
the upper computer sends a power-off command to the test tool, and the test tool completes the power-off action and enables the module to lose the working voltage after receiving the command.
As a possible implementation manner of this embodiment, the process of the dynamic power consumption test of the communication module includes the following steps:
the upper computer sends a power-on command to the test tool, and the test tool completes the power-on action after receiving the command and enables the module to be connected with the working voltage;
after the upper computer completes module networking, sending a meter reading command to the module, sending data to the module, simultaneously carrying out power consumption detection calculation on the module by the test tool to obtain a stable average value, and waiting for the upper computer to read;
the upper computer sends a command for reading the dynamic power consumption result to the test tool;
the test tool receives the command, performs data acquisition and power consumption processing and sends a power consumption calculation result to the upper computer to judge the qualification of the numerical value;
the upper computer sends a power-off command to the test tool, and the test tool completes the power-off action after receiving the command, enables the module to lose working voltage and completes dynamic power consumption test.
As a possible implementation manner of this embodiment, the process of performing data acquisition and power consumption processing by the test fixture specifically includes:
the current sampling circuit samples the current of the communication module in real time and obtains the current value I of the communication moduleloadSending the current value to a test tool, and obtaining the current value I of the communication moduleloadThe calculation formula of (2) is as follows:
wherein, VoutIs the output voltage, V, of the AD8212 current sampling chipaThe current sampling chip is the internal reference voltage of the AD8212 current sampling chip, and R is the resistance value of the communication module;
the voltage acquisition circuit samples the voltage of the communication module in real time and acquires a module voltage value VloadSending the data to a test tool; voltage value V of communication moduleloadThe calculation formula of (2) is as follows:
r36 and R40 are two series resistors of a voltage acquisition circuit, VADCH4Is the output voltage of the voltage acquisition circuit;
the test tool calculates the real-time power consumption of the communication module; the power consumption calculation formula of the communication module is as follows:
Pload=Vload*Iload。
as a possible implementation manner of this embodiment, when the communication module has a super capacitor, a power consumption calculation formula of the communication module is as follows:
Pk=Vload*Iload*δ(k)
wherein, delta (k) is the power consumption coefficient of the super capacitor.
The technical scheme of the embodiment of the invention has the following beneficial effects:
the power supply conversion circuit is used for supplying power to a communication module to be tested through the current sampling circuit, and the current sampling circuit samples the current of the communication module in real time to obtain a module current value IloadAnd sending the voltage value to a test tool, and carrying out real-time voltage sampling on the communication module by a voltage acquisition circuit to acquire a module voltage value VloadAnd sending the data to a test tool, and then calculating the real-time power consumption of the communication module by the test tool. The invention can detect the static power consumption and the dynamic power consumption of the communication module (especially an HPLC module) in real time, especially the power consumption of the communication module with a super capacitor, and the detection is accurate and convenient.
Detailed Description
The invention is further illustrated by the following examples in conjunction with the accompanying drawings:
in order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
Fig. 1 is a schematic block diagram illustrating a power consumption testing apparatus of a communication module according to an exemplary embodiment. As shown in fig. 1, a power consumption testing apparatus for a communication module according to an embodiment of the present invention includes a testing tool, a power conversion circuit, a current sampling circuit, and a voltage acquisition circuit; the power conversion circuitThe current sampling circuit supplies power to a communication module to be tested, and the current sampling circuit samples the real-time current of the communication module to obtain a current value I of the communication moduleloadAnd sending the voltage to the test tool, and the voltage acquisition circuit samples the real-time voltage of the communication module to acquire a module voltage value VloadAnd sending the power consumption to the test tool, wherein the test tool calculates the real-time power consumption of the communication module.
As a possible implementation manner of this embodiment, the control chip of the test fixture is an STM32F series single chip microcomputer;
the power conversion circuit comprises a power conversion chip and a peripheral circuit thereof, the current sampling circuit is an AD8212 current sampling chip and a peripheral circuit thereof, and the communication module is an HPLC module.
As a possible implementation manner of this embodiment, the current value I of the communication moduleloadThe calculation formula of (2) is as follows:
wherein, VoutIs the output voltage, V, of the AD8212 current sampling chipaThe internal reference voltage of the AD8212 current sampling chip is obtained, and R is the resistance value of the communication module.
As a possible implementation manner of this embodiment, the voltage acquisition circuit includes a first resistor R36 and a second resistor R40 connected in series, and the other end of the first resistor R36 is connected to the communication module voltage value V of the communication moduleloadThe other end of the second resistor R40 is grounded; the output voltage V of the voltage acquisition circuitADCH4Is connected between the first resistor R36 and the second resistor R40;
the communication module voltage value VloadThe calculation formula of (2) is as follows:
as a possible implementation manner of this embodiment, a power consumption calculation formula of the communication module is as follows:
Pload=Vload*Iload。
as a possible implementation manner of this embodiment, the communication module has a super capacitor;
the power consumption calculation formula of the communication module is as follows:
Pk=Vload*Iload*δ(k)
wherein, delta (k) is the power consumption coefficient of the super capacitor.
As a possible implementation manner of this embodiment, the power consumption of the communication module includes static power consumption and dynamic power consumption; the static power consumption of the communication module is the power consumption of the communication module after being electrified, and the dynamic power consumption of the communication module is the power consumption of the networking transmitting state of the communication module.
The embodiment of the invention also provides a power consumption testing method of the communication module, which comprises the following steps:
testing the static power consumption of the communication module;
and testing the dynamic power consumption of the communication module.
As a possible implementation manner of this embodiment, the process of testing the static power consumption of the communication module includes the following steps:
the upper computer sends a power-on command to the testing tool, the testing tool completes the power-on action after receiving the command and enables the communication module to be connected with working voltage, the testing tool starts to detect the real-time power consumption of the communication module and obtains a stable average value, and the upper computer waits for reading;
the upper computer sends a command for reading a static power consumption result;
the test tool receives the command, performs data acquisition and power consumption processing and sends a power consumption calculation result to the upper computer to judge the qualification of the numerical value;
the upper computer sends a power-off command to the test tool, and the test tool completes the power-off action and enables the module to lose the working voltage after receiving the command.
As a possible implementation manner of this embodiment, the process of the dynamic power consumption test of the communication module includes the following steps:
the upper computer sends a power-on command to the test tool, and the test tool completes the power-on action after receiving the command and enables the module to be connected with the working voltage;
after the upper computer completes module networking, sending a meter reading command to the module, sending data to the module, simultaneously carrying out power consumption detection calculation on the module by the test tool to obtain a stable average value, and waiting for the upper computer to read;
the upper computer sends a command for reading the dynamic power consumption result to the test tool;
the test tool receives the command, performs data acquisition and power consumption processing and sends a power consumption calculation result to the upper computer to judge the qualification of the numerical value;
the upper computer sends a power-off command to the test tool, and the test tool completes the power-off action after receiving the command, enables the module to lose working voltage and completes dynamic power consumption test.
As a possible implementation manner of this embodiment, the process of performing data acquisition and power consumption processing by the test fixture specifically includes:
the current sampling circuit samples the current of the communication module in real time and obtains the current value I of the communication moduleloadSending the current value to a test tool, and obtaining the current value I of the communication moduleloadThe calculation formula of (2) is as follows:
wherein, VoutIs the output voltage, V, of the AD8212 current sampling chipaThe current sampling chip is the internal reference voltage of the AD8212 current sampling chip, and R is the resistance value of the communication module;
the voltage acquisition circuit samples the voltage of the communication module in real time and acquires a module voltage value VloadSending the data to a test tool; voltage value V of communication moduleloadThe calculation formula of (2) is as follows:
r36 and R40 are two series resistors of a voltage acquisition circuit, VADCH4Is the output voltage of the voltage acquisition circuit;
the test tool calculates the real-time power consumption of the communication module; the power consumption calculation formula of the communication module is as follows:
Pload=Vload*Iload。
as a possible implementation manner of this embodiment, when the communication module has a super capacitor, a power consumption calculation formula of the communication module is as follows:
Pk=Vload*Iload*δ(k)
wherein, delta (k) is the power consumption coefficient of the super capacitor.
Fig. 2 to 3 are schematic structural diagrams provided by the embodiment of the present invention, and for convenience of explanation, only the parts related to the embodiment of the present invention are shown. The embodiment of the power consumption testing device of the communication module comprises a testing tool, and a power supply conversion circuit, a current sampling circuit and a voltage acquisition circuit which are connected with the testing tool; the power supply conversion circuit is used for supplying power to a communication module to be tested through the current sampling circuit, and the current sampling circuit samples the real-time current of the communication module to obtain a module current value IloadAnd sending the voltage value to a test tool, and carrying out real-time voltage sampling on the communication module by a voltage acquisition circuit to acquire a module voltage value VloadAnd sending the data to a test tool, and then calculating the real-time power consumption of the communication module by the test tool.
In this embodiment, the control chip of the test fixture is an STM32F series, specifically, may be an STM32F103 chip, or may be a similar chip of another model or another company with the same function, and is not limited herein. The power conversion circuit comprises a power conversion chip and a peripheral circuit thereof, and the test tool sends a control signal to the power conversion circuit, so that the power conversion circuit provides 12V voltage to supply power to the communication module. The current sampling circuit is an AD8212 current sampling chip and a peripheral circuit thereof, and the communication module is an HPLC module. When the power conversion circuit supplies power to the communication module, the current sampling circuit and the voltage sampling circuit sample the current and the voltage of the communication module in real time, and then the real-time power consumption of the communication module is calculated.
Specifically, the HPLC module is a high-speed power line carrier, also called a broadband power line carrier, and is a broadband power line carrier technology for data transmission on a low-voltage power line. The broadband power line carrier communication network is a communication network which takes a power line as a communication medium and realizes the aggregation, transmission and interaction of the power utilization information of low-voltage power users. The broadband power line carrier mainly adopts an Orthogonal Frequency Division Multiplexing (OFDM) technology, and the frequency band uses 2MHz-12 MHz. Compared with the traditional low-speed narrowband power line carrier technology, the HPLC technology has large bandwidth and high transmission rate, and can meet the higher requirement of low-voltage power line carrier communication. HPLC modules are mainly classified into the following categories: the broadband carrier module of the single-phase meter and the I-type collector, the broadband carrier module of the three-phase meter, the broadband carrier module of the broadband carrier II-type collector and the concentrator, the copy controller of the broadband carrier and the like.
In this embodiment, the current sampling chip is an AD8128 current monitoring chip of ANALOG DEVICES, which linearly converts a monitored current value into a voltage value, and the pin is shown in fig. 3, where the OUT pin is an output pin of an acquisition result, and the test tool reads the voltage value converted by the pin.
In a typical application, the AD8218 amplifies a small differential input voltage generated by a load current flowing in a shunt resistor. The AD8218 can restrain high common mode voltage (maximum 80V), and provides buffer output taking ground as reference. Fig. 4 shows a simplified electrical schematic of the AD 8218. In this configuration, when the differential input voltage and the voltage at pin REF are both 0V, the internal reference voltage (80mV) is active and the output voltage becomes 80 mV. This internal reference voltage is very useful in unidirectional current measurements with a large range of monitored currents. Setting the output start point to 80mV means that the output voltage reaches 80mV when the load current flowing through the shunt resistance is 0A. In this way, it is possible to surely overcome an output error caused by an initial offset and an output saturation range of the amplifier. In this mode, the transfer function of the AD8218 is:
OUT(V)=(20×VIN)+0.08V
Vin=Iload*R
after the testing tool collects the VOUT voltage value, the consumed current Iload of the communication module is reversely deduced,
the module current value IloadThe calculation formula of (2) is as follows:
wherein, the VoutIs the output voltage of the AD8212 current sampling chip, VaThe internal reference voltage of the AD8212 current sampling chip is obtained, and R is the resistance of the communication module. Considering the instability of single sampling, the test tool performs sampling every 21us, and performs filtering calculation after sampling for 50 times to obtain the current value average value I.
In this embodiment, the voltage acquisition circuit comprises a first resistor R36 and a second resistor R40 connected in series, and the other end of the first resistor R36 is connected to the module voltage value V of the communication moduleloadThe other end of the second resistor R40 is grounded; the output voltage V of the voltage acquisition circuitADCH4Connected between the first resistor R36 and the second resistor R40. The voltage injected into the HPLC module is converted into a voltage range acceptable by the testing tool in a resistance voltage division mode, and the voltage value V is obtained after the voltage value of ADCH4 is collected by the single chip microcomputerADCH4Then, the voltage value of the communication module is reversely deduced, and the voltage value V of the moduleloadThe calculation formula of (2) is as follows:
considering the instability of single sampling, the single chip can perform sampling every 21us, filter calculation is performed once after sampling is performed 50 times to obtain the average value V of the voltage value of the current communication module, and the inside of the test tool is synchronously performed when the current value and the voltage value of the communication module are acquired.
For a communication module without a super capacitor, the power consumption calculation formula of the communication module is as follows:
Pload=Vload*Iload。
for a communication module with a super capacitor, the power consumption calculation of the super capacitor needs to obtain the current change slopes of the super capacitor of the module at different moments after the module is powered on in advance according to an experimental result so as to determine the current charging state of the super capacitor of the module. The calculation of power consumption requires determining the relevant calculation coefficient according to the change slope of the current module current.
Therefore, the power consumption calculation companies of the communication module are:
Pk=Vload*Iload*δ(k)
wherein δ (k) is a power consumption coefficient of the super capacitor. The obtained power consumption value of the communication module is a static power consumption value of a charging and discharging part of the filtered super capacitor, wherein delta (k) is a power consumption coefficient and is related to the current change slope of the current communication module, and the power consumption value is obtained according to experiments.
Within a period of time after the communication module is electrified, the current value consumed by the communication module slowly descends in a curve at different moments, after sampling, the change slope delta (k) of the current at different moments can be calculated, the slopes are stored in a test tool as constants, and the change slopes of the charge-discharge curves and the discharge curves of the super capacitor are consistent for different communication modules, so that the power consumption calculation of the super capacitor can determine the value of a deduction part according to two variables of the power consumption value of the communication module and the change slope of the current communication module, which are acquired in real time, without waiting for the super capacitor to be fully charged and then calculating.
For example, the same module of a certain manufacturer is tested at present, the first acquisition time is point a, the current is Ia, the voltage is Va, and the current change slope is Ka; the second acquisition moment is point B, the current is Ib, the voltage is Vb, and the current change slope is Kb; from the curve trend, the slope Ka > Kb. The first reading power consumption value is Va Ia delta (Ka), the second reading power consumption value is Vb Ib delta (Kb), the coefficient delta (Ka) < delta (Kb), and the calculated power consumption value Va Ia delta (Ka) is basically equal to Vb Ib delta (Kb), so that the power consumption value of the communication module can be guaranteed to be close to actual static power consumption at any time, and the value ensures that the influence of capacitance charging and discharging is filtered.
In this embodiment, the power consumption of the communication module is static power consumption and dynamic power consumption of the communication module; the static power consumption of the communication module is the power consumption of the communication module after being electrified, and the dynamic power consumption of the communication module is the power consumption of the networking transmitting state of the communication module. Specifically, (1) the static power consumption test method: and sending a power-on instruction, sending a static power consumption reading instruction to the test tool by the upper computer, analyzing returned result data, and comparing the returned result data with the standard upper limit value and the standard lower limit value. (2) The dynamic power consumption testing method comprises the following steps: and sending a power-on instruction, carrying out networking meter reading on the communication module by the upper computer, sending a dynamic power consumption value reading instruction by the upper computer while the communication module is in a transmitting state, and analyzing returned result data to compare the returned result data with the standard upper limit value and the standard lower limit value.
In this embodiment, the test fixture static power consumption/dynamic power consumption test process:
the static power consumption test comprises the following steps: 1. and the upper computer sends a power-on command to the test tool, the test tool completes the power-on action after receiving the command and enables the module to be switched on to work voltage, and the test tool starts to detect the real-time power consumption of the communication module and obtain a stable average value to wait for the upper computer to read. 2. The upper computer sends a command for reading a static power consumption result; and the test tool returns a power consumption calculation result to the upper computer after receiving the command and judges the qualification of the numerical value. 3. The upper computer sends a power-off instruction to the test tool, and the test tool completes the power-off action after receiving the instruction, enables the module to lose working voltage and completes static power consumption test.
The dynamic power consumption test comprises the following steps: 1. the upper computer sends a power-on command to the test tool, and the test tool completes the power-on action after receiving the command and enables the module to be connected with the working voltage. 2. After the upper computer completes module networking, a meter reading command is sent to the module, the module sends data, meanwhile, the test tool carries out power consumption detection calculation on the module, obtains a stable average value, and waits for the upper computer to read. 3. The upper computer sends a command for reading the dynamic power consumption result to the test tool; and the test tool returns a power consumption calculation result to the upper computer after receiving the command and judges the qualification of the numerical value. 4. The upper computer sends a power-off command to the test tool, and the test tool completes the power-off action after receiving the command, enables the module to lose working voltage and completes dynamic power consumption test.
The power consumption testing device of the communication module comprises a testing tool, and a power supply conversion circuit, a current sampling circuit and a voltage acquisition circuit which are connected with the testing tool; the power supply conversion circuit is used for supplying power to a communication module to be tested through the current sampling circuit, the current sampling circuit samples the real-time current of the communication module to obtain a module current value Iload and sends the module current value Iload to the testing tool, the voltage sampling circuit samples the real-time voltage of the communication module to obtain a module voltage value Vload and sends the module voltage value Vload to the testing tool, and the testing tool then calculates the real-time power consumption of the communication module. The power consumption testing device of the communication module can be used for detecting the static power consumption and the dynamic power consumption of the communication module (especially an HPLC module) in real time, especially the power consumption of the communication module with the super capacitor, and the detection is accurate and convenient.
The foregoing is only a preferred embodiment of the present invention, and it will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and these modifications and improvements are also considered to be within the scope of the present invention.