US 12,222,399 B2
Method and apparatus for measuring remaining power level of device
Zhou Lu, Beijing (CN); and Huazhang Yu, Beijing (CN)
Assigned to Feitian Technologies Co. Ltd., Beijing (CN)
Appl. No. 17/799,563
Filed by FEITIAN TECHNOLOGIES CO., LTD., Beijing (CN)
PCT Filed Jun. 18, 2021, PCT No. PCT/CN2021/100762
§ 371(c)(1), (2) Date Aug. 12, 2022,
PCT Pub. No. WO2022/012261, PCT Pub. Date Jan. 20, 2022.
Claims priority of application No. 202010683762.1 (CN), filed on Jul. 16, 2020.
Prior Publication US 2023/0128424 A1, Apr. 27, 2023
Int. Cl. G01R 31/3842 (2019.01); G01R 31/36 (2020.01)
CPC G01R 31/3842 (2019.01) [G01R 31/3646 (2019.01)] 8 Claims
OG exemplary drawing
 
1. A method for calculating remaining electric quantity of a device, comprising the following steps:
S1) checking status of flags, executing Step S2 when a first flag is set, while executing Step S4 when a second flag is set;
S2) activating a timer to start counting, calculating a password, closing the timer after finishing calculating the password, stopping counting to obtain time for calculating the password, resetting the timer, adding the time for calculating the password to a fourth register, executing Step S3;
S3) displaying the password and the remaining electric quantity, resetting the first flag, going back to Step S1;
S4) checking battery voltage, obtaining a preset wake-up current value, a password calculating current value and a displaying current value according to the battery voltage detected and a pre-stored first data table, obtaining a total consumption of power by summing up a product of the wake-up current value and data in a first register, a product of the password calculating current value and data in a fourth register, and a product of the displaying current value and a result of a first preset value minus data in the fourth register;
S5) updating the remaining electric quantity according to the total consumption of power and a second preset value, resetting the second flag and going back to Step S1;
in a process of executing Step S1 to Step S5, when a real time clock interruption is detected, executing Step A1 to Step A4, the real time clock interruption is triggered every first preset time period;
A1) activating a timer to start counting, updating a second register and a sixth register by adding the first preset time period to data in the second register and the data in the sixth register respectively, when the data in the second register is equal to a fourth preset value, executing Step A2; when the data in the second register is equal to the first preset value, executing Step A3;
A2) setting the first flag, clearing the data in the sixth register, then executing Step A4;
A3) setting the second flag, then executing Step A4;
A4) closing the timer to stop counting, obtaining a time period for waking up, then adding the time period for waking up into the first register.