Measuring current across inductor?

Discussion in 'Embedded Systems and Microcontrollers' started by kdar1987, Apr 4, 2012.

  1. kdar1987

    Thread Starter New Member

    Feb 5, 2010
    15
    1
    I am not sure if something similar was asked here before.. but anyways...

    I am trying to measure energy spent by CPU performing some task on embedded platform running Linux (like moving a file, or compressing something.. etc).

    At this moment, I have collected sampled DC voltage across this inductor by soldering some small wires to both ends of inductor and using DAQ to sample the data.
    How can I get from this collected data current and energy?

    Previously, I have used same method to measure total energy usage, from power source (power adapter cable) of embedded platform. And to get current, I used small resistor of 0.1Ohm.

    Can I do something similar and use measured DC resistance of inductor (measured when board is off) to derive current from sampled voltage data?

    (I am trying to analyse how much energy is used by CPU)
     
    Last edited: Apr 4, 2012
  2. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    Determining current in an inductor from the voltage measurements is not generally practical. A direct measurement with a current sense resistor (as you used before) or a Hall effect sensor is practical.

    It's not clear why you are trying measure across an inductor anyway. If you want to know the system power/energy, wouldn't direct voltage and current readings on the CPU power pins give you that?
     
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,607
    Huh? There is no current across an inductor.

    There is a current thru it and a voltage across it, but the voltage you can read is related to the change in current.

    A resistor is more suitable for this, as the current and voltage are in direct proportion. The devil in the detail is to insert a resistor so it does not affect the CPU.

    That is possible if you place this resistor *before* the regulator supplying the CPU. That leaves the next devil, getting a reading that is between ground and VCC (where I assume your measurement device will sit.)

    Maxim makes some High-Side Current-Sense devices that do just that, convert a series resistor in the high supply lead and reference the current reading to ground. I've used then to good result before in some fixturing.
     
  4. kdar1987

    Thread Starter New Member

    Feb 5, 2010
    15
    1
    Sorry, I meant thru.

    Well, there are no pins to measure voltage or current directly.

    I can not use ohmic internal resistance of inductor?
     
  5. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    No, because you can't separate the resistance from the inductance. In principle you could develop an observer/estimator to calculate the current from the voltage history. This involves the mathematical operation of integration which is notoriously impractical to use in a calculation without extraordinary efforts. The reason is that any offset errors will get integrated over time and make your measurement inaccurate in a relatively short amount of time.

    There is the exception of pure AC sinusoidal signals with no offset, or with a feedback system that keeps the offset from accumulating over time. In that case, the inductive reactance creates impedance that can be used to relate voltage and current. However, based on your description, this would not be the case.
     
    Last edited: Apr 4, 2012
  6. kdar1987

    Thread Starter New Member

    Feb 5, 2010
    15
    1
    here is part of schematic with this inductor (L18, L13.. etc):
    [​IMG]

    So inductor is connected between Power Manager PMIC (to the left) and OMAP chip (to the right).

    Like ErnieM mentioned above, that since I was measuring across inductor, I was measuring voltage related to the change in current (which is probably not what I want).

    Should I instead measure from PMIC side across small resistor to ground to get right voltage? (or should it be from OMAP side? Somewhere I read that PMIC side would have a lot of noise..)
     
    Last edited: Apr 4, 2012
  7. kdar1987

    Thread Starter New Member

    Feb 5, 2010
    15
    1
    What if resistance and inductance is known? Or resistance when board is on can be different from measurement when board is off?
     
  8. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    Not sure what you mean here, but no matter how well you know the values, the fact is that voltage tells you current through the mathematical operation of integration. This type of relation is a little too complicated and much too sensitive to rely on for a measurement because the present value of current at any time depends on the total past history of the voltage. Also, even if you know the values very well, often you do not know offset voltages and noise sources well at all. I wouldn't say it's impossible, but it is very very difficult and not very robust to do it this way.

    A pure resistor or a Hall effect sensor tells you current directly since it is the voltage reading times a scale factor. The value of current now depends only on the voltage reading now. This is so very easy to do.
     
  9. kdar1987

    Thread Starter New Member

    Feb 5, 2010
    15
    1
    Ah I see now. Right. I felt doing integration can be hard from sampled data, but I didn't know how accurate it could be.

    So with pure resistor.. I would try to measure voltage from it to ground? or how could I bypass inductor and measure its current?

    From the schematic above, can I prode it between VBAT_VCORE1 and Ground?

    Or will I short it out?
     
    Last edited: Apr 4, 2012
Loading...