I'm trying to figure out the best way to measure and log current consumption in my circuit, which houses an ATmega2560 and a number of sensors and servos. Using a DMM, I see about 100mA draw when running at full power (with servos off), and <1mA when sleeping.
An (albeit cursory) search through hall effect current sensors is giving me ICs meant to measure tens of amps or more at hundreds of volts. The smallest I can find is this batch of Allegro sensors that go as low as 5A. I assume that means that my option is a resistor-based approach, and I'm trying to wrap my head around how that would work.
As I understand it, the idea is to pass all current through a small resistor and effectively measure the voltage drop across it to determine the I in V=IR. That's great, but doing some basic math shows that with the ATmega's 10-bit ADC, running against a 3.3V Vref, I get roughly 3.2mV / LSB. To get 100µA to be visible to the ADC, I would need my shunt to be 30 Ohms, which would of course not work.
Is this a dead end? Is it possible to measure current at that resolution with an ATmega?