INA3221 as 3x low-side current sensor (no voltage) [SOLVED]

As the max 26V was not enough for me and i did not want to add three INA226 i simply used the INA3221 as a low-side current sensor.

Simply connect POW to Minus and CH1, CH2, CH3 to the negative pole of your three loads/gains.
INA3221 backside.png

My setup: 240V AC inverter / Wind generator / solar panel - only one battery voltage anyway.
A load will create a negative shunt voltage, a gain a positive.

When you want to measure greater currents, you may want to solder and connect SMD shunt resistors like shown in attached photo:

No need to remove the shunt resistors on the module. You probably need to calibrate the readings anyway:

#include <SDL_Arduino_INA3221.h>
SDL_Arduino_INA3221 ina3221;

#define Current_Ac 1
#define Current_Wind 2
#define Current_Sun 3

float iAnalogRead=0;
double fIT_Ac=0,  fIT_Wind=0, fIT_Sun=0;
float fI_Ac=0,  fI_Wind=0, fI_Sun=0;

void AddAnalog()
  fIT_Ac   += ina3221.getShuntVoltage_mV(Current_Ac);
  fIT_Wind += ina3221.getShuntVoltage_mV(Current_Wind);
  fIT_Sun  += ina3221.getShuntVoltage_mV(Current_Sun);

void ReadSensors()
  fIT_Ac   /= iAnalogRead;
  fIT_Wind /= iAnalogRead;
  fIT_Sun  /= iAnalogRead;
  fI_Ac     = mapf(fIT_Ac,    0.0,-163.0,  0.0,80.0);
  fI_Wind  = mapf(fIT_Wind,  0.0,163.0,  0.0,80.0);
  fI_Sun   = mapf(fIT_Sun,   0.0,163.0,  0.0,80.0);
  if (fI_Ac < 0) fI_Ac = 0;
  if (fI_Wind < 0) fI_Wind = 0;
  if (fI_Sun < 0) fI_Sun = 0;

  Serial.print("IT_Ac=" + String(fIT_Ac) + "\tIT_Wind=" + String(fIT_Wind) + "\tIT_Sun=" + String(fIT_Sun)) ;
  Serial.print("\t->\tI_Ac=" + String(fI_Ac) + "\tI_Wind=" + String(fI_Wind) + "\tI_Sun=" + String(fI_Sun)) ;

  iAnalogRead = fIT_Ac = fIT_Wind = fIT_Sun = 0;

double mapf(double val, double in_min, double in_max, double out_min, double out_max) {
    return (val - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;

the Roland
All at your own risk !

INA3221 backside.png

Wow. That looks like an amazing project. Let me know if there are more details. Also, one suggestion is that if you do projects where you are working with high voltages, I recommend to have them enclosed in a safe box and follow electrical safety guidelines. Getting shocked with high voltage is no joke.

Wow. ... Getting shocked with high voltage is no joke.

No, nothing special here. And no high voltages,only high currents. So yes, at 40A and 25V = 1000 Watt, the 0,002 Ohm shunt resistors would exceed their 3 Watt heat dissipation limits.
So i should switch on a little cooler fan with a KSD9700 bimetal switch. Or connect a PNP transitor to the programmable Critical Output of the INA3221..

I plan to connect this ESP8266 D1 Mini project to my free power logging portal
Again nothing special. But it is very compact :slight_smile:
Then people could not only log their various data but also control their esp8266 und install new firmware..

ideas welcome

Haha, I was so stupid to test a 2000 Watt inverter with my 2 mOhm resistors in the circuit:

P.s. I wrongly say in the end of the video that the original shunt resistors can say on the ina3331 module. But when a high current 1 Ohm shunt resistor would melt off, the 3A shunt resistor on board would immediately execeed the max shunt voltage and probably kill the the chip before turning to dust itself.
On top, as the minus of the load would then disconnect from the battery minus, full positive voltage would reach the chip shunt voltage input and might again blow the chip up.
So with a low-side setup, better take care the shunt resistor will not disconnect.