How to set INA219 Current Sensor resolution lower?
Moderators: adafruit_support_bill, adafruit

How to set INA219 Current Sensor resolution lower?

by rbardsley on Wed Jan 30, 2013 8:37 pm

Hello, I am experimenting with the Adafruit INA219 Current Sensor Breakout Board.

I am trying to measure the current supplied to a standard LED. I have the INA219 wired properly and I am getting results that seem to be working properly. However, I want to increase my resolution. As it is an LED, and I am controlling the voltage and amperage, it's never going to be anywhere near the 32 AMP limit. So, in the product lit it says the board is capable of this:
With the internal gain set at the minimum of div8, the max current is ±400mA and the resolution is 0.1mA.

This sounds much better than the 0.8mA jumps I am getting now. However, when I looked at the library, it seems like I can get much better resolution... but I am not an electrical engineer or a mathematician. I don't have the faintest idea what I need to do to achieve the best resolution for measuring the current going to my LED.

Any suggestions?

Many thanks.

Ryan
Boston, MA
rbardsley
 
Posts: 28
Joined: Fri Jan 06, 2012 10:09 am
Location: Manchester, MA

Re: How to set INA219 Current Sensor resolution lower?

by Electronicsconstructor45 on Wed Jan 30, 2013 9:23 pm

I believe the correct equation is divide-8 by the maximum Voltage then getting a reading or answer of 1.0Mili Amps correct me if im wrong im not that familiar with ampage as much
Electronicsconstructor45
 
Posts: 5
Joined: Sun Aug 12, 2012 10:55 am

Re: How to set INA219 Current Sensor resolution lower?

by Electronicsconstructor45 on Wed Jan 30, 2013 9:24 pm

i meant 0.1
Electronicsconstructor45
 
Posts: 5
Joined: Sun Aug 12, 2012 10:55 am

Re: How to set INA219 Current Sensor resolution lower?

by john444 on Wed Jan 30, 2013 9:32 pm

Hi Rbardsley,

All you should need to do is change the 'current-sense' resistor.
You might try replacing R5 (the one with R100) in the photo with
say, 1-ohm. Then instead of 3.2-A (max) & 0.8-mA resolution,
You would get 320-mA (max) & 0.08-mA resolution.

That should get you into the right ballpark for testing LEDs.

Good Luck, John
john444
 
Posts: 443
Joined: Sun Mar 04, 2012 1:42 pm
Location: Claremore, Ok

Re: How to set INA219 Current Sensor resolution lower?

by Electronicsconstructor45 on Wed Jan 30, 2013 9:34 pm

actully do what he said his idea works right mine doesnt seem close to his
Electronicsconstructor45
 
Posts: 5
Joined: Sun Aug 12, 2012 10:55 am

Re: How to set INA219 Current Sensor resolution lower?

by Zener on Wed Jan 30, 2013 10:29 pm

I think technically you need to set bits 11 and 12 of the config register (PG0 and PG1) to set the gain you want. Complicated chip.
Zener
 
Posts: 2566
Joined: Sat Feb 21, 2009 1:38 am