Post Go back to editing

Migrating from 5mOhms to 10mOhms

Thread Summary

The user is migrating from a 5mΩ to a 10mΩ sense resistor on the MAX17320 and facing issues with current and capacity readings. The final answer confirms that nRsense is only used for GUI conversion, and all capacity and current-related NVM registers (nFullCapRep, nFullCapNom, nDesignCap, nIChgTerm, nIProtTh1/2, nODSCTh) must be updated to account for the new resistor value. nCGain does not need adjustment for the sense resistor change, and a significant current error suggests a potential layout or soldering issue.
AI Generated Content
Category: Hardware
Product Number: MAX17320

Hi all

We are the same team that recently posted about issues with configuration registers on the MAX17320.

We are migrating from the default* 5mΩ sense resistor to a 10mΩ sense resistor. (*we refer to the Rsense resistor as " default " based on the evaluation board value and how it is treated in the datasheet)

We updated nRSense = 0x03E8 (1000 × 10µΩ = 10mΩ) accordingly.

CGain corrects the current register, but capacity reads at 75% of the real value

Our battery pack consist of 3 3400mAh cells in series (3S)

Here are some of the new issues we are facing

Problem 1: Current reading at 0.75× real

With 10mΩ and default nCGain = 0x4000, the Current register reads 0.75× the real current measured by a calibrated ammeter. We applied CGain correction per the implementation guide formula:

raw_gain = Round((1.0 / 0.75) × 512) = 683

nCGain = 0x5540

This corrected the Current register so it reads accurately.

Problem 2: Capacity reads at 50% of the real value:

With CGain corrected, RepCap reports 1752mAh at 100% SOC instead of 3400mAh. TTE is internally consistent with the reported current and capacity (1.7525Ah / 0.072A ≈ 24h, IC reports 23h), confirming the IC math is self-consistent; however, the capacity baseline is wrong.

Current NVM register values (shadow RAM):

nRSense    = 0x03E8  (10mΩ)

nDesignCap = 0x0D48  (3400, set for 5mΩ)

nFullCapRep= 0x0D48  (3400)

nFullCapNom= 0x0F68  (3944)

nCGain     = 0x5540  (CGain correction for 0.75× error)

nIChgTerm  = 0x0100  (256)

nIPrtTh1   = 0x21E7

Our understanding: From the datasheet, nCGain only adjusts the Current register output:

Current Register = (Current ADC Reading × (CGain/256)) + COff

It does not affect the coulomb counter accumulation. Therefore, the capacity registers are still accumulating based on the raw ADC, which sees 0.75× real current, resulting in ~50% capacity error compounded with the 2× LSB change from 5mΩ to 10mΩ.

Please note that during our previous tests, we used 5 mOhms and the current measurement seemed more accurate. We can confirm that the resistors are ACTUALLY 10 mOhms

Questions:

  1. What is the correct procedure to migrate from 5mΩ to 10mΩ? Should nDesignCap, nFullCapNom, and nFullCapRep be doubled to account for the LSB change (5µVh/0.01Ω = 0.5mAh/LSB)?
  2. Does CGain correction also apply to the coulomb counter, or only the Current register readout?
  3. Is the 0.75× current error (with correct 10mΩ resistor) expected, or does it indicate a layout/Kelvin connection issue that should be resolved physically before applying CGain correction?
  4. What registers need to be recalculated when changing Rsense, beyond nRSense itself?

Thank you in advance for your help

FTAO  

  • The IC operates completely in uV or uVhrs for all currents and capacity values.  The nRsense register is not used internally by the IC, but only is used by the EVKIT GUI (or host application) to convert the uV and uVHrs to mA and mAHr for us humans to easily understand.

    Changing the sense resistor does require changes to all of the capacity and current values in NVM so that they are scaled correctly for the new uV/Rsense or uVHr/Rsense.  nFullCapRep, nFullCapNom, nDesignCap, nIChgTerm, nIProtTh1/2 and nODSCTh will all need to be updated for a change in sense resistor.

    nCGain is not impacted by a change in sense resistor as it is applied internally by the IC in terms of uV.

    If you are seeing a big current error, then it may be an indication that the sense resistor isn't soldered cleanly or bad layout of the Kelvin connections.  It is NOT normal to need to tweak nCGain.  Most customers are able to use the default value of 0x4000 (which applies no Current Gain correction)

  • Dear  

    Thank you for your prompt response. The information you shared is invaluable to us, and we are preparing a comprehensive response for you.

    One of my engineers managed to get the Fuel Gauge up and running by applying some corrections at the System Controller level. However, the inconsistencies persist.

    Unfortunately, one of the key points that you touched upon truly resonates with us: the Kelvin connection. During our prototyping stage, we used a custom PCB that had no space constraints and the Kelin connections were kept extremely short; they were routed following a differential pair paradigm and the connections to the sense resistor were made at the sense resistor's inner pads. In contrast, the system we are having trouble with is one of our initial revisions (to be delivered soon), where shrinking down the size of the board was paramount for our customer. The problem with this is that this design constraint forced us to make some sacrifices in terms of the placement ot the balancing resistors, the sense resistor and the routing of the Kelvin connections. While we kept the traces close together, treated them as true differential pairs to try to minimise the imbalance in their intrinsic trace resistance, the distance to the IC input terminals is highly questionable. Moreover, we were unable to route them on the same top copper layer.

    We measured both trace resistances (from the sense resistor pads to the IC's input pins), and we found that each trace resistance is approximately 344mOhms. We confirmed this by measuring the TOTAL trace resistance (by measuring the resistance at the IC's input sense pins (we desoldered the chip and the 10 mOhms sense resistor and measured the resistance at the IC's pads) finding a total resistance of 683mOhms. Our technique is based on a constant current source (Fluke 789 Process meter), direct voltage measurement and Ohm's law. Basically, a cheapo milliOhmeter of sorts.

    These findings do NOT fully explain the current mismatch. We have always assumed that the 4-Wire Kelvin technique cancels out the trace resistance at the measurement point.

    As you may understand, I cannot disclose any specifics of the application; however, I have attached the screenshots from the 6 layers of our design. We believe that this may be a strong case for redesigning the layout in a new revision

    Thanks for your help, once again

  • Dear  

    Just wondering if you had the chance to read our previous post. We would be grateful to hear your thoughts

    Thanks in advance

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.