CN118112306A - Current detection circuit, electronic device and current detection method - Google Patents

Current detection circuit, electronic device and current detection method Download PDF

Info

Publication number
CN118112306A
CN118112306A CN202410346388.4A CN202410346388A CN118112306A CN 118112306 A CN118112306 A CN 118112306A CN 202410346388 A CN202410346388 A CN 202410346388A CN 118112306 A CN118112306 A CN 118112306A
Authority
CN
China
Prior art keywords
module
current
load
power supply
power consumption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410346388.4A
Other languages
Chinese (zh)
Inventor
张开卫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202410346388.4A priority Critical patent/CN118112306A/en
Publication of CN118112306A publication Critical patent/CN118112306A/en
Pending legal-status Critical Current

Links

Landscapes

  • Measurement Of Current Or Voltage (AREA)

Abstract

The application discloses a current detection circuit, electronic equipment and a current detection method, and belongs to the technical field of electronic equipment. The current detection circuit includes: the sampling control unit and the first voltage dividing module are arranged on the load power supply path; the first voltage division module is connected between the power supply module and the load module; the sampling ends of the sampling control unit are respectively connected with two ends of the first voltage division module and are used for collecting first voltages at two ends of the first voltage division module, determining first power supply current of the load module according to the first voltages and resistance values of the first voltage division module and determining first power consumption of the load module according to the first power supply current.

Description

Current detection circuit, electronic device and current detection method
Technical Field
The application belongs to the technical field of electronic equipment, and particularly relates to a current detection circuit, electronic equipment and a current detection method.
Background
Along with the development of electronic devices and application programs, the application programs installed on the electronic devices are more and more, the power consumption of the electronic devices is more and more, the residual electric quantity of the battery is lower and lower, and the use of the electronic devices by users is affected.
In the related art, electronic devices are configured with an electricity meter, and charging current or discharging current of a battery can be collected through the electricity meter, so that charging electricity quantity or discharging electricity quantity of the battery and remaining electricity quantity of the battery can be calculated.
However, the power supply current provided by the battery to each load module (e.g., display module, storage module, network module, etc.) cannot be detected, and the power consumption of each load module cannot be determined.
Disclosure of Invention
The embodiment of the application aims to provide a current detection circuit, electronic equipment and a current detection method, which can detect the power supply current of each load module and determine the power consumption of each load module.
In a first aspect, an embodiment of the present application provides a current detection circuit, including: the sampling control unit and the first voltage dividing module are arranged on the load power supply path;
the first voltage division module is connected between the power supply module and the load module;
The sampling ends of the sampling control unit are respectively connected with two ends of the first voltage division module and are used for collecting first voltages at two ends of the first voltage division module, determining first power supply current on a load power supply path according to the first voltages and the resistance values of the first voltage division module, and determining first power consumption of the load module according to the first power supply current.
In a second aspect, an embodiment of the present application provides an electronic device, including: the embodiment of the application provides a current detection circuit.
In a third aspect, an embodiment of the present application provides a current detection method, which is applied to a first electronic device, where the electronic device is an electronic device provided by the embodiment of the present application; the current detection method comprises the following steps:
collecting first voltages at two ends of a first voltage division module through a sampling control unit;
Determining a first power supply current of the load module according to the first voltage and the resistance value of the first voltage division module;
The first power consumption of the load module is determined according to the first power supply current.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps of the current detection method provided by the embodiments of the present application.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the steps of the current detection method provided by the embodiment of the present application.
In a sixth aspect, embodiments of the present application provide a computer program product stored in a storage medium, the program product being executed by at least one processor to implement the steps of the current detection method provided by embodiments of the present application.
In the embodiment of the application, the current detection circuit comprises a sampling control unit and a first voltage division module arranged on a load power supply path; the first voltage division module is connected between the power supply module and the load module; the sampling ends of the sampling control unit are respectively connected with two ends of the first voltage division module and are used for collecting first voltages at two ends of the first voltage division module, determining first power supply current of the load module according to the first voltages and resistance values of the first voltage division module and determining first power consumption of the load module according to the first power supply current. In this way, the current detection circuit can detect the power supply current of each load module, and further can determine the power consumption of each load module.
Drawings
Fig. 1 is a schematic diagram of a first structure of a current detection circuit according to an embodiment of the present application;
fig. 2 is a schematic diagram of a second structure of a current detection circuit according to an embodiment of the present application;
fig. 3 is a schematic diagram of a third structure of a current detection circuit according to an embodiment of the present application;
fig. 4 is a schematic diagram of a fourth structure of a current detection circuit according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a sampling period and a current sampling gap provided by an embodiment of the present application;
fig. 6 is a schematic diagram of a fifth structure of a current detection circuit according to an embodiment of the present application;
fig. 7 is a schematic diagram of a sixth structure of a current detection circuit according to an embodiment of the present application;
fig. 8 is a schematic diagram of a seventh configuration of a current detection circuit according to an embodiment of the present application;
FIG. 9 is a schematic flow chart of a current detection method according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 11 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
Detailed Description
The technical solutions of the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which are obtained by a person skilled in the art based on the embodiments of the present application, fall within the scope of protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or otherwise described herein, and that the objects identified by "first," "second," etc. are generally of a type not limited to the number of objects, for example, the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The current detection circuit, the electronic device and the current detection method provided by the embodiment of the application are described in detail below through specific embodiments and application scenes thereof with reference to the accompanying drawings.
The current detection circuit provided by the embodiment of the application comprises: the sampling control unit and the first voltage dividing module are arranged on the load power supply path; the first voltage division module is connected between the power supply module and the load module; the sampling ends of the sampling control unit are respectively connected with two ends of the first voltage division module and are used for collecting first voltages at two ends of the first voltage division module, determining first power supply current of the load module according to the first voltages and resistance values of the first voltage division module and determining first power consumption of the load module according to the first power supply current.
When there is only one load power supply path, the current detection circuit provided in the embodiment of the present application is shown in fig. 1, and fig. 1 is a schematic diagram of a first structure of the current detection circuit provided in the embodiment of the present application.
In fig. 1, a current detection circuit 10 includes a sampling control unit 100 and a first voltage division module 102 disposed on a load power supply path 101, the first voltage division module 102 is connected between a power supply module 11 and a load module 12, sampling ends of the sampling control unit 100 are respectively connected with two ends of the first voltage division module 102, first voltages at two ends of the first voltage division module 102 are collected, a power supply current on the load power supply path 101 is determined according to the first voltages and a resistance value of the first voltage division module 102, and a power consumption of the load module 12 is determined according to the power supply current.
When there are multiple load power supply paths, the current detection circuit provided in the embodiment of the application is shown in fig. 2, and fig. 2 is a schematic diagram of a second structure of the current detection circuit provided in the embodiment of the application.
In fig. 2, the current detection circuit 10 includes a sampling control unit 100 and a first voltage division module disposed on n load power supply paths. The voltage division module i on the load power supply path i is connected between the power supply module 11 and the load module i on the load power supply path i, the sampling control unit 100 collects first voltages at two ends of the voltage division module i, determines power supply current of the load module i according to the first voltages and resistance values of the voltage division module i, and determines power consumption of the load module i according to the power supply current, wherein n is a positive integer greater than 1, and i is a positive integer less than or equal to n.
It is understood that in the present embodiment, the first voltage dividing module includes the voltage dividing modules 1 to n.
In the embodiment of the application, the current detection circuit comprises a sampling control unit and a first voltage division module arranged on a load power supply path; the first voltage division module is connected between the power supply module and the load module; the sampling control unit collects first voltages at two ends of the first voltage division module, determines first power supply current of the load module according to the first voltages and resistance values of the first voltage division module, and determines first power consumption of the load module according to the first power supply current. In this way, the current detection circuit can detect the power supply current of each load module, and further can determine the power consumption of each load module.
In some possible implementations of the embodiments of the present application, for a supply current of a load module at a certain moment, a voltage at two ends of a first voltage dividing module disposed on a power supply path of the load acquired at the moment may be divided by a resistance value of the first voltage dividing module to obtain the supply current of the load module at the moment.
In some possible implementations of the embodiments of the present application, the current detection circuit provided in the embodiments of the present application may further include: the first switch module is arranged on the load power supply path and is connected with the first voltage dividing module in parallel; the first end of the first switch module is connected with the first end of the first voltage dividing module, and the second end of the first switch module is connected with the second end of the first voltage dividing module; the control end of the first switch module is connected with the control signal output end of the sampling control unit.
In some possible implementations of the embodiments of the present application, the sampling control unit may control on and off of the first switch module by using a control signal output from the control signal output end, and since the first switch module is connected in parallel with the first voltage dividing module and the on-resistance of the first switch module is smaller, when the first switch module is turned on, the voltage at two ends of the first voltage dividing module approaches to 0, and at this time, the sampling control unit does not sample the current of the load module; when the first switch module is opened, the sampling control unit samples the current of the load module.
In some possible implementations of the embodiments of the present application, the sampling control unit may simultaneously control on and off of the plurality of first switch modules through one control signal output terminal.
As shown in fig. 3, fig. 3 is a schematic diagram of a third structure of a current detection circuit according to an embodiment of the present application. In fig. 3, the current detection circuit 10 includes a sampling control unit 100, a first voltage dividing module disposed on n load supply paths, and a first switching module disposed on n load supply paths and connected in parallel with the first voltage dividing module. The voltage dividing module i on the load power supply path i is connected between the power supply module 11 and the load module i on the load power supply path i, the first end of the switch module i is connected with the first end of the voltage dividing module i, the second end of the switch module i is connected with the second end of the voltage dividing module i, and the control end of the voltage dividing module i is connected with the control signal output end CTR of the sampling control unit 100.
It is understood that in the present embodiment, the first voltage dividing module includes voltage dividing modules 1 to n, and the first switch module includes switch modules 1 to n.
In the embodiment of the application, the sampling control unit can simultaneously control the on and off of the plurality of switch modules through one control signal output end, so as to realize the simultaneous sampling of the power supply currents of the plurality of load modules.
In some possible implementations of the embodiments of the present application, the sampling control unit may control on and off of the plurality of switch modules through the plurality of control signal output terminals, respectively.
As shown in fig. 4, fig. 4 is a schematic diagram of a third structure of a current detection circuit according to an embodiment of the present application. In fig. 4, the current detection circuit 10 includes a sampling control unit 100, a first voltage dividing module disposed on n load supply paths, and a first switching module disposed on n load supply paths and connected in parallel with the first voltage dividing module. The voltage division module i on the load power supply path i is connected between the power supply module 11 and the load module i on the load power supply path i, the first end of the switch module i is connected with the first end of the voltage division module i, the second end of the switch module i is connected with the second end of the voltage division module i, and the control end of the switch module i is connected with the control signal output end CTRi of the sampling control unit 100.
It is understood that in the present embodiment, the first voltage dividing module includes voltage dividing modules 1 to n, and the first switch module includes switch modules 1 to n.
The sampling control unit 100 controls the on and off of the switch module i through CTRi, so as to realize the sampling of the power supply current of the load module i.
In some possible implementations of the embodiments of the present application, the sampling control unit may control, through a plurality of control signal output terminals, on and off of a plurality of switch modules, respectively, to sample supply currents of a plurality of load modules, respectively.
In some possible implementations of the embodiments of the present application, the sampling control unit may control a sampling period and a current sampling interval of the supply current of each load module, and sample the supply current of the load module in the current sampling interval of the sampling period. As shown in fig. 5, fig. 5 is a schematic diagram of a sampling period and a current sampling gap according to an embodiment of the present application. In fig. 5, T is a sampling period, and Ts is a current sampling gap.
In some possible implementations of the embodiments of the present application, the load power supply path in the embodiments of the present application includes a wireless transmission power supply path, and a load module of the wireless transmission power supply path is a wireless transmission module; the wireless transmission power supply path also comprises a second voltage division module; the first end of the second voltage dividing module is connected with the first end of the first voltage dividing module on the wireless transmission power supply path, and the second end of the second voltage dividing module is connected with the sampling control unit; the sampling control unit is also used for collecting second voltages at two ends of the second voltage division module, determining second power supply current of the sampling control unit according to the second voltages and the resistance value of the second voltage division module, and determining second power consumption of the sampling control unit according to the second power supply current.
As shown in fig. 6, fig. 6 is a schematic diagram of a fifth structure of a current detection circuit according to an embodiment of the present application. In fig. 6, the current detection circuit 10 includes a sampling control unit 100, a first voltage dividing module disposed on n load supply paths, and a first switching module disposed on n load supply paths and connected in parallel with the first voltage dividing module. The voltage dividing module i on the load supply path i is connected between the power supply module 11 and the load module i on the load supply path i. The load power supply path n is a wireless transmission power supply path. The first end of the second voltage dividing module 13 is connected to the first end of the voltage dividing module n, and the second end of the second voltage dividing module 13 is connected to the sampling control unit 100.
The sampling control unit 100 collects the second voltages at both ends of the second voltage division module, determines the second power supply current of the sampling control unit according to the second voltages and the resistance value of the second voltage division module, and determines the second power consumption of the sampling control unit according to the second power supply current.
It is understood that in the present embodiment, the first voltage dividing module includes voltage dividing modules 1 to n, and the first switch module includes switch modules 1 to n.
In the embodiment of the application, the current detection circuit can also detect the power consumption of the sampling control unit.
In some possible implementations of the embodiments of the present application, the sampling control unit may be communicatively connected to the wireless transmission module, and may transmit, to other electronic devices, power consumption data (e.g., power consumption ratio, etc.) of each load module through the wireless transmission module, or receive, through the wireless transmission module, power consumption data sent by other electronic devices.
In some possible implementations of the embodiments of the present application, the wireless transmission power supply path may further include a second switch module connected in parallel with the two-way voltage module; the first end of the second switch module is connected with the first end of the second voltage division module, the second end of the second switch module is connected with the second end of the second voltage division module, and the control end of the second switch module is connected with the control signal output end of the sampling control unit.
As shown in fig. 7, fig. 7 is a schematic diagram of a sixth structure of a current detection circuit according to an embodiment of the present application. In fig. 7, the current detection circuit 10 includes a sampling control unit 100, a first voltage dividing module disposed on n load supply paths, and a first switching module disposed on n load supply paths and connected in parallel with the first voltage dividing module. The load power supply path n is a wireless transmission power supply path. The first end of the second voltage dividing module 13 is connected to the first end of the voltage dividing module n, and the second end of the second voltage dividing module 13 is connected to the sampling control unit 100. The first end of the second switch module 14 is connected to the first end of the second voltage dividing module 13, the second end of the second switch module 14 is connected to the second end of the second voltage dividing module 13, and the control end of the second switch module 14 is connected to the control signal output end CTRx.
It is understood that in the present embodiment, the first voltage dividing module includes voltage dividing modules 1 to n, and the first switch module includes switch modules 1 to n.
In some possible implementations of the embodiments of the present application, the current detection circuit provided in the embodiments of the present application may further include: the third voltage dividing module is arranged on the total power supply path of the power supply module; the sampling control unit is also used for collecting the third voltage at two ends of the third voltage division module, determining the total current of the total power supply path according to the third voltage and the resistance value of the third voltage division module, and determining the total power consumption of the load power supply path according to the total current.
As shown in fig. 8, fig. 8 is a schematic diagram of a seventh configuration of a current detection circuit according to an embodiment of the present application. In fig. 8, the current detection circuit 10 includes a sampling control unit 100, a first voltage division module disposed on n load power supply paths, a first switch module disposed on n load power supply paths and connected in parallel with the first voltage division module, and a third voltage division module 15 disposed on the total power supply path of the power supply module 11. The load power supply path n is a wireless transmission power supply path.
The voltage dividing module i on the load supply path i is connected between the power supply module 11 and the load module i on the load supply path i.
The first end of the second voltage dividing module 13 is connected to the first end of the voltage dividing module n, and the second end of the second voltage dividing module 13 is connected to the sampling control unit 100. The first end of the second switch module 14 is connected to the first end of the second voltage dividing module 13, the second end of the second switch module 14 is connected to the second end of the second voltage dividing module 13, and the control end of the second switch module 14 is connected to the control signal output end CTRx.
The sampling control unit collects the third voltage at two ends of the third voltage division module 15, determines the total current of the total power supply path according to the third voltage and the resistance value of the third voltage division module 15, and determines the total power consumption of the load power supply path according to the total current.
It is understood that in the present embodiment, the first voltage dividing module includes voltage dividing modules 1 to n, and the first switch module includes switch modules 1 to n.
In some possible implementations of the embodiments of the present application, when the current value calculated according to the third voltage and the resistance value of the third voltage division module is greater than or equal to the current threshold value, the current value may be determined as a total current of the total power supply path, and the total power consumption of the load module may be determined according to the total current. When the current value calculated according to the third voltage and the resistance value of the third voltage division module is smaller than the current threshold value, the sum of the supply currents of the load modules can be used as the total current of the total supply path, and then the total power consumption of the load modules is determined according to the total current.
In the embodiment of the application, when the current value calculated according to the third voltage and the resistance value of the third voltage division module is smaller than the current threshold, the current value sampled by the third voltage division module is shown to have poor precision, and at this time, the precision of the total current of the total power supply path can be improved by taking the sum of the power supply currents of the load modules as the total current of the total power supply path, so that the accuracy of determining the total power consumption of the load modules is improved.
In some possible implementations of the embodiments of the present application, the voltage dividing module in the embodiments of the present application may include a voltage divider, a resistor, or a coil with a specific resistance, and the power supply module in the embodiments of the present application includes, but is not limited to: batteries, capacitors, etc., the load modules in embodiments of the present application include, but are not limited to: the switch module in the embodiment of the application may be a triode switch, where the triode switch includes but is not limited to: insulated gate bipolar transistors (Insulate-Gate Bipolar Transistor, IGBT) and Metal-Oxide-semiconductor field effect transistors (MOSFET), etc.
In some possible implementations of the embodiments of the present application, the power consumption of the load module may be calculated by the following formula (1):
In the formula (1), cn is the power consumption of the load module n In the period from t0 to t1, and In (t) is the power supply current of the load module n which varies with time.
In some possible implementations of the embodiments of the present application, the total power consumption of each load module may be calculated by the following formula (2):
in the formula (2), C is the power consumption of each load module in the period from t0 to t1, and I (t) is the total current varying with time.
The embodiment of the application also provides electronic equipment comprising the current detection circuit provided by the embodiment of the application.
The electronic device in the embodiment of the present application may be a Mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a Mobile internet device (Mobile INTERNET DEVICE, MID), an augmented reality (augmented reality, AR)/Virtual Reality (VR) device, a robot, a wearable device, an ultra-Mobile personal computer (UMPC), an internet book or a 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 (TV), an teller machine or a self-service machine, etc., which is not particularly limited.
The electronic device in the embodiment of the application can be an electronic device with an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, and the embodiment of the present application is not limited specifically.
The embodiment of the application also provides a current detection method which is applied to the first electronic equipment, wherein the first electronic equipment is provided by the embodiment of the application.
Fig. 9 is a flow chart of a current detection method according to an embodiment of the present application. The current detection method may include:
Step 801: collecting first voltages at two ends of a first voltage division module through a sampling control unit;
step 802: determining a first power supply current of the load module according to the first voltage and the resistance value of the first voltage division module;
In some possible implementations of the embodiments of the present application, for a first supply current of a load module at a certain moment, a division operation may be performed on a voltage at two ends of a first voltage division module acquired at the moment and a resistance value of the first voltage division module, so as to obtain the first supply current of the load module at the moment.
Step 803: the first power consumption of the load module is determined according to the first power supply current.
In some possible implementations of the embodiments of the present application, the first supply current of the load module at any time in the time period from t0 to t1 may be obtained, so as to obtain the supply current of the load module changing with time in the time period from t0 to t1, and then the power consumption of the load module in the time period from t0 to t1 may be calculated according to the above formula (1).
In the embodiment of the application, the power supply current of the load module can be detected, and the power consumption of the load module can be determined.
In some possible implementations of the embodiment of the present application, before step 801, the current detection method provided by the embodiment of the present application may further include: the method comprises the steps of controlling a first switch module arranged on a load power supply path to be disconnected for a first duration through a sampling control unit; accordingly, step 801 may include: and collecting the first voltage through the sampling control unit in the first time period.
In some possible implementations of the embodiments of the present application, the on and off of the first switch module may be controlled by outputting a control signal to the control terminal of the first switch module through the control signal output terminal on the sampling control unit. When the first switch module is conducted, the voltage at two ends of the first voltage division module approaches to 0, and at the moment, the sampling control unit does not sample the current of the load module; when the first switch module is opened, the sampling control unit samples the current of the load module.
In some possible implementations of the embodiments of the present application, the current detection method provided by the embodiments of the present application may further include: collecting the third voltage at two ends of a third voltage dividing module through a sampling control unit in the first time period, wherein the third voltage dividing module is a voltage dividing module arranged on a total power supply path of the power supply module; determining the current flowing through the third voltage division module according to the third voltage and the resistance value of the third voltage division module; under the condition that the current flowing through the third voltage division module is greater than or equal to a current threshold value, determining the current flowing through the third voltage division module as the total current of the total power supply path; determining a sum of the first supply currents as a total current when the current flowing through the third voltage dividing module is less than a current threshold; and determining the total power consumption of the load module in the first time period according to the total current.
In some possible implementations of the embodiments of the present application, when the current value calculated according to the third voltage and the resistance value of the third voltage division module is greater than or equal to the current threshold value, the current value may be determined as a total current of the total power supply path, and the total power consumption of the load module may be determined according to the total current. When the current value calculated according to the third voltage and the resistance value of the third voltage division module is smaller than the current threshold value, the sum of the supply currents of the load modules can be used as the total current of the total supply path, and then the total power consumption of the load modules is determined according to the total current.
In some possible implementations of the embodiments of the present application, when the total current of the total power supply path that varies with time in the period from t0 to t1 is obtained, then the total power consumption of the load module in the period from t0 to t1 can be calculated by the above formula (2).
In the embodiment of the application, when the current value calculated according to the third voltage and the resistance value of the third voltage division module is smaller than the current threshold, the current value sampled by the third voltage division module is shown to have poor precision, and at this time, the precision of the total current of the total power supply path can be improved by taking the sum of the power supply currents of the load modules as the total current of the total power supply path, so that the accuracy of determining the total power consumption of the load modules is improved.
In some possible implementations of the embodiments of the present application, the current detection method provided by the embodiments of the present application may further include: determining a first power consumption ratio of the load module in a first duration according to the first power consumption and the total power consumption; acquiring a second power consumption ratio of a load module in second electronic equipment in the first time period; and determining an average power consumption ratio according to the first power consumption ratio and the second power consumption ratio, wherein the average power consumption ratio is used for measuring the power consumption influence of the load module on the electronic equipment used by the user.
The second electronic device is the same type and the same configuration as the first electronic device.
In some possible implementations of embodiments of the present application, the power consumption ratio may be calculated according to the following formula (3):
kj=Cj/C (3)
in the formula (3), kj is the power consumption ratio of the load module j in the first duration, cj is the power consumption of the load module j, and C is the total power consumption.
After obtaining the power consumption ratio of the load module j of each electronic device in the first period, the average power consumption ratio may be calculated according to the following formula (4):
in formula (4), AVG j is an average power consumption ratio, K 0-j is a power consumption ratio of a load module j of the first electronic device in a first period, K i-j is a power consumption ratio of a load module j of an electronic device i in the first period, i is a positive integer less than or equal to n, and the second electronic device includes electronic devices 1 to n.
When the power consumption ratio of the load module j of the first electronic device in the first time period is greater than the average power consumption ratio, the load module j can be considered to have a larger influence on the power consumption of the user using the first electronic device.
In the embodiment of the application, the influence of the load module on the power consumption of the electronic equipment used by the user can be measured.
In some possible implementations of the embodiments of the present application, the current detection method provided by the embodiments of the present application may further include: acquiring third power consumption of a load module in third electronic equipment at a first time; and displaying a comparison result of the first power consumption and the third power consumption.
The third electronic device is the same type and configuration as the first electronic device.
For example, assume that power consumption of the load module j of 100 electronic devices in the first duration is obtained, wherein the power consumption of the load module j of the first electronic device in the first duration is greater than the power consumption of the load module j of 87 electronic devices in the 100 electronic devices in the first duration, and a prompt message "the electronic device with 87% of the power consumption of the load module j is complete and the power consumption of the load module j needs to be controlled" is displayed.
For example, assume that power consumption of the load module j of 100 electronic devices in the first period is obtained, wherein the power consumption of the load module j of the first electronic device in the first period is smaller than the power consumption of the load module j of 87 electronic devices in the 100 electronic devices in the first period, and a prompt message "the power consumption of the load module j is 87% greater than the power consumption of the electronic device in the first period" is displayed, and the electronic device is kept.
In the embodiment of the application, through the third power consumption of the load module in the first time period in other electronic equipment, the heavy user and the light user of the load module can be distinguished, wherein the heavy user refers to the user with larger power consumption of the load module when the electronic equipment is used, and the light user refers to the user with smaller power consumption of the load module when the electronic equipment is used.
In some possible implementations of the embodiments of the present application, after obtaining the third power consumption of the load modules in the third electronic device for the first duration, if the power consumption of the load modules is mostly greater than the power consumption threshold, the next-generation electronic device may be optimized, for example, the power consumption of the display module of the electronic device is mostly greater than the power consumption threshold, and when the next-generation electronic device is produced, the display module of the next-generation electronic device may use a screen with low power consumption or the next-generation electronic device may use a high-capacity battery.
In some possible implementations of the embodiments of the present application, the current detection method provided by the embodiments of the present application may further include: determining a first current range corresponding to the total current according to the working mode of the first electronic equipment; and displaying first abnormality information when the total current is not in the first current range, wherein the first abnormality information is used for indicating that an abnormal load module exists in the load modules.
In some possible implementations of embodiments of the present application, the operating modes in embodiments of the present application include, but are not limited to, a normal operating mode, an off-screen standby operating mode, and a sleep mode. In different modes of operation, the total current of the total supply path corresponds to different current ranges.
The working mode of the first electronic equipment can be obtained, and then the current range of the total current corresponding to the obtained working mode is determined according to the corresponding relation between the working mode corresponding to the total current and the current range. And when the total current of the total power supply channel is not in the determined current range, indicating that an abnormal load module exists in the load module, and displaying abnormal information to remind a user that the abnormal load module exists in the load module.
In the embodiment of the application, the user can know the abnormality of the load module by displaying the abnormality information indicating the existence of the abnormal load module in the load module.
In some possible implementations of the embodiments of the present application, the current detection method provided by the embodiments of the present application may further include: determining a second current range corresponding to the load module according to the working mode of the first electronic equipment; and displaying second abnormality information when the first power supply current is not in the second current range, wherein the second abnormality information is used for indicating that the load module is abnormal.
In some possible implementations of embodiments of the present application, the operating modes in embodiments of the present application include, but are not limited to, a normal operating mode, an off-screen standby operating mode, and a sleep mode. Under different working modes, different load modules correspond to different current ranges.
The load module i described above is exemplified as an example.
The working mode of the first electronic device can be obtained, and then the current range of the load module i corresponding to the obtained working mode is determined according to the corresponding relation between the working mode corresponding to the load module i and the current range. When the power supply current of the load module i is not in the determined current range, the load module i is indicated to have abnormality, and at the moment, abnormality information is displayed to remind a user that the load module i has abnormality.
In the embodiment of the application, the user can directly know that the load module is abnormal by displaying the abnormal information indicating that the load module is abnormal.
Optionally, as shown in fig. 10, the embodiment of the present application further provides an electronic device 900, which includes a processor 901 and a memory 902, where a program or an instruction that can be executed on the processor 901 is stored in the memory 902, and the program or the instruction when executed by the processor 901 implements each step of the above embodiment of the current detection method, and can achieve the same technical effect, so that repetition is avoided, and no further description is given here.
Fig. 11 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 1000 includes, but is not limited to: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, and processor 1010.
The electronic device 1000 further includes a current detection circuit provided by an embodiment of the present application.
Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 1010 by a power management system to perform functions such as managing charge, discharge, and power consumption by the power management system. The electronic device structure shown in fig. 11 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than illustrated, or may combine some components, or may be arranged in different components, which are not described in detail herein.
The current detection circuit is used for collecting first voltages at two ends of the first voltage division module through the sampling control unit; determining a first power supply current of the load module according to the first voltage and the resistance value of the first voltage division module; the first power consumption of the load module is determined according to the first power supply current.
In the embodiment of the application, the power supply current of the load module can be detected, and the power consumption of the load module can be determined.
In some possible implementations of the embodiments of the present application, the current detection circuit is further configured to control, by the sampling control unit, the first switch module disposed on the load power supply path to be turned off for a first period of time; and collecting the first voltage through the sampling control unit in the first time period.
In some possible implementations of the embodiments of the present application, the current detection circuit is further configured to collect, in a first period of time, a third voltage at two ends of a third voltage dividing module through the sampling control unit, where the third voltage dividing module is a voltage dividing module disposed on a total power supply path of the power supply module; determining the current flowing through the third voltage division module according to the third voltage and the resistance value of the third voltage division module; under the condition that the current flowing through the third voltage division module is greater than or equal to a current threshold value, determining the current flowing through the third voltage division module as the total current of a total power supply path; and under the condition that the current flowing through the third voltage division module is smaller than the current threshold value, determining the sum of the first power supply currents as the total current, and determining the total power consumption of the load module in the first time period according to the total current.
In the embodiment of the application, when the current value calculated according to the third voltage and the resistance value of the third voltage division module is smaller than the current threshold, the current value sampled by the third voltage division module is shown to have poor precision, and at this time, the precision of the total current of the total power supply path can be improved by taking the sum of the power supply currents of the load modules as the total current of the total power supply path, so that the accuracy of determining the total power consumption of the load modules is improved.
In some possible implementations of the embodiments of the present application, the processor 1010 is configured to determine a first power consumption ratio of the load module during a first duration according to the first power consumption amount and the total power consumption amount; acquiring a second power consumption ratio of a load module in second electronic equipment in the first time period; and determining an average power consumption ratio according to the first power consumption ratio and the second power consumption ratio, wherein the average power consumption ratio is used for measuring the power consumption influence of the load module on the electronic equipment used by the user.
In some possible implementations of embodiments of the application, the processor 1010 is further configured to: acquiring third power consumption of a load module in third electronic equipment at a first time;
the display unit 1006 is configured to: and displaying a comparison result of the first power consumption and the third power consumption.
In the embodiment of the application, through the third power consumption of the load module in the first time period in other electronic equipment, the heavy user and the light user of the load module can be distinguished, wherein the heavy user refers to the user with larger power consumption of the load module when the electronic equipment is used, and the light user refers to the user with smaller power consumption of the load module when the electronic equipment is used.
In some possible implementations of embodiments of the application, the processor 1010 is further configured to: determining a first current range corresponding to the total current according to the working mode of the first electronic equipment;
The display unit 1006 is also configured to: and displaying first abnormality information when the total current is not in the first current range, wherein the first abnormality information is used for indicating that an abnormal load module exists in the load modules.
In the embodiment of the application, the user can know the abnormality of the load module by displaying the abnormality information indicating the existence of the abnormal load module in the load module.
In some possible implementations of embodiments of the application, the processor 1010 is further configured to: determining a second current range corresponding to the load module according to the working mode of the first electronic equipment;
the display unit 1006 is also configured to: and displaying second abnormality information when the first power supply current is not in the second current range, wherein the second abnormality information is used for indicating that the load module is abnormal.
In the embodiment of the application, the user can directly know that the load module is abnormal by displaying the abnormal information indicating that the load module is abnormal.
It should be appreciated that in embodiments of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, where the graphics processor 10041 processes image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 1007 includes at least one of a touch panel 10071 and other input devices 10072. The touch panel 10071 is also referred to as a touch screen. The touch panel 10071 can include two portions, a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
The memory 1009 may be used to store software programs as well as various data. The memory 1009 may mainly include a first memory area storing programs or instructions and a second memory area storing data, wherein the first memory area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 1009 may include volatile memory or nonvolatile memory, or the memory 1009 may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM), static random access memory (STATIC RAM, SRAM), dynamic random access memory (DYNAMIC RAM, DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate Synchronous dynamic random access memory (Double DATA RATE SDRAM, DDRSDRAM), enhanced Synchronous dynamic random access memory (ENHANCED SDRAM, ESDRAM), synchronous link dynamic random access memory (SYNCH LINK DRAM, SLDRAM), and Direct random access memory (DRRAM). Memory 1009 in embodiments of the application includes, but is not limited to, these and any other suitable types of memory.
The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, and the like, and a modem processor that primarily processes wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 1010.
The embodiment of the application also provides a readable storage medium, on which a program or an instruction is stored, which when executed by a processor, implements the processes of the above embodiment of the current detection method, and can achieve the same technical effects, so that repetition is avoided, and no further description is given here.
Wherein the processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, and examples of the computer readable storage medium include a non-transitory computer readable medium such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or optical disk, and the like.
The embodiment of the application also provides a chip, which comprises a processor and a communication interface, wherein the communication interface is coupled with the processor, and the processor is used for running programs or instructions to realize the processes of the embodiment of the current detection method, and can achieve the same technical effects, so that repetition is avoided, and the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
The embodiment of the present application further provides a computer program product, which is stored in a storage medium, and the program product is executed by at least one processor to implement the respective processes of the above-mentioned current detection method embodiment, and achieve the same technical effects, so that repetition is avoided, and a detailed description is omitted here.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.

Claims (13)

1. A current detection circuit, the current detection circuit comprising: the sampling control unit and the first voltage dividing module are arranged on the load power supply path;
the first voltage division module is connected between the power supply module and the load module;
The sampling ends of the sampling control unit are respectively connected with two ends of the first voltage division module and are used for collecting first voltages at two ends of the first voltage division module, determining first power supply current of the load module according to the first voltages and resistance values of the first voltage division module and determining first power consumption of the load module according to the first power supply current.
2. The current detection circuit of claim 1, wherein the current detection circuit further comprises: the first switch module is arranged on the load power supply path and connected with the first voltage dividing module in parallel;
The first end of the first switch module is connected with the first end of the first voltage division module, and the second end of the first switch module is connected with the second end of the first voltage division module;
The control end of the first switch module is connected with the control signal output end of the sampling control unit.
3. The current detection circuit of claim 2, wherein the load power path comprises a wireless transmit power path, the load module of the wireless transmit power path being a wireless transmit module;
The wireless transmission power supply path also comprises a second voltage division module; the first end of the second voltage dividing module is connected with the first end of the first voltage dividing module on the wireless transmission power supply path, and the second end of the second voltage dividing module is connected with the sampling control unit;
The sampling control unit is further used for collecting second voltages at two ends of the second voltage division module, determining second power supply current of the sampling control unit according to the second voltages and resistance values of the second voltage division module, and determining second power consumption of the sampling control unit according to the second power supply current.
4. The current detection circuit of claim 3, further comprising a second switching module in parallel with the second voltage dividing module in the wireless transmission power path;
the first end of the second switch module is connected with the first end of the second voltage division module, the second end of the second switch module is connected with the second end of the second voltage division module, and the control end of the second switch module is connected with the control signal output end of the sampling control unit.
5. The current detection circuit according to any one of claims 1 to 4, further comprising: the third voltage dividing module is arranged on the total power supply path of the power supply module;
The sampling control unit is further configured to collect a third voltage at two ends of the third voltage division module, determine a total current of the total power supply path according to the third voltage and a resistance value of the third voltage division module, and determine a total power consumption of the load power supply path according to the total current.
6. An electronic device, the electronic device comprising:
The current detection circuit according to any one of claims 1 to 5.
7. A current detection method, applied to a first electronic device, the first electronic device being the electronic device of claim 6, the method comprising:
Collecting first voltages at two ends of the first voltage dividing module through the sampling control unit;
determining a first supply current of the load module according to the first voltage and the resistance value of the first voltage dividing module;
and determining the first power consumption of the load module according to the first power supply current.
8. The method of claim 7, wherein before the sampling control unit collects the first voltage across the first voltage dividing module disposed on the load power supply path, the method further comprises:
the sampling control unit is used for controlling a first switch module arranged on the load power supply channel to be disconnected for a first duration;
The sampling control unit is used for collecting first voltages at two ends of a first voltage dividing module arranged on a load power supply circuit, and the sampling control unit comprises:
And collecting the first voltage through the sampling control unit in the first time period.
9. The method of claim 8, wherein the method further comprises:
Collecting third voltages at two ends of a third voltage dividing module through the sampling control unit in the first duration, wherein the third voltage dividing module is a voltage dividing module arranged on a total power supply path of the power supply module;
determining a current flowing through the third voltage division module according to the third voltage and the resistance value of the third voltage division module;
Determining the current flowing through the third voltage division module as the total current of a total power supply path under the condition that the current flowing through the third voltage division module is greater than or equal to a current threshold value; determining the sum of the first supply currents as the total current if the current flowing through the third voltage dividing module is less than the current threshold;
and determining the total power consumption of the load module in the first duration according to the total current.
10. The method according to claim 9, wherein the method further comprises:
determining a first power consumption ratio of the load module in the first duration according to the first power consumption and the total power consumption;
Acquiring a second power consumption ratio of the load module in the second electronic device in the first time period;
And determining an average power consumption ratio according to the first power consumption ratio and the second power consumption ratio, wherein the average power consumption ratio is used for measuring the power consumption influence of the load module on the use of the electronic equipment by the user.
11. The method of claim 8, wherein the method further comprises:
acquiring third power consumption of the load module in the third electronic device in the first duration;
and displaying a comparison result of the first power consumption and the third power consumption.
12. The method according to claim 9, wherein the method further comprises:
determining a first current range corresponding to the total current according to the working mode of the first electronic equipment;
And displaying first abnormality information when the total current is not in the first current range, wherein the first abnormality information is used for indicating that an abnormal load module exists in the load modules.
13. The method according to claim 12, wherein the method further comprises:
determining a second current range corresponding to the load module according to the working mode of the first electronic equipment;
And displaying second abnormality information when the power supply current is not in the second current range, wherein the second abnormality information is used for indicating that the load module has abnormality.
CN202410346388.4A 2024-03-25 2024-03-25 Current detection circuit, electronic device and current detection method Pending CN118112306A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410346388.4A CN118112306A (en) 2024-03-25 2024-03-25 Current detection circuit, electronic device and current detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410346388.4A CN118112306A (en) 2024-03-25 2024-03-25 Current detection circuit, electronic device and current detection method

Publications (1)

Publication Number Publication Date
CN118112306A true CN118112306A (en) 2024-05-31

Family

ID=91208387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410346388.4A Pending CN118112306A (en) 2024-03-25 2024-03-25 Current detection circuit, electronic device and current detection method

Country Status (1)

Country Link
CN (1) CN118112306A (en)

Similar Documents

Publication Publication Date Title
US9689927B2 (en) Detection circuit and electronic terminal
CN101867637A (en) Method and terminal for dynamically generating standby interface
CN102087575A (en) Electronic device and method for dynamic arrangement of icons
CN107843802A (en) Internal short-circuit detection method and device
CN112997134B (en) Application icon display method and device, storage medium and electronic equipment
CN105760050A (en) Screen capturing method and device
CN112114652B (en) Voltage control method and device, electronic equipment and readable storage medium
CN114062957A (en) Method and device for acquiring remaining battery capacity, electronic equipment and storage medium
CN108733277A (en) Application icon aligning method, device, readable storage medium storing program for executing and mobile terminal
WO2024169905A1 (en) Ambient temperature measurement method and apparatus for electronic device
CN102998622A (en) Remote controller and battery voltage detection method and device thereof
CN102818429A (en) Method for managing foods in refrigerator by utilizing mobile terminal
CN101950234B (en) Information display method and system of full-screen input application program
CN109962983B (en) Click rate statistical method and device
CN114281631A (en) Method and device for testing image processing chip and electronic equipment
CN118112306A (en) Current detection circuit, electronic device and current detection method
CN115856705A (en) Electronic equipment, current detection method and device
CN117348710A (en) Equipment control method, device, medium, equipment and chip
CN115939549A (en) Impedance monitoring method and device for battery, electronic equipment and readable storage medium
CN113933717B (en) Method and device for obtaining electric quantity of battery, battery and electronic equipment
CN116973623A (en) Power consumption detection method and device and electronic equipment
CN108958594A (en) A kind of method for page jump and equipment
US20100004884A1 (en) System and method for determining capacity of battery of electronic device
CN114337872B (en) Network signal measurement method and device
CN113676271B (en) Method and device for switching antennas

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination