Welcome: Hunan Intelligent Applications Tecgnology CO.,ltd.-HNIAT.com
Language: Chinese ∷  English

Smart test

Check the battery capacity with a simple test method

Most handheld devices use alkaline or rechargeable batteries, so measuring battery capacity is a key feature of this type of design. However, in most cases, the use of battery power monitoring ICs may be a luxury for projects with tight budgets. This is a simpler and cheaper option.

    Nowadays, even the microcontrollers often include an internal analog-to-digital converter (ADC) module, and because of its (relatively) low resolution and high noise level, this module has not been used. However, one of those unused internal ADC channels is sufficient to perform a test to determine if the battery is still usable.

    The method used to detect the state of the battery is called Electrochemical Dynamic Response (EDR) (Reference 1), and was awarded by Cadex Electronics, U.S. No. 7,622,929.

    EDR compares the battery condition under load with stored parameters related to battery performance by applying load pulses and evaluating the battery's response time to attack and recovery. As shown in Figure 1, a good battery has strong recovery characteristics, while a nearly exhausted battery has a higher discharge slope and poor recovery ability. There are many reasons for these differences in the response of a drained battery, such as an increase in internal resistance.

11.png

    This figure shows the EDR of the battery in various charging states. Figure 1 compares the battery's response to temporary load pulses in various charging states and shows the difference in EDR.

    Using EDR theory, the battery voltage is sampled to find the battery power at a specific time (for example, when power consumption occurs), and information about battery health can be obtained. The initial turn-on time of the system (also known as "hello") is a particularly good opportunity to gauge the health of the battery. Before the system is fully activated, the battery power seems to be at a safe operating level, but if the battery is about to run out, when the system reaches full load, the battery power may immediately fall below a safe level. The device will start in normal mode without performing an EDR test, but will shut down uncontrollably under a heavy load (ie, the voltage drops to the critical battery level shown in Figure 1).

    The simplified hardware version realized by EDR test is shown in Figure 2. The load resistance is chosen to represent the entire system load, so its resistance value may vary from system to system. The system that generates the data shown here requires a value of 10Ω. Resistors R1 and R2 are used as voltage dividers for battery voltage (Vcc) measurement, and the boost circuit ensures that the ADC's reference remains constant, even when the battery voltage drops during the test. Resistor R3 is the pull-down resistance of the switching transistor.

22.png

    EDR test equipment schematic diagram Figure 2 This simplified schematic diagram shows the overall design of the EDR test implementation.

    The test system samples the battery voltage within a set period of time (about 200 milliseconds (msec)). Under firmware control, the MOSFET is only turned on for half of the measurement period, and then turned off. In this way, the system can measure the voltage under full load and measure the battery's recovery response under load. (The time period can be changed in the firmware, but I found that 200 milliseconds is enough to fully evaluate the battery capacity.) After the measurement is completed, the results can be read out via the UART link.

    Use your unique design to impress the engineering world: Design concept submission guide

    In the example system built to demonstrate EDR, I used two AA alkaline batteries with a Vcc value of 3.2V. The boost voltage Vdd is set to a constant 3.6V. The system normally consumes 55 milliamps (mA), but it consumes 127 mA at full load. The oscilloscope traces obtained when testing the system with a "good" battery (Figure 3a) and a "bad" battery (that is, a depleted battery (Figure 3b)) show how much the underload voltage difference might be.

33.png

    Two oscilloscope traces show the results of the load test. The load test of the battery voltage in Figure 3 shows that there is a significant difference between the response of a fully charged battery (a) and a nearly exhausted battery (b).

    The example design I used in some projects is based on the STM32F303 microcontroller, and its firmware is written in C using KEIL IDE. The firmware can be found on this GitHub page.

    The flow chart of the test code appears in Figure 4. After the UART receives the "S" character, it will perform the test. The ADC sampling frequency is set to 250 Hz, and as mentioned earlier, the test cycle is approximately 200 milliseconds.

999.png

    The flow chart of the EDR test code process is shown in Figure 4. The EDR test code turns on the load, the sampling time is half of the test time, then turns off the load and completes the sampling cycle.

    This code is only for testing and collecting data. There are many options for processing data. In simple cases, you can view the value of the data and compare it with the system's safe operating voltage level (also called the critical level). If the battery voltage is close to a critical level during the test, the system user can be warned that it is time to replace the battery.

    More comprehensive algorithms can be written to determine battery health, such as displaying a battery level indicator. In order to update and show the appropriate data to the user on the display or battery indicator, the acquired data should be filtered. Load changes make the original data completely useless without proper filtering. A slow infinite impulse response (IIR) filter will smooth the signal normally.

    In short, with the help of the very basic ADC of the microcontroller, with the help of the EDR method, the battery status can be detected inexpensively. The battery reading during the initial power-up is approximately 200 milliseconds, which is sufficient to perform basic battery health tests for almost all systems.

CONTACT US

Contact: Manager Xu

Phone: 13907330718

Tel: 0731-22222718

Email: hniatcom@163.com

Add: Room 603, 6th Floor, Shifting Room, No. 2, Orbit Zhigu, No. 79 Liancheng Road, Shifeng District, Zhuzhou City, Hunan Province

Scan the qr codeClose
the qr code