Arduino Forum

Using Arduino => Sensors => Topic started by: Rendoh on May 19, 2018, 01:40 pm

Title: Fixing the INA3221 breakout board
Post by: Rendoh on May 19, 2018, 01:40 pm
I was reading about the INA3221 breakout board in this thread https://forum.arduino.cc/index.php?topic=501980.0 (https://forum.arduino.cc/index.php?topic=501980.0)  .  Channels 1, 2 and 3 are connected respectively to In-1, In-2 and In-3 pins of the INA3221. In+1, In+2 and In+3 are connected together to POW pin.
So I tried to fix the board by cutting the traces connecting one side of the 3 shunt resistors to the POW pin, then I cut all the traces connecting the GND input pins to ground then I resoldered some wires between each shunt and the input pins. By analogy to the INA219,  GND input became the V+ (connected to power supply),  the Channel input became V- (connected to load +).
I tried the 3 channels and now they work independently with 3 independent power rails with connected grounds
Title: Re: Fixing the INA3221 breakout board
Post by: Rendoh on May 19, 2018, 01:47 pm
forgot to attach this file
Title: Re: Fixing the INA3221 breakout board
Post by: Memmy on May 20, 2018, 04:24 am
Excellent work. Im fiddling with the same modules atm.

Created an account just to say thanks :)
Title: Re: Fixing the INA3221 breakout board
Post by: chetan06soni on Jul 06, 2018, 11:42 am
Hii...
Am facing some problem with these modules, I have connected a resistor 1K resistor to it for measuring the current through it, but in serial monitor I get only 1.6mA value, voltage value seems to be correct.


Thank you.
Title: Re: Fixing the INA3221 breakout board
Post by: MorganS on Jul 07, 2018, 11:57 am
Hii...
Am facing some problem with these modules, I have connected a resistor 1K resistor to it for measuring the current through it, but in serial monitor I get only 1.6mA value, voltage value seems to be correct.


Thank you.
The problem is in the code you didn't post.
Title: Re: Fixing the INA3221 breakout board
Post by: chetan06soni on Jul 12, 2018, 05:35 am
The problem is in the code you didn't post.
Thanks for the reply, here is the code I've used,

Code: [Select]
//
//   SDL_Arduino_INA3221 Library Test Code
//   SDL_Arduino_INA3221.cpp Arduino code - runs in continuous mode
//   Version 1.1
//   SwitchDoc Labs   January 31, 2015
//
//
// This was designed for SunAirPlus - Solar Power Controller - www.switchdoc.com
//



#include <Wire.h>
#include <SDL_Arduino_INA3221.h>

SDL_Arduino_INA3221 ina3221;

// the three channels of the INA3221 named for SunAirPlus Solar Power Controller channels (www.switchdoc.com)
#define LIPO_BATTERY_CHANNEL 1
#define SOLAR_CELL_CHANNEL 2
#define OUTPUT_CHANNEL 3

void setup(void)
{
 
Serial.begin(57600);
Serial.println("SDA_Arduino_INA3221_Test");

Serial.println("Measuring voltage and current with ina3221 ...");
ina3221.begin();
}

void loop(void)
{

Serial.println("------------------------------");
float shuntvoltage1 = 0;
float busvoltage1 = 0;
float current_mA1 = 0;
float loadvoltage1 = 0;


busvoltage1 = ina3221.getBusVoltage_V(LIPO_BATTERY_CHANNEL);
shuntvoltage1 = ina3221.getShuntVoltage_mV(LIPO_BATTERY_CHANNEL);
current_mA1 = -ina3221.getCurrent_mA(LIPO_BATTERY_CHANNEL);  // minus is to get the "sense" right.   - means the battery is charging, + that it is discharging
loadvoltage1 = busvoltage1 + (shuntvoltage1 / 1000);

Serial.print("LIPO_Battery Bus Voltage:   "); Serial.print(busvoltage1); Serial.println(" V");
Serial.print("LIPO_Battery Shunt Voltage: "); Serial.print(shuntvoltage1); Serial.println(" mV");
Serial.print("LIPO_Battery Load Voltage:  "); Serial.print(loadvoltage1); Serial.println(" V");
Serial.print("LIPO_Battery Current 1:       "); Serial.print(current_mA1); Serial.println(" mA");
Serial.println("");

float shuntvoltage2 = 0;
float busvoltage2 = 0;
float current_mA2 = 0;
float loadvoltage2 = 0;

busvoltage2 = ina3221.getBusVoltage_V(SOLAR_CELL_CHANNEL);
shuntvoltage2 = ina3221.getShuntVoltage_mV(SOLAR_CELL_CHANNEL);
current_mA2 = -ina3221.getCurrent_mA(SOLAR_CELL_CHANNEL);
loadvoltage2 = busvoltage2 + (shuntvoltage2 / 1000);

Serial.print("Solar Cell Bus Voltage 2:   "); Serial.print(busvoltage2); Serial.println(" V");
Serial.print("Solar Cell Shunt Voltage 2: "); Serial.print(shuntvoltage2); Serial.println(" mV");
Serial.print("Solar Cell Load Voltage 2:  "); Serial.print(loadvoltage2); Serial.println(" V");
Serial.print("Solar Cell Current 2:       "); Serial.print(current_mA2); Serial.println(" mA");
Serial.println("");

float shuntvoltage3 = 0;
float busvoltage3 = 0;
float current_mA3 = 0;
float loadvoltage3 = 0;

busvoltage3 = ina3221.getBusVoltage_V(OUTPUT_CHANNEL);
shuntvoltage3 = ina3221.getShuntVoltage_mV(OUTPUT_CHANNEL);
current_mA3 = ina3221.getCurrent_mA(OUTPUT_CHANNEL);
loadvoltage3 = busvoltage3 + (shuntvoltage3 / 1000);

Serial.print("Output Bus Voltage 3:   "); Serial.print(busvoltage3); Serial.println(" V");
Serial.print("Output Shunt Voltage 3: "); Serial.print(shuntvoltage3); Serial.println(" mV");
Serial.print("Output Load Voltage 3:  "); Serial.print(loadvoltage3); Serial.println(" V");
Serial.print("Output Current 3:       "); Serial.print(current_mA3); Serial.println(" mA");
Serial.println("");

delay(2000);
}
Title: Re: Fixing the INA3221 breakout board
Post by: MorganS on Jul 12, 2018, 07:00 am
Please use code tags.

Please tell us where you got that library from.
Title: Re: Fixing the INA3221 breakout board
Post by: chetan06soni on Jul 12, 2018, 07:37 am
I got the library from SwitchDocs, here is the link - https://github.com/switchdoclab/SDL_Arduino_INA3221
Title: Re: Fixing the INA3221 breakout board
Post by: MorganS on Jul 23, 2018, 07:18 pm
I get a 404 error on that link. Please post the link again with URL tags so that it is clickable.
Title: Re: Fixing the INA3221 breakout board
Post by: chetan06soni on Jul 26, 2018, 04:41 pm
Sorry for lack of my knowledge on how to use the forum.
Here is the link, please help me. Here is the Link (https://github.com/switchdoclabs/SDL_Arduino_INA3221)
Title: Re: Fixing the INA3221 breakout board
Post by: chetan06soni on Jul 27, 2018, 03:35 am
I get a 404 error on that link. Please post the link again with URL tags so that it is clickable.
Hii..
I got it working, I made wrong connections. I followed the datasheet and connected, but the CJMCU 3221 module require different connections.

Thank you for your time.
Title: Re: Fixing the INA3221 breakout board
Post by: HSWD on Oct 28, 2018, 05:45 am
Thanks @Rendoh. Its working...  :)
Title: Re: Fixing the INA3221 breakout board
Post by: C4lculated on Apr 23, 2019, 02:55 am
I was reading about the INA3221 breakout board in this thread https://forum.arduino.cc/index.php?topic=501980.0 (https://forum.arduino.cc/index.php?topic=501980.0)  .  Channels 1, 2 and 3 are connected respectively to In-1, In-2 and In-3 pins of the INA3221. In+1, In+2 and In+3 are connected together to POW pin.
So I tried to fix the board by cutting the traces connecting one side of the 3 shunt resistors to the POW pin, then I cut all the traces connecting the GND input pins to ground then I resoldered some wires between each shunt and the input pins. By analogy to the INA219,  GND input became the V+ (connected to power supply),  the Channel input became V- (connected to load +).
I tried the 3 channels and now they work independently with 3 independent power rails with connected grounds

I haven't tried this yet but just looking at the images something looks odd to me... Shouldn't there be another cut?
I've marked the trace that I'm talking about with a green circle:

(http://i.imgur.com/VKoR7ec.jpg) (http://imgur.com/VKoR7ec)
Title: Re: Fixing the INA3221 breakout board
Post by: Cathprotech on Jun 02, 2019, 02:28 am
Hi,
I know this is an old thread, almost 1 year now but I have just taken delivery of this board and have been a little confused.
I noticed all the grounds are connected together and thought that was a little strange to the point that it looks like it will not work and will cause damage if connected the way it first appears.

However, after reading this thread and the original one, am I to assume that I can connect a supply (+ve) to the POW pin and then take my load from each channel (1, 2, 3).  NOT using any of the ground connections and then this board will function on the high side and monitor 3 independent loads but from a single supply.

If that is correct, then it is fine, I would run my loads off the same supply anyway.

Thanks
Martin
Title: Re: Fixing the INA3221 breakout board
Post by: C4lculated on Jun 06, 2019, 04:36 am
However, after reading this thread and the original one, am I to assume that I can connect a supply (+ve) to the POW pin and then take my load from each channel (1, 2, 3).  NOT using any of the ground connections and then this board will function on the high side and monitor 3 independent loads but from a single supply.

If that is correct, then it is fine, I would run my loads off the same supply anyway.

Thanks
Martin

Could you please show a schematic of an example circuit that you intent to connect? I can't infer it from the text.
Title: Re: Fixing the INA3221 breakout board
Post by: nielsboon on Dec 11, 2019, 02:28 pm
Thanks so much, I got it working now.

It may be easier to just solder a short piece of wire onto the right sides of the shunt resistors, and use those as inputs.

You still need to cut the path that runs between the right sides of these resistors. (so that's two cuts in total, no more)

By the way, there's no need to make a new connection between the left sides of the shunt resistors and the input connectors CH1/CH2/CH3; they're already connected.




Title: Re: Fixing the INA3221 breakout board
Post by: yesyes on Jan 01, 2020, 06:04 pm
Hi,
if anyone is interested, I have designed an improved version of this breakout board that allows 3 different power supplies; one per channel. No need to scratch tracks. I have also increased the width of the track between the solder points and the sense resistors. They were very flimsy on the original board.

I have made 2 different models with different sense resistor values. One with 0.1Ohm (the same the original board has) and one with 0.01Ohm. The latter has lower voltage drop and 10 times the current range at the expense of lower 4mA resolution (0.4mA with 0.1Ohm).

I sell these on Tindie here:
improved INA3221 breakout-3 power supplies-0.01Ohm (https://www.tindie.com/products/yesyes/improved-ina3221-breakout-3-power-supplies-001ohm/)
improved INA3221 breakout-3 power supplies-0.1Ohm (https://www.tindie.com/products/yesyes/improved-ina3221-breakout-3-power-supplies-01ohm/)

Chris