Projects / Battery internal resistance meter

Battery internal resistance meter

Intermediate1.5 hGuided buildReviewed

Build it step by step

0 of 7 done
  1. NANO

    Check the resistor

    Measure the 10 Ω load with a multimeter.

  2. NANO

    Check the 5 V pin

    Enter the real value as VREF.

  3. NANOIRLZ44

    Build the switch

    MOSFET, gate resistor and pull-down.

  4. NANO

    Test with a fresh cell

    See open voltage and load voltage.

  5. NANO

    Work out the result

    Drop divided by current.

  6. NANO

    Compare cells

    Test a new cell and an old one.

  7. NANO

    Compare with the multimeter

    Check the voltage readings agree.

In short

How do you build a battery internal resistance meter?

Measure a cell's voltage with no load and with a known load, and work out its internal resistance to spot worn-out cells. You need Arduino Nano, MOSFET IRLZ44N, Power resistor 10 Ω 5 W (cement), Resistor 10 kΩ, Battery holder 18650 single, SSD1306 OLED Display and Resistor 220 Ω. It takes 7 steps and about 90 minutes.

Level
Intermediate
Time
About 90 min
Parts
7

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
Cell + (holder)Nano A0 and the 10 Ω resistorVoltage sense and load top
10 Ω 5 W resistorMOSFET drainLoad path
MOSFET sourceCell − (holder) and Nano GNDLoad return
Nano D5220 Ω resistor to MOSFET gateLoad switch
10 kΩ resistorMOSFET gate to sourceKeeps the load off at power-up
OLED SDA and SCLNano A4 and A5I2C
OLED VCC and GNDNano 5V and GNDPower (Nano on USB)

Code

The method is simple: internal resistance equals the voltage drop divided by the current. With a 10 Ω load a 3.7 V cell gives about 370 mA, a gentle test that causes only a small drop of tens of millivolts. The Nano's 10-bit converter has steps of about 5 mV, so the answer is a rough indicator that is good for telling a healthy cell (often under 150 mΩ for a good 18650) from a worn one (several hundred mΩ), not a lab measurement; averaging 64 readings helps. For better accuracy use the INA219 version of this idea. The load resistor gets warm, so keep the pulse under a second. Test only one undamaged cell at a time, never above 4.3 V, never a swollen or dented cell, and never short a cell. Put the load on a heat-safe surface. The MOSFET gate pull-down keeps the load off while the Nano starts. Arduino IDE, board "Arduino Nano" (try the Old Bootloader option if the upload fails).

Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).

// Battery internal resistance meter. Libraries: Adafruit SSD1306, Adafruit GFX. Board: Arduino Nano.
// Test one lithium or NiMH cell at a time, never above 4.3 V, never a damaged or swollen cell.
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

Adafruit_SSD1306 oled(128, 64, &Wire, -1);
const int LOAD = 5;
const float R_LOAD = 10.0;          // measure your resistor with a multimeter and enter its real value
const float VREF = 5.00;            // measure the Nano 5V pin and enter it here

float readV() {
  long sum = 0;
  for (int i = 0; i < 64; i++) { sum += analogRead(A0); delay(1); }
  return (sum / 64.0) * VREF / 1023.0;
}

void setup() {
  pinMode(LOAD, OUTPUT); digitalWrite(LOAD, LOW);
  oled.begin(SSD1306_SWITCHCAPVCC, 0x3C); oled.setTextColor(SSD1306_WHITE);
}

void loop() {
  digitalWrite(LOAD, LOW); delay(1000);
  float vOpen = readV();
  if (vOpen < 0.5 || vOpen > 4.3) {                     // no cell, or too high for the direct input
    oled.clearDisplay(); oled.setTextSize(1); oled.setCursor(0, 0); oled.print("Insert one cell");
    oled.setCursor(0, 14); oled.print("0.5 to 4.3 V only"); oled.display(); delay(1000); return;
  }
  digitalWrite(LOAD, HIGH); delay(800);                 // load for under a second
  float vLoad = readV();
  digitalWrite(LOAD, LOW);

  float current = vLoad / R_LOAD;                       // the load resistor is across the cell terminals
  float rInt = (current > 0.01) ? (vOpen - vLoad) / current : 0;

  oled.clearDisplay(); oled.setTextSize(1);
  oled.setCursor(0, 0);  oled.print("Open "); oled.print(vOpen, 3); oled.print(" V");
  oled.setCursor(0, 12); oled.print("Load "); oled.print(vLoad, 3); oled.print(" V");
  oled.setCursor(0, 24); oled.print("Current "); oled.print(current * 1000, 0); oled.print(" mA");
  oled.setTextSize(2); oled.setCursor(0, 42); oled.print(rInt * 1000, 0); oled.print(" mohm");
  oled.display();
  delay(4000);
}

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
New 18650Low resistance, usually under 150 mΩ
Old or worn cellNoticeably higher
Pulse lengthUnder a second, resistor only warm
No cellDisplay asks you to insert one

If it does not work

Resistance reads zero

Voltage drop is below the ADC step; average more or use an INA219.

Load stays on at power-up

Check the gate pull-down resistor.

Strange values

Enter the real VREF and the measured load resistance.

Resistor too hot

Shorten the pulse.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the battery internal resistance meter?

Arduino Nano, MOSFET IRLZ44N, Power resistor 10 Ω 5 W (cement), Resistor 10 kΩ, Battery holder 18650 single, SSD1306 OLED Display and Resistor 220 Ω.

How long does the battery internal resistance meter take to build?

About 90 minutes for a intermediate maker, in 7 steps.

How do I know the battery internal resistance meter works?

New 18650: Low resistance, usually under 150 mΩ. Old or worn cell: Noticeably higher. Pulse length: Under a second, resistor only warm.

Resistance reads zero: what should I check?

Voltage drop is below the ADC step; average more or use an INA219.

Load stays on at power-up: what should I check?

Check the gate pull-down resistor.

Strange values: what should I check?

Enter the real VREF and the measured load resistance.

Resistor too hot: what should I check?

Shorten the pulse.