Skip to content

Battery capacity testing system using ESP32, INA226, and Web Server.

License

Notifications You must be signed in to change notification settings

fobaty/ESP32-Battery-Capacity-Tester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

44 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ESP32 Capacity Battery Tester ๐Ÿ”‹

๐Ÿš€ Battery testing system using ESP32, INA226, and Web Server.

๐Ÿ“Œ Features

โœ… Measures battery voltage using INA226
โœ… Battery capacity calculation
โœ… Automatic discharge stop at set voltage
โœ… Sound notification upon completion of the test
โœ… Logs test results to SPIFFS
โœ… Web interface to start/stop tests and configure parameters

I don't use the current obtained from INA226. The calculation is made based on the voltage taken from INA226 and Load Resistance (default 3.3 Ohms, it is possible to change it via the web interface)

โšก Theoretical Current Calculation (Ohmโ€™s Law)

The discharge current is calculated using Ohmโ€™s Law:

I = V / R

Where:

  • I = Current (A)
  • V = Voltage (V)
  • R = Resistance (ฮฉ)

๐Ÿ› ๏ธ Hardware

  • ESP32
  • INA226 Voltage & Current Sensor
  • Relay module
  • Resistor (Load)
  • Buzzer

๐Ÿ“ท Screenshot

Web Interface

๐Ÿ“ท ESP32 Capacity Battery Tester

Web Interface

๐Ÿš€ Installation

  1. Clone repo:
    git clone https://github.com/fobaty/ESP32-Battery-Capacity-Tester.git
  2. Install Arduino IDE & ESP32 board
  3. Install INA226 library:
  1. Upload code to ESP32

๐Ÿ–ฅ๏ธ Web Interface

  • Main page: http://192.168.4.1

  • Start test: http://192.168.4.1/start

  • Stop test: http://192.168.4.1/stop

  • Set Voltage Threshold: http://192.168.4.1/set_threshold

  • Set Load Resistance: http://192.168.4.1/set_resistance

    ๐Ÿ“ท Testing

  • Fully charged the battery (without load I had 12.8 volts).

  • Make a short pause (30 minutes or 1 hour) after charging to let the battery cool down.

  • Discharged it to 10.5V using a 3.3ฮฉ load resistor.

  • I also used a small fan to cool the resistor (what I found at home).

  • The measured capacity was only 12Ah, while the battery is rated at 45Ah.

  • On the web page in the test results it displays the Final voltage as 12.08 volts this voltage is measured after stopping the test and without load. If you measure with load it will be 10.5 volts, since the test automatically stops at 10.5 volts and disconnects the load Web Interface

About

Battery capacity testing system using ESP32, INA226, and Web Server.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages