|
Post by Allen Aska on Dec 27, 2022 21:57:50 GMT -8
Hi, I just got the 0.01 Ohm model of the INA3221. Voltage has measured fine, but my current & shunt seems to be very odd. I downloaded the sample code, and was very pleased the voltage was right. But, my meter reads 13.2v, 97mA, 1.28w and the INA3221 is reading 13.13v, 212mA. I set the Shunt resistor to 0.01 in the program. The voltage across shunt is 0.0030v
My brother knows a lot more about this than me, he verified it was all wired correctly, even researched and saw there needs to be bit shifting which he saw was taking place and something about 40 and 8 but said oh, they used 0.005 which is the same thing (I guess it's 0.04/8 = 0.005). He seems to be confused why the voltage across the shunt is 0.0030v. Is there any reason why it's measuring 212mA when it should be 97mA? I also downloaded someone else's program to measure current, it reported the same 212mA current. Thoughts?
|
|
|
Post by Allen Aska on Dec 27, 2022 22:28:10 GMT -8
I have another SwitchDoc grove INA3221 but it's the one with 0.1 Ohm resistors so can't measure a lot of current. If I take the exact same program, change the shunt from 0.01 to 0.1, use the INA3221 with the 0.1 Ohm shunt it measures the current correctly. Why if I use the 0.01 Ohm and change the shunt in the program to 0.01 the current goes way off... am I supposed to use a different value for the shunt?
|
|
|
Post by SDL on Dec 29, 2022 8:27:36 GMT -8
Boy, I need more information to help out here. Please post pictures of the INA3221 (so I can see the units) you are using and post the software you are using.
BP
|
|
|
Post by piedmont on Dec 30, 2022 10:20:12 GMT -8
Thank you. Here's 4 pictures and code. In short, if I connect the low current INA3221 and set shunt resistor to 0.1 current is spot on. Tells me program is working correctly. However, if I connect the High Current INA3221 with 0.01 resistors, set the shunt value in software to 0.01 the current is more than 2x off. All is attached to common ground, I'm measuring the current of the arduino + 12v to 5v dc to dc buck converter (which powers the arduino), plus wifi router. I included my code in the zip file.
|
|
|
Post by SDL on Dec 31, 2022 17:11:33 GMT -8
We haven't released the High Current INA3221 except in our SolarMAX2 product. Here is the important part from the SolarMAX code so you can get the right values:
#define SHUNT_RESISTOR_VALUE (0.02) // default shunt resistor value of 0.1 Ohm / 0.02 ohm for high current
BP
|
|
|
Post by piedmont on Jan 4, 2023 16:23:03 GMT -8
Thank you, I wasn't sure if changing the value to adjust was the right answer. I ended up using 0.023208 after measuring with a professional multimeter and that made it match.
I wanted to thank you for sending me the INA3221 from the SolarMax2 product so I could use it with my existing solar. I also was pleasantly surprised to find out it came with address 043. That let me connect the high current and low current at the same time, and 043 is not an often used address so I felt good I wouldn't have conflicts. Cheers!
|
|