That 18650 cell claiming 3000mAh – is it genuine or a relabelled 800mAh cell? The only way to know is to test it. A battery discharge tester drains the cell at a known rate while measuring voltage and current, giving you the true capacity. This guide shows you how to build one using an Arduino and a few common components available in India.
Why Test Battery Capacity
India’s electronics market is flooded with counterfeit and relabelled lithium cells. A ₹50 cell claiming 9900mAh might actually deliver only 500mAh. Testing every cell before using it in a project protects you from wasted money and dangerous battery packs. Mismatched cells in a pack cause uneven discharge, reducing pack life and creating safety risks.
How Discharge Testing Works
A discharge tester works by drawing a constant current from the battery while monitoring its voltage. When the voltage drops to the safe minimum (typically 2.8V for Li-ion), the test stops. The total mAh delivered is calculated by multiplying current (in amps) by time (in hours).
Formula: Capacity (mAh) = Discharge Current (mA) x Time (hours)
For example, if a cell delivers 0.5A for 4.2 hours before hitting 2.8V, its capacity is 500mA x 4.2h = 2100mAh.
Components Needed
You will need the following components:
- Arduino Nano or Uno
- INA219 current/voltage sensor module
- Power MOSFET (IRLZ44N or IRF540) for load control
- Power resistors (2-5 ohm, 10W or higher) as discharge load
- 18650 battery holder
- OLED display (optional, for real-time readout)
- Cooling fan (recommended for sustained testing)
Price: ₹86
I2C current/voltage sensor – accurate to within 1%
Buy on Zbotic.in
Price: ₹284
4-Channel MOSFET switch for load control
Buy on Zbotic.in
Price: ₹156
Ready-made capacity tester if you prefer a turnkey solution
Buy on Zbotic.in
Building the Discharge Tester Circuit
The circuit is straightforward:
- Connect the 18650 cell positive terminal through the INA219 high-side to the drain of the MOSFET.
- Connect a power resistor between the MOSFET source and battery negative.
- The INA219 measures both voltage across the cell and current through the load.
- Arduino controls the MOSFET gate via a digital pin (through a 100-ohm resistor).
- Arduino reads INA219 over I2C (SDA/SCL) and calculates running mAh total.
The power resistor value determines discharge current. For a 1A discharge from a fully charged 4.2V cell: R = V/I = 4.2/1 = 4.2 ohms. A 4.7-ohm 10W resistor is suitable. The resistor will get hot during testing, so mount it with adequate airflow.
Arduino Code for Capacity Measurement
#include <Wire.h>
#include <Adafruit_INA219.h>
Adafruit_INA219 ina219;
float totalMah = 0;
float cutoffVoltage = 2.8; // Safe minimum for Li-ion
unsigned long lastTime = 0;
bool testing = false;
void setup() {
Serial.begin(9600);
ina219.begin();
pinMode(7, OUTPUT); // MOSFET gate control
digitalWrite(7, LOW); // Start with load OFF
Serial.println("Battery Discharge Tester");
Serial.println("Send 'S' to start, 'X' to stop");
}
void loop() {
if (Serial.available()) {
char cmd = Serial.read();
if (cmd == 'S' || cmd == 's') startTest();
if (cmd == 'X' || cmd == 'x') stopTest();
}
if (testing) {
float voltage = ina219.getBusVoltage_V();
float current_mA = ina219.getCurrent_mA();
unsigned long now = millis();
float elapsed_h = (now - lastTime) / 3600000.0;
totalMah += current_mA * elapsed_h;
lastTime = now;
Serial.print("V: "); Serial.print(voltage, 3);
Serial.print(" I: "); Serial.print(current_mA, 1);
Serial.print("mA Total: "); Serial.print(totalMah, 1);
Serial.println("mAh");
if (voltage 0.5) {
stopTest();
Serial.print("TEST COMPLETE! Capacity: ");
Serial.print(totalMah, 0);
Serial.println(" mAh");
}
delay(1000);
}
}
void startTest() {
totalMah = 0;
lastTime = millis();
testing = true;
digitalWrite(7, HIGH); // Turn on load
Serial.println("Test started...");
}
void stopTest() {
testing = false;
digitalWrite(7, LOW); // Turn off load
Serial.println("Test stopped.");
}
Interpreting Test Results
After testing, compare your results:
- Above 80% of rated capacity: Cell is genuine and in good condition.
- 60-80% of rated capacity: Cell is used or slightly degraded but still usable for low-drain applications.
- Below 60% of rated capacity: Cell is either fake, old, or damaged. Do not use in multi-cell packs.
- Below 30% of rated capacity: Cell is counterfeit. Dispose safely.
For pack building, match cells within 5% of each other’s capacity. Test all cells from the same batch and group them accordingly.
Tips for Accurate Testing
- Let cells rest for at least 1 hour after charging before testing.
- Test at room temperature (25°C ± 5°C) for consistent results.
- Use a consistent discharge rate (0.2C to 0.5C is standard for capacity testing).
- Run the test twice and average the results for accuracy.
- Keep a spreadsheet of results if building battery packs – you need matched cells.
Frequently Asked Questions
How long does a battery capacity test take?
At 0.5A discharge, a genuine 2200mAh cell takes about 4-4.5 hours. At 1A, it takes about 2-2.5 hours. Lower discharge rates give more accurate capacity readings.
Can I test LiPo batteries with this tester?
Yes, the same principle applies. Just ensure your cutoff voltage is correct (3.0V per cell for LiPo is the safe minimum). Never discharge LiPo below 3.0V per cell.
What if I do not have an INA219 module?
You can use a voltage divider on an Arduino analog pin to measure battery voltage, and a shunt resistor with another analog pin for current measurement. However, the INA219 is far more accurate and costs only ₹86.
Ready to Power Your Next Project?
Get all the components for your battery tester – INA219 modules, MOSFET switches, battery holders, and Arduino boards at Zbotic.in.
Add comment