Arduino Measuring Current: No External ADC Needed?

Before ordering parts I'm hoping someone can confirm my understanding of the current measurements using the Arduino ADC.

I’m looking to use an Arduino to measure current drawn by another device that runs on 9V and determine which of three states it’s in (Sleeping, On, Active). The difference in current for each state are:

  1. ACTIVE = .71 A

  2. ON = .57 A

  3. SLEEPING = .002 A

The top two measurements are the closest (~140mA apart) so I’m guessing my current measurements should have a resolution or 50mA or better to accurately differentiate between the ACTIVE and the ON state and sleeping will be easy to determine. If a 3V Arduino pro mini has a 10 bit ADC then it's 9V/1024 steps = 8.7 mV per step. If I use a 30 mOhm shunt resistor at .57A there’s a 17.1mV drop and at .714A there’s a 21.4mV drop (difference of 4.3mV). Therefore I cannot differentiate between all the states and need a higher resolution external ADC. Is my understanding correct and is there another/better way to determine the state of this external device measuring the current that doesn't require an higher resolution ADC?

Hi, @freebird4446
Have you Googled;

measuring current with an arduino

Or Google;

arduino current sensor

That will show you some current sense modules with better resolution using their own ADC.

Tom.... :smiley: :+1: :coffee: :australia:

1 Like

Your description REQUIRES the Arduino to be part of the 9 volt circuit for the measurement to take place. Doesn't seem like a good plan.

1 Like

I have done that and here's the issue I can't figure out with these modules. Many of them are all in one modules and I don't know if I have to power them to allow current to pass through or if they will allow current to pass through to keep another device powered even when they are off which will allow me to power the chips up periodically to check the current and determine the state of the device. Couldn't find this info in the datasheets I saw.

Ah yes, good call...didn't realize the 9V is far above the analog input voltage range for the Arduino pro mini, especially if I'm running it at 3V. Maybe I can use a FET to switch in a resistor divider (so it doesn't waste energy over the resistors) and periodically ready the voltage. I guess then the resistors in my voltage divider have to be very precise and stable over temp which doesn't seem ideal.

This is not the correct way to look at the problem. If you have an Arduino Uno, Nano or Pro Mini, you can use the 1.1V ADC reference, which gives you ~1 mV per ADC step.

Use a resistor of suitable value in the gizmo ground lead to generate the voltage drop to be measured. For example a 100 mOhm resistor will give 71 mV for 0.71 A, which is trivial to distinguish from the next lower level.

1 Like

If you do your research you will find example code and schematics and explanations of how they are used, some use a current shunt, others use a Hall Effect device.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:
PS, It sounds like you are not a hardware person.
Can you please tell us your electronics, programming, arduino, hardware experience?

1 Like

An INA226 module could be suitable.
It has a built-in 0.1ohm shunt and a 16-bit A/D.
Leo..

1 Like

Definitely a hardware person, haven't done current measurements before. Routinely spin my own boards but always a ton to learn :slight_smile: Getting into software, haven't done maybe a dozen arduino projects of varying complexity.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.