[go: up one dir, main page]

WO2018170775A1 - Electrical quantity meter, current-sampling calibration circuit and method of calibration - Google Patents

Electrical quantity meter, current-sampling calibration circuit and method of calibration Download PDF

Info

Publication number
WO2018170775A1
WO2018170775A1 PCT/CN2017/077653 CN2017077653W WO2018170775A1 WO 2018170775 A1 WO2018170775 A1 WO 2018170775A1 CN 2017077653 W CN2017077653 W CN 2017077653W WO 2018170775 A1 WO2018170775 A1 WO 2018170775A1
Authority
WO
WIPO (PCT)
Prior art keywords
calibration
switch
state signal
fuel gauge
battery
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.)
Ceased
Application number
PCT/CN2017/077653
Other languages
French (fr)
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.)
Leadcore Technology Co Ltd
Original Assignee
Leadcore Technology 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 Leadcore Technology Co Ltd filed Critical Leadcore Technology Co Ltd
Priority to CN201780010235.0A priority Critical patent/CN108966670B/en
Priority to PCT/CN2017/077653 priority patent/WO2018170775A1/en
Publication of WO2018170775A1 publication Critical patent/WO2018170775A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Definitions

  • the invention mainly relates to a fuel gauge, in particular to a current collection calibration circuit and a calibration method of a fuel gauge.
  • FIG. 1 is an electrical schematic diagram of a conventional fuel gauge.
  • the fuel gauge includes a battery BAT, a switch SW, a resistor Rsense, an amplifier 11, an analog-to-digital converter (ADC) 12, 13, an accumulator 14, and a time base circuit 15.
  • the current is collected by detecting the voltage across the resistor Rsense.
  • the resistor Rsense is a measuring resistor, which is a m ⁇ class current-sense resistor.
  • the resistor RL is the system load.
  • the battery BAT discharges the system load RL by turning on the switch SW.
  • the current loop includes battery BAT, switch SW, resistors Rsense, and RL.
  • the discharge capacity can be expressed as:
  • FIG. 2 is a welded structure of a resistor in the fuel gauge shown in FIG. 1.
  • the resistance of the resistance Rsense is tens of milliohms
  • the welding resistance Rsolder is introduced during soldering.
  • the value of Rsolder sometimes reaches milliohms, so the soldering impedance greatly increases the measurement error. Therefore, the existing fuel gauge has a problem that the current detection result has a large deviation.
  • the resistance itself will have manufacturing variations, and this part of the deviation will also cause deviations in the current measurement results.
  • the technical problem to be solved by the present invention is to provide a current collecting and calibrating circuit in the fuel gauge, which can be used to adjust the error of the measuring resistor, thereby improving the accuracy of the current collecting of the fuel gauge.
  • the present invention provides a current collection calibration circuit in a fuel gauge, including a fuel gauge, including a measurement resistor, a voltage sampler, a power accumulator, and a current collection calibration.
  • a circuit an input end of the voltage sampler is connected to the two ends of the measuring resistor, and an output end of the voltage sampler is connected to the electric quantity accumulator
  • the current collecting and calibrating circuit comprises a battery, a first switch, a second switch, a calibration enabling circuit a current source and a controller, the battery is connected in series with the measuring resistor, and is connected in parallel with the load through the first switch, the first switch is opened and closed by the control of the first state signal; the second switch, the current source And the battery and the measuring resistor are connected in parallel; wherein the calibration enabling circuit generates a second state signal and outputs to the second switch, the second switch is opened and closed by the control of the second state signal; wherein When the two switches are closed, the current source, the battery and the measuring
  • the first status signal is a power on state signal of the device where the fuel gauge is located.
  • the calibration enable circuit generates the second status signal according to a shutdown state signal of the device in which the fuel gauge is located.
  • the calibration enable circuit generates the second state signal according to a shutdown state signal of the device in which the fuel gauge is located, and one of an in-position signal and a power stabilization signal of the battery.
  • the calibration enable circuit further detects a calibration flag and generates the second state signal when the calibration flag is set.
  • the current acquisition calibration circuit further includes a register for storing a calibration resistance value of the measurement resistor, the register being coupled to the controller.
  • the invention also provides a current collecting and calibrating circuit of the fuel gauge, the current collecting and calibrating circuit comprises a battery, a measuring resistor and a voltage sampler, wherein the battery is connected in series with the measuring resistor, and the input end of the voltage sampler is connected to the measuring resistor End, wherein the current collection calibration circuit comprises a battery, a first switch, a second switch, a calibration enable circuit, a current source and a controller, the battery is connected in series with the measuring resistor, and the first switch is connected in parallel with the load, the first a switch is opened and closed by the control of the first state signal, the current source is connected in parallel with the battery and the measuring resistor, and the controller is connected to the voltage sampler; wherein the calibration enabling circuit generates the second The status signal is output to the second switch, and the second switch is opened and closed by the control of the second status signal; wherein when the second switch is closed, the current source, the battery and the measuring resistor form a loop, And the controller is based on the current value of the
  • the calibration enable circuit generates the second status signal according to a shutdown state signal of the device in which the fuel gauge is located.
  • the calibration enable circuit generates the second state signal according to a shutdown state signal of the device in which the fuel gauge is located, and one of an in-position signal and a power stabilization signal of the battery.
  • the calibration enable circuit further detects a calibration flag and generates the second state signal when the calibration flag is not set.
  • the current acquisition calibration circuit further includes a register for storing a calibration resistance value of the measurement resistor, the register being coupled to the controller.
  • the invention also provides a current collecting and calibrating method for a fuel gauge, the fuel gauge comprising a measuring resistor, a voltage sampler, a power accumulator and a current collecting calibration circuit, wherein an input end of the voltage sampler is connected to the two ends of the measuring resistor, An output of the voltage sampler is coupled to the power accumulator, the first switch being opened and closed by the control of the first state signal, the current collection calibration circuit comprising a battery, a first switch, a second switch, and a current source, the battery In series with the measuring resistor, and connected in parallel with the load through the first switch, the second switch, the current source and the battery, the measuring resistor are connected in parallel; wherein the first switch is controlled to be opened and closed by the first state signal The second switch is opened and closed by the control of the second state signal, the method comprising the steps of: providing the second state signal to close the second switch, the current source, the battery and the measuring resistor forming a loop; Calculating a calibration resistance value of the measurement resistor according
  • the first status signal is a power on state signal of the fuel gauge.
  • the second status signal is provided according to a shutdown status signal of the device in which the fuel gauge is located.
  • the second status signal is provided according to a shutdown status signal of the device in which the fuel gauge is located, and one of the in-position signal and the power stabilization signal of the battery.
  • the method includes: after obtaining the calibration resistance value, setting a calibration flag, wherein the calibration flag is detected, and the second is generated when the calibration flag is not set. Status signal.
  • the calibration flag when the calibration flag is not set, if the power-on vector of the device where the fuel gauge is located is received, the second state signal is still provided, and the booting process is suspended.
  • the above-mentioned fuel gauge and the current calibration circuit thereof eliminate the error of the mounting and the resistor itself by calibrating the actual value after the precision resistor is mounted, and write the calibration value into the register of the battery voltage domain, and call the normal operation. The value is calculated to optimize the fuel gauge calculation accuracy.
  • the current calibration method of the above embodiment of the present invention ensures the timing of calibration and the timing of power calculation by the strict process design, which ensures the accuracy of calibration and the accuracy of current calculation.
  • Figure 1 is an electrical schematic diagram of a conventional fuel gauge.
  • FIG. 2 is a welded structure of a resistor in the fuel gauge shown in FIG. 1.
  • FIG. 3 is an electrical schematic diagram of a fuel gauge according to an embodiment of the present invention.
  • FIG. 4 is an electrical schematic diagram of a fuel gauge according to another embodiment of the present invention.
  • Fig. 5 is an electrical schematic diagram of a fuel gauge according to still another embodiment of the present invention.
  • FIG. 6 is a flow chart of a current collection calibration method according to an embodiment of the present invention.
  • FIG. 7 is a flow chart of a current collection calibration method according to another embodiment of the present invention.
  • FIG. 8 is a flow chart of a current collection calibration method according to still another embodiment of the present invention.
  • Embodiments of the present invention describe a current acquisition calibration circuit and a calibration method in a fuel gauge for modifying the error of the measured resistance, particularly the error introduced by the resistor during mounting and the error of the resistor itself.
  • the fuel gauge of the present invention can be used to measure battery capacity, and thus can be widely used in various portable electronic devices.
  • the fuel gauge 30 of the present embodiment includes a measurement resistor Rsense, an amplifier 31, an analog-to-digital converter (ADC) 32, 33, an accumulator 34, a time base circuit 35, a current source 36, and a calibration.
  • the circuit 40 is enabled.
  • the amplifier 31 and the ADC 33 form a voltage sampler.
  • the input of the amplifier 31 is connected to both ends of the measuring resistor Rsense, and the output terminal is connected to the input terminal of the ADC 33.
  • the output of ADC 33 is coupled to accumulator 34.
  • the accumulator 34 and the time reference circuit 35 constitute a power accumulator.
  • the current collection calibration circuit 40 includes a battery BAT, a first switch SW1, a second switch SW2, a calibration enable circuit 41, a current source 42, and a controller 43.
  • the battery BAT is connected in series with the measuring resistor Rsense and in parallel with the load RL through the first switch SW1.
  • the second switch SW2, the current source 42 and the battery BAT, and the measuring resistor Rsense are connected in parallel.
  • the nominal resistance of the measuring resistor Rsense is Rsense, however due to the introduction of the welding resistance value Rsolder, the actual resistance value Rsns is the sum of Rsense and Rsolder. Further, considering the difference between the actual value Rsense' of the measuring resistor Rsense and the nominal value, the actual resistance value Rsns is the sum of Rsense' and Rsolder.
  • Current source 42 has a current Ical. In order to ensure the accuracy of the calibration, Ical needs to be stable and has a low error. For example, the error of Ical is ⁇ 1%.
  • the fuel gauge of this embodiment has two states of power calculation and resistance calibration.
  • a first state signal and a second state signal are provided, respectively corresponding to the two states, for controlling the first switch SW1 and the second switch SW2.
  • the power calculation is usually performed after the device where the fuel gauge is turned on. Therefore, the power-on state signal of the device where the fuel gauge is located is selected as the first state signal, and is supplied to the first switch SW1.
  • the first switch SW1 is turned off and closed by the control of the power-on state signal, that is, when the power-on state signal display device is turned on, the first switch SW1 is closed, otherwise the first switch SW1 is turned off.
  • the accuracy of the calibration can be ensured.
  • the shutdown state signal of the device where the fuel gauge is located is selected as the second state signal and is supplied to the second switch SW2.
  • the calibration enable circuit 41 generates a second state signal according to the off state and outputs it to the second switch SW2.
  • the second switch SW2 is turned off and closed by the control of the second state signal, that is, when the shutdown state signal display device is turned off, the second switch SW2 is closed, otherwise the second switch SW2 is turned off.
  • the current source 42, the battery BAT and the measuring resistor Rsense are composed Loop.
  • a voltage sampler consisting of amplifier 31 and ADC 33 will acquire the voltage Vcal across the measurement resistor Rsense.
  • the controller 43 can calculate the electric quantity by using the calibration resistance value, and the process of calculating the electric quantity is already an existing technology, and is not expanded here.
  • a register 44 is provided for storing the calibration resistance value.
  • Register 44 is coupled to controller 43 so that controller 43 can access register 44.
  • REGcal can be called from the register 44 to calculate the power.
  • the fuel gauge 30 of the present embodiment includes a measurement resistor Rsense, an amplifier 31, an analog-to-digital converter (ADC) 32, 33, an accumulator 34, a time base circuit 35, a current source 36, and a calibration.
  • the circuit 40 is enabled.
  • the amplifier 31 and the ADC 33 form a voltage sampler.
  • the input of the amplifier 31 is connected to both ends of the measuring resistor Rsense, and the output terminal is connected to the input terminal of the ADC 33.
  • the output of ADC 33 is coupled to accumulator 34.
  • the accumulator 34 and the time reference circuit 35 constitute a power accumulator.
  • the current collection calibration circuit 40 includes a battery BAT, a first switch SW1, a second switch SW2, a calibration enable circuit 41, a current source 42, and a controller 43.
  • the battery BAT is connected in series with the measuring resistor Rsense and in parallel with the load RL through the first switch SW1.
  • the second switch SW2, the current source 42 and the battery BAT, and the measuring resistor Rsense are connected in parallel.
  • the nominal resistance of the measuring resistor Rsense is Rsense, however due to the introduction of the welding resistance value Rsolder, the actual resistance value Rsns is the sum of Rsense and Rsolder. Further, considering the difference between the actual value Rsense' of the measuring resistor Rsense and the nominal value, the actual resistance value Rsns is the sum of Rsense' and Rsolder.
  • Current source 42 has a current Ical. In order to ensure the accuracy of the calibration, Ical needs to be stable and has a low error. For example, the error of Ical is ⁇ 1%.
  • the fuel gauge of this embodiment has two states of power calculation and resistance calibration.
  • a first state signal and a second state signal are provided, respectively corresponding to the two states, for controlling the first switch SW1 and the second switch SW2.
  • the power calculation is usually performed after the device where the fuel gauge is turned on. Therefore, the power-on state signal of the device where the fuel gauge is located is selected as the first state signal, and is supplied to the first switch SW1.
  • the first switch SW1 is turned off and closed by the control of the power-on state signal, that is, when the power-on state signal display device is turned on, the first switch SW1 is closed, otherwise the first switch SW1 is turned off.
  • the device where the fuel gauge is located is turned off
  • the shutdown state signal of the device where the fuel gauge is located is selected as the second state signal and supplied to the second switch SW2.
  • the present embodiment is different from the previous embodiment in that the calibration enable circuit 41 generates a second state signal based on the battery in-position signal and the off-state signal.
  • the calibration enable circuit 41 can be implemented as an AND gate. In other words, calibration is only performed when the battery is in place and the device where the fuel gauge is located is off.
  • the battery in-position signal can be replaced with a power supply stabilization signal, that is, calibration is performed only when the power supply is stable and the device in which the fuel gauge is located is off.
  • Fig. 5 is an electrical schematic diagram of a fuel gauge according to still another embodiment of the present invention.
  • the fuel gauge 30 of the present embodiment includes a measurement resistor Rsense, an amplifier 31, an analog-to-digital converter (ADC) 32, 33, an accumulator 34, a time base circuit 35, a current source 36, and a calibration.
  • the circuit 40 is enabled.
  • the amplifier 31 and the ADC 33 form a voltage sampler.
  • the input of the amplifier 31 is connected to both ends of the measuring resistor Rsense, and the output terminal is connected to the input terminal of the ADC 33.
  • the output of ADC 33 is coupled to accumulator 34.
  • the accumulator 34 and the time reference circuit 35 constitute a power accumulator.
  • the current collection calibration circuit 40 includes a battery BAT, a first switch SW1, a second switch SW2, a calibration enable circuit 41, a current source 42, and a controller 43.
  • the battery BAT is connected in series with the measuring resistor Rsense and in parallel with the load RL through the first switch SW1.
  • the second switch SW2, the current source 42 and the battery BAT, and the measuring resistor Rsense are connected in parallel.
  • the nominal resistance of the measuring resistor Rsense is Rsense, however due to the introduction of the welding resistance value Rsolder, the actual resistance value Rsns is the sum of Rsense and Rsolder. Further, considering the difference between the actual value Rsense' of the measuring resistor Rsense and the nominal value, the actual resistance value Rsns is the sum of Rsense' and Rsolder.
  • Current source 42 has a current Ical.
  • Ical In order to ensure the accuracy of the calibration, Ical needs to be stable and has a low error. For example, the error of Ical is ⁇ 1%.
  • the value of the current Ical can be set to 100 mA or hundreds of mA, as needed.
  • the fuel gauge of this embodiment has two states of power calculation and resistance calibration.
  • a first state signal and a second state signal are provided, respectively corresponding to the two states, for controlling the first switch SW1 and the second switch SW2.
  • the power calculation is usually performed after the device where the fuel gauge is turned on. Therefore, the power-on state signal of the device where the fuel gauge is located is selected as the first state signal, and is supplied to the first switch SW1.
  • the first switch SW1 is turned off and closed by the control of the power-on state signal, that is, when the power-on state signal display device is turned on, the first switch SW1 is closed, otherwise the first switch SW1 is turned off.
  • the accuracy of the calibration can be ensured.
  • the present embodiment differs from the previous embodiment in that the current acquisition calibration circuit 40 further includes a register 45 that holds a calibration flag. After the controller 43 obtains the calibration resistance value, the calibration flag is set (eg, set to 1). The calibration enable circuit 41 first detects the calibration flag bit, and when the calibration flag bit is not set, generates a second state signal based on the battery in-position signal and the off-state signal. At this time, the calibration enable circuit 41 can be implemented as an AND gate having three signal inputs. That is to say, calibration is performed only when the calibration is not performed, the battery is in place, and the device where the fuel gauge is located is turned off.
  • the battery in-position signal can be replaced with a power supply stabilization signal, that is, calibration is performed only when the power supply is stable and the device in which the fuel gauge is located is off.
  • FIG. 6 is a flow chart of a current collection calibration method according to an embodiment of the present invention. Referring to FIG. 6, when the current management calibration method of the embodiment is in the power-on reset state, the following steps are performed:
  • step 61 it is detected whether the device where the fuel gauge is located is in a shutdown state, and if yes, proceeds to step 62, otherwise continues to wait;
  • step 62 it is determined whether there is a boot vector, if yes, proceed to step 66, otherwise proceed to step 63; where the boot vector is an event that can cause the device of the fuel gauge to be powered on, such as pressing a power button, starting charging, etc.;
  • step 63 the resistance value calibration is performed;
  • the specific calibration process can refer to the foregoing embodiment, and is not expanded here;
  • the calibration resistor value is written to the register
  • step 65 it is determined again whether there is a boot vector, if yes, proceed to step 66, otherwise continue to wait;
  • step 66 the power is turned on, and the fuel gauge performs a power calculation
  • step 67 the value of the register is called for calculation when performing the power calculation
  • the power calculation is performed cyclically.
  • FIG. 7 is a flow chart of a current collection calibration method according to another embodiment of the present invention. Referring to FIG. 7, when the current management calibration method of the embodiment is in the power-on reset state, the following steps are performed:
  • step 71 it is detected whether the device where the fuel gauge is located is in a shutdown state, and if yes, proceeds to step 62, otherwise continues to wait;
  • step 72 it is determined whether the calibration flag is 1, if it is 1 indicating that the calibration has been performed, proceeds to step 73, otherwise proceeds to step 74;
  • step 73 it is determined whether there is a boot vector, if yes, proceed to step 77, otherwise continue to wait; where the boot vector is an event that can cause the device of the fuel gauge to be powered on, such as pressing a power button, starting charging, etc.;
  • step 74 the resistance value calibration is performed;
  • the specific calibration process can refer to the foregoing embodiment, and is not expanded here;
  • the calibration resistance value is written to the register and the calibration flag is set
  • step 76 it is determined again whether there is a boot vector, if yes, proceed to step 66, otherwise continue to wait;
  • step 77 the power is turned on, and the fuel gauge performs a power calculation
  • step 78 the value of the register is called for calculation when performing the power calculation
  • the power calculation is performed cyclically.
  • FIG. 8 is a flow chart of a current collection calibration method according to still another embodiment of the present invention.
  • the current collection calibration method of the embodiment is that when the power management chip is in the power-on reset state, the following steps are performed:
  • step 81 it is determined whether the battery is in place, if yes, then proceeds to step 83, otherwise proceeds to step 82;
  • step 82 it is determined whether the power supply is stable, if yes, then proceeds to step 83, otherwise returns to step 81;
  • step 83 it is detected whether the device where the fuel gauge is located is in a shutdown state, and if yes, proceeds to step 84, otherwise continues to wait;
  • step 84 it is determined whether the calibration flag is 1, if it is 1 indicates that the calibration has been performed, proceeds to step 85, otherwise proceeds to step 86;
  • step 85 it is determined whether there is a boot vector, if yes, proceed to step 89, otherwise continue to wait; where the boot vector is an event that can cause the device of the fuel gauge to be powered on, such as pressing a power button, starting charging, etc.;
  • the resistance value calibration is performed; the specific calibration process can refer to the foregoing embodiment, and is not expanded here;
  • the calibration resistance value is written to the register and the calibration flag is set;
  • step 88 it is again determined whether there is a boot vector present, if yes, then proceeds to step 66, otherwise Continue to wait;
  • step 89 the power is turned on, and the fuel gauge performs a power calculation
  • the value of the register is called for calculation when performing the power calculation
  • the power calculation is performed cyclically.
  • the embodiment shown in Fig. 7 can be further optimized to the embodiment shown in Fig. 9.
  • the current collection calibration method of the embodiment is that when the power management chip is in the power-on reset state, the following steps are performed:
  • step 1001 it is detected whether the device where the fuel gauge is located is in a shutdown state, and if yes, proceeds to step 62, otherwise continues to wait;
  • step 1002 it is determined whether the calibration flag is 1, if it is 1 indicating that the calibration has been performed, proceeds to step 1003, otherwise proceeds to step 1004;
  • step 1003 it is determined whether there is a boot vector, if yes, proceed to step 1011, otherwise continue to wait; where the boot vector is an event that can cause the device of the fuel gauge to be powered on, such as pressing a power button, starting charging, etc.;
  • step 1004 it is determined whether there is a boot vector exists, if yes, then proceeds to step 1008, otherwise proceeds to step 1005;
  • step 1005 the resistance value calibration is performed; the specific calibration process can refer to the foregoing embodiment, and is not expanded here;
  • step 1006 the calibration resistance value is written to the register and the calibration flag is set
  • step 1007 it is determined again whether there is a boot vector, if yes, proceed to step 66, otherwise continue to wait;
  • step 1008 performing a resistance value calibration
  • step 1009 a boot process is performed
  • the calibration resistance value is written to the register and the calibration flag is set
  • step 1011 the power is turned on, and the fuel gauge performs a power calculation
  • step 1012 the value of the register is called when performing the power calculation
  • the power calculation is performed cyclically.
  • step 1004 when it is determined in step 1004 that the boot vector exists, the boot process is not immediately executed, but the predetermined time (for example, 100 ms) is delayed, and the resistance value calibration is performed in step 1008 for a predetermined time, and then the boot process is executed in step 1009. .
  • the predetermined time for example, 100 ms
  • the fuel gauge and the current calibration circuit of the above embodiment of the present invention eliminate the error of the mounting and the resistor itself by calibrating the actual value after the precision resistor is mounted, and write the calibration value into the register of the battery voltage domain, during normal operation. This value is called for power calculation, which optimizes the calculation accuracy of the fuel gauge.
  • the current calibration method of the above embodiment of the present invention ensures the timing of calibration and the timing of power calculation by the strict process design, which ensures the accuracy of calibration and the accuracy of current calculation.

Landscapes

  • Measurement Of Current Or Voltage (AREA)
  • Measurement Of Levels Of Liquids Or Fluent Solid Materials (AREA)

Abstract

A electrical quantity meter, a current-sampling calibration circuit thereof and a method of calibration. The electrical quantity meter (30) comprises a sensing resistor (Rsense), a voltage sampler and a current-sampling calibration circuit. An input end of the voltage sampler connects to two ends of the sensing resistor (Rsense). The current-sampling calibration circuit comprises a battery (BAT), a first switch (SW1), a second switch (SW2), a calibration enabling circuit (41), a current source (42) and a controller (43). The second switch (SW2) and the current source (42) are connected to the battery (BAT) and the sensing resistor (Rsense) in parallel. The calibration enabling circuit (41) generates and outputs a second status signal to the second switch (SW2). When the second switch (SW2) is closed, the current source (42), the battery (BAT) and the sensing resistor (Rsense) form a circuit, and the controller (43) calculates a calibration resistance value of the sensing resistor (Rsense) according to a current value of the current source (42) and a sampling value of the voltage sampler. When the first switch (SW1) is closed, the battery (BAT), the sensing resistor (Rsense) and a load (RL) form a circuit, and the controller (43) calculates an electricity quantity according to the calibration resistance value.

Description

电量计及其电流采集校准电路和校准方法Fuel gauge and its current collecting calibration circuit and calibration method 技术领域Technical field

本发明主要涉及电量计,尤其涉及电量计的电流采集校准电路和校准方法。The invention mainly relates to a fuel gauge, in particular to a current collection calibration circuit and a calibration method of a fuel gauge.

背景技术Background technique

图1是现有电量计的电原理图。参考图1所示,电量计包括电池BAT、开关SW、电阻Rsense、放大器11、模数转换器(ADC)12、13、累加器14和时间基准(time base)电路15。电流的采集是通过检测电阻Rsense上的电压来计算。电阻Rsense是测量电阻,它是mΩ级检流电阻。电阻RL为系统负载。电池BAT通过开关SW的接通对系统负载RL放电。当系统正常工作时,电流回路包括电池BAT、开关SW、电阻Rsense和RL。假设回路电流为I0,电阻Rsense两端产生的瞬时压降为Vs(t)=I0(t)×Rsense,电量计10持续检测电阻Rsense两端的压差Vs,并将其通过放大器11和ADC 13转换为数字量Current,之后进行累加,累加结果Accumulated Current的单位为Vh(伏时)。对量化后的Vs进行累加相当于对其进行积分出

Figure PCTCN2017077653-appb-000001
因此放电电量就可以表示为:Figure 1 is an electrical schematic diagram of a conventional fuel gauge. Referring to FIG. 1, the fuel gauge includes a battery BAT, a switch SW, a resistor Rsense, an amplifier 11, an analog-to-digital converter (ADC) 12, 13, an accumulator 14, and a time base circuit 15. The current is collected by detecting the voltage across the resistor Rsense. The resistor Rsense is a measuring resistor, which is a mΩ class current-sense resistor. The resistor RL is the system load. The battery BAT discharges the system load RL by turning on the switch SW. When the system is operating normally, the current loop includes battery BAT, switch SW, resistors Rsense, and RL. Assuming that the loop current is I 0 , the instantaneous voltage drop across the resistor Rsense is Vs(t)=I 0 (t)×Rsense, and the fuel gauge 10 continuously detects the voltage difference Vs across the resistor Rsense and passes it through the amplifier 11 and The ADC 13 is converted to a digital value Current, and then accumulated, and the accumulated result is in units of Vh (volt-hour). Accumulating the quantized Vs is equivalent to integrating it
Figure PCTCN2017077653-appb-000001
Therefore, the discharge capacity can be expressed as:

Figure PCTCN2017077653-appb-000002
Figure PCTCN2017077653-appb-000002

从上式中可以看出,电阻Rsense出现偏差就会引起电量计算的偏差。It can be seen from the above equation that the deviation of the resistance Rsense will cause the deviation of the power calculation.

图2是图1所示电量计中,电阻的焊接结构。如图2所示,实际在使用电阻Rsense这种阻值为数十毫欧姆级别的电阻时,焊接时会引入焊接阻抗Rsolder。Rsolder的值有时会达到毫欧姆级别,因此焊接阻抗会大幅增加测量误差。所以现有的电量计,存在电流检测结果偏差较大的问题。另外,电阻本身也会有制造偏差,这部分偏差也会引起电流测量结果的偏差。2 is a welded structure of a resistor in the fuel gauge shown in FIG. 1. As shown in FIG. 2, when the resistance of the resistance Rsense is tens of milliohms, the welding resistance Rsolder is introduced during soldering. The value of Rsolder sometimes reaches milliohms, so the soldering impedance greatly increases the measurement error. Therefore, the existing fuel gauge has a problem that the current detection result has a large deviation. In addition, the resistance itself will have manufacturing variations, and this part of the deviation will also cause deviations in the current measurement results.

发明内容Summary of the invention

本发明要解决的技术问题是提供电量计中的电流采集校准电路,可以用来修调测量电阻的误差,从而提高电量计电流采集的精度。The technical problem to be solved by the present invention is to provide a current collecting and calibrating circuit in the fuel gauge, which can be used to adjust the error of the measuring resistor, thereby improving the accuracy of the current collecting of the fuel gauge.

为解决上述技术问题,本发明提供了一种电量计中的电流采集校准电路,包括一种电量计,包括测量电阻、电压采样器、电量累加器以及电流采集校准 电路,该电压采样器的输入端连接于该测量电阻两端,该电压采样器的输出端连接该电量累加器,该电流采集校准电路包括电池、第一开关、第二开关、校准使能电路、电流源和控制器,该电池与该测量电阻串联,且通过该第一开关与负载并联,该第一开关受到第一状态信号的控制而断开和闭合;该第二开关、该电流源和该电池、该测量电阻并联;其中该校准使能电路产生第二状态信号并输出给该第二开关,该第二开关受到该第二状态信号的控制而断开和闭合;其中当该第二开关闭合时,该电流源、该电池和该测量电阻组成回路,且该控制器根据该电流源的电流值和该电压采样器的采样值计算该测量电阻的校准电阻值;当该第一开关闭合时,该电池、该测量电阻与该负载组成回路,且该控制器采用该校准电阻值进行电量计算。In order to solve the above technical problem, the present invention provides a current collection calibration circuit in a fuel gauge, including a fuel gauge, including a measurement resistor, a voltage sampler, a power accumulator, and a current collection calibration. a circuit, an input end of the voltage sampler is connected to the two ends of the measuring resistor, and an output end of the voltage sampler is connected to the electric quantity accumulator, the current collecting and calibrating circuit comprises a battery, a first switch, a second switch, a calibration enabling circuit a current source and a controller, the battery is connected in series with the measuring resistor, and is connected in parallel with the load through the first switch, the first switch is opened and closed by the control of the first state signal; the second switch, the current source And the battery and the measuring resistor are connected in parallel; wherein the calibration enabling circuit generates a second state signal and outputs to the second switch, the second switch is opened and closed by the control of the second state signal; wherein When the two switches are closed, the current source, the battery and the measuring resistor form a loop, and the controller calculates a calibration resistance value of the measuring resistor according to the current value of the current source and the sampling value of the voltage sampler; when the first When the switch is closed, the battery, the measuring resistor and the load form a loop, and the controller uses the calibration resistor value to perform the power calculation.

在本发明的一实施例中,该第一状态信号为该电量计所在设备的开机状态信号。In an embodiment of the invention, the first status signal is a power on state signal of the device where the fuel gauge is located.

在本发明的一实施例中,该校准使能电路根据该电量计所在设备的关机状态信号产生该第二状态信号。In an embodiment of the invention, the calibration enable circuit generates the second status signal according to a shutdown state signal of the device in which the fuel gauge is located.

在本发明的一实施例中,该校准使能电路根据该电量计所在设备的关机状态信号,以及该电池的在位信号和电源稳定信号其中之一产生该第二状态信号。In an embodiment of the invention, the calibration enable circuit generates the second state signal according to a shutdown state signal of the device in which the fuel gauge is located, and one of an in-position signal and a power stabilization signal of the battery.

在本发明的一实施例中,该校准使能电路还检测一校准标志位,且在该校准标志位被置位时产生该第二状态信号。In an embodiment of the invention, the calibration enable circuit further detects a calibration flag and generates the second state signal when the calibration flag is set.

在本发明的一实施例中,该电流采集校准电路还包括用于储存该测量电阻的校准电阻值的寄存器,该寄存器连接该控制器。In an embodiment of the invention, the current acquisition calibration circuit further includes a register for storing a calibration resistance value of the measurement resistor, the register being coupled to the controller.

本发明还提出一种电量计的电流采集校准电路,该电流采集校准电路包括电池、测量电阻以及电压采样器,该电池与该测量电阻串联,该电压采样器的输入端连接于该测量电阻两端,其中该电流采集校准电路包括电池、第一开关、第二开关、校准使能电路、电流源和控制器,该电池与该测量电阻串联,且通过该第一开关与负载并联,该第一开关受到第一状态信号的控制而断开和闭合,该第二开关、该电流源和该电池、该测量电阻并联,该控制器连接该电压采样器;其中该校准使能电路产生第二状态信号并输出给该第二开关,该第二开关受到该第二状态信号的控制而断开和闭合;其中当该第二开关闭合时,该电流源、该电池和该测量电阻组成回路,且该控制器根据该电流源的电流值和该电 压采样器的采样值计算该测量电阻的校准电阻值。The invention also provides a current collecting and calibrating circuit of the fuel gauge, the current collecting and calibrating circuit comprises a battery, a measuring resistor and a voltage sampler, wherein the battery is connected in series with the measuring resistor, and the input end of the voltage sampler is connected to the measuring resistor End, wherein the current collection calibration circuit comprises a battery, a first switch, a second switch, a calibration enable circuit, a current source and a controller, the battery is connected in series with the measuring resistor, and the first switch is connected in parallel with the load, the first a switch is opened and closed by the control of the first state signal, the current source is connected in parallel with the battery and the measuring resistor, and the controller is connected to the voltage sampler; wherein the calibration enabling circuit generates the second The status signal is output to the second switch, and the second switch is opened and closed by the control of the second status signal; wherein when the second switch is closed, the current source, the battery and the measuring resistor form a loop, And the controller is based on the current value of the current source and the electricity The sampled value of the pressure sampler calculates the calibration resistance value of the measured resistance.

在本发明的一实施例中,该校准使能电路根据该电量计所在设备的关机状态信号产生该第二状态信号。In an embodiment of the invention, the calibration enable circuit generates the second status signal according to a shutdown state signal of the device in which the fuel gauge is located.

在本发明的一实施例中,该校准使能电路根据该电量计所在设备的关机状态信号,以及该电池的在位信号和电源稳定信号其中之一产生该第二状态信号。In an embodiment of the invention, the calibration enable circuit generates the second state signal according to a shutdown state signal of the device in which the fuel gauge is located, and one of an in-position signal and a power stabilization signal of the battery.

在本发明的一实施例中,该校准使能电路还检测一校准标志位,且在该校准标志位未被置位时产生该第二状态信号。In an embodiment of the invention, the calibration enable circuit further detects a calibration flag and generates the second state signal when the calibration flag is not set.

在本发明的一实施例中,电流采集校准电路还包括用于储存该测量电阻的校准电阻值的寄存器,该寄存器连接该控制器。In an embodiment of the invention, the current acquisition calibration circuit further includes a register for storing a calibration resistance value of the measurement resistor, the register being coupled to the controller.

本发明还提出一种电量计的电流采集校准方法,该电量计包括测量电阻、电压采样器、电量累加器以及电流采集校准电路,该电压采样器的输入端连接于该测量电阻两端,该电压采样器的输出端连接该电量累加器,该第一开关受到第一状态信号的控制而断开和闭合,该电流采集校准电路包括电池、第一开关、第二开关和电流源,该电池与该测量电阻串联,且通过该第一开关与负载并联,该第二开关、该电流源和该电池、该测量电阻并联;其中该第一开关受到第一状态信号的控制而断开和闭合,该第二开关受到第二状态信号的控制而断开和闭合,该方法包括如下步骤:提供该第二状态信号使该第二开关闭合,该电流源、该电池和该测量电阻组成回路;根据该电流源的电流值和该电压采样器的采样值计算该测量电阻的校准电阻值;提供该第一状态信号使该第一开关闭合,该电池、该测量电阻与该负载组成回路,且该控制器采用该校准电阻值进行电量计算。The invention also provides a current collecting and calibrating method for a fuel gauge, the fuel gauge comprising a measuring resistor, a voltage sampler, a power accumulator and a current collecting calibration circuit, wherein an input end of the voltage sampler is connected to the two ends of the measuring resistor, An output of the voltage sampler is coupled to the power accumulator, the first switch being opened and closed by the control of the first state signal, the current collection calibration circuit comprising a battery, a first switch, a second switch, and a current source, the battery In series with the measuring resistor, and connected in parallel with the load through the first switch, the second switch, the current source and the battery, the measuring resistor are connected in parallel; wherein the first switch is controlled to be opened and closed by the first state signal The second switch is opened and closed by the control of the second state signal, the method comprising the steps of: providing the second state signal to close the second switch, the current source, the battery and the measuring resistor forming a loop; Calculating a calibration resistance value of the measurement resistor according to a current value of the current source and a sample value of the voltage sampler; providing the first state signal The first switch is closed, the battery, the load resistor and the measurement circuit composition, and the controller uses the resistance value the calibration amount calculation.

在本发明的一实施例中,该第一状态信号为该电量计的开机状态信号。In an embodiment of the invention, the first status signal is a power on state signal of the fuel gauge.

在本发明的一实施例中,根据该电量计所在设备的关机状态信号提供该第二状态信号。In an embodiment of the invention, the second status signal is provided according to a shutdown status signal of the device in which the fuel gauge is located.

在本发明的一实施例中,根据该电量计所在设备的关机状态信号,以及该电池的在位信号和电源稳定信号其中之一提供该第二状态信号。In an embodiment of the invention, the second status signal is provided according to a shutdown status signal of the device in which the fuel gauge is located, and one of the in-position signal and the power stabilization signal of the battery.

在本发明的一实施例中,上述方法包括:在得到该校准电阻值后,将一校准标志位置位,其中检测该校准标志位,且在该校准标志位未被置位时产生该第二状态信号。 In an embodiment of the invention, the method includes: after obtaining the calibration resistance value, setting a calibration flag, wherein the calibration flag is detected, and the second is generated when the calibration flag is not set. Status signal.

在本发明的一实施例中,在该校准标志位未被置位时,如果收到该电量计所在设备的开机向量,仍然提供该第二状态信号,而暂缓开机流程。In an embodiment of the invention, when the calibration flag is not set, if the power-on vector of the device where the fuel gauge is located is received, the second state signal is still provided, and the booting process is suspended.

本发明上述的电量计及其电流校准电路,通过校准精密电阻贴装后的实际值,消除贴装和电阻本身的误差,并把校准值写入电池电压域的寄存器内,正常运行时调用该值进行电量计算,从而优化了电量计计算精度。本发明上述实施例的电流校准方法通过严密的流程设计,分别确保了校准的时机和开机进行电量计算的时机,保证了校准的准确性和电流计算的准确性。The above-mentioned fuel gauge and the current calibration circuit thereof eliminate the error of the mounting and the resistor itself by calibrating the actual value after the precision resistor is mounted, and write the calibration value into the register of the battery voltage domain, and call the normal operation. The value is calculated to optimize the fuel gauge calculation accuracy. The current calibration method of the above embodiment of the present invention ensures the timing of calibration and the timing of power calculation by the strict process design, which ensures the accuracy of calibration and the accuracy of current calculation.

附图概述BRIEF abstract

本发明的特征、性能由以下的实施例及其附图进一步描述。Features and capabilities of the present invention are further described by the following examples and the accompanying drawings.

图1是现有电量计的电原理图。Figure 1 is an electrical schematic diagram of a conventional fuel gauge.

图2是图1所示电量计中电阻的焊接结构。2 is a welded structure of a resistor in the fuel gauge shown in FIG. 1.

图3是本发明一实施例的电量计的电原理图。3 is an electrical schematic diagram of a fuel gauge according to an embodiment of the present invention.

图4是本发明另一实施例的电量计的电原理图。4 is an electrical schematic diagram of a fuel gauge according to another embodiment of the present invention.

图5是本发明又一实施例的电量计的电原理图。Fig. 5 is an electrical schematic diagram of a fuel gauge according to still another embodiment of the present invention.

图6是本发明一实施例的电流采集校准方法流程图。6 is a flow chart of a current collection calibration method according to an embodiment of the present invention.

图7是本发明另一实施例的电流采集校准方法流程图。7 is a flow chart of a current collection calibration method according to another embodiment of the present invention.

图8是本发明又一实施例的电流采集校准方法流程图。FIG. 8 is a flow chart of a current collection calibration method according to still another embodiment of the present invention.

本发明的较佳实施方式Preferred embodiment of the invention

为让本发明的上述目的、特征和优点能更明显易懂,以下结合附图对本发明的具体实施方式作详细说明。The above described objects, features and advantages of the present invention will become more apparent from the aspects of the appended claims.

在下面的描述中阐述了很多具体细节以便于充分理解本发明,但是本发明还可以采用其它不同于在此描述的其它方式来实施,因此本发明不受下面公开的具体实施例的限制。In the following description, numerous specific details are set forth in the description of the invention, and the invention may be practiced otherwise.

如本申请和权利要求书中所示,除非上下文明确提示例外情形,“一”、“一个”、“一种”和/或“该”等词并非特指单数,也可包括复数。一般说来,术语“包括”与“包含”仅提示包括已明确标识的步骤和元素,而这些步骤和元素不构成一个排它性的罗列,方法或者设备也可能包含其他的步骤或元素。 The words "a", "an", "the" and "the" In general, the terms "comprising" and "comprising" are intended to include only the steps and elements that are specifically identified, and the steps and elements do not constitute an exclusive list, and the method or device may also include other steps or elements.

本发明的实施例描述电量计中的电流采集校准电路和校准方法,用来修调测量电阻的误差,尤其是电阻在贴装时引入的误差和电阻本身的误差。本发明的电量计可以用来测量电池容量,因此可广泛应用在各种便携式电子设备中。Embodiments of the present invention describe a current acquisition calibration circuit and a calibration method in a fuel gauge for modifying the error of the measured resistance, particularly the error introduced by the resistor during mounting and the error of the resistor itself. The fuel gauge of the present invention can be used to measure battery capacity, and thus can be widely used in various portable electronic devices.

图3是本发明一实施例的电量计的电原理图。参考图3所示,本实施例的电量计30包括测量电阻Rsense、放大器31、模数转换器(ADC)32、33、累加器34、时间基准(time base)电路35、电流源36和校准使能电路40。放大器31和ADC 33组成电压采样器,放大器31的输入端连接于测量电阻Rsense的两端,输出端连接ADC 33的输入端。ADC 33的输出端连接累加器34。累加器34和时间基准电路35组成电量累加器。3 is an electrical schematic diagram of a fuel gauge according to an embodiment of the present invention. Referring to FIG. 3, the fuel gauge 30 of the present embodiment includes a measurement resistor Rsense, an amplifier 31, an analog-to-digital converter (ADC) 32, 33, an accumulator 34, a time base circuit 35, a current source 36, and a calibration. The circuit 40 is enabled. The amplifier 31 and the ADC 33 form a voltage sampler. The input of the amplifier 31 is connected to both ends of the measuring resistor Rsense, and the output terminal is connected to the input terminal of the ADC 33. The output of ADC 33 is coupled to accumulator 34. The accumulator 34 and the time reference circuit 35 constitute a power accumulator.

电流采集校准电路40包括电池BAT、第一开关SW1、第二开关SW2、校准使能电路41、电流源42和控制器43。电池BAT与测量电阻Rsense串联,且通过第一开关SW1与负载RL并联。第二开关SW2、电流源42和电池BAT、测量电阻Rsense并联。测量电阻Rsense标称阻值是Rsense,然而由于焊接电阻值Rsolder的引入,实际阻值Rsns为Rsense与Rsolder之和。另外,考虑到测量电阻Rsense的实际值Rsense’和标称值的不同,实际阻值Rsns为Rsense’与Rsolder之和。电流源42具有电流Ical。为了保证校准的精确度,Ical需要保持稳定,且具有较低的误差。例如Ical的误差在±1%。The current collection calibration circuit 40 includes a battery BAT, a first switch SW1, a second switch SW2, a calibration enable circuit 41, a current source 42, and a controller 43. The battery BAT is connected in series with the measuring resistor Rsense and in parallel with the load RL through the first switch SW1. The second switch SW2, the current source 42 and the battery BAT, and the measuring resistor Rsense are connected in parallel. The nominal resistance of the measuring resistor Rsense is Rsense, however due to the introduction of the welding resistance value Rsolder, the actual resistance value Rsns is the sum of Rsense and Rsolder. Further, considering the difference between the actual value Rsense' of the measuring resistor Rsense and the nominal value, the actual resistance value Rsns is the sum of Rsense' and Rsolder. Current source 42 has a current Ical. In order to ensure the accuracy of the calibration, Ical needs to be stable and has a low error. For example, the error of Ical is ±1%.

本实施例的电量计具有电量计算和电阻校准两种状态。为此,提供第一状态信号和第二状态信号,分别对应这两种状态,用来控制第一开关SW1和第二开关SW2。电量计算通常是在电量计所在设备开机后进行,因此选择在电量计所在设备的开机状态信号作为第一状态信号,提供给第一开关SW1。第一开关SW1受到开机状态信号的控制而断开和闭合,即当开机状态信号显示设备开机时,第一开关SW1闭合,否则第一开关SW1断开。电量计所在设备关机时,更能保证校准的准确性,因此选择在电量计所在设备的关机状态信号作为第二状态信号,提供给第二开关SW2。校准使能电路41根据关机状态产生第二状态信号并输出给第二开关SW2。第二开关SW2受到第二状态信号的控制而断开和闭合,即当关机状态信号显示设备关机时,第二开关SW2闭合,否则第二开关SW2断开。The fuel gauge of this embodiment has two states of power calculation and resistance calibration. To this end, a first state signal and a second state signal are provided, respectively corresponding to the two states, for controlling the first switch SW1 and the second switch SW2. The power calculation is usually performed after the device where the fuel gauge is turned on. Therefore, the power-on state signal of the device where the fuel gauge is located is selected as the first state signal, and is supplied to the first switch SW1. The first switch SW1 is turned off and closed by the control of the power-on state signal, that is, when the power-on state signal display device is turned on, the first switch SW1 is closed, otherwise the first switch SW1 is turned off. When the device where the fuel gauge is turned off, the accuracy of the calibration can be ensured. Therefore, the shutdown state signal of the device where the fuel gauge is located is selected as the second state signal and is supplied to the second switch SW2. The calibration enable circuit 41 generates a second state signal according to the off state and outputs it to the second switch SW2. The second switch SW2 is turned off and closed by the control of the second state signal, that is, when the shutdown state signal display device is turned off, the second switch SW2 is closed, otherwise the second switch SW2 is turned off.

当第二开关SW2闭合时,电流源42、电池BAT和测量电阻Rsense组成 回路。放大器31和ADC 33组成的电压采样器将会采集测量电阻Rsense两端的电压Vcal。此时可以在控制器43内计算得到真实的测量电阻阻值为Rsns=Vcal/Ical。这一电阻值即可作为校准电阻值。When the second switch SW2 is closed, the current source 42, the battery BAT and the measuring resistor Rsense are composed Loop. A voltage sampler consisting of amplifier 31 and ADC 33 will acquire the voltage Vcal across the measurement resistor Rsense. At this time, the actual measured resistance value can be calculated in the controller 43 as Rsns=Vcal/Ical. This resistance value can be used as the calibration resistance value.

当第一开关SW1闭合时,电池BAT、测量电阻Rsense与负载RL组成回路。此时控制器43可采用校准电阻值进行电量计算,电量计算的过程已经是现有的技术,在此不再展开。When the first switch SW1 is closed, the battery BAT, the measuring resistor Rsense and the load RL form a loop. At this time, the controller 43 can calculate the electric quantity by using the calibration resistance value, and the process of calculating the electric quantity is already an existing technology, and is not expanded here.

较佳地,设置寄存器44,用来保存校准电阻值。寄存器44与控制器43连接,以便控制器43能够访问寄存器44。这样,当电量计处于电量计算状态时,可以从寄存器44中调用其值REGcal进行电量的计算。Preferably, a register 44 is provided for storing the calibration resistance value. Register 44 is coupled to controller 43 so that controller 43 can access register 44. Thus, when the fuel gauge is in the power calculation state, its value REGcal can be called from the register 44 to calculate the power.

图4是本发明另一实施例的电量计的电原理图。参考图4所示,本实施例的电量计30包括测量电阻Rsense、放大器31、模数转换器(ADC)32、33、累加器34、时间基准(time base)电路35、电流源36和校准使能电路40。放大器31和ADC 33组成电压采样器,放大器31的输入端连接于测量电阻Rsense的两端,输出端连接ADC 33的输入端。ADC 33的输出端连接累加器34。累加器34和时间基准电路35组成电量累加器。4 is an electrical schematic diagram of a fuel gauge according to another embodiment of the present invention. Referring to FIG. 4, the fuel gauge 30 of the present embodiment includes a measurement resistor Rsense, an amplifier 31, an analog-to-digital converter (ADC) 32, 33, an accumulator 34, a time base circuit 35, a current source 36, and a calibration. The circuit 40 is enabled. The amplifier 31 and the ADC 33 form a voltage sampler. The input of the amplifier 31 is connected to both ends of the measuring resistor Rsense, and the output terminal is connected to the input terminal of the ADC 33. The output of ADC 33 is coupled to accumulator 34. The accumulator 34 and the time reference circuit 35 constitute a power accumulator.

电流采集校准电路40包括电池BAT、第一开关SW1、第二开关SW2、校准使能电路41、电流源42和控制器43。电池BAT与测量电阻Rsense串联,且通过第一开关SW1与负载RL并联。第二开关SW2、电流源42和电池BAT、测量电阻Rsense并联。测量电阻Rsense标称阻值是Rsense,然而由于焊接电阻值Rsolder的引入,实际阻值Rsns为Rsense与Rsolder之和。另外,考虑到测量电阻Rsense的实际值Rsense’和标称值的不同,实际阻值Rsns为Rsense’与Rsolder之和。电流源42具有电流Ical。为了保证校准的精确度,Ical需要保持稳定,且具有较低的误差。例如Ical的误差在±1%。The current collection calibration circuit 40 includes a battery BAT, a first switch SW1, a second switch SW2, a calibration enable circuit 41, a current source 42, and a controller 43. The battery BAT is connected in series with the measuring resistor Rsense and in parallel with the load RL through the first switch SW1. The second switch SW2, the current source 42 and the battery BAT, and the measuring resistor Rsense are connected in parallel. The nominal resistance of the measuring resistor Rsense is Rsense, however due to the introduction of the welding resistance value Rsolder, the actual resistance value Rsns is the sum of Rsense and Rsolder. Further, considering the difference between the actual value Rsense' of the measuring resistor Rsense and the nominal value, the actual resistance value Rsns is the sum of Rsense' and Rsolder. Current source 42 has a current Ical. In order to ensure the accuracy of the calibration, Ical needs to be stable and has a low error. For example, the error of Ical is ±1%.

本实施例的电量计具有电量计算和电阻校准两种状态。为此,提供第一状态信号和第二状态信号,分别对应这两种状态,用来控制第一开关SW1和第二开关SW2。电量计算通常是在电量计所在设备开机后进行,因此选择在电量计所在设备的开机状态信号作为第一状态信号,提供给第一开关SW1。第一开关SW1受到开机状态信号的控制而断开和闭合,即当开机状态信号显示设备开机时,第一开关SW1闭合,否则第一开关SW1断开。电量计所在设备关机 时,更能保证校准的准确性,因此选择在电量计所在设备的关机状态信号作为第二状态信号,提供给第二开关SW2。本实施例与前一实施例的不同之处在于,校准使能电路41根据电池在位信号和关机状态信号来产生第二状态信号。此时校准使能电路41可实施为与门。也就是说,只有电池在位,且电量计所在设备处于关机状态时,才进行校准。The fuel gauge of this embodiment has two states of power calculation and resistance calibration. To this end, a first state signal and a second state signal are provided, respectively corresponding to the two states, for controlling the first switch SW1 and the second switch SW2. The power calculation is usually performed after the device where the fuel gauge is turned on. Therefore, the power-on state signal of the device where the fuel gauge is located is selected as the first state signal, and is supplied to the first switch SW1. The first switch SW1 is turned off and closed by the control of the power-on state signal, that is, when the power-on state signal display device is turned on, the first switch SW1 is closed, otherwise the first switch SW1 is turned off. The device where the fuel gauge is located is turned off When the accuracy of the calibration is more ensured, the shutdown state signal of the device where the fuel gauge is located is selected as the second state signal and supplied to the second switch SW2. The present embodiment is different from the previous embodiment in that the calibration enable circuit 41 generates a second state signal based on the battery in-position signal and the off-state signal. At this time, the calibration enable circuit 41 can be implemented as an AND gate. In other words, calibration is only performed when the battery is in place and the device where the fuel gauge is located is off.

在另一变化例中,电池在位信号可以替代为电源稳定信号,也就是说,只有电源稳定且电量计所在设备处于关机状态时,才进行校准。In another variation, the battery in-position signal can be replaced with a power supply stabilization signal, that is, calibration is performed only when the power supply is stable and the device in which the fuel gauge is located is off.

图5是本发明又一实施例的电量计的电原理图。参考图5所示,本实施例的电量计30包括测量电阻Rsense、放大器31、模数转换器(ADC)32、33、累加器34、时间基准(time base)电路35、电流源36和校准使能电路40。放大器31和ADC 33组成电压采样器,放大器31的输入端连接于测量电阻Rsense的两端,输出端连接ADC 33的输入端。ADC 33的输出端连接累加器34。累加器34和时间基准电路35组成电量累加器。Fig. 5 is an electrical schematic diagram of a fuel gauge according to still another embodiment of the present invention. Referring to FIG. 5, the fuel gauge 30 of the present embodiment includes a measurement resistor Rsense, an amplifier 31, an analog-to-digital converter (ADC) 32, 33, an accumulator 34, a time base circuit 35, a current source 36, and a calibration. The circuit 40 is enabled. The amplifier 31 and the ADC 33 form a voltage sampler. The input of the amplifier 31 is connected to both ends of the measuring resistor Rsense, and the output terminal is connected to the input terminal of the ADC 33. The output of ADC 33 is coupled to accumulator 34. The accumulator 34 and the time reference circuit 35 constitute a power accumulator.

电流采集校准电路40包括电池BAT、第一开关SW1、第二开关SW2、校准使能电路41、电流源42和控制器43。电池BAT与测量电阻Rsense串联,且通过第一开关SW1与负载RL并联。第二开关SW2、电流源42和电池BAT、测量电阻Rsense并联。测量电阻Rsense标称阻值是Rsense,然而由于焊接电阻值Rsolder的引入,实际阻值Rsns为Rsense与Rsolder之和。另外,考虑到测量电阻Rsense的实际值Rsense’和标称值的不同,实际阻值Rsns为Rsense’与Rsolder之和。电流源42具有电流Ical。为了保证校准的精确度,Ical需要保持稳定,且具有较低的误差。例如Ical的误差在±1%。另外,电流Ical的数值可以设定为100mA或者数百mA,根据需要而定。The current collection calibration circuit 40 includes a battery BAT, a first switch SW1, a second switch SW2, a calibration enable circuit 41, a current source 42, and a controller 43. The battery BAT is connected in series with the measuring resistor Rsense and in parallel with the load RL through the first switch SW1. The second switch SW2, the current source 42 and the battery BAT, and the measuring resistor Rsense are connected in parallel. The nominal resistance of the measuring resistor Rsense is Rsense, however due to the introduction of the welding resistance value Rsolder, the actual resistance value Rsns is the sum of Rsense and Rsolder. Further, considering the difference between the actual value Rsense' of the measuring resistor Rsense and the nominal value, the actual resistance value Rsns is the sum of Rsense' and Rsolder. Current source 42 has a current Ical. In order to ensure the accuracy of the calibration, Ical needs to be stable and has a low error. For example, the error of Ical is ±1%. In addition, the value of the current Ical can be set to 100 mA or hundreds of mA, as needed.

本实施例的电量计具有电量计算和电阻校准两种状态。为此,提供第一状态信号和第二状态信号,分别对应这两种状态,用来控制第一开关SW1和第二开关SW2。电量计算通常是在电量计所在设备开机后进行,因此选择在电量计所在设备的开机状态信号作为第一状态信号,提供给第一开关SW1。第一开关SW1受到开机状态信号的控制而断开和闭合,即当开机状态信号显示设备开机时,第一开关SW1闭合,否则第一开关SW1断开。电量计所在设备关机时,更能保证校准的准确性,因此选择在电量计所在设备的关机状态信号作为 第二状态信号,提供给第二开关SW2。本实施例与前一实施例的不同之处在于,电流采集校准电路40还包括寄存器45,其保存一校准标志位。在控制器43得到校准电阻值后,将校准标志位置位(例如置位1)。校准使能电路41会先检测该校准标志位,且在该校准标志位未被置位时,再根据电池在位信号和关机状态信号来产生第二状态信号。此时校准使能电路41可实施为具有3个信号输入端的与门。也就是说,只有未进行过校准,电池在位,且电量计所在设备处于关机状态时,才进行校准。The fuel gauge of this embodiment has two states of power calculation and resistance calibration. To this end, a first state signal and a second state signal are provided, respectively corresponding to the two states, for controlling the first switch SW1 and the second switch SW2. The power calculation is usually performed after the device where the fuel gauge is turned on. Therefore, the power-on state signal of the device where the fuel gauge is located is selected as the first state signal, and is supplied to the first switch SW1. The first switch SW1 is turned off and closed by the control of the power-on state signal, that is, when the power-on state signal display device is turned on, the first switch SW1 is closed, otherwise the first switch SW1 is turned off. When the device where the fuel gauge is turned off, the accuracy of the calibration can be ensured. Therefore, the signal of the shutdown state of the device where the fuel gauge is located is selected. The second state signal is supplied to the second switch SW2. The present embodiment differs from the previous embodiment in that the current acquisition calibration circuit 40 further includes a register 45 that holds a calibration flag. After the controller 43 obtains the calibration resistance value, the calibration flag is set (eg, set to 1). The calibration enable circuit 41 first detects the calibration flag bit, and when the calibration flag bit is not set, generates a second state signal based on the battery in-position signal and the off-state signal. At this time, the calibration enable circuit 41 can be implemented as an AND gate having three signal inputs. That is to say, calibration is performed only when the calibration is not performed, the battery is in place, and the device where the fuel gauge is located is turned off.

在另一变化例中,电池在位信号可以替代为电源稳定信号,也就是说,只有电源稳定且电量计所在设备处于关机状态时,才进行校准。In another variation, the battery in-position signal can be replaced with a power supply stabilization signal, that is, calibration is performed only when the power supply is stable and the device in which the fuel gauge is located is off.

图6是本发明一实施例的电流采集校准方法流程图。参考图6所示,本实施例的电流采集校准方法是电源管理芯片处于上电复位状态时,执行以下步骤:6 is a flow chart of a current collection calibration method according to an embodiment of the present invention. Referring to FIG. 6, when the current management calibration method of the embodiment is in the power-on reset state, the following steps are performed:

在步骤61,检测电量计所在设备是否处于关机状态,如果是,则进入步骤62,否则继续等待;In step 61, it is detected whether the device where the fuel gauge is located is in a shutdown state, and if yes, proceeds to step 62, otherwise continues to wait;

在步骤62,判断是否有开机向量存在,如果是则进入步骤66,否则进入步骤63;在此开机向量是能够引起电量计所在设备开机的事件,例如按下开机键、开始充电等;In step 62, it is determined whether there is a boot vector, if yes, proceed to step 66, otherwise proceed to step 63; where the boot vector is an event that can cause the device of the fuel gauge to be powered on, such as pressing a power button, starting charging, etc.;

在步骤63,执行电阻值校准;具体校准过程可参考前文的实施例,在此不再展开;In step 63, the resistance value calibration is performed; the specific calibration process can refer to the foregoing embodiment, and is not expanded here;

在步骤64,把校准电阻值写入寄存器;At step 64, the calibration resistor value is written to the register;

在步骤65,再次判断是否有开机向量存在,如果有则进入步骤66,否则继续等待;In step 65, it is determined again whether there is a boot vector, if yes, proceed to step 66, otherwise continue to wait;

在步骤66,开机,电量计执行电量计算;At step 66, the power is turned on, and the fuel gauge performs a power calculation;

在步骤67,执行电量计算时调用寄存器的值进行计算;At step 67, the value of the register is called for calculation when performing the power calculation;

在步骤68,循环执行电量计算。At step 68, the power calculation is performed cyclically.

图7是本发明另一实施例的电流采集校准方法流程图。参考图7所示,本实施例的电流采集校准方法是电源管理芯片处于上电复位状态时,执行以下步骤:7 is a flow chart of a current collection calibration method according to another embodiment of the present invention. Referring to FIG. 7, when the current management calibration method of the embodiment is in the power-on reset state, the following steps are performed:

在步骤71,检测电量计所在设备是否处于关机状态,如果是,则进入步骤62,否则继续等待; In step 71, it is detected whether the device where the fuel gauge is located is in a shutdown state, and if yes, proceeds to step 62, otherwise continues to wait;

在步骤72,判断校准标志位是否为1,如果为1表明执行过校准,进入步骤73,否则进入步骤74;In step 72, it is determined whether the calibration flag is 1, if it is 1 indicating that the calibration has been performed, proceeds to step 73, otherwise proceeds to step 74;

在步骤73,判断是否有开机向量存在,如果是则进入步骤77,否则继续等待;在此开机向量是能够引起电量计所在设备开机的事件,例如按下开机键、开始充电等;In step 73, it is determined whether there is a boot vector, if yes, proceed to step 77, otherwise continue to wait; where the boot vector is an event that can cause the device of the fuel gauge to be powered on, such as pressing a power button, starting charging, etc.;

在步骤74,执行电阻值校准;具体校准过程可参考前文的实施例,在此不再展开;In step 74, the resistance value calibration is performed; the specific calibration process can refer to the foregoing embodiment, and is not expanded here;

在步骤75,把校准电阻值写入寄存器,并且置位校准标志位;At step 75, the calibration resistance value is written to the register and the calibration flag is set;

在步骤76,再次判断是否有开机向量存在,如果有则进入步骤66,否则继续等待;In step 76, it is determined again whether there is a boot vector, if yes, proceed to step 66, otherwise continue to wait;

在步骤77,开机,电量计执行电量计算;At step 77, the power is turned on, and the fuel gauge performs a power calculation;

在步骤78,执行电量计算时调用寄存器的值进行计算;At step 78, the value of the register is called for calculation when performing the power calculation;

在步骤79,循环执行电量计算。At step 79, the power calculation is performed cyclically.

图8是本发明又一实施例的电流采集校准方法流程图。参考图8所示,本实施例的电流采集校准方法是电源管理芯片处于上电复位状态时,执行以下步骤:FIG. 8 is a flow chart of a current collection calibration method according to still another embodiment of the present invention. Referring to FIG. 8, the current collection calibration method of the embodiment is that when the power management chip is in the power-on reset state, the following steps are performed:

在步骤81,判断电池是否在位,如果是则进入步骤83,否则进入步骤82;In step 81, it is determined whether the battery is in place, if yes, then proceeds to step 83, otherwise proceeds to step 82;

在步骤82,判断电源是否稳定,如果是则进入步骤83,否则回到步骤81;In step 82, it is determined whether the power supply is stable, if yes, then proceeds to step 83, otherwise returns to step 81;

在步骤83,检测电量计所在设备是否处于关机状态,如果是,则进入步骤84,否则继续等待;In step 83, it is detected whether the device where the fuel gauge is located is in a shutdown state, and if yes, proceeds to step 84, otherwise continues to wait;

在步骤84,判断校准标志位是否为1,如果为1表明执行过校准,进入步骤85,否则进入步骤86;In step 84, it is determined whether the calibration flag is 1, if it is 1 indicates that the calibration has been performed, proceeds to step 85, otherwise proceeds to step 86;

在步骤85,判断是否有开机向量存在,如果是则进入步骤89,否则继续等待;在此开机向量是能够引起电量计所在设备开机的事件,例如按下开机键、开始充电等;In step 85, it is determined whether there is a boot vector, if yes, proceed to step 89, otherwise continue to wait; where the boot vector is an event that can cause the device of the fuel gauge to be powered on, such as pressing a power button, starting charging, etc.;

在步骤86,执行电阻值校准;具体校准过程可参考前文的实施例,在此不再展开;At step 86, the resistance value calibration is performed; the specific calibration process can refer to the foregoing embodiment, and is not expanded here;

在步骤87,把校准电阻值写入寄存器,并且置位校准标志位;At step 87, the calibration resistance value is written to the register and the calibration flag is set;

在步骤88,再次判断是否有开机向量存在,如果有则进入步骤66,否则继 续等待;At step 88, it is again determined whether there is a boot vector present, if yes, then proceeds to step 66, otherwise Continue to wait;

在步骤89,开机,电量计执行电量计算;In step 89, the power is turned on, and the fuel gauge performs a power calculation;

在步骤90,执行电量计算时调用寄存器的值进行计算;At step 90, the value of the register is called for calculation when performing the power calculation;

在步骤91,循环执行电量计算。At step 91, the power calculation is performed cyclically.

另外,当开机并把各路电源开启后,负载电流加大就会影响校准值。所以校准要在关机条件下进行。为了避免在执行电阻值校准的过程中开机而影响校准精度,图7所示实施例可进一步优化为图9所示实施例。参考图9所示,本实施例的电流采集校准方法是电源管理芯片处于上电复位状态时,执行以下步骤:In addition, when the power is turned on and the power is turned on, the load current is increased to affect the calibration value. Therefore, the calibration should be performed under shutdown conditions. In order to avoid the startup accuracy during the execution of the resistance value calibration, the embodiment shown in Fig. 7 can be further optimized to the embodiment shown in Fig. 9. Referring to FIG. 9, the current collection calibration method of the embodiment is that when the power management chip is in the power-on reset state, the following steps are performed:

在步骤1001,检测电量计所在设备是否处于关机状态,如果是,则进入步骤62,否则继续等待;In step 1001, it is detected whether the device where the fuel gauge is located is in a shutdown state, and if yes, proceeds to step 62, otherwise continues to wait;

在步骤1002,判断校准标志位是否为1,如果为1表明执行过校准,进入步骤1003,否则进入步骤1004;In step 1002, it is determined whether the calibration flag is 1, if it is 1 indicating that the calibration has been performed, proceeds to step 1003, otherwise proceeds to step 1004;

在步骤1003,判断是否有开机向量存在,如果是则进入步骤1011,否则继续等待;在此开机向量是能够引起电量计所在设备开机的事件,例如按下开机键、开始充电等;In step 1003, it is determined whether there is a boot vector, if yes, proceed to step 1011, otherwise continue to wait; where the boot vector is an event that can cause the device of the fuel gauge to be powered on, such as pressing a power button, starting charging, etc.;

在步骤1004,判断是否有开机向量存在,如果是则进入步骤1008,否则进入步骤1005;In step 1004, it is determined whether there is a boot vector exists, if yes, then proceeds to step 1008, otherwise proceeds to step 1005;

在步骤1005,执行电阻值校准;具体校准过程可参考前文的实施例,在此不再展开;In step 1005, the resistance value calibration is performed; the specific calibration process can refer to the foregoing embodiment, and is not expanded here;

在步骤1006,把校准电阻值写入寄存器,并且置位校准标志位;At step 1006, the calibration resistance value is written to the register and the calibration flag is set;

在步骤1007,再次判断是否有开机向量存在,如果有则进入步骤66,否则继续等待;In step 1007, it is determined again whether there is a boot vector, if yes, proceed to step 66, otherwise continue to wait;

在步骤1008,执行电阻值校准;At step 1008, performing a resistance value calibration;

在步骤1009,执行开机流程;In step 1009, a boot process is performed;

在步骤1010,把校准电阻值写入寄存器,并且置位校准标志位;At step 1010, the calibration resistance value is written to the register and the calibration flag is set;

在步骤1011,开机,电量计执行电量计算;In step 1011, the power is turned on, and the fuel gauge performs a power calculation;

在步骤1012,执行电量计算时调用寄存器的值进行计算;In step 1012, the value of the register is called when performing the power calculation;

在步骤1013,循环执行电量计算。 At step 1013, the power calculation is performed cyclically.

也就是说,在步骤1004判断开机向量存在时,不立即执行开机流程,而是延迟预定时间(例如100ms),并在预定时间内,于步骤1008执行电阻值校准,然后在于步骤1009执行开机流程。That is, when it is determined in step 1004 that the boot vector exists, the boot process is not immediately executed, but the predetermined time (for example, 100 ms) is delayed, and the resistance value calibration is performed in step 1008 for a predetermined time, and then the boot process is executed in step 1009. .

本发明上述实施例的电量计及其电流校准电路,通过校准精密电阻贴装后的实际值,消除贴装和电阻本身的误差,并把校准值写入电池电压域的寄存器内,正常运行时调用该值进行电量计算,从而优化了电量计计算精度。本发明上述实施例的电流校准方法通过严密的流程设计,分别确保了校准的时机和开机进行电量计算的时机,保证了校准的准确性和电流计算的准确性。The fuel gauge and the current calibration circuit of the above embodiment of the present invention eliminate the error of the mounting and the resistor itself by calibrating the actual value after the precision resistor is mounted, and write the calibration value into the register of the battery voltage domain, during normal operation. This value is called for power calculation, which optimizes the calculation accuracy of the fuel gauge. The current calibration method of the above embodiment of the present invention ensures the timing of calibration and the timing of power calculation by the strict process design, which ensures the accuracy of calibration and the accuracy of current calculation.

虽然本发明已参照当前的具体实施例来描述,但是本技术领域中的普通技术人员应当认识到,以上的实施例仅是用来说明本发明,在没有脱离本发明精神的情况下还可作出各种等效的变化或替换,因此,只要在本发明的实质精神范围内对上述实施例的变化、变型都将落在本申请的权利要求书的范围内。 While the invention has been described with respect to the embodiments of the present invention, it will be understood by those skilled in the art Various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (17)

一种电量计,包括测量电阻、电压采样器、电量累加器以及电流采集校准电路,该电压采样器的输入端连接于该测量电阻两端,该电压采样器的输出端连接该电量累加器,,A fuel gauge includes a measuring resistor, a voltage sampler, a power accumulator, and a current collecting calibration circuit, wherein an input end of the voltage sampler is connected to the two ends of the measuring resistor, and an output end of the voltage sampler is connected to the electric quantity accumulator. , 该电流采集校准电路包括电池、第一开关、第二开关、校准使能电路、电流源和控制器,该电池与该测量电阻串联,且通过该第一开关与负载并联,该第一开关受到第一状态信号的控制而断开和闭合,该第二开关、该电流源和该电池、该测量电阻并联;其中该校准使能电路产生第二状态信号并输出给该第二开关,该第二开关受到该第二状态信号的控制而断开和闭合;The current collection calibration circuit includes a battery, a first switch, a second switch, a calibration enable circuit, a current source, and a controller. The battery is connected in series with the measurement resistor, and is connected in parallel with the load through the first switch, the first switch is received Disconnecting and closing the first state signal, the second switch, the current source and the battery, the measuring resistor are connected in parallel; wherein the calibration enabling circuit generates a second state signal and outputs the second state switch to the second switch The second switch is opened and closed by the control of the second state signal; 其中当该第二开关闭合时,该电流源、该电池和该测量电阻组成回路,且该控制器根据该电流源的电流值和该电压采样器的采样值计算该测量电阻的校准电阻值;When the second switch is closed, the current source, the battery and the measuring resistor form a loop, and the controller calculates a calibration resistance value of the measuring resistor according to the current value of the current source and the sampling value of the voltage sampler; 当该第一开关闭合时,该电池、该测量电阻与该负载组成回路,且该控制器采用该校准电阻值进行电量计算。When the first switch is closed, the battery, the measuring resistor and the load form a loop, and the controller uses the calibration resistance value to perform a power calculation. 如权利要求1所述的电量计,其特征在于,该第一状态信号为该电量计所在设备的开机状态信号。The fuel gauge of claim 1 wherein the first status signal is a power on state signal of the device in which the fuel gauge is located. 如权利要求1所述的电量计,其特征在于,该校准使能电路根据该电量计所在设备的关机状态信号产生该第二状态信号。The fuel gauge of claim 1 wherein the calibration enable circuit generates the second status signal based on a shutdown status signal of the device in which the fuel gauge is located. 如权利要求1所述的电量计,其特征在于,该校准使能电路根据该电量计所在设备的关机状态信号,以及该电池的在位信号和电源稳定信号其中之一产生该第二状态信号。The fuel gauge according to claim 1, wherein the calibration enabling circuit generates the second state signal according to a shutdown state signal of the device in which the fuel gauge is located, and one of an in-position signal and a power stabilization signal of the battery. . 如权利要求3或4所述的电量计,其特征在于,该校准使能电路还检测一校准标志位,且在该校准标志位被置位时产生该第二状态信号。A fuel gauge according to claim 3 or 4, wherein the calibration enable circuit further detects a calibration flag and generates the second state signal when the calibration flag is set. 如权利要求1所述的电量计,其特征在于,该电流采集校准电路还包括用于储存该测量电阻的校准电阻值的寄存器,该寄存器连接该控制器以便该控制器能够访问该寄存器。The fuel gauge of claim 1 wherein the current acquisition calibration circuit further comprises a register for storing a calibration resistance value of the measurement resistor, the register being coupled to the controller for the controller to access the register. 一种电量计的电流采集校准电路,该电量计包括测量电阻以及电压采样器,该电压采样器的输入端连接于该测量电阻两端, A current collecting calibration circuit for a fuel gauge, the fuel gauge comprising a measuring resistor and a voltage sampler, wherein an input end of the voltage sampler is connected to the two ends of the measuring resistor 其中该电流采集校准电路包括电池、第一开关、第二开关、校准使能电路、电流源和控制器,该电池与该测量电阻串联,且通过该第一开关与负载并联,该第一开关受到第一状态信号的控制而断开和闭合,该第二开关、该电流源和该电池、该测量电阻并联,该控制器连接该电压采样器;其中该校准使能电路产生第二状态信号并输出给该第二开关,该第二开关受到该第二状态信号的控制而断开和闭合;The current collection calibration circuit includes a battery, a first switch, a second switch, a calibration enable circuit, a current source, and a controller. The battery is connected in series with the measurement resistor, and is connected in parallel with the load through the first switch, the first switch Disconnected and closed by the control of the first state signal, the current source and the battery, the measuring resistor are connected in parallel, the controller is connected to the voltage sampler; wherein the calibration enabling circuit generates the second state signal And outputting to the second switch, the second switch being opened and closed by the control of the second state signal; 其中当该第二开关闭合时,该电流源、该电池和该测量电阻组成回路,且该控制器根据该电流源的电流值和该电压采样器的采样值计算该测量电阻的校准电阻值;When the second switch is closed, the current source, the battery and the measuring resistor form a loop, and the controller calculates a calibration resistance value of the measuring resistor according to the current value of the current source and the sampling value of the voltage sampler; 当该第一开关闭合时,该电池、该测量电阻与该负载组成回路,且该控制器采用该校准电阻值进行电量计算。When the first switch is closed, the battery, the measuring resistor and the load form a loop, and the controller uses the calibration resistance value to perform a power calculation. 如权利要求7所述的电流采集校准电路,其特征在于,该校准使能电路根据该电量计所在设备的关机状态信号产生该第二状态信号。The current acquisition calibration circuit of claim 7 wherein the calibration enable circuit generates the second status signal based on a shutdown status signal of the device in which the fuel gauge is located. 如权利要求7所述的电流采集校准电路,其特征在于,该校准使能电路根据该电量计所在设备的关机状态信号,以及该电池的在位信号和电源稳定信号其中之一产生该第二状态信号。The current collecting calibration circuit according to claim 7, wherein the calibration enabling circuit generates the second according to a shutdown state signal of the device where the fuel gauge is located, and one of an in-position signal and a power stabilization signal of the battery. Status signal. 如权利要求8或9所述的电流采集校准电路,其特征在于,该校准使能电路还检测一校准标志位,且在该校准标志位未被置位时产生该第二状态信号。The current acquisition calibration circuit of claim 8 or 9, wherein the calibration enable circuit further detects a calibration flag and generates the second state signal when the calibration flag is not set. 如权利要求7所述的电流采集校准电路,其特征在于,还包括用于储存该测量电阻的校准电阻值的寄存器,该寄存器连接该控制器。The current acquisition calibration circuit of claim 7 further comprising a register for storing a calibration resistance value of the measurement resistor, the register being coupled to the controller. 一种电量计的电流采集校准方法,该电量计包括测量电阻、电压采样器、电量累加器以及电流采集校准电路,该电压采样器的输入端连接于该测量电阻两端,该电压采样器的输出端连接该电量累加器,该第一开关受到第一状态信号的控制而断开和闭合,该电流采集校准电路包括电池、第一开关、第二开关和电流源,该电池与该测量电阻串联,且通过该第一开关与负载并联,该第二开关、该电流源和该电池、该测量电阻并联;其中该第一开关受到第一状态信号的控制而断开和闭合,该第二开关受到第二状态信号的控制而断开和闭合,该方法包括如下步骤: A current collecting calibration method for a fuel gauge, the fuel gauge comprising a measuring resistor, a voltage sampler, a power accumulator, and a current collecting calibration circuit, wherein an input end of the voltage sampler is connected to the two ends of the measuring resistor, the voltage sampler The output terminal is connected to the power accumulator, the first switch is opened and closed by the control of the first state signal, the current collecting calibration circuit comprises a battery, a first switch, a second switch and a current source, the battery and the measuring resistor Connected in series, and connected in parallel with the load through the first switch, the second switch, the current source and the battery, the measuring resistor are connected in parallel; wherein the first switch is opened and closed by the control of the first state signal, the second The switch is opened and closed by the control of the second state signal, the method comprising the steps of: 提供该第二状态信号使该第二开关闭合,该电流源、该电池和该测量电阻组成回路;Providing the second state signal to close the second switch, the current source, the battery and the measuring resistor forming a loop; 根据该电流源的电流值和该电压采样器的采样值计算该测量电阻的校准电阻值;Calculating a calibration resistance value of the measurement resistor according to a current value of the current source and a sample value of the voltage sampler; 提供该第一状态信号使该第一开关闭合,该电池、该测量电阻与该负载组成回路,且该控制器采用该校准电阻值进行电量计算。The first state signal is provided to close the first switch, the battery, the measuring resistor and the load form a loop, and the controller uses the calibration resistance value to perform a power calculation. 如权利要求12所述的电流采集校准方法,其特征在于,该第一状态信号为该电量计的开机状态信号。The current collecting calibration method according to claim 12, wherein the first state signal is a power-on state signal of the fuel gauge. 如权利要求12所述的电流采集校准方法,其特征在于,根据该电量计所在设备的关机状态信号提供该第二状态信号。The current collecting calibration method according to claim 12, wherein the second state signal is provided according to a shutdown state signal of the device in which the fuel gauge is located. 如权利要求12所述的电流采集校准方法,其特征在于,根据该电量计所在设备的关机状态信号,以及该电池的在位信号和电源稳定信号其中之一提供该第二状态信号。The current collection calibration method according to claim 12, wherein the second state signal is provided according to a shutdown state signal of the device in which the fuel gauge is located, and one of an in-position signal and a power stabilization signal of the battery. 如权利要求14或15所述的电流采集校准方法,其特征在于还包括:The current collection calibration method according to claim 14 or 15, further comprising: 在得到该校准电阻值后,将一校准标志位置位,After obtaining the calibration resistance value, a calibration flag is set, 其中检测该校准标志位,且在该校准标志位未被置位时产生该第二状态信号。The calibration flag is detected and the second status signal is generated when the calibration flag is not set. 如权利要求16所述的电流采集校准方法,其特征在于,在该校准标志位未被置位时,如果收到该电量计所在设备的开机向量,仍然提供该第二状态信号,而暂缓开机流程。 The current collecting and calibrating method according to claim 16, wherein when the calibration flag is not set, if the power-on vector of the device where the fuel gauge is located is received, the second state signal is still provided, and the second state signal is temporarily suspended. Process.
PCT/CN2017/077653 2017-03-22 2017-03-22 Electrical quantity meter, current-sampling calibration circuit and method of calibration Ceased WO2018170775A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201780010235.0A CN108966670B (en) 2017-03-22 2017-03-22 Electric meter and current acquisition calibration circuit and calibration method thereof
PCT/CN2017/077653 WO2018170775A1 (en) 2017-03-22 2017-03-22 Electrical quantity meter, current-sampling calibration circuit and method of calibration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/077653 WO2018170775A1 (en) 2017-03-22 2017-03-22 Electrical quantity meter, current-sampling calibration circuit and method of calibration

Publications (1)

Publication Number Publication Date
WO2018170775A1 true WO2018170775A1 (en) 2018-09-27

Family

ID=63584883

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/077653 Ceased WO2018170775A1 (en) 2017-03-22 2017-03-22 Electrical quantity meter, current-sampling calibration circuit and method of calibration

Country Status (2)

Country Link
CN (1) CN108966670B (en)
WO (1) WO2018170775A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114200325A (en) * 2021-11-05 2022-03-18 深圳优地科技有限公司 Battery electric quantity calibration method, robot control device and robot
CN114706003A (en) * 2022-03-24 2022-07-05 深圳市道通智能航空技术股份有限公司 Electricity meter adjusting method, battery state determining method and battery system
CN115133833A (en) * 2022-07-29 2022-09-30 江苏爱玛车业科技有限公司 Automatic calibration method and device for bus current of motor controller

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111697659A (en) * 2020-06-24 2020-09-22 北京捷莱特技术有限公司 Battery management circuit
CN113759257A (en) * 2020-07-17 2021-12-07 北京京东尚科信息技术有限公司 Current compensation circuit and method for electronic equipment and electronic equipment
CN113094230B (en) * 2021-03-31 2024-03-12 宁畅信息产业(北京)有限公司 Power consumption monitoring method and power consumption monitoring main board
CN115308662B (en) * 2022-08-12 2025-05-30 国核自仪系统工程有限公司 Analog input channel calibration device, system, method, equipment and medium
CN120908513A (en) * 2024-04-30 2025-11-07 荣耀终端股份有限公司 Detection chip, circuit board, electronic device and current detection method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5928678A (en) * 1982-08-10 1984-02-15 Fuji Photo Film Co Ltd Display device of residual electric power of battery
US20120283970A1 (en) * 2009-11-19 2012-11-08 Andre Boehm Method and device for error-compensated current measurement of an electrical accumulator
CN202794494U (en) * 2012-09-28 2013-03-13 贵州航天计量测试技术研究所 Device for four-point probe resistivity tester verification
CN103592508A (en) * 2013-12-04 2014-02-19 珠海全志科技股份有限公司 Current detection device used for coulomb measurement
CN105229479A (en) * 2013-12-14 2016-01-06 雅盖隆大学 The system and method for the electric charge slowly changed is measured for Cumulate Sum
CN205861886U (en) * 2016-05-05 2017-01-04 天津市计量监督检测科学研究院 A kind of High-accuracy direct current coulomb meter, coulometer

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006080067A1 (en) * 2005-01-27 2006-08-03 Panasonic Ev Energy Co., Ltd. Secondary cell charge/discharge electricity amount estimation method and device, secondary cell polarization voltage estimation method and device, and secondary cell remaining capacity estimation method and device
US7531989B2 (en) * 2005-11-02 2009-05-12 02Micro International Ltd. Battery fuel gauge circuit
CN201508380U (en) * 2009-10-21 2010-06-16 金亮 Wireless electric quantity charging device
US8717033B2 (en) * 2010-09-21 2014-05-06 Maxim Integrated Products, Inc. Integrated MOSFET current sensing for fuel-gauging
DE102012212978B3 (en) * 2012-07-24 2013-08-22 Siemens Aktiengesellschaft Process measuring device for measuring physical or chemical quantities, such as pressure or flow used in process automation and process technology, has measuring unit for converting non-electrical quantity into electrical measurement signal
CN104200635A (en) * 2014-09-19 2014-12-10 上海电器科学研究院 Wireless switch with function of electrical quantity metering and acquisition method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5928678A (en) * 1982-08-10 1984-02-15 Fuji Photo Film Co Ltd Display device of residual electric power of battery
US20120283970A1 (en) * 2009-11-19 2012-11-08 Andre Boehm Method and device for error-compensated current measurement of an electrical accumulator
CN202794494U (en) * 2012-09-28 2013-03-13 贵州航天计量测试技术研究所 Device for four-point probe resistivity tester verification
CN103592508A (en) * 2013-12-04 2014-02-19 珠海全志科技股份有限公司 Current detection device used for coulomb measurement
CN105229479A (en) * 2013-12-14 2016-01-06 雅盖隆大学 The system and method for the electric charge slowly changed is measured for Cumulate Sum
CN205861886U (en) * 2016-05-05 2017-01-04 天津市计量监督检测科学研究院 A kind of High-accuracy direct current coulomb meter, coulometer

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114200325A (en) * 2021-11-05 2022-03-18 深圳优地科技有限公司 Battery electric quantity calibration method, robot control device and robot
CN114200325B (en) * 2021-11-05 2024-02-20 深圳优地智能有限公司 Battery electric quantity calibration method, control device of robot and robot
CN114706003A (en) * 2022-03-24 2022-07-05 深圳市道通智能航空技术股份有限公司 Electricity meter adjusting method, battery state determining method and battery system
CN115133833A (en) * 2022-07-29 2022-09-30 江苏爱玛车业科技有限公司 Automatic calibration method and device for bus current of motor controller

Also Published As

Publication number Publication date
CN108966670B (en) 2021-01-08
CN108966670A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
WO2018170775A1 (en) Electrical quantity meter, current-sampling calibration circuit and method of calibration
CN103168247B (en) System and method for determining remaining battery capacity of a battery device
CN101236236B (en) Battery remaining capacity predicting apparatus
CN100546095C (en) Battery pack and its remaining capacity information supply device
WO2010004984A1 (en) Battery state monitoring device
WO2019057006A1 (en) Battery detection method
TWI439714B (en) Battery voltage measurement
US10862175B2 (en) Battery fuel gauge circuit
CN101339230A (en) Device and method for measuring battery internal resistance
US20150025823A1 (en) Temperature-compensated state of charge estimation for rechargeable batteries
CN106970333A (en) The method and device of internal resistance of cell detection
JP2023101509A (en) Semiconductor device and method for detecting remaining battery level
WO2019140956A1 (en) Electricity quantity metering accuracy detection method, device and computer storage medium
TWI505530B (en) Battery capacitance detecting system
CN105403837A (en) System and method for determining remaining battery capacity of a battery device
CN105548887A (en) Battery power value calibration method and device thereof
JP7141236B2 (en) BATTERY LEVEL DETECTION CIRCUIT, ELECTRONIC DEVICE USING THE SAME, BATTERY LEVEL DETECTION METHOD
CN110133506A (en) A kind of device and its calculation method using the time for calculating lithium battery residue
JP2003017139A (en) Battery level measurement device
CN113169385A (en) Battery pack, circuitry to measure battery current, and device to measure battery current
CN108363012B (en) A system and method for detecting faults of key components of a vehicle lithium battery starting power supply
US20150042349A1 (en) Voltage measurement
US11114705B2 (en) Current measurement and voltage control approach
JP5852882B2 (en) A / D conversion circuit, A / D converter error correction device, and battery remaining amount detection device
JP6662033B2 (en) Method and apparatus for measuring resistance of storage element

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17901648

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17901648

Country of ref document: EP

Kind code of ref document: A1