I would love advice on good (but not horribly expensive) tools to use to measure power consumption of my little Arduino project.
Mr Gammon has a great reference ( https://www.gammon.com.au/power ) that has been shared plenty on this forum. I would love to know what tools were used to get those precise readings.
I have been trying with 2 multimeters to capture the changes from when my XBee radio sends data and when the whole project goes to sleep.
--one is auto-ranging, I think the changes happen faster that the meter can figure out the range to display.
--the other has a 200uA as well as a 20mA and 200mA setting but again seems to react to slowly to show changes.
this one is really old and quite cheap - a circuitmate dm25L.
Since I have been operating a 3.3v Arduino Pro Mini on 3 AA batteries connected to the RAW pin for 2 weeks now, I figure that my unit must go to sleep. I want to figure out how long it can theoretically last for, depending on those results, I would explore going to 3 AAA batteries to save space in the project enclosure.
What Gammon's tutorial showed is that the figures in the ATmega328 data sheet on current consumption in various sleep modes are correct.
So, if you use the code and information in his tutorial, your current consumption will be essentially the same. If you have modules connected to and powered by the Arduino, you need to add those currents to the total.
Approximate battery life in hours = (battery capacity in mAh)/(average current consumption in mA)
You could use the uCurrent, as Gammon described, but it is currently out of stock. DIY with the uCurrent PCB, or you can buy similar instruments for a price.
dan_movie:
Yes agreed. I am sure I can go thru the specs sheets for all modules and components used in my project.
But Mr Gammon had very precise measurements, so I would imagine good tools to get those readings.
So my original question is what would you recommend as far as tools.
You need to think about how some of that stuff operated. A transmit module will be active for just a few milliseconds. Any DVM or other meter cannot capture the value of the current used in that short time span. You will need an oscilloscope, probably a digital scope, the record the voltage across a series resistor. You can see that voltage on the scope and compute the current from that.
The same may be true for certain sensors, like ultrasonic.
The problem with a shunt resistor is it won't work for large ratios of current. To measure 10µA sometimes
and 50mA at other times there is no resistor value that is going to work for both.
So you might need to make several measurements whilst forcing the mode to be correct for the shunt
resistor, which can get tricky, or have switchable shunts in the measurement rig. Too large a shunt
when a high current pulse is demanded will reset the device as the voltage drops, too small a shunt
means inability to measure a small current at all.
If you aren't too worried about accuracy, there is a clever trick with a series diode. Diode forward
voltage is a logarithmic function of current, allowing the same shunt diode to measure < 1µA or > 1A,
perhaps visualizing a complex set of changes on a 'scope too. However some care to calibrate the
particular diode (and for higher currents self-heating is an issue as this changes the diode voltage).
For very short pulses of current you have another problem, which is that the decoupling capacitors will
be providing the pulse. However you can, by integrating the total charge for the whole event, and
knowing the duration of the pulse, calculate the pulse current. However integration is only straightforward
for the shunt resistor which is linear.