The Battery Capacity Meter allows you to measure the capacity of any battery or accumulator; it can also be used as a precise voltmeter, milliammeter, and power meter. It discharges the battery and measures the released energy in mWh and the capacity in mAh.
Key Features of the Battery Capacity Meter
Contents
Test start without any operation or button press
Capacity measurement of any battery and accumulator (AA, AAA, CR2032, LR44, Krona, 18650 and others)
Fixed resistor as load, possibility of connecting external electronic load
Load current between 0.01 mA and 8A (can be changed depending on the nominal value of the resistor and the measurement shunt)
Batteries or accumulators can be tested between 0.5 and 36 volts
Test duration between 10 seconds and 1000 hours (approximately 42 days)
Measured energy between 1 and 99999 mWh
Measured capacity between 1 and 99999 mAh
Continuous display of voltage, current, capacity (mAh), energy (mWh) and time on the screen
Automatic determination of the test end voltage depending on the battery type
Ability to manually change the test end voltage
Transfer of test data to a computer (can be saved and discharge graphs can be plotted). Saving test data to a MicroSD card
Continuous display of results after test completion
Four different current measurement ranges (8mA, 80mA, 800mA, 8A) thanks to interchangeable measurement shunts
Four-pin connection of the measured power element for higher measurement accuracy
Calibration of voltage and current measurements by saving them to flash memory
Disconnecting the load at the end of the test (necessary for batteries)
Saving the result of the previous test to flash memory, allowing the test to be resumed if accidentally interrupted
The device can be used as a precise voltmeter and milliammeter
Modular design allowing only the necessary components to be installed.
ESP8266 software

The firmware and source code of the program are for non-commercial use only.
The archive contains three files: the ESP8266 Flasher program and two software versions: btest2.bin with the screen inverted and btest2f.bin with the screen not inverted.
Connect the ESP8266 mini to the computer (the current sensor module and screen do not need to be connected to the board). Install the CH340 driver if necessary. A new COM port should appear on the computer.
Start the ESP8266 Flasher, select the COM port that appears, click Configuration, then click the gear icon at the top, select the firmware file, click Operation, then click Flash.
The flashing process will begin and will take approximately one minute. When a green check mark appears at the bottom, you can remove the board.
The source code is also available in the Batterytest2.ino software file for those who prefer to program the device via the Arduino IDE and want to learn how the program works and perhaps improve it.
Basic module connection diagram for ESP8266 Battery Capacity Meter

Additionally, there are maximum configuration schemes with a relay module and a MOSFET LR7843 module.
Main components:
Mini ESP8266 or MINI V4.0.0 variant
0.96-inch display module. NEW – White variant.
INA226 voltage and current measurement module.
MicroSD card module.
Relay module or MOSFET module. LR7843.
Two buttons (on a common board or separately).
Shunt resistors
source: ammo1.ru/btest2
I prefer Yours new projects sir.