# Method of measuring wide range of currents without significant burden?

#### Jblack

Joined Feb 24, 2016
39
I'll try to keep it short, I'm interested in measuring the current draw of various microcontrollers (and associated sensors) during various stages of activity. During high activity stages with things like WiFi or Bluetooth active, they can easily reach 200 or 300mA, so I need to be able to measure these high currents. On the other hand, when put into deep sleep mode, some can drop to single digit uA, which I would like to be able to measure with at least 0.5uA precision.
I could use a shunt, but those aren't well suited to a large range of currents, the accuracy would be poor at low currents and the voltage drop would be significant at high currents.
I could use a feedback ammeter, but those typically can't handle more than 20 or 30mA.
I could use a hall effect current sensor, but I haven't found any designed for less than a few hundred mA.
Any suggestions would be appreciated.
As a final note, I do not have access to, nor money to acquire, expensive test equipment, so while I'm well aware that a normal, lab grade DMM could do exactly what I'm asking for, that's not an option for me.

#Edit:
I should have clarified, I need to be able to measure high and low currents without swapping out shunts or removing power in any way, as that would reset the mcu and I wouldn't be able to watch the current as it flips back and forth between sleep and high activity.
I really am looking for a magic solution here, which I realize may not exist, but that's why I'm asking the experts, I figure if anyone would know, it'd be the people on this forum.

Last edited:

#### Papabravo

Joined Feb 24, 2006
14,266
I suppose you expect that there is some magic, that we can suggest that will solve your problem. I'm fresh out of magic. What I can suggest is that you provide on your prototype or production boards a removable "short" in the power trace to the microcontroller and use a $9.99 Centek multimeter from Harbor Freight. It may not have the accuracy you want, but when your financial resources improve and you can use a better DMM, you will have made a provision for what you need. Maybe you can borrow a meter - it has worked for me. Thread Starter #### Jblack Joined Feb 24, 2016 39 I suppose you expect that there is some magic, that we can suggest that will solve your problem. I'm fresh out of magic. What I can suggest is that you provide on your prototype or production boards a removable "short" in the power trace to the microcontroller and use a$9.99 Centek multimeter from Harbor Freight. It may not have the accuracy you want, but when your financial resources improve and you can use a better DMM, you will have made a provision for what you need. Maybe you can borrow a meter - it has worked for me.
I've never understood why people on AAC always seem so snippy, as if I've personally offended them by asking questions. Of course I'm looking for 'magic', if I were looking for a common, well known solution, I would have already found it on google. I don't expect you to provide a perfect solution, I simply cross my fingers and hope that someone on here knows something that I don't (let's be real here, there's an awful lot that I don't know). Am I wrong for asking a question instead of simply giving up?
As for your suggestion itself, that's what I'm doing right now and, as you mentioned, it simply doesn't have the accuracy I'd like, hence why I'm searching for another solution.

#### MrChips

Joined Oct 2, 2009
21,690
The magic you are seeking is to manually switch your ammeter or use an auto-ranging ammeter.

#### Jblack

Joined Feb 24, 2016
39
The magic you are seeking is to manually switch your ammeter or use an auto-ranging ammeter.
Do you know of any decent ammeters for less than a few hundred dollars? I wasn't able to find any. Also ammeters tend to have fairly large resistance shunts for the low current ranges, which I would really like to avoid (though I realize this may not be possible)

#### crutschow

Joined Mar 14, 2008
25,273
Also ammeters tend to have fairly large resistance shunts for the low current ranges, which I would really like to avoid (though I realize this may not be possible)
It needs a high resistance for low currents because it's measuring the voltage across the shunt, and the resistance is determined by how low a voltage the meter can measure.
So even though the shunt resistance is high, the voltage drop in the circuit is still low.

#### Papabravo

Joined Feb 24, 2006
14,266
Sometimes a sufficiently advanced technology is indistinguishable from....magic.

#### Jblack

Joined Feb 24, 2016
39
Sometimes a sufficiently advanced technology is indistinguishable from....magic.
Exactly, it's that 'sufficiently advanced technology' that I'm hoping to find. Heck, three days ago feedback ammeters were magic to me.

#### MrChips

Joined Oct 2, 2009
21,690
I have a Fluke 75 DMM. Most Fluke DMM are auto-ranging.

#### andrewmm

Joined Feb 25, 2011
538
The other fly in the ointment, is that you want to measure a changing current,
for instance, when micro controllers entre sleep, they wake up for a few us, during which the current spikes, so your measurement needs to be fast, a DMM will not to the job.

Taking a look from the other direction,

could you make use of the power over time ?
I'm wondering about measuring the average current over a time, which will give you a measure of the average current .

#### Jblack

Joined Feb 24, 2016
39
I have a Fluke 75 DMM. Most Fluke DMM are auto-ranging.

View attachment 214051
I actually have that exact meter as well. The issue I run into with that one is that when my MCUs wake up from a deep sleep, they wake up faster than the autoranging acts, so they try to start pulling say 75mA while the autorange is in the sub-mA range, which causes them to brown out. I may be able to put a large capacitor across to help fight that brown out, I'll have to try that...

#### Jblack

Joined Feb 24, 2016
39
The other fly in the ointment, is that you want to measure a changing current,
for instance, when micro controllers entre sleep, they wake up for a few us, during which the current spikes, so your measurement needs to be fast, a DMM will not to the job.

Taking a look from the other direction,

could you make use of the power over time ?
I'm wondering about measuring the average current over a time, which will give you a measure of the average current .
Yeah that's the real trouble here, it's easy to measure uA and it's easy to measure 100mA, but it's not easy to measure both on the same system.
I'm not terribly concerned with instantaneous current, mostly just average current when it's awake vs average current when it's asleep.
Out of curiosity though, how would you go about measuring average current over time without measuring instantaneous current during such spikes?

#### Jblack

Joined Feb 24, 2016
39
It needs a high resistance for low currents because it's measuring the voltage across the shunt, and the resistance is determined by how low a voltage the meter can measure.
So even though the shunt resistance is high, the voltage drop in the circuit is still low.
Yes, that is true, so my DMM has a 100 ohm shunt in uA mode, if my circuit draws 20uA, then the voltage drop is only 2mV, but when the MCU wakes up and starts drawing 20mA, now the voltage drop is 2V, causing the MCU to brown out. An autoranging ammeter could solve this, but it would almost have to switch ranges before the MCU wakes up.

#### andrewmm

Joined Feb 25, 2011
538
Yeah that's the real trouble here, it's easy to measure uA and it's easy to measure 100mA, but it's not easy to measure both on the same system.
I'm not terribly concerned with instantaneous current, mostly just average current when it's awake vs average current when it's asleep.
Out of curiosity though, how would you go about measuring average current over time without measuring instantaneous current during such spikes?

Easy answer is I dot know, I have thoughts of the coulomb counters used in battery circuits.
or

How about using a super capacitor to power the device.
provided its at the same temperature, and the current from / to is not "large" then its a very predictable voltage / current / time curve.

or with a resistor to measure the current as usual, but use say a 24 bit ADC. If the max voltage drop was say 1V, then a 24 bit ADC would be able to read 60 nano volts !! yeh right... but you get the idea. a current of 1 Amp to 1uA is "only" 10^6 .

#### Jblack

Joined Feb 24, 2016
39
Easy answer is I dot know, I have thoughts of the coulomb counters used in battery circuits.
or

How about using a super capacitor to power the device.
provided its at the same temperature, and the current from / to is not "large" then its a very predictable voltage / current / time curve.

or with a resistor to measure the current as usual, but use say a 24 bit ADC. If the max voltage drop was say 1V, then a 24 bit ADC would be able to read 60 nano volts !! yeh right... but you get the idea. a current of 1 Amp to 1uA is "only" 10^6 .
I like the supercap idea, I don't have a decent supercap, but I'll have to keep that in mind for future projects.

#### djsfantasi

Joined Apr 11, 2010
6,724
Just blue-skying here... not sure what I’m talking about.

Could you put two resistors in series. One to measure the low current and one to measure the higher current. Of course, you might have to supply a higher voltage to compensate for the anticipated voltage drop. Then, use two DMMs, on different scales, to measure the voltage across each resistor. The DMMs can be less expensive models. You can include jumpers to bypass the resistors, heck, even bypass each resistor individually.

#### Jblack

Joined Feb 24, 2016
39
Just blue-skying here... not sure what I’m talking about.

Could you put two resistors in series. One to measure the low current and one to measure the higher current. Of course, you might have to supply a higher voltage to compensate for the anticipated voltage drop. Then, use two DMMs, on different scales, to measure the voltage across each resistor. The DMMs can be less expensive models. You can include jumpers to bypass the resistors, heck, even bypass each resistor individually.
Potentially, I'll have to give that a shot...

#### crutschow

Joined Mar 14, 2008
25,273
I'd try a large capacitor across the meter shunt to prevent the brownout when the micro wakes up.