Author Topic: High bandwidth, high dynamic range current monitoring device  (Read 9862 times)

0 Members and 1 Guest are viewing this topic.

Offline TerminalJack505Topic starter

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Hi guys and gals,

I'm curious if there is a USB device that provides PC-based current monitoring similar to TI's new MSP-FET.

MSP-FET is a programmer/debugger for TI's MSP430 MCUs.  It has a current monitoring technology that they call EnergyTraceTM or EnergyTrace++TM.  It basically allows you to profile your circuit's energy usage.  See for more information.

The bandwidth and dynamic range is good enough that they can capture the current usage of a MCU from when it is sleeping to when it comes out of sleep mode and enters active mode.  It takes a MCU just a couple of microseconds to come out of sleep mode so that's fairly high bandwidth.  Also, a sleeping MCU will consume < 1uA of current but can consume > 10mA of current when active so that's a fairly high dynamic range.

It would be nice if there were such a device that provides similar current monitoring functionality (only--without the programmer/debugger features) that can be used for tracing the energy consumption of other devices and other vendor's MCUs. 

Anybody know of such a thing?

It is interesting how TI implements this.  (At least from what I can glean from their marketing talk.  I haven't seen a schematic.) 

They don't monitor the current using a shunt resistor.  This is one of the tricks to getting high dynamic range.  They have the advantage of being in charge of generating the voltage that supplies the circuit under test.  This gives them the capability to "count coulombs" simply by counting the pulses from their DC-DC converter.  Each pulse provides a constant amount charge and the pulses are at a high enough frequency to provide the necessary bandwidth to capture events down to the resolution of 1us or better.

The required circuitry for such an approach to current monitoring sounds fairly simple.  I'm sure most of the magic happens in software.
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1922
  • Country: 00
Re: High bandwidth, high dynamic range current monitoring device
« Reply #1 on: July 12, 2014, 06:06:22 pm »
Such a device has always sparkled my interest, and I've got a project ongoing with a very similar thing.

I've had pretty good results with a conventional approach and picked up an AD8253 pre-amplifier plus a 16-bit ADC. For starters I looked how a MCP3911 would perform (answer: not too brilliant), but it did gave me some useful info for a new revision.

As an example, this is a quick capture of a PIC16 RF node (another WIP project) waking up, starting conversion of a digital temp sensor (~200uA current draw), transmitting that data over 868MHz RF (25mA), waiting for an ACK and going back to sleep.
https://dl.dropboxusercontent.com/u/207647/PIC16%20Sleep%20test.png
Unfortunately the wake-up of the PIC to start the sensor is off screen; but you can see the trace slightly offset before the transmit compared to afterwards.

The AD8253 has a 4MHz bandwidth at a gain of 10. I measure across a 10R 0.1% current shunt. The voltage is attenuated and goes straight into the A/D. With G=10 I get about +/- 136mA FSR and 4.15uA/LSB (16-bit words).

If the current draw would stay within about 13mA, everything drops a tenfold to 0.415uA/LSB and 500kHz bandwidth.
That sounds similar to their "100s of nA to mA" range but without special trickery.
(plus the AD8253 has 1 range left - but then the offset/calibration is really fiddly)

I also tried measuring very brief sleep wakeup periods (at 1000x gain so limited bandwidth):
https://dl.dropboxusercontent.com/u/207647/PIC16DeepSleep%20-%20Wakeup%20pattern.png

I suspect this pulse is severely dampened by the limited bandwidth at such high gain; but also that the current consumption is measured across a 20cm cable and ~20uF of ceramic capacitors.
Likely the transition has a lot more detail if I would intercept the power pin of the microcontroller.

Nevertheless; if I wanted to know how long my microcontroller stays alive on each wake-up, I would probably toggle an I/O pin near the sleep() instruction and measure the pulse lengths with an oscilloscope.
MSP's profiler seems powerful, because it gives a quick overview,

The reason I DIY-ed it because I've seen some professional tools that do similar things, but are often unaffordable or locked-in to 1 microcontroller vendor (Microchip's Real ICE has a similar power meter board plug-in).
I know of CMicrotek (startup) that attempted a crowd-funding earlier this year, getting fame on this forum for calling it's current-scope probe the 'uCurrent'.
https://www.eevblog.com/forum/crowd-funded-projects/current-probe-cmicrotek-ultra-low-current-measurement-tools/

They also have a uPower analyzer (which is functionally an identical instrument I am working on).
I should probably open source my project when I have got revision 1 debugged out enough  :-/O

There are probably some more devices around - but they probably charge the same 500$+ price tag.
« Last Edit: July 12, 2014, 10:07:03 pm by hans »
 

Offline TerminalJack505Topic starter

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: High bandwidth, high dynamic range current monitoring device
« Reply #2 on: July 12, 2014, 08:33:18 pm »
It looks like you got pretty good results with your project.

I'm thinking about rolling my own using a method similar to TI's.  In my case I need to monitor the current usage of a 3V battery operated device that uses current in the range of 500nA to 100mA so I thought I'd be able keep things as simple as possible by targeting that specific case.

My idea is to switch a fairly precise voltage source through a precision fixed resistance at a fixed pulse width at as high a speed as practical.  This will provide a fairly fixed amount of charge into the 3V rail each time it is switched.  Software can be used to correct for switching losses and whatnot.  A couple of precision resistors can be used as a load for calibration purposes.

A high-speed comparator and reference voltage would monitor the 3V rail.  The comparator would interface with a CPLD or FPGA to synchronize the switching with a high speed clock.  The CPLD/FPGA would also track the pulse counts which would then be fed to a MCU.  The MCU would then forward these on to the PC via USB. 

Once the data is on the PC some manipulation will (hopefully) be able to reconstruct the current usage waveform.  This is were things would get tricky, I imagine.  Using this scheme, each pulse will have a constant charge.  To cover the case where the circuit under test needs 100mA, the pulses will have to have an effective instantaneous current of at least 100mA.  This means a lot of averaging will likely be necessary to determine the actual current usage.  10 pulses per second with a 10Mhz switch rate would indicate a current usage of 100nA, for example.  (If I got my math right.)
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22435
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: High bandwidth, high dynamic range current monitoring device
« Reply #3 on: July 12, 2014, 09:39:06 pm »
^ Why all the MCU and CPLD and charge pumping and spikiness and ripple and stuff?  There's this analog (semi-analog, really) thing called a delta-sigma converter :)

The fundamental nature of power supply filtering necessarily limits you to 10-100kHz bandwidth (edges in the 1s to 10s of us), without impairing the performance of your loads (i.e., do you *really* want to risk putting a sloppy, resistive, inductive current sensor on each and every VDD of your high-falootin' processor?).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline TerminalJack505Topic starter

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: High bandwidth, high dynamic range current monitoring device
« Reply #4 on: July 12, 2014, 10:09:09 pm »
I'm not quite following you but do you think that's how TI implemented their design?

I've done some modeling of my idea and the ripple isn't too terrible so long as you have at least 10uF of capacitance on the 3V side of the switch.  This is a digital application anyway so 10mV of ripple isn't going to matter one bit.

The 10Mhz switching frequency is probably unrealistic.  So far as I know everything else should be fairly doable. 

TI is managing to do it somehow at least.  And considering that they are doing it in a fairly high-volume $130 device as a add-on feature means it can't be too exotic.
 

Offline engineer_in_shorts

  • Regular Contributor
  • *
  • Posts: 122
  • Country: gb
Re: High bandwidth, high dynamic range current monitoring device
« Reply #5 on: July 12, 2014, 10:09:11 pm »
I think some of the debugger manufactures came to the same conclusion. The micro has many vcc points and nearly always some decoupling.

Check out lauterbach debuggers.
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1922
  • Country: 00
Re: High bandwidth, high dynamic range current monitoring device
« Reply #6 on: July 12, 2014, 10:42:51 pm »
I've looked up that debug tool, and in the user manual, chapter Hardware, one of the last paragraphs is the schematics of their debugger device.

They seem to have included a MSP430 host MCU and some kind of Microsemi FPGA/SoC;... but I'm not sure what that FPGA is doing. Maybe doing the heavy lifting in various debugging?

On the latter page there is dedicated section for "S/W controlled DCDC converter"

"Energy measurement method protected under U.S. Patent Application 13/329,073 and subsequent patent applications"
http://www.google.com/patents/US20130154594

It seems like it's a discrete DC/DC with a MSP430G2452 microcontroller. There is a very very basic NPN+PFET high-side driver, and a buck converter set up.
It may even that simple that they use the MSP430G2452 just for it's comperator and that it can run it's calibration thingy. The only communication with the host is I2C and the pulse signal itself. I suspect the host is doing all the measuring (including pulse counting), and that microcontroller is just executing.

I also notice their inductor (L4) is not annotated with any value or type; so it may be very crucial pick.


The patent says they just count the number of pulses in a time frame, and calculate the equivalent current for that.
It sounds like the sample rate of such a method is very low; but you can pick up very brief pulses in current.
« Last Edit: July 12, 2014, 10:44:31 pm by hans »
 

Offline TerminalJack505Topic starter

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: High bandwidth, high dynamic range current monitoring device
« Reply #7 on: July 12, 2014, 11:21:34 pm »
I should have known they had a patent on the technology.  Thanks for pointing it out.  I'm reading it now.

I went looking for the schematic about a week ago but couldn't find it.  I guess I didn't look hard enough.  I'll have a look at it too.
 

Offline TerminalJack505Topic starter

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: High bandwidth, high dynamic range current monitoring device
« Reply #8 on: July 13, 2014, 01:33:24 am »
I think some of the debugger manufactures came to the same conclusion. The micro has many vcc points and nearly always some decoupling.

Check out lauterbach debuggers.

Thanks for the suggestion.  I hadn't heard of them before.
 

Offline TerminalJack505Topic starter

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: High bandwidth, high dynamic range current monitoring device
« Reply #9 on: July 14, 2014, 12:52:06 am »
I can't believe there isn't prior art for this method of current monitoring.  Maybe it just seems obvious in retrospect.

After looking at the schematic and patent, however, I have to wonder if TI isn't "cheating" somehow to produce their results.  The profiles they show in their video are produced using the EnergyTrace++ technology as opposed to the less capable EnergyTrace technology.  EnergyTrace++ coordinates with the MCU regarding the states of the peripherals and whatnot so they might be using some additional information to produce those pretty graphs.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6566
  • Country: 00
Re: High bandwidth, high dynamic range current monitoring device
« Reply #10 on: July 14, 2014, 01:03:48 am »
Search for 'monsoon power monitor' for a good quality power monitor.

I designed an open source one recently, it is based on LTC2943 which has analog integrator so you get very accurate integration over time which is what you need with battery operated devices.
 

Offline TerminalJack505Topic starter

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: High bandwidth, high dynamic range current monitoring device
« Reply #11 on: July 14, 2014, 03:33:36 am »
Search for 'monsoon power monitor' for a good quality power monitor.

I designed an open source one recently, it is based on LTC2943 which has analog integrator so you get very accurate integration over time which is what you need with battery operated devices.

I think I came across your project by searching the forum for "coulomb counter."

Using something like a coulomb counter IC would be great for analyzing the energy usage of a battery project late in the development of the project.  I was hoping to find something that gives more of a real-time sort of feedback for early in the project development cycle when it is easier to identify problem areas and it is also easier to make big changes that affect energy usages.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6566
  • Country: 00
Re: High bandwidth, high dynamic range current monitoring device
« Reply #12 on: July 14, 2014, 04:09:14 am »
Using something like a coulomb counter IC would be great for analyzing the energy usage of a battery project late in the development of the project.  I was hoping to find something that gives more of a real-time sort of feedback for early in the project development cycle when it is easier to identify problem areas and it is also easier to make big changes that affect energy usages.

Those devices are used during software development (operating systems, apps, etc). Depending on what you test, you can get reliable reading within a few seconds and you don't even need a computer, just the onboard analysis firm are (e.g it counts the number of wakes).

I built it because I was developing battery sensitive software and didn't want to go through the professional power monitor hassle.

One alternative is to use an oscilloscope with either a monsoon or a current to voltage converter such as uCurrent.

Edit: by my calculation, a 0.05 resistor will give 0-1A range with about 83nAH per tick. That's about 12M ticks per 1AH battery.
« Last Edit: July 14, 2014, 04:34:51 am by zapta »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 19051
  • Country: us
  • DavidH
Re: High bandwidth, high dynamic range current monitoring device
« Reply #13 on: July 17, 2014, 08:51:10 pm »
I can't believe there isn't prior art for this method of current monitoring.  Maybe it just seems obvious in retrospect.

There is in the form of charge balancing converters so TI's patent will have more to do with their specific implementation and application.  Of course the patent office is picky about what they consider to be prior art so they easily could have missed earlier designs whether they were publicly documented or not.

 

Offline gmb42

  • Frequent Contributor
  • **
  • Posts: 335
  • Country: gb
Re: High bandwidth, high dynamic range current monitoring device
« Reply #14 on: July 18, 2014, 12:49:26 pm »
The Energy Micro Silicon Labs EFM32 kits have some form of "Advanced Energy Monitoring" on-board, see their Wonder Gecko starter kit for instance.

Section 6.2 of the User Guide discusses the current sensor and talks about 0.1uA to 50mA dynamic range.

I think they have some method of displaying the current consumption along with program execution, possibly in the debugger or support tools (Simplicity Studio).
 

Offline electronic_eel

  • Regular Contributor
  • *
  • Posts: 201
Re: High bandwidth, high dynamic range current monitoring device
« Reply #15 on: July 18, 2014, 08:05:55 pm »
maybe this is what you are looking for:
http://www.dorkbotpdx.org/blog/paul/measuring_microamps_milliamps_at_3_mhz_bandwidth

I haven't tried it myself but bookmarked it some time ago as interesting.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 19051
  • Country: us
  • DavidH
Re: High bandwidth, high dynamic range current monitoring device
« Reply #16 on: July 18, 2014, 08:52:17 pm »
I have made the same measurement but with a more discrete design.  I used a discrete current mirror balanced by a slow operational amplifier to create a ground referenced output from the voltage across the sense resistor.  Bandwidth only depends on the discrete transistors so it may be easily extended into the 100s of MHz with a cascode output and the low shunt resistance requires little or no local decoupling to slow anything down.  Since the single ended output is driven by a current, it is easy to adapt it to driving a 50 ohm transmission line if desired.  Dynamic range and linearity is not as good as using differential feedback amplifiers but it is still higher than most oscilloscopes.

Another was to use a regulated supply with a fast virtual ground generated by a cascode that results in the same sort of output signal but since the power supply is remote, local decoupling will limit bandwidth which is an issue shared with the design in TI's patent.  This sort of thing could be done locally on the board but would require additional bias supplies.

My best AC current probe has a sensitivity down to 1 mA/div with a bandwidth of 50+ MHz and could probably make this measurement with just a single turn.  Add a couple of turns to increase the sensitivity.  The old Tektronix AC/DC current probes have similar performance.
« Last Edit: July 18, 2014, 08:56:51 pm by David Hess »
 

Offline prabal

  • Newbie
  • Posts: 1
Re: High bandwidth, high dynamic range current monitoring device
« Reply #17 on: May 02, 2015, 01:24:32 am »
"I can't believe there isn't prior art for this method of current monitoring.  Maybe it just seems obvious in retrospect."

Well, there's this project that I worked on some years back that is very similar:

http://www.cs.berkeley.edu/~prabal/pubs/papers/dutta08icount.pdf
http://www.cs.berkeley.edu/~prabal/talks/ipsn08icount.ppt
 

Offline Rupunzell

  • Frequent Contributor
  • **
  • Posts: 349
Re: High bandwidth, high dynamic range current monitoring device
« Reply #18 on: May 02, 2015, 04:00:40 am »
Another intro paper to flux gate magnetometers..
http://www.gemsys.ca/wp-content/uploads/2013/10/Commercial-magnetometers-and-their-application.pdf

First commercial production current meter based on a flux gate magnetometer was the hewlett packard 428A.
http://www.hpl.hp.com/hpjournal/pdfs/IssuePDFs/1958-06.pdf

hp 428B offered a current range of 1mA to 10A full scale.
http://www.hpl.hp.com/hpjournal/pdfs/IssuePDFs/1961-11.pdf

The rights to this design was sold to Applied Physics Systems and lives on to this day as the 428D.http://appliedphysics.com/products/products/

There are a number of commercial flux gate magnetometers available for current measurement. Google this.


Bernice

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf