Voltage/Current spike averaging curcuit

Discussion in 'The Projects Forum' started by noiprocs, Jun 26, 2009.

  1. noiprocs

    Thread Starter New Member

    Jun 26, 2009
    3
    0
    I'm currently designing a circuit that will be used as a signal conditioner for a data-logger. It will be measuring the current consumption of a battery powered device. I plan to use a 4ohm resistor to convert the current into about 100mV (at 25mA) and then amplify with an opamp.

    Thats all OK, heres the problem:
    The device switches on/off a radio chip that uses 25mA. It uses about 10uA when it's turned off. It turns on for 100us; the sample period of the data-logger is 500us! Obviously the data-logger could completely miss the spike! What I would like to do is build some form of averaging circuit so that the spike will always be captured (maybe in 2 samples) so I am still able to work out the energy consumed by the device.

    Does anyone have any ideas or calculations that I should be following?

    thanks
     
  2. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    864
    40
  3. noiprocs

    Thread Starter New Member

    Jun 26, 2009
    3
    0
    Hi,

    I like the idea of an integrator circuit - thanks for the links you provided. The problem is I can't get access to the sample clock as the data logger is a separate device. I would prefer to keep it simple anyway.

    I have had a suggestion to use an RC circuit but I am unsure how to calculate the best cutoff value...
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  5. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    864
    40
    I am just going to type while a think about this...

    Choosing a high frequency cutoff means that your signal will charge quickly from the spike in voltage, it will also discharge quickly as the spike is removed. You may still miss the spike...

    Choosing a low frequency cutoff will not charge or discharge quickly for a spike and would probably reduce the scale, and maybe accuracy, of the output voltage of the system.

    And, if the spike can occur at various points in the 500 us sample period, you may get differing results for the same current based on the charge and discharge rates of the RC filter.

    You may have to do some testing to see if the RC circuit would work.

    A peak detect circuit comes to mind as well...

    You say the ON time of the device is 100 us. What is the OFF time? Is it periodic, repeating at regular intervals? Or, does it just turn on sporadically?
     
  6. DC_Kid

    Distinguished Member

    Feb 25, 2008
    638
    9
  7. noiprocs

    Thread Starter New Member

    Jun 26, 2009
    3
    0
    The problem with a peak detector is that it would not give me any information about how long the pulse has been 'on' for - I would only be able to work out when it turned off

    The pulse will be fairly sporadic and could be on for more or less than 100us. I came to the same conclusion you did on the RC, here are my thoughts:

    I started by making the assumption no current is used when the radio chip is switched off. Also, lets assume that we are going to take a sample at exactly the falling edge of the peak. That should tell us that the sample will be taken at the peak voltage of an RC lowpass output.

    As the sample period (500us) is 5 times greater than our theoretical pulse width (100us), I will need to measure a voltage 5 times less to accurately calculate the amount of energy consumed (As the pulse is 100mV I will need to measure 20mV).

    The RC time constant ( RC=-t/(ln(1-%)) ) gives me f=355Hz. But I also need to ensure that if the sample occured at the rising edge, I would still get a measurement of 20mV on the sample after. This will obviously not be the case because the RC would of had 400us to discharge.

    The only way I can see to do it is to use a lower curoff and do some post processing on the PC side. The problem is I don't know for sure exactly what the pulse amplitude will be (25mA is a typical value) or the length of time it will be on for.
     
  8. DC_Kid

    Distinguished Member

    Feb 25, 2008
    638
    9
    so i am a tad confused.

    if the datalogger is only 500us fast in sampling and you have a 100us event, it still seems to me the solution is a better data logger vs trying to solve the problem with passive devices.

    a comparator with hysteresis feedback might be better than what you're trying with RC?
     
    Last edited: Jun 27, 2009
  9. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    864
    40
    I think you have two options, you can either use the integrating type circuit or, as DC Kid has suggested, get a data logger that can actually be guaranteed to see the event.

    I don't think the RC is going to work based on your comment "The pulse will be fairly sporadic and could be on for more or less than 100us." And there is no guarantee at what point in the data logger period the pulse will occur. Your result from the time constant will then not guarantee similar results for similar currents and times.
     
Loading...