I'm wondering how impossible it would be for an arduino to self monitor it's own power consumption (in milliamps)?
Could you do it with a shunt resistor?
I'm wondering how impossible it would be for an arduino to self monitor it's own power consumption (in milliamps)?
Could you do it with a shunt resistor?
Hardly. Use a multimeter.
It's possible, for sure, but you'll need more than a single shunt resistor.
One way would be to include a shunt resistor in the positive supply net, followed by a step-up converter that feeds an opamp that amplifies the voltage across the shunt. The Arduino can then read that voltage. The step-up converter is needed because the shunt voltage will be so close to the supply voltage that even a typical rail-to-rail opamp will likely be wildly inaccurate.
Something like this:

(Incomplete schematic; note that the opamp circuitry is only for conceptual purposes - IRL it would require some additional passive components).
Alternatively the shunt could be placed after the boost converter so it only monitors the Arduino's supply current. The way it's drawn, the current measured will also include the current drawn by the sensor circuit.
Ok, so possible but not worth it.
Ok, so possible but not worth it.
$9.95 (USD)
If you don't know how to design and build a high side current monitor, this would be easier
Has resolutions as little as 0.1mA
It will measure current and voltage and do the power calculations.
Depends on the application. I can imagine situations where you'd want/need your program to be aware of power use, for instance to predict how long a battery will last etc. However, in the vast majority of cases, I'd just do what @Railroader suggests and do some measurements in a lab setup, and then use that to inform your project choices.
If you really do need 'live' current monitoring, the module suggested by @jim-p looks nice and a low/now-fuss solution.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.