|
Post by somewhereinusa on Dec 12, 2019 4:35:44 GMT -8
I'm working on a project that I need 3, fairly accurate, voltage measurements. ;Using a voltage divider gave unsatisfactory results. I purchased the SwitchDoc INA3221 breakout thinking it would do what I wanted. I'm only interested in one voltage reading for each channel. Using this wiring, measuring 1 battery that measures 2.7v with a volt meter I get, channel 1, 2.1v; channel 2, 1.9v; and channel 3, .03v. From what I can tell from the spec sheet I have it wired correctly. Tried with a UNO and different jumper wires with same results. 
|
|
|
Post by somewhereinusa on Dec 12, 2019 12:29:44 GMT -8
OK, went back and read the specs sheet some more. Changed wiring so there is a common ground with worse results. 
|
|
|
Post by SDL on Dec 12, 2019 13:13:01 GMT -8
Hmm. The first one will give you accurate current measurements but not voltages. No Common ground.
The second is shorting out your batteries because I think that there is only 0.1 ohms across the sensing terminals. You may have destroyed the ina3221 but probably not.
This is a current monitoring device. That will measure high side voltage. You need to do this:
Hook up your batteries So they all have a common ground. Then hook up the plus of each battery to the IN+ input (1,2,3). Now you will read voltages. If you want currents too, then you need to draw your power from IN- for each battery to read current!!
Hope that helps!
BP
|
|
|
Post by somewhereinusa on Dec 12, 2019 14:15:13 GMT -8
If I understand correctly you want it wired like this.  The first module I tried, maybe fried, didn't work correctly. Tried the second, unopened one, wired like this. Using my bench power supply on only one channel I get voltage readings on all three, doesn't matter which channel I try to measure. None the same, none even close to the voltage to be measured.
|
|
|
Post by SDL on Dec 12, 2019 14:30:44 GMT -8
I’m heading out now but common ground means common ground. You need to connect the Arduino ground to your battery ground. That should do it.
BP
|
|
|
Post by somewhereinusa on Dec 13, 2019 4:31:00 GMT -8
I’m heading out now but common ground means common ground. You need to connect the Arduino ground to your battery ground. That should do it. BP That is how the second picture is wired, isn't it?
|
|
|
Post by SDL on Dec 13, 2019 5:30:00 GMT -8
You don't hook up the battery ground to the IN- ports. That shorts out the batteries. Sorry I was in too much of a hurry last night to notice what you did.
Repeating:
Hook up your batteries So they all have a common ground. Then hook up the plus of each battery to the IN+ input (1,2,3). Now you will read voltages. If you want currents too, then you need to draw your power from IN- for each battery to read current!!
You will not have anything hooked up to the IN- for each battery to read the voltages.
BTW, thanks for the wiring pictures. It makes it much easier to help you!
BP
|
|
|
Post by somewhereinusa on Dec 13, 2019 7:12:19 GMT -8
Thanks for all of your help and patience, I have it sorted out now.
Dick
|
|
|
Post by somewhereinusa on Dec 13, 2019 7:23:05 GMT -8
In case others have been following. This is what works and seems to be accurate to within a few mV. 
|
|
|
Post by SDL on Dec 13, 2019 7:46:59 GMT -8
What are you using for diagram drawing? I really like it!
BP
|
|
|
Post by somewhereinusa on Dec 13, 2019 13:33:19 GMT -8
I use Affinity Designer does the same as Adobe Illustrator only MUCH cheaper. ($50). The drawings are scaleable and can be exported as jpg, pdf and a list of others. When I get a new part I make a drawing,made up of pieces of other drawings, of it on a page I keep with all of my boards and pieces. All I have to do then is copy/paste onto my new diagram. Picture of my components page.  Project with INA3221 with corrected wiring.  Since it's scaleable I can make a drawing to see how components will fit into the space I have. These are to exact scale. 
|
|
|
Post by somewhereinusa on Mar 13, 2020 12:09:05 GMT -8
I have this working well in a slightly different setup than above. The middle channel has consistently shown .2 V lower than actual at about 5V. The other two are spot on. It has done it in different wiring set ups. Can I compensate for that? On a side note can these be ordered without the pins soldered on?
|
|
|
Post by SDL on Mar 16, 2020 11:37:49 GMT -8
Howdy somewhere,
Have you checked the voltage with a voltmeter? So you know it is 0.2V lower?
If you have, I would just apply a linear adjustment to the line. The load value won't vary much (well, it will be 0 or around 5!).
I'd guess that the shunt resistor is a little off.
BP
|
|
|
Post by somewhereinusa on Mar 16, 2020 13:19:34 GMT -8
Thanks, that's what I did. Thought there might be a more elegant solution.
Dick
|
|