How to set INA219 Current Sensor resolution lower?

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

How to set INA219 Current Sensor resolution lower?

Postby rbardsley » 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: 3
Joined: Fri Jan 06, 2012 10:09 am

Re: How to set INA219 Current Sensor resolution lower?

Postby Electronicsconstructor45 » 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?

Postby Electronicsconstructor45 » 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?

Postby john444 » 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: 411
Joined: Sun Mar 04, 2012 1:42 pm
Location: Claremore, Ok

Re: How to set INA219 Current Sensor resolution lower?

Postby Electronicsconstructor45 » 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?

Postby Zener » 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: 1994
Joined: Sat Feb 21, 2009 1:38 am


Return to General Project help

Who is online

Users browsing this forum: Zener and 10 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [108]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[31]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[34]
LCDs & Displays[48]
Components & Parts[70]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[111]
 
Wireless[14]
Cables[62]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]