Embodiments of the present invention provide a battery power statistical method, please refer toFigure 1-2The method includes:
Step S100: Get the output current of the battery;
Step S200: Get the operating temperature of the battery;
Specifically, the device is connected to the battery, the battery only provides electrical energy for the normal operation of the device. When the device is operating, the output current of the battery and the ambient temperature of the battery are operated in which the operating temperature is ambient temperature when operating.
Step S300: According to the output current, the operating temperature obtains the total capacity of the battery;
Among them, step S300 includes:
Step S310: At different temperatures, the corresponding relationship between the total capacity and the output current is obtained;
Step S320: According to the output current, the operating temperature, the corresponding relationship obtains the total capacity.
Specifically, at different temperatures, the correspondence between the output current and the total capacity is obtained by experiments, such asfigure 2 Indicated. The total capacity of the battery under the operating temperature is obtained according to the correspondence. The size of the battery output current directly affects the total capacity of the battery, and the present application will take the temperature and current to the battery capacity, and achieve the technical effect of obtaining accurate battery capacity, it is accurate Statistical battery power laying the foundation.
Step S400: A valid capacity of the battery is obtained according to the total capacity;
Among them, step S400 includes:
Step S410: A discharging coefficient of the battery is obtained;
Step S420: According to the total capacity, the discharging coefficient obtains the effective capacity of the battery.
Specifically, when the total amount of the battery is below a certain value, the battery cannot be discharged to the outside. The effective capacity of the battery is all of the electric charge used to discharge. The effective capacity of the battery = the total capacity × discharge coefficient, each battery has different discharging coefficients, and therefore, the user can select different discharge coefficients depending on the actual situation. In the present application embodiment, the discharge coefficient is 0.8.
Step S500: The power consumption behavior of the device is obtained;
Further, the power consumption behavior includes: sleep, up, down, work, search.
Further, the power consumption behavior is stored in the EEPROM.
Specifically, the power consumption is all power consumption behavior of the device, and the power consumption behavior of the device includes sleep, uplink, downward, work, search, etc. The power-consuming behavior is stored in a special EEPROM (Electrically ErasableProgramMable Read Only Memory, the powerful programmable read-only memory), even if the device is reset or powered down, the power supply behavior is not lost, ensuring the battery. Accuracy of the remaining power calculation. The power consumption behavior of the device is different in different working conditions. The dormant time, the time consumption, the number of upwards, and the power consumption, working state of the single downstream power consumption, the number of downward downstream power consumption, the number of downward times, and the power consumption of the single downstream, and the number of jobs corresponding to the working state, and the number of times and Single search power consumption.
Step S600: According to the valid capacity, the power consumption behavior obtains the residual amount of the battery;
Among them, step S600 includes:
Step S610: Sleeping power consumption;
Step S620: Get an uplink power consumption;
Step S630: Get the downstream power consumption
Step S640: Get the power consumption of power;
Step S650: Get the search power consumption;
Step S660: The effective capacity minus the sleeping charge, the upstream power consumption, the downlink power consumption, the search power consumption, and the remaining power.
Specifically, the dormant power consumption is the power consumption of the device in a sleep state, the sleep power consumption = hibernate time × Sleep current. The power consumption of the device is transmitted when the device is transmitted, and the upstream power consumption = the number of uplinks × power consumption of the single upstream. The downstream power consumption amount = upstream power consumption = single-line power consumption is applied.
The power consumption amount is the power consumption of the device in different working conditions, and the apparatus includes at least a first operating state, two working states, and the working current in the first working state is The first current, the working time of the first working state is the first working time. The current in the second working state is a second current, the working time of the second working state is a second working time, wherein the first operating state is different from the second operating state, the first The working current is different from the second operating current. The operating power is = first operating current × first working time + second operating current × second working time.
The search power consumption is the power consumption of the device, and the search power consumption is = Search time × single search power consumption. In this embodiment, step S610-Step S650 can be carried out simultaneously, there is no order between the five steps, as long as it is completed before step S660.
Surplus power = effective power - sleep power consumption - upstream power consumption - downower power consumption - Work consumption - Search power consumption.
Further, the method also includes obtaining a percentage of the remaining power of the battery;
It is determined whether the percentage of the remaining power is lower than the preset percentage;
When the percentage of the remaining power is lower than the preset percentage, the first prompt information is issued to the user.
Specifically, the remaining electricity percentage = the remaining electricity / the effective capacity × 100%, the preset percentage is a value pre-set value, and when the remaining power percentage is less than the preset percentage, The residual amount of the battery is insufficient, and the device issues a first prompt information, which is used to remind the user's battery power, reaching the remaining power of the battery in real time, and issues a prompt information in time, avoiding the device due to insufficient battery power. The technical effect.