# Current detection

Discussion in 'General Electronics Chat' started by Mark3722, May 14, 2015.

1. ### Mark3722 Thread Starter New Member

Dec 26, 2014
13
0
Hi All,

I am a beginner in Electronics with enough knowledge to be very dangerous.

I have an application where I need to measure the current consumed by 4 separate DC devices using the same single 5V/5A bus. i.e. I need to see the current consumed by each device from an Arduino. My idea was to configure a low ohm (0.1 ohm) shunt resistor in the positive line going to each device and then detect the voltage change going over each of the resistors using ohms law to calculate the current.

To sense the current, I was considering using something such as Maxim 44284 low current power sensing amplifier: http://datasheets.maximintegrated.com/en/ds/MAX44284.pdf.

A couple of questions for everyone:

- Assuming there is enough current capacity in the 5V bus, would there be any issues with pulling and measuring current from 4 separate parallel devices?
- For each shunt-resistor, I am assuming that I can just use Oms law for the calculation of current. i.e. I = Measured Voltage across shunt/0.1 Ohms.
- I will be using an Arduino for this app and hence the usage of an IC to measure the voltage across the shunt made sense. I was also considering using it without such a device but struggling to determine how to wire things up. i.e the common ground might mess things up.

Any pointers for this type of application would be helpful. I have tried using devices such as a acs712 boards but the current seems to be too low for this application.

Thanks,

Mark

2. ### WBahn Moderator

Mar 31, 2012
20,057
5,644
How much current do you expect each device to draw?

How much voltage drop can each device tolerate while still yielding acceptable performance?

3. ### Mark3722 Thread Starter New Member

Dec 26, 2014
13
0
the devices will pull between 50 to to 300 ohms. Voltage drops should be less than 0.5 volts.

Thanks for the consideration.

4. ### Mark3722 Thread Starter New Member

Dec 26, 2014
13
0
Blaaaa I meant between 50 to 300 milliamps. Long day...

5. ### WBahn Moderator

Mar 31, 2012
20,057
5,644
What kind of resolution do you need on the current measurements?

6. ### Mark3722 Thread Starter New Member

Dec 26, 2014
13
0
In the range of 10 milliamps would do the job but 5 milliamps would be better.

Jan 15, 2015
1,914
784
You do not mention how much current you will be measuring? Anyway, that is how it's done, as you covered. Use a very low value shunt like about .1 or .01 Ohm and amplify the voltage drop across the shunt. Use an IA (Instrumentation Amplifier) to amplify that low level voltage and what you get will be proportional to the current you want to measure. Do everything times four and run the amplified voltages into your Arduino which will give you 10 bit A/D. Take your returned integers of 0 to 1023 and convert to Amps (engineering units) and that is about it. What you have planned should work just fine.

Ron

Jan 15, 2015
1,914
784
Wow, I see post have been made. Just consider your full scale current and needed resolution.

Ron

9. ### Mark3722 Thread Starter New Member

Dec 26, 2014
13
0
Thanks Ron. Would the Maxim 44284 be considered an IA? What I liked about the device is the application schematic listed on the first page of the PDF. http://datasheets.maximintegrated.com/en/ds/MAX44284.pdf. It seems rather easy to hook up.

There seems to be 4 pins. One goes to 3.3v, one to GND and the other 2 between the shunt. The only thing I do not like about it is that it is not available in a DIP package. I will have to use the SOT-23 with a breakout board to test on a breadboard.

BTW: With so many cool ICs now only available in surface mount packages, what is the future of the breadboard?

10. ### ian field AAC Fanatic!

Oct 27, 2012
5,455
970
There are op-amps specifically designed for high side current sensing, and the manufacturers publish appnotes that show how to use them.

The latest thing is Hall-effect sensing, you can buy off the shelf units, or at least one magazine has published an article describing cutting a slot in an iron-dust toroid. You simply glue a hall effect chip in the slot and put your current sensing coil round the rest of the toroid.

If you go the DIY route - make sure not to get the logic output sensor, my heads a bit fuzzy today, but I think the type is "ratiometric".

Jan 15, 2015
1,914
784
Yes, the Maxim 44284 is a good choice. Just as long as you can work within the fixed gain options of the amplifier. Still don't know the max currents you plan to read. Also, I see Ian mentioned Hall Effect Sensing which is another good option beyond using shunts.

Ron

Jan 15, 2015
1,914
784
That's better.

Ron

13. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,906
1,789
Agree this is a good chip to use, one of many. You want to set the resistor value and the gain to give you a max to your Arduino (about which I know little). If you divide the max output conversion voltage (which comes out of that chip) by the full scale A2D count (1024 for a 10 bit converter) you get the resolution of your measurement, then you play that back into the exciting current.

(Huh?) For this, the A2D input is current x resistor x gain equals the voltage into the A2D. Or:

I x R x G = V

Example: say that 300mA thru a 0.1 ohm resistor (.03 volts) gives you an output of 3 volts when using the gain of 100 version.

Now the step size of an A2D is the reference voltage over the number of steps. Say you have a 3V reference and 10 bits; the step is then 3V/1024 or 0.029 volts.

Plug that voltage into the above equation and solve for I: you get 0.029 / 100 / 0.1 = .29mA.
That’s better than you expected, but it depends on having a 3V reference.

(Note there is some discussion should one use 1023 or 1024. The answer depends on the exact A2D you use, and actually doesn’t have much error either way you go.)

14. ### MikeML AAC Fanatic!

Oct 2, 2009
5,451
1,070
Look at the Zetex (ne Diodes, inc) high-side current monitors, like the ZXCT1009, etc.

15. ### pwdixon Member

Oct 11, 2012
490
56
There are hall effect current sensing devices like the ACS711 and I have seen arduino compatible senor boards with chips like these, there may be a suitable one for your current range. The good news is that they don't create heat like a standard shunt does. Have a search on ebay/google for arduino current sensor breakout boards.

16. ### AnalogKid AAC Fanatic!

Aug 1, 2013
5,567
1,575
I can't recall who, but someone out there makes these chips with the current shunt built-in. Something about handling up to 20 A in an SO or SOT package.

ak

17. ### pwdixon Member

Oct 11, 2012
490
56
Yep, they are all the members of the ACS711 family set post #15

18. ### AnalogKid AAC Fanatic!

Aug 1, 2013
5,567
1,575
I was thinking of a resistance shunt type device, not Hall Effect. HE has some advantages, but accuracy, offset, linearity, and just about everything else over temperature is worse than other techniques. We use a closed loop HE from LEM that is a bit better in some specs, but still not what I would use for an application that is less than 0.5A full scale.

ak