Skip to main content
emobility.academy
Maker buildsModerateTake care 1 weekendFor makers, students

Build a Single-Cell Battery Capacity Tester with an Arduino

Build an Arduino-based tester that discharges a single lithium-ion cell through a fixed load and measures its real capacity in mAh. You learn about discharge curves, cut-off voltage and safe single-cell handling on the bench.

Go to the steps
Build a Single-Cell Battery Capacity Tester with an Arduino: Microcontroller board, LCD and laptop on a DIYguru lab desk
Representative photo from DIYguru's EV lab.

Why this happens

A cell's printed capacity is often optimistic, and capacity falls as cells age. Discharging a fully charged cell at a known current down to its cut-off voltage, and adding up current over time, gives the real figure. An Arduino measures the voltage, a MOSFET switches the load, and the sketch stops the test at cut-off so the cell is not over-discharged.

What you need

Tools

  • Soldering iron and solder
  • Digital multimeter
  • Laptop with the Arduino IDE
  • Dedicated single-cell lithium-ion charger

Materials

  • Arduino Uno or Nano
  • Single-cell holder for the cell size you test, with wire leads
  • Logic-level N-channel MOSFET
  • Power resistor (a few ohms) on a heatsink as the load
  • Low-value shunt resistor or a current-sense module
  • Inline fuse holder and fuse
  • Small I2C display (optional)
  • Fire-safe mat or metal tray

Before you start

  • Test single loose cells only; never open an EV or e-bike pack to get cells or test a whole pack with this build.
  • Never discharge below the datasheet cut-off voltage, and never charge with the tester.
  • Always fit a fuse, use a fire-safe surface and supervise every test.
  • The load resistor gets very hot; keep it on a heatsink and away from wires and plastics.

Step by step

  1. 1

    Choose cells and a safe workspace

    Use only single cells bought new as loose cells from a reputable supplier, with their datasheet. Never take cells out of an EV or e-bike pack. Inspect each cell: reject any with dents, torn wrap or leaks. Work on a fire-safe mat or metal tray, away from flammable items, and never leave a test running unattended.

  2. 2

    Charge the cell with a proper charger

    Fully charge the cell in a dedicated single-cell lithium-ion charger, not with the tester or a bench supply. Let it rest for about an hour, then measure its voltage with a multimeter. A healthy, freshly charged cell should be close to the full-charge voltage on its datasheet. Note the reading and the cell's identifier.

  3. 3

    Build the discharge circuit

    Wire the cell holder's positive through an inline fuse to the power resistor, then to the MOSFET drain. Connect the MOSFET source through the shunt resistor to the cell's negative and Arduino ground. Drive the MOSFET gate from a digital pin through a small resistor, with a pull-down to ground so the load is off by default. Mount the power resistor on a heatsink.

    Tip: Choose the load resistor so the discharge current is within the cell datasheet's recommended rate.

  4. 4

    Wire the measurements

    Connect the cell positive to an analogue input to read cell voltage; a single cell is within the Arduino's input range on a 5 V board, but add a series resistor for protection. Read the voltage across the shunt on a second analogue input, or use a current-sense module over I2C, to get the discharge current. Measure the shunt's actual value with your multimeter.

  5. 5

    Write the sketch

    Every second, read cell voltage and current, add current multiplied by time to a running mAh total, and print time, voltage, current and mAh over serial or to the display. Stop the test by switching the MOSFET off when the voltage reaches the cut-off voltage from the cell's datasheet, and keep it off. Add a maximum test time as a second safety stop.

  6. 6

    Calibrate against your multimeter

    Before the first real test, compare the Arduino's voltage reading with your multimeter on the cell, and its current reading with the meter in series on a short trial. Adjust the reference voltage and shunt value in the sketch until they agree. Accurate measurement matters more than precise code; small errors add up over a test lasting hours.

  7. 7

    Run and supervise the test

    Insert the charged cell, connect the laptop and start the test. Check the cell and resistor temperatures with an infrared thermometer during the first few minutes and regularly after. The resistor will get hot; the cell should only be warm. Stay nearby for the whole test. Remove the cell from the holder when the test finishes.

  8. 8

    Plot and compare results

    Copy the serial log into a spreadsheet and plot voltage against mAh. A healthy cell shows a long, gently sloping middle section and a steep drop near the end. Compare the measured capacity with the datasheet rating. Retest the same cell after a few months to see ageing. Recharge cells in the dedicated charger before storing them at a partial charge.

How to tell it worked

The tester stops automatically at cut-off and reports a capacity close to what you calculate by hand from the log, giving a repeatable mAh figure for each cell.

Stop and call a technician if

  • The cell gets hot, swells, hisses, leaks or smells sweet or burnt: disconnect only if safe, move away and call 112 if it smokes.
  • The cell voltage is far below normal before you start, which suggests it is damaged.
  • The fuse blows or the MOSFET gets hot, which suggests a wiring fault.

Questions

Why is my measured capacity lower than the label?

Labels are often optimistic, and capacity depends on discharge current, temperature and age. Test at the datasheet's standard rate for a fair comparison.

Can I use this to test my scooter battery?

No. This build is for single cells on a bench. For an EV battery, use the vehicle's own display or app and an authorised service centre.

Related EV hacks

All 100 EV hacks