Description
LCR Digital Bridge Capable of Measuring Battery Internal Resistance Based on Renesas R7FA2E1A7 MCU
1. Project Function Introduction
As an amateur electronics enthusiast, I usually need to measure battery internal resistance and the impedance of electronic components. Switching between two instruments is quite cumbersome. Many open-source bridges omit the DC-blocking capacitor and protection circuit, making it impossible to directly measure battery internal resistance. Connecting an external DC-blocking capacitor is not very convenient either. Therefore, I designed an LCR digital bridge that can measure battery internal resistance by myself, while verifying my own ideas. The design adopts dual-channel acquisition and multi-ADC port sampling to improve reading resolution.
Since I am an amateur enthusiast, this project was challenging for me. As a result, the final product is not very user-friendly and only reaches a "barely usable" level.
- Measurement Frequencies: 1kHz, 10kHz, 100Hz
- Impedance Measurement Range: 1mΩ to 10MΩ Measurable parameters include: battery internal resistance, series capacitance, series inductance, series resistance, series reactance, D-value, Q-value, phase angle, and impedance magnitude.
Due to the multiple frequency options and wide measurement range, some gears may have bugs. There are also issues with the auto-ranging function, which sometimes fails to switch to the correct gear.
2. Project Attributes
This project is publicly released for the first time. Part of the circuit is referenced from open-source bridges, while the program is original.
3. Open-Source License
GPL 3.0 open-source license, with both hardware and software being open-source.
4. Hardware Part
The power supply part uses 18650 batteries for power supply, with DW01 protection and 4056 charging functions. SW1 serves as the main power switch of the entire device. U4 converts the voltage to 3.3V. The maximum power consumption does not exceed 40mA when the clips are short-circuited.
Key Notes on Terminology
- MCU (Microcontroller Unit): The core control chip of the device, here referring to the Renesas R7FA2E1A7.
- DC-blocking capacitor: A capacitor used to isolate DC signals while allowing AC signals to pass, a critical component for measuring battery internal resistance.
- 18650: A common cylindrical lithium-ion battery specification (18mm diameter, 65mm length), widely used in portable electronic devices.
- DW01: A typical lithium battery protection IC, used to prevent overcharging, over-discharging, and short-circuiting of the battery.
- 4056: Refers to chips like TP4056, a common lithium battery charging management IC, supporting constant-current and constant-voltage charging.

The Renesas R7FA2E1A7 MCU is used as the main controller, with a 32MHz crystal oscillator. Although the maximum frequency specified in the datasheet is 20MHz, an overclocking operation was performed to verify the idea of using 4 ADC ports for sampling. The sampling rate is 50KHz, and all collected data need to undergo DFT operations, resulting in a relatively large computational load. The DFT calculation frequency is around 70K, which just allows interrupts to be generated, hence the overclocking.
Pin functions:
- P400 outputs PWM. P409 and P408 switch the PWM filter circuit through an analog switch to serve as the excitation source.
- P407 is the 33.3Ω gear switch analog switch. Since the on-resistance of the 74HC4052 analog switch is relatively large, which cannot meet the requirements of the lowest gear, a 3157 analog switch is connected in parallel in the 33.3Ω gear to reduce the on-resistance.
- P915 and P914 are the control ports for the 74HC4052 gear switch, used to switch resistors of different gears.
- P206 and P207 are the gain switches for the measured components, each providing a 10x gain.
- P208 and P914 are the gain switches for the sampling resistors in the internal V/I circuit, each also providing a 10x gain.
- P300 and...
yjmwxwx
Ellie T
Marek Materzok
Christoph Tack