measuring current consumption in uC with very low power modes

Hi to all,

often i have to measure the current absorbed by small circuits,in battery appplications Normally i deal with consumptions big as 20mA in run mode and 2uA in sleep mode.

One method that sometimes i use is to desconnect the battery,leaving the circuit feeded only by a 10,000 uF capacitor,seldom and quickly measured by an high impedence multimeter,(of course not a 10 Mohm oscilloscope probe).Measuring the difference in voltage at a specified times i can calculate the consumption.The cap was previously measured,to avoid tolerance error.

More often i need a more immediate measurement,so i feed the circuit by a commutator switch,in parallel to 1,10 and 100 ohm shunt resistors. The latter is constantly inserted so that the circuit is not completely relying on itself during commutations. When the uc goes to sleep and i need to have an hopefully realistic rading of few uA i switch on the 100 ohm shunt,the voltage drop between battery and circuit is below the mV,therefore irrelevant. The voltage is read by a 6 and half digit DMM via a 60cm(2 ft)twisted wire.

Is this a good method or others can be better?

Is there any advantage using an instrumentation op amp as buffer or amplifier, wired very closely to the shunt?

Many thanks for your attention

Diego

Reply to
blisca
Loading thread data ...

Have you considered an op-amp voltage follower around your sense resistor, e.g.

formatting link
Since the op-amp compensates for the voltage drop the resistor and that drop can be a lot greater and easier to measure accurately.

--
Andrew Smallshaw 
andrews@sdf.lonestar.org
Reply to
Andrew Smallshaw

I'm taking the liberty of cross-posting this to sci.electronics.design, because this is really an electronics question, not an embedded question. I think you'll get more answers from there, and many of them will even be good ones.

I think your commutation idea will suffer in accuracy if the load is fairly stiff in voltage -- like if you're driving a capacitor. In that case the current with the low resistance switched in will be higher than without.

If the circuit is otherwise isolated, the best way to do the measurement may be to put your 100 ohm resistor between the circuit ground and the negative terminal of the battery, then amplify its voltage by 10 or 100 using a chopper-stabilized op-amp. Then you can just read the voltage and scale it appropriately to current.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

Have a browse around on Jack Ganssle's web-site at as I know Jack has had an article or two about microprocessor current measurements (even for the lowest power ones). There is certainly a reference to the article in one of his Muses.

--
******************************************************************** 
Paul E. Bennett IEng MIET..... 
Forth based HIDECS Consultancy............. 
Mob: +44 (0)7811-639972 
Tel: +44 (0)1235-510979 
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk.. 
********************************************************************
Reply to
Paul E Bennett

Thank you for all the good immediate hints,as the one of the compensating buffer and for the suggested links .

Sadly in last years i'm spending so much time working head down that i have few or no time to learn from useful sites,but once more it looks like it's worth it

Forgive me if the topic is not strictly inherent to the group, thanks for crossposting.

Diego

Reply to
blisca

Well I have designed various current sensors even just using resistive depending on requirements of accuracy for several embedded projects.

Power run ground shunts can be a pain with having a real ground and majority that has to be elevated some micro to milli volts and keeping them isolated. At micro amp ranges a finger bridge the ground and pseudo ground can affect results in some circumstances.

For supply monitoring I use all sorts but if I have a small negative rail available I tend to use AD628 for this especially if you need high common mode isolation. I have found shunt 3 resistors and 1 cap it works well. Easy to scale for ADC input as two difference amplifier.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk 
    PC Services 
  Raspberry Pi Add-ons 
 Timing Diagram Font 
 For those web sites you hate
Reply to
Paul

Just in case you didn't realize, the replies in s.e.d didn't get cross posted to this group. So you will need to look in s.e.d to read them.

--

Rick
Reply to
rickman

the

measured

by

completely

between

question.

be

and

OPs method makes a lot of sense where the average current is a lot lower than the maximum current. Many low power uPs have sleep modes where they only run about 1 percent of the time; the rest of the time only timers and such run. Greatly reducing average power and making measurement much more difficult.

?-)

Reply to
josephkk

Hi Diego - See STMicro's AN3413 for some ideas:

formatting link

The STM discovery board for the STM32L0 very-low-power ARM M0 includes this circuit. Uses a switchable shunt and measurement on the high side, controlled by the micro. It starts a measurement, sleeps for a while, wakes up and measures a cap...

Hope that helps! Best Regards, Dave

Reply to
Dave Nadler

Interesting approach. I'm not sure what the point of this is as opposed to the user measuring the shunt voltage with a meter.

--

Rick
Reply to
rickman

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.