0
\$\begingroup\$

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 10s 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 100uA 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?

\$\endgroup\$
5
\$\begingroup\$

Sure it's possible. Simply put an in amp such as the INA21X around the low-value resistor to increase the voltage difference to a measurable value first. This is the same method used by the µCurrent, except that uses an external DMM instead of a MCU.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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