How to set INA219 Current Sensor resolution lower?

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rbardsley
 
Posts: 62
Joined: Fri Jan 06, 2012 11:09 am

How to set INA219 Current Sensor resolution lower?

Post by rbardsley »

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

Electronicsconstructor45
 
Posts: 5
Joined: Sun Aug 12, 2012 11:55 am

Re: How to set INA219 Current Sensor resolution lower?

Post by Electronicsconstructor45 »

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 11:55 am

Re: How to set INA219 Current Sensor resolution lower?

Post by Electronicsconstructor45 »

i meant 0.1

User avatar
john444
 
Posts: 443
Joined: Sun Mar 04, 2012 2:42 pm

Re: How to set INA219 Current Sensor resolution lower?

Post by john444 »

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

Electronicsconstructor45
 
Posts: 5
Joined: Sun Aug 12, 2012 11:55 am

Re: How to set INA219 Current Sensor resolution lower?

Post by Electronicsconstructor45 »

actully do what he said his idea works right mine doesnt seem close to his

User avatar
zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: How to set INA219 Current Sensor resolution lower?

Post by zener »

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.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”