bentprong / ocp_xavier

Xavier NIC3 Test & Monitoring Board firmware.
Apache License 2.0
0 stars 0 forks source link

Current values are incorrect: need values for INA219 setup #1

Closed bentprong closed 1 year ago

bentprong commented 1 year ago

Default values don't work as tested on the test pads. Here are the defines currently used, adopted from the Arduino INA219 library example code. // INA219 defines

define U2_SHUNT_MAX_V 0.04 / Rated max for our shunt is 75mv for 50 A current: /

                              /* we will measure only up to 20A so max is about 75mV*20/50 */

define U2_BUS_MAX_V 16.0 / with 12v lead acid battery this should be enough/

define U2_MAX_CURRENT 3.0 / In our case this is enaugh even tho shunt is capable to 50 A/

define U3_SHUNT_MAX_V 0.04 / Rated max for our shunt is 75mv for 50 A current: /

                              /* we will mesaure only up to 20A so max is about 75mV*20/50 */

define U3_BUS_MAX_V 16.0 / with 12v lead acid battery this should be enough/

define U3_MAX_CURRENT 3.0 / In our case this is enaugh even tho shunt is capable to 50 A/

define SHUNT_R 0.01 / Shunt resistor in ohms (R211 and R210 are the same ohms) /

bentprong commented 1 year ago

ina219.pdf

bentprong commented 1 year ago

Using the 'status' command or the 'current' command, the firmware shows V/I for 12V and 3.3V rails. I'm not convinced the current readings are correct, hence this issue. Please test and advise if they are correct or not and also please provide the shunt data for the INA219's. See original comment and data sheet which is attached. Thx.

rickbrandwein commented 1 year ago

Version 1.0.6 appears to be accurate. With a benchtop supply I am able to make voltage adjustments and see the voltage measurements track. Next I had pulled the shunt resistors to put an ammeter in series. Then compared the measurements with the Xavier current measurements prior to removing the shunts. Verified the 6-8mA reading on the 3.3v line that the card was reporting and the 170-210mA reading on the 12V line.