5
\$\begingroup\$

I'm looking to measure current consumption of my microcontroller as an in-built feature of the final design. Should I buy and use high-side current monitors that are available on the market (e.g. Zetex ZXCT1009)? Or is it possible to build one out of discrete parts that's cheaper and better?

Device operating out of a lithium polymer battery, so 3.7V typical only. Drawing around 0 to 30mA.

\$\endgroup\$
4
  • \$\begingroup\$ Why would you want to roll your own? We need to know your design goals (size, cost, educational value, precision, reliability, simplicity) to help you make a decision. \$\endgroup\$ Commented Jan 11, 2011 at 23:04
  • \$\begingroup\$ I thought it'd be simple enough that rolling your own would actually be cheaper... \$\endgroup\$
    – cksa361
    Commented Jan 11, 2011 at 23:26
  • 3
    \$\begingroup\$ If you have all the required components onboard already (maybe you've got a quad opamp with an unused quadrant?), it might be cheaper. The cost you just spent by thinking about it probably exceeded the savings, though. \$\endgroup\$ Commented Jan 12, 2011 at 1:26
  • \$\begingroup\$ As a rule of thumb, if you can find an IC that does a work it'll be hard to do better with discrete components \$\endgroup\$
    – clabacchio
    Commented Jun 6, 2012 at 21:49

3 Answers 3

7
\$\begingroup\$

You can build one with a simple op amp circuit, but it will take more design work, more external components and likely more board space. There really isn't a reason to do so unless you have specialty application which requires something out of the norm.

Current monitoring for battery powered devices is a very normal application.

There are current monitors out there that output a PWM signal that you can monitor instead of a voltage that to be read with an ADC. This type of monitor may be easier to interface with and require less power to monitor depending on the type of microcontroller your using and available peripherals. You can also get regulators with built in current monitoring circuitry which can reduce part count, cost, board size, power usage and increase accuracy in some applications.

\$\endgroup\$
2
\$\begingroup\$

The working principle is simple, and it takes just three parts to do what the ZXCT1009 does:

enter image description here

The opamp will try to keep the voltage drops across \$R_{SENSE}\$ and the 100\$\Omega\$ equal by controlling the current through the 100\$\Omega\$ resistor. So if your \$R_{SENSE}\$ is 1\$\Omega\$ the collector current will be 1/100th of that, or 100\$\mu\$A if your microcontroller draws 10mA. If you place a 10k\$\Omega\$ resistor between emitter and ground you get 1V/10mA out.

Yes, a resistor + a transistor + an opamp is cheaper than the Zetex device. But you have to pay attention to the details. \$V_{SENSE+}\$ will be your battery voltage, also your opamp's power supply. At 5mA the input voltages will be 5mV below the power supply. Obviously that calls for a Rail-to-Rail opamp. But 5mV is very close, so you start digging in datasheets if the opamp can handle it. (Don't bother, the datasheet doesn't say.)
Anyway, is it worth it? Not to me. The ZXCT1009 costs 1 dollar in 1's and is 1% accurate. It might be different if I would need 100k/year of them, but for just one? If you can't afford the dollar perhaps you've chosen the wrong hobby.

\$\endgroup\$
0
\$\begingroup\$

There are nice 1-wire devices like the DS2438 from Maxim-IC

1-wire is fairly easy and some micros can even talk to them natively.

http://pdfserv.maxim-ic.com/en/ds/DS2438.pdf

\$\endgroup\$
2
  • \$\begingroup\$ That's a battery monitor, OP wants a current monitor. \$\endgroup\$ Commented Jun 6, 2012 at 16:57
  • \$\begingroup\$ @FedericoRusso: That chip measures current, among multiple other things that are useful to have in a battery-powered system. \$\endgroup\$
    – Ben Voigt
    Commented Feb 12, 2013 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.