This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BeagleBone Black RevC with Adafruit Ina219 measure motor current

Part Number: INA219

Hello. In the picture above you can see my circuit.

Unfortunately, I can not find a proper value for the calibration register, to have the same value as what I am getting from the Multimeter.

Thank you

  • Hello,

    You will need to calculate the calibration register for your specific application. See the screenshot below:

    First use equation 2 to solve for Current_LSB using the maximum expected current. Then you will use the Current_LSB (from equation 2) and the Rshunt you are using to solve for the Calibration register using equation 1.

    For more information about programming the calibration register you can refer to the 8.5.1 section of the INA219's datasheet. 

    If you have any other questions please reply

    Regards,

    Castrense

  • Hi, Thanks for the reply

      Dec Hex
    V Bus Max 16
    V Shunt Max 0,04
    R Shunt 0,1
    Max Possible I 0,4
    Max Expected I 0,2
    Minimum LSB 0,0000061
    Maximum LSB 0,0000488
    Current LSB 0,0000080
    Calibration 51200 C800

    These are my values.

    When I write this value to INA219, I write it as 0x00C8 (MSB First).

    Also The configuration Register has the value 0x07FF.
    And the value I pass to ina219 is 0xFF07.

    I don't seem to get anything useful.

    Do I also need to invert the bytes of the values that I am getting from the INA?  (I just thought about it)

  • Hello,

    Attached are pictures on how to write to the INA219 as well as how to read and set up the pointer address.

    You should be writing to the device MSB first so for the calibration register should be 0xC800. This should be the case with the configuration register also. You should be able to read the current register as is.

    What does the shunt Voltage read?

    For the calibration register I calculate a value of 33554 dec or 0x8312. This is using 0.4 A max expected current, and an Rshunt of 0.1 ohm.

    Regards,

    Castrense