This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LM25066 Current Sense

Other Parts Discussed in Thread: LM25066, LM25066I, LM25066A

I am using the LM25066 device and a 1m-ohm sense resistor.  When I use the default values listed in Table 41 of the device specification (CL=GND), I have readings that are roughly 35% low.  I have taken several measurements between 1A and 11A. 

The section about Determining Telemetry Coefficients Empirically with Linear Fit implies that there might be some slight variation, but 35% does not seem slight to me. 

 

I have verified the voltage at the LM25066 input pins are very close to the voltage drop over the sense resistor. 

If I determine the coefficients empirically with linear fit (as described in the doc), I get very different coefficients than the defaults.

 

I am curious what the expected variation is, and what might be causing this issue.

 

 



  • Hi Kathy,

    Welcome to the E2E forums! A member from our team should be back tomorrow to discuss. In the meantime, are you using the EVM or a custom design? If custom, do you have any resistors in series on the VIN or SENSE pins?

    We have this blog regarding current sense resistor layout which may also help:
    e2e.ti.com/.../choosing-the-right-sense-resistor-layout

    Thanks,
    Alex
  • Thanks Alex.

    Our sense resistor uses a layout like Figure 2 in the link above. 

    Also, I have measured the voltage at the LM25066, and it is pretty close to the sense resistor. 

    For example:

    sense resistor (1m-ohm) = 11.495mV

    LM25066 pin = 11.015mV

    Using the recommended coefficients, I read 8.2-8.7A

  • Hi Kathy,

    The accuracy is spec'd essentially at the full scale range of VIN - SENSE = 25mV to be +/- 2.4%. There will be error in the current sense measurement when the sense voltages are low compared to the full scale ADC range.


    In addition, from the example numbers you had provided, you can tell there is already a ~5% error due to a discrepency between the sense resistor voltage and the LM25066 pin voltage. These values should be fairly close to each other unless there is series resistance, layout issues, or soldering problems.

    But that does not explain the larger error measured. I would recommend capturing both the Vsns measured and simultaneously the raw I2C traffic. That is the easiest method to troubleshoot if there is an error in the conversion technique, coefficients, or something else.

    Here is a quick example on how to properly read and and convert the data:

    1. Begin by converting the hexadecimal byte packets to two’s complement binary values of codes.
    a. SMBus and PMBus bit data is transmitted on the bus from msb to lsb (big endian); however, words are transferred as bytes, from LSB to MSB (little endian). Therefore, the byte packets of {0x2e 0x01} and {0x03 0x00} become 0x012e (302.) and 0x0003 (3.), respectively.
    2. Next, for a given sense resistor (Rs), use the data-sheet or GUI to determine the PMBus coefficients for IIN.
    a. For Rs = .5mOhms; b = -5200, m = 6831, R = -2
    3. Finally, for each code, apply the formula X = (1/m)(Y*10^-R-b) (and the IIN coefficients from the previous step) to convert from PMBus direct-format to real values of current intensity.
    a. (1/6831)(302*10^2+5200) = 5.182A
    b. (1/6831)(3*10^2+5200) = 0.805A

    To check the recommended coefficients based on the Rs chosen, you can use our PI Commander GUI which features a PMBus Coefficient Editor page. The PI Commander GUI also features a way to read in the raw I2C data from READ_IIN. Learn more about the PI Commander GUI and what it can do here:
    e2e.ti.com/.../simplify-digital-hot-swap-design-using-the-pi-commander-gui

    Thanks!
    Alex

  • Hi Alex,

    I have already addressed the less-than-perfect layout issues in my next board spin to improve things on that front.  At this point, the 5% error due to the routing is not my biggest concern.

    I have already gone through the process of doing the conversion.  I am using a 1m-ohm resistor, and if I use the default values in the spreadsheet, I am off by 30-something percent.

    When I read the sensor of I2C, and look at the raw data, and compare it to the conversion to current, it aligns with what I am seeing. 

    I can go through and generate new coefficients. 

    My real question is, it normal to see readings that are this far off and be required to calculate new coefficients for any new board that we design?  The datasheet reads like this 'might' be required for more accuracy, but the defaults should give you reasonable readings.  We have several designs using this circuit, and all of them are reading off by 30-something percent.  It just feels like something is wrong...

    kathy

  • Hi Kathy,

    You are correct. We almost never recommend going through the process of calculating custom coefficients. The reasons are explained in the latest version of the LM25066 datasheet (not the A/I/IA datasheet yet - just the default LM25066 datasheet):

    Section 8.5.1.4 on page 38.

    Copied here:

    It is not considered good practice to take measurements on one board and use the computed

    coefficients for all units in production, because the RS and the LM25066I on a given board are randomly chosen

    and do not represent a statistical mean. It is recommended to either calibrate all boards individually or to use the

    recommended coefficients from Table 41.

    The coefficients from Table 41 were generated by characterizing several units over temperature and determining the optimal setting.

    We have seen great results when using these coefficients from all of our customers, and from our own testing on the LM25066 EVM.

    The most common problems we see are errors in calculating the coefficients, reading the raw I2C traffic data properly, or using the equation to convert the values properly.

    One option you can consider is using the USB module which comes with our EVM and connecting it to your board (the SDA/SCL/GND lines). Then you can use our GUI at www.ti.com/hotswap --> "Tools & Software" to evaluate the performance and see if the current readings make sense. This should rule out whether there are any software related problems.

    If you do not have our USB module from the EVM but happen to have a Total Phase Aardvark I2C Host Adapter, our GUI is compatible with that device as well.

    Thanks,

    Alex

  • Thanks Alex.

    With the ~11A load, I see converted data of 8.2A-8.7A, and raw data in the range of 0x4Dx-0x51x (we are only printing out the upper 8 bits, but that shouldn't cause this kind of error).
    If I use the standard coefficients from the datasheet, and work backwards, I get that a reading of 8.7A should translate to 0x4D8.
    So, it seems like the math is correct.

    Is there a recommendation regarding which register to read?
    0xD1 (input current)
    0xDE (averaged input current)
    I think we are using 0xD1. If 0xDE is recommended, is there also a recommendation for the number of samples to use for 0xDB?

    We do have an Aardvark, so we should be able to give that tool a shot.

    Thanks,
    kathy
  • Hi Kathy,

    Your math is correct. So if you use our GUI and an Aardvark then you could use the "view traffic log" to see the raw I2C communication then you can get the full raw I2C values to be sure:

    e2e.ti.com/.../simplify-digital-hot-swap-design-using-the-pi-commander-gui

    See Figure 3 and 4 and their captions for brief instructions.

    However ultimately if the values are truly reading between 4Dx to 51x, then it would seem like a hardware issue.


    From the IC point of view, all that matters is the voltage between the VIN and SENSE pins. If you have 11mV across the sense pins, the D1 register should store a value around 0x0600 give or take. We can run this test in our lab using an EVM (adjust load until the Vsns voltage is 11mV, then record the raw D1 register value).

    D1 and DE should be mirror values unless you change the SAMPLES_FOR_AVG register. Either should be ok for this test purpose.

    Thanks,
    Alex
  • Hi Alex,

    You mentioned in an earlier post in this thread that the accuracy of the current sensor will be less good under lighter loads.  How much error do you typically see when not fully loaded?

    We hooked up the Aardvark, and what I am seeing over the I2C bus aligns with the low readings I am seeing. 

    Next, we changed the sense resistor to 2m-ohm (but didn't change the equations), to make the circuit 'think' that it has a 20A load (plus the 1A consumed by the board itself).  With a reading across of the sensor resistor around 22mV, we get a converted current of 20A. 

    kathy

  • Hi Kathy,

    I'll discuss with our IC designer to get a rough estimate of what would be expected. Will get back to you today.

    Note that solder resistance can play a role (copying blog link from earlier):

    So we have seen cases when simply reflowing the sense resistor improved the accuracy by a significant amount.

    I understand that may not be the case here, but just offering some of the odd-ball scenarios.

    One way to truly test the IC would be to place the LM25066 IC on a new EVM and then test the accuracy with our GUI. I can't imagine it being as far off as 30% at half scale (which is around what you had seen).

    Thanks!

    Alex

  • Hi Kathy,

    I spoke to our IC designer and for this device, the spec is listed as 2.4% at 25mV over temperature.

    At 11mV, we would estimate this value to be within 5-10%. The LM25066's ADCs have some offset and intergral non-linearities which could affect the measurement at lower ranges.

    Note that the EVM makes it easy to test the sense resistor voltage (there are test points) and easy to read the current on our GUI. If time permits it, that could help rule out if it is an IC problem or something else.

    Thanks,
    Alex
  • Alex,

    I am trying to gather more data from other engineers here. It is my understanding that we are seeing similar results across several designs, so I am not suspecting a bad IC. What I do not know is what current range the other designs were tested at (close to full load, or lightly loaded).

    If I am reading the datasheet correctly, with a 10A load over a 1m-ohm resistor, I should be seeing better than 5% for the measurements I am taking at ambient temperature.
    [VIN-VSENSE = 5mV, CL=GND, Tj=10C-85C]
    As you already noted, my routing is not ideal, and therefore do expect a little loss, but not what I am seeing.

    I am also not suspecting the sense resistor -
    we are using the layout in figure 2 from the link you pasted.
    also, we are not seeing a significant drop between the voltage measured at the sense resistor, and the voltage measured at the vias for the LM25066A device.
    I think I am getting about a 4% loss due to non-ideal routing of the sense signals. Again, not great, but not the inaccuracies that I am seeing.

    kathy
  • I think I understand Kathy, and that is what is making it difficult to troubleshoot where the error lies.

    I am out of my stash for EVMs for the LM25066 (been using or modifying them all up). I am ordering some more and can take the default EVM and measure the raw I2C data and GUI values with 10A applied.

    I just felt there are a lot of variables at play, and even if those variables are measured and taken into account (such as the voltage difference drop between the sense resistor and IC), it may be worth considering to take the IC and place it on a new EVM. Such a test would determine if the IC is reporting values correctly or not, on a controlled and repeatable test setup.

    Thanks,
    Alex