Patent Description:
This application relates generally to battery technology including, but not limited to, methods and systems for monitoring charge levels of a rechargeable battery in an electronic device and protecting the rechargeable battery from damage caused by being kept on a charger for too long.

Rechargeable batteries, such as lithium-ion batteries, are commonly used in electronic devices. When a battery is kept on a charger for too long, overcharge conditions can lead to battery swelling due to the build-up of heat and gas inside the battery. This failure state can cause fires, destroy the product, cause damage to a user's home, or injure the user.

A rechargeable battery can be equipped with charger integrated circuits (ICs) and fuel gauge ICs, which inform a user about a charge state of the battery. When the battery is full, the ICs generally terminate the charge current but continue to supply a small trickle current to keep the battery full. When the battery is kept on a trickle charge for a long period of time, swelling occurs. Thus, currently available charger and field gauge technologies do not prevent battery swelling. Accordingly, there is a need for simple and cost-effective solutions to monitor a charge level of a rechargeable battery and to protect the battery and its accompanying device and user from damage caused by continuous periods of charging. A battery charging method is disclosed in <CIT>. <CIT> and <CIT> disclose the use of a counter which counts the number of overvoltage events of a battary. <CIT> discloses a charging device and a control method for preventing recharging of a fully charged battery.

This disclosure describes methods and systems for monitoring a charge level of a rechargeable battery. A claimed solution is specified by a method according to claim <NUM> and by an electronic device according to claim <NUM>. In some implementations, the rechargeable battery includes a battery charger. The battery also includes a microcontroller unit (MCU) that compares a voltage of the battery against a predefined threshold voltage at each sampling period (e.g., every minute, every five minutes, etc.) over a time window (e.g., five days, a week, ten days, etc.). The MCU utilizes a bit array to implement a sliding window. Each bit of the array represents whether the battery voltage is above the threshold voltage while it is charging. In some implementations, the MCU sets the bit to "<NUM>" if the battery voltage is greater than the threshold voltage, and sets the bit to "<NUM>" if it is less than or equal to the threshold voltage.

In some implementations, the number of bits (e.g., cells) in the bit array is based on a time duration for monitoring the battery. For example, a <NUM>-bit (or <NUM>-byte) array is used for monitoring a battery over eight days and at a sampling rate of one minute. The number of bits (and/or bytes) are allocated in the buffer for tracking the battery charging state for eight consecutive days. In some implementations, using a bit array helps keep the memory requirements low so it fits in the constraints of a small MCU. For each sample, all the bits in the bit array are shifted by one, thus making it a sliding window. In some implementations, when a number of bit "one" in the array is above a threshold (e.g., <NUM>%), the MCU decreases the maximum voltage of a charger to a lower stepdown voltage.

In one aspect of the present disclosure, a method is implemented for charging a battery. The method comprises allocating an indexed sequence of bits in a buffer for tracking a battery charging state. The indexed sequence of bits has a first number of bits. The method also comprises sampling a battery voltage of a rechargeable battery at a sampling rate. For each sampled battery voltage, the battery voltage is compared with a voltage threshold. A next bit position in the indexed sequence of bits is identified. In accordance with a determination that a comparison result is true, a predefined first value is added to the next bit position in the indexed sequence of bits. A second number of bits that are filled with the predefined first value is determined. A ratio between the second number and the first number is also determined. In accordance with a determination that the ratio exceeds a threshold step-down ratio, stepping down a battery charge voltage is stepped to, to which the rechargeable battery is charged to a step-down voltage.

In another aspect, some implementations include determining whether the rechargeable battery is connected to a charger source. The predefined first value is added to the next bit position in accordance with a determination that the comparison result is true and that the rechargeable battery is connected to the charger source. For each sampled battery voltage, in accordance with a determination that the rechargeable battery is not connected to a charger source, the techniques add a predefined second value to the next bit position in the indexed sequence of bits.

Thus, systems, devices, and methods are provided to monitor a voltage level of a rechargeable battery. Systems, devices, and methods that reduce a battery charge voltage are also disclosed. As such, this application provides simple and cost-effective solutions for detecting rechargeable batteries that may be vulnerable to damage due to being charged for too long at high voltage (e.g., near their maximum voltage limit), thereby preventing the swelling problem.

For a better understanding of the various described implementations, reference should be made to the Detailed Description below, in conjunction with the following drawings in which like reference numerals refer to corresponding parts throughout the figures.

<FIG> illustrates an example operating environment <NUM> in accordance with some implementations. In some implementations, the operating environment <NUM> comprises a home environment that is connected to a remote server system <NUM>. The operating environment <NUM> includes various devices (also referred to herein as "connected" or "integrated" devices) that are interconnected via a local network <NUM>. In some implementations, the devices include a mobile device <NUM>, a display assistant device <NUM>, and home devices <NUM>. In some implementations, the home devices <NUM> include one or more of: a connected doorbell/camera <NUM>, a camera <NUM>, and a thermostat <NUM>. The connected doorbell/camera <NUM> alerts the user to the presence of people and/or packages at the front door and monitors activity at the front door. The camera <NUM> may be part of a home security system that allows the user to track activity around the operating environment <NUM>. The thermostat <NUM> detects ambient climate characteristics (e.g., temperature and/or humidity) and controls a heating, ventilation, and air conditioning (HVAC) system (not shown) of the operating environment <NUM> accordingly.

By virtue of network connectivity, a user may control the connected devices in the operating environment <NUM> even if the user is not proximate to the devices. As one example, the user may use the display assistant device <NUM> to view or adjust a current set point temperature of the thermostat <NUM> (e.g., via the local network <NUM> and through a communication circuitry of the display assistant device <NUM>). In some implementations, the display assistant device <NUM> includes program modules that can control the home devices <NUM> without user interaction. As another example, the camera <NUM> may store video data locally and wirelessly stream video data to the mobile device <NUM> or the display assistant device <NUM> via communication network(s) <NUM> and/or the local network <NUM>.

In some implementations, at least a subset of the connected devices is also communicatively coupled to a server system <NUM> through communication network(s) <NUM>. The sever system <NUM> includes one or more of: an information storage database <NUM>, a device and account database <NUM>, and a connected device processing module <NUM>. For example, the camera <NUM> may stream video data to the server system <NUM> via the communication network(s) <NUM> for storage on the server system <NUM> (e.g., the information storage database <NUM>) or for additional processing by the server system <NUM>. The user may access the stored video data using the mobile device <NUM> (or the display assistant device <NUM>) via the communication network(s) <NUM>.

In some implementations, the user establishes a user account (e.g., a Google™ user account) with the server system <NUM> and associates (e.g., adds and/or links) one or more connected devices with the user account. The server system <NUM> stores information for the user account and associated devices in the device and account database <NUM>.

In some implementations, the server system <NUM> enables the user to control and monitor information from the connected home devices <NUM> via the connected device processing module <NUM> (e.g., using an application executing on the mobile device <NUM> or assistant capabilities of some of the home devices <NUM>). The user can also link the display assistant device <NUM> to one or more of the connected home devices <NUM> via the user account. This allows program modules executing on the display assistant device <NUM> to receive information collected by the home devices <NUM> via the server system <NUM>, or send commands via the server system <NUM> to the home devices <NUM>.

In some implementations, the connected doorbell/camera <NUM> includes memory <NUM>, processing circuitry <NUM>, communication circuitry <NUM> (e.g., network interface(s)), speakers <NUM>, and sensor(s) <NUM>. Further, in some implementations, the connected doorbell/camera <NUM> includes a bit array <NUM> that includes an indexed sequence of bits that is stored by the memory <NUM>. The connected doorbell/camera <NUM> also includes a rechargeable battery <NUM>, a charger <NUM> for charging the rechargeable battery <NUM>, and a fuel gauge <NUM> (e.g., a fuel gauge IC) for determining a state of charge of the battery <NUM>. In some implementations, the rechargeable battery <NUM> is built into the connected doorbell/camera <NUM> or is a replaceable module in the connected doorbell/camera <NUM>.

The memory <NUM> stores programs that, when executed by elements of the processing circuitry <NUM>, perform one or more of the functions described with reference to <FIG>. For example, in some implementations, the stored programs include a battery charging module <NUM> that determines a battery charge voltage at which the rechargeable battery <NUM> is to be charged. Specifically, in some implementations, the battery charging module <NUM> samples a voltage of the rechargeable battery <NUM> at a sampling rate (e.g., once every minute, once every three minutes, etc.). For each sampled battery voltage, the battery charging module <NUM> compares the battery voltage with a voltage threshold. The battery charging module <NUM> identifies in the bit array <NUM> a next bit position in the indexed sequence of bits. In accordance with a determination that a comparison result is true (e.g., the battery voltage exceeds the voltage threshold), the battery charging module <NUM> adds a predefined first value (e.g., bit "<NUM>") to the next bit position in the indexed sequence of bits. The battery charging module <NUM> determines a ratio of (i) a number of bits in the indexed sequence of bits that are filled with the predefined first value and (ii) a total number of bits in the indexed sequence of bits. In accordance with a determination that the ratio exceeds a threshold step-down ratio (e.g., <NUM>:<NUM>), the battery charging module <NUM> steps down (e.g., decreases) a battery charge voltage to which the rechargeable battery <NUM> is charged to a step-down voltage.

In some implementations, the stored programs include a battery setting adjustment module <NUM> for adjusting a setting (e.g., a threshold voltage, a battery charge voltage, etc.) of the rechargeable battery <NUM>. The memory <NUM> also stores battery threshold data <NUM> and a setting register <NUM> of the rechargeable battery <NUM>.

The sensor(s) <NUM> are integrated into the connected doorbell/camera <NUM> and include one or more of: microphone(s) <NUM>, motion sensor(s) <NUM>, and a temperature sensor <NUM>. The sensor(s) <NUM> detect and record sound, movement, and/or ambient conditions (e.g., temperature) in proximity to the connected doorbell/camera <NUM>. In some implementations, the connected doorbell/camera <NUM> also includes an image capture device <NUM>, for recording images and video footage of a region surrounding the connected doorbell/camera <NUM>. In some implementations, each of the recorded events (e.g., from the sensor(s) <NUM> and the image capture device <NUM>) is associated with a respective date stamp and timestamp. In some implementations, the recorded events are stored and processed locally on the connected doorbell/camera <NUM>. In some implementations, the connected doorbell/camera <NUM> sends at least a subset of the recorded events to the server system <NUM> via the communication network(s) <NUM> for storage and processing.

<FIG> illustrates a block diagram <NUM> of a connected doorbell/camera <NUM> in accordance with some implementations.

In some implementations, the connected doorbell/camera <NUM> includes a microcontroller unit (MCU) <NUM> that is electrically coupled to a charger <NUM> and a fuel gauge <NUM>. The MCU <NUM> includes various components of the connected doorbell/camera <NUM>, including the memory <NUM>, the processing circuitry <NUM>, the communication circuitry <NUM>, and the bit array <NUM> that are discussed with respect to <FIG>. The fuel gauge <NUM> measures a voltage supplied to a battery <NUM> (e.g., VBAT <NUM>) by measuring a voltage drop across a resistor <NUM>.

In some implementations, the MCU <NUM> regularly polls a state of the charger <NUM> to determine whether the charger is connected to the battery <NUM>.

In some implementations, the MCU <NUM> regularly polls the fuel gauge <NUM>.

For example, at each sampling period (e.g., every second), the MCU <NUM> obtains from the fuel gauge <NUM> the voltage of the battery <NUM> (e.g., VBAT <NUM>) and compares it with a threshold voltage (e.g., VTH <NUM>). The MCU <NUM> tracks how long the voltage of the battery <NUM> has been above the threshold voltage by determining a ratio of a number of bits in an indexed sequence of bits in the bit array <NUM> that are filled with the predefined first value and a total number of bits in the indexed sequence of bits in the bit array <NUM>, as discussed above with respect to <FIG>. In some implementations, the MCU <NUM> regulates a maximum allowable voltage (e.g., VBC <NUM>) of the charger <NUM> to a lower stepdown voltage (e.g., VSD <NUM>) in accordance with a determination that the ratio exceeds a threshold ratio.

<FIG> illustrates a bit array <NUM> in accordance with some implementations.

In the example of <FIG>, the bit array <NUM> contains an indexed sequence of n bits <NUM>-<NUM> to <NUM>-n. Each of the bits <NUM> corresponds to a respective sampling period (e.g., one second). The entry in each bit <NUM> represents whether the battery voltage (e.g., VBAT <NUM>) is above the threshold voltage (e.g., VTH <NUM>) at the sampling period. In some implementations, an entry "<NUM>" (see, e.g., bits <NUM>-<NUM> to <NUM>-<NUM>) denotes that the battery voltage is above the threshold voltage. An entry "<NUM>" (see, e.g., bit <NUM>-<NUM>) indicates that the battery voltage is equal to or less than the threshold voltage.

In some implementations, the number of bits in the array <NUM> is based on a fixed time duration that is monitored by the MCU <NUM>. For example, a time duration of one week (e.g., <NUM> days), at a sampling rate of once per minute, uses an array of <NUM> bits or <NUM> bytes.

In some implementations, the bits in the bit array <NUM> corresponds to a sliding time window in which the battery voltage is sampled at the sampling rate, and the sliding time window covers a fixed length of time determined based on the sampling rate. <FIG> illustrates representative window durations/sizes for batteries of different applications, at a sampling rate (e.g., polling frequency) of one minute. Using the "Battery in Camera" in <FIG> as an example, a bit array of <NUM> bits (e.g., n = <NUM>), or <NUM> bytes, is used for a time window of <NUM> days at a sampling rate of one minute. In this example, the bits in the bit array are filled up sequentially, starting from <NUM>-<NUM>. In some implementations, if the time monitored by the MCU <NUM> exceeds the time window, the oldest bits are replaced. Thus, in this example, after the bit <NUM>-n is filled, the next bit replaces the oldest bit <NUM>-<NUM>.

<FIG> is an exemplary plot <NUM> illustrating the effects of battery supply voltage <NUM> on the state of charge <NUM> of a battery <NUM> in accordance with some implementations. In some implementations, the battery supply voltage <NUM> is a voltage that is supplied by a charger <NUM>. In some implementations, the battery <NUM> is configured to be charged by a solar-powered battery charger.

<FIG> illustrates that the battery supply voltage includes a voltage limit <NUM> (e.g., VBC), a threshold voltage <NUM> (e.g., VTH), and a stepdown voltage <NUM> (e.g., VSD). In some implementations, the voltage limit <NUM> is the maximum allowable voltage supplied by the charger <NUM> (e.g., VBC ~ <NUM> in <FIG>). The battery supply voltage is capped at the voltage limit <NUM>. A battery can become fully charged (e.g., <NUM>% state of charge) when it is charged at the voltage limit <NUM>. In some implementations, the threshold voltage <NUM> is the battery supply voltage used to achieve a <NUM>% state of charge for the battery <NUM>. In the example of <FIG>, the threshold voltage <NUM> is VTH ~ <NUM> V. In some implementations, if a sampled battery voltage is above the threshold voltage, the MCU <NUM> assigns a predefined first value (e.g., value "<NUM>") to a bit corresponding to the sampled voltage (e.g., a next bit position in the bit array <NUM>). If the sampled battery voltage is equal to or less than the threshold voltage, the MCU <NUM> assigns a predefined second value (e.g., "<NUM>") to the bit.

In some implementations, the MCU <NUM> further determines (e.g., by polling the charger <NUM>), whether the rechargeable battery <NUM> is connected to a charger source. In some implementations, the predefined first value is added to the next bit position in accordance with the determination that sampled battery voltage is above the threshold voltage and that the rechargeable battery is connected to the charger source.

In some implementations, the stepdown voltage <NUM> is the battery supply voltage used to achieve an <NUM>% state of charge for the battery <NUM>. In the example of <FIG>, the stepdown voltage <NUM> is VSD ~ <NUM> V. In some implementations, the MCU <NUM> determines a ratio of a number of bits in the bit array <NUM> that have the predefined first value to the total number of bits in the bit array <NUM> that are filled (e.g., that contain either the first predefined value or the second predefined value). In accordance with a determination that the ratio exceeds a threshold step-down ratio (e.g., <NUM>%), the processing circuitry <NUM> steps down the battery supply voltage from the voltage limit <NUM> to the stepdown voltage <NUM>. In some implementations, by limiting the battery supply voltage to less than the maximum allowable voltage, the battery <NUM> does not become fully charged. Accordingly, the problem of battery swelling is reduced.

<FIG> illustrates an exemplary charging cycle <NUM> of a battery <NUM> in accordance with some implementations. In this example, the battery <NUM> comprises a current maximum voltage setting <NUM> that includes a full charge voltage (e.g., <NUM> V) and a stepdown voltage <NUM> (e.g., <NUM> V). The battery <NUM> also comprises a threshold voltage setting <NUM> (e.g., <NUM> V). The initial battery voltage S = <NUM> is about <NUM> V.

In some implementations, a value (e.g., "<NUM>" or "<NUM>") is added to the bit array <NUM> in accordance with a determination that the battery <NUM> is connected to a charger source. <FIG> shows that the battery <NUM> is not connected to a charger source (e.g., the charger is not connected to a power source) from S = <NUM> to S = <NUM>. Therefore, the bit array <NUM> has a count of zero from S = <NUM> to S = <NUM>. At the same time, the battery voltage <NUM> also decreases because it is not charged.

In the example of <FIG>, the battery <NUM> starts charging from S = <NUM>, when the charger is connected. The battery voltage <NUM> increases (e.g., linearly) from voltage <NUM> at S = <NUM>, to voltage <NUM> at S = <NUM>. During the same time, the number of bits filled with "<NUM>" (<NUM>) remains at zero because the battery voltage <NUM> is less than the threshold voltage setting <NUM>. At S = <NUM>, the battery voltage <NUM> reaches the threshold voltage setting <NUM>. Accordingly, the MCU <NUM> assigns a value of "<NUM>" to subsequent bits in the bit array <NUM> from S = <NUM>. This corresponds to an increase in the number of bits filled with "<NUM>" starting from S = <NUM>. The battery voltage <NUM> also increases from voltage <NUM> at S = <NUM> to voltage <NUM> at S ≈ <NUM>, where the full charge voltage of <NUM> V is reached. The battery voltage <NUM> remains constant at the full charge voltage (e.g., voltage <NUM>).

With continued reference to the example of <FIG>, at S = <NUM> (e.g., voltage <NUM>), the ratio of the number of bits in the array <NUM> with value "<NUM>" to the number of bits in the array <NUM> that have been filled reaches a threshold ratio (e.g., <NUM>%, <NUM>%, etc.). Accordingly, in some implementations, the processing circuitry <NUM> decreases a current maximum voltage setting from the full charge voltage (e.g., <NUM> V) to a stepdown voltage <NUM> (e.g., <NUM> V). <FIG> shows that the voltage of the battery decreases from voltage <NUM> as a result of the reduction in current maximum voltage setting. <FIG> also shows that the number of bits filled with "<NUM>" <NUM> continues to increase from S = <NUM> to S = <NUM>, because the battery voltage at S = <NUM> (e.g., voltage <NUM>) is still above the threshold voltage setting <NUM>. At S = <NUM>, the battery voltage decreases to voltage <NUM>, which is below the threshold voltage setting <NUM>. Subsequent voltages that are sampled by the MCU <NUM> are assigned a bit value "<NUM>" due to the battery voltage being lower than the threshold voltage. <FIG> shows that a number <NUM> of bits having the value "<NUM>" is constant from S ~ <NUM> to S ~ <NUM>. Furthermore, with the reduction in the current maximum voltage setting at S = <NUM>, the battery voltage decreases from voltage <NUM> at S = <NUM> to voltage <NUM> at S ~ <NUM> and remains constant at the stepdown voltage <NUM> thereafter.

<FIG> also illustrates that the charger is electrically disconnected at S ~ <NUM> (<NUM>). In some implementations, when the charger is disconnected, the maximum voltage setting is reset from the stepdown voltage <NUM> (e.g., <NUM> V) to the full charge voltage (e.g., <NUM>). In this example, the disconnecting of the charger causes the maximum voltage setting to be restored to the full charge voltage of <NUM> V (<NUM>). However, the battery voltage continues to decrease from voltage <NUM> to voltage <NUM> due to discharge of the battery. At S ~ <NUM> (<NUM>), the charger is connected again. This restarts the battery charging cycle.

<FIG> illustrates an exemplary charging cycle <NUM> of a battery <NUM> that is connected to a solar-powered charger in accordance with some implementations.

In this example, the battery <NUM> comprises a current maximum voltage setting <NUM> that includes a full charge voltage (e.g., <NUM> V) and a stepdown voltage <NUM> (e.g., <NUM> V). The battery <NUM> also comprises a threshold voltage setting <NUM> (e.g., <NUM> V). In some implementations, the solar powered charger may cycle on and off during the day due to the presence or absence of sunlight. In the example of <FIG>, the solar powered charger is enabled from S = <NUM> to S = <NUM>, S = <NUM> to S = <NUM>, S = <NUM> to S = <NUM>, and S = <NUM> to S = <NUM>, and disabled from S = <NUM> to S = <NUM>, S = <NUM> to S = <NUM>, S = <NUM> to S = <NUM>, and S = <NUM> to S = <NUM>.

The battery <NUM> has a starting battery voltage of ~ <NUM> V (<NUM>) at S = <NUM>. From S = <NUM> from S = <NUM>, the charger is disabled (e.g., due to lack of sunlight). The battery voltage decreases from voltage <NUM> to voltage <NUM> due to discharge of the battery <NUM>. From S = <NUM> to S = <NUM>, the solar-powered charger is enabled (e.g., due to presence of sunlight) and charges the battery <NUM>, thus leading to an increase in the battery voltage from <NUM> to <NUM>. During the same time period, the number of bits filled with "<NUM>" (<NUM>) remains at zero because the battery voltage is less than the threshold voltage setting <NUM>.

At S = <NUM>, the battery voltage <NUM> reaches (e.g., exceeds) the threshold voltage setting <NUM>. <FIG> illustrates a slight increase in the number of bits filled with "<NUM>" (<NUM>) from S ~ <NUM> due to the battery voltage <NUM> exceeding the threshold voltage setting <NUM> and the solar-powered charger being enabled. From S ~ <NUM> to S = <NUM>, the number of bits filled with "<NUM>" (<NUM>) remains constant because the charger is not enabled. During the same time, there is a decrease in the battery voltage from voltage <NUM> to voltage <NUM>.

From S = <NUM> to S = <NUM>, the charger is enabled. <FIG> shows that the number of bits filled with "<NUM>" (<NUM>) remains constant from S = <NUM> to S = <NUM> due to the battery voltage being lower than the threshold voltage setting <NUM>. From S = <NUM> to S = <NUM>, the number of bits filled with "<NUM>" (<NUM>) increases because the battery voltage (e.g., voltage <NUM> at S = <NUM> and voltage <NUM> at S = <NUM>) exceeds the threshold voltage.

From S = <NUM> to S = <NUM>, the solar-powered charger is disabled. <FIG> shows a decrease in the battery voltage from voltage <NUM> to voltage <NUM> during this time. The number of bits filled with "<NUM>" remains constant during this time because the charger is disabled.

At S = <NUM>, the charger is enabled and charges the battery <NUM>. The voltage of the battery <NUM> increases from voltage <NUM> at S = <NUM> to the current maximum voltage setting at S ~ <NUM> (<NUM>). During this time, the number of bits filled with "<NUM>" also increases (e.g., from count <NUM> to count <NUM>) due to the battery voltage <NUM> exceeding the threshold voltage <NUM>. In some implementations, at count <NUM>, the ratio of the number of bits in the array <NUM> with value "<NUM>" to the number of bits in the array <NUM> that have been filled reaches a threshold ratio (e.g., <NUM>%, <NUM>%, or <NUM>%). In some implementations, in accordance with a determination that the ratio has reached (e.g., exceeded) a threshold ratio the processing circuitry <NUM> decreases the current maximum voltage setting from the full charge voltage (e.g., <NUM> V) to the stepdown voltage <NUM> (e.g., <NUM> V).

As also illustrated in <FIG>, the charger is disabled from S = <NUM> to S = <NUM> (e.g., due to the absence of sunlight). The number of bits filled with "<NUM>" remains constant during this time due to the charger being disabled. From S = <NUM> to S = <NUM>, even though the charger is enabled (e.g., due to the presence of sunlight), the battery voltage continues to decrease (e.g., from voltage <NUM> to voltage <NUM>) because the current maximum voltage setting is at the stepdown voltage value (e.g., <NUM> V). The battery voltage continues to decrease from S = <NUM> (e.g., voltage <NUM>) to S = <NUM> because the charger is not enabled.

In some implementations, the processing circuitry <NUM> steps up the battery charge voltage from the stepdown voltage <NUM> to the full charge voltage (e.g., <NUM>) in accordance with a determination that the rechargeable battery <NUM> is connected to a non-solar powered charger source. <FIG> illustrates that at S = <NUM>, the battery <NUM> is connected to a USB charger (<NUM>). Accordingly, the processing circuitry <NUM> increases the current maximum voltage setting from the stepdown voltage <NUM> to full charge voltage (e.g., <NUM>).

<FIG> illustrates exemplary product life expectancies, polling frequencies, window durations/sizes, maximum voltages, threshold voltages, stepdown voltages, and respective threshold ratios for switching a maximum charging voltage to a stepdown voltage for batteries of different applications, in accordance with some implementations.

In the example of <FIG>, each of the applications includes a polling frequency of once per minute. In some implementations, one or more of the voltage threshold, stepdown voltage, sampling rate, value of first predefined bit, and threshold step-down ratio are customized for the rechargeable battery based on at least one of: a type, a location, and a season of the electronic device. For instance, in some implementations, a battery in a camera (e.g., a connected doorbell/camera <NUM>) includes a window duration of eight days. At a sampling rate of once per minute, a total of <NUM> bits (or <NUM> bytes) is used. In some implementations, <NUM> bytes are allocated in a buffer of the memory <NUM> for tracking the battery charging state for eight consecutive days.

<FIG> illustrates a flowchart of a method <NUM> in accordance with some implementations. Method <NUM> is, optionally, governed by instructions that are stored in a non-transitory computer-readable storage medium (e.g., memory <NUM> in <FIG>) and that are executed by one or more processors of an electronic device. The computer-readable storage medium may include a magnetic or optical disk storage device, solid-state storage devices such as Flash memory, or other non-volatile memory device or devices. The computer-readable instructions stored on the computer-readable storage medium may include one or more of: source code, assembly language code, object code, or other instruction format that is interpreted by one or more processors. Some operations in method <NUM> may be combined and/or the order of some operations may be changed. In some implementations, the electronic device is disposed in an outdoor environment and includes a rechargeable battery <NUM>. Optionally, the electronic device is disconnected from an external power source and entirely powered by the rechargeable battery <NUM>, which can be charged when the electronic device is connected to the external power source. Optionally, the electronic device is constantly connected to the external power source and charged at a charge rate using the methods described with respect to <FIG>.

The electronic device allocates (<NUM>) an indexed sequence of bits in a buffer for tracking a battery charging state. The indexed sequence of bits has a first number of bits. In some implementations, the indexed sequence of bits are bits of a bit array <NUM>. In some implementations, and as illustrated in <FIG>, the first number of bits is based on a sampling rate and a time duration for which the battery <NUM> is to be monitored.

The electronic device samples (<NUM>) a battery voltage of a rechargeable battery at a sampling rate (e.g., every minute, every three minutes, every five minutes, etc.).

For each sampled battery voltage, the electronic device compares (<NUM>) the battery voltage with a voltage threshold. The electronic device also identifies (<NUM>) a next bit position in the indexed sequence of bits.

In accordance with a determination that a comparison result is true, the electronic device adds (<NUM>) a predefined first value to the next bit position in the indexed sequence of bits.

The electronic device determines (<NUM>), in the indexed sequence of bits, a second number of bits that are filled with the predefined first value.

The electronic device also determines (<NUM>) a ratio between the second number and the first number.

In accordance with a determination that the ratio exceeds a threshold step-down ratio (e.g., <NUM>%, <NUM>%, <NUM>%, etc.), the electronic device steps down (<NUM>) a battery charge voltage to which the rechargeable battery is charged to a step-down voltage.

The terminology used in the description of the various described implementations herein is for the purpose of describing particular implementations only and is not intended to be limiting. As used in the description of the various described implementations and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. It will be further understood that the terms "includes," "including," "comprises," and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Additionally, it will be understood that, although the terms "first," "second," etc. may be used herein to describe various elements, these elements should not be limited by these terms.

The foregoing description, for purpose of explanation, has been described with reference to specific embodiments. However, the illustrative discussions above are not intended to be exhaustive or to limit the claims to the precise forms disclosed. Many modifications and variations are possible in view of the above teachings. The embodiments were chosen and described in order to best explain principles of operation and practical applications, to thereby enable others skilled in the art.

Claim 1:
A battery charging method, comprising:
allocating (<NUM>) an indexed sequence of bits in a buffer for tracking a battery charging state, the indexed sequence of bits having a first number of bits;
sampling (<NUM>) a battery voltage of a rechargeable battery (<NUM>) at a sampling rate;
for each sampled battery voltage:
comparing (<NUM>) the battery voltage with a voltage threshold;
identifying (<NUM>) a next bit position in the indexed sequence of bits; and
in accordance with a determination that a comparison result is true, adding (<NUM>) a predefined first value to the next bit position in the indexed sequence of bits;
determining (<NUM>), in the indexed sequence of bits, a second number of bits that are filled with the predefined first value;
determining (<NUM>) a ratio between the second number and the first number; and
in accordance with a determination that the ratio exceeds a threshold step-down ratio, stepping down (<NUM>) a battery charge voltage to which the rechargeable battery (<NUM>) is charged to a step-down voltage.