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.

INA226:INA226 ALERT PIN

Part Number: INA226

Tool/software:

i using INA226 in my pcb design.

İ have a 1R shunt resistor and also i working with 2.5uV LSB.  i measuring  current on lamp and i appyl 5V lamp. My lamp current is 40mA when i apply 5V.   

when i  setting alert pin for 50mA (alert pin being low state)

when i  setting alert pin for 60mA (alert pin being low state)

when i  setting alert pin for 70mA  system doesnt working (alert pin being low state)

if i setting alert pin for 80mA system works and lamp blink.

i checked  shunt voltage and current register adreess.  i saw my current as i said 40mA. Alsa i measured with multimeter. My current is correct.

Why my system doesnt work, when i set alert  limit register as i said status. Why my sistem works just  when i seting alert limit register for 80mA

 

i sharing my code;

void INA226_Config_Register()

{

uint16_t config_Reg_Data=0x48A7;

Write_All_Devices(INA226_CONFIG_REG,config_Reg_Data);

}

void INA226_Calibration_Register()

{

uint16_t config_Reg_Data=0x800 ; //For 100mA ->>LSB==2.5 µA/bit. Rshunt=1R on board.

Write_All_Devices(INA226_CALIBRATION_REG,config_Reg_Data);

}

void INA226_Enable_Shunt_Over_Limit()

{

uint16_t Enable_Reg_Data=0x8001;

Write_All_Devices(INA226_MASK_ENABLE_REG, Enable_Reg_Data);

Read_All_Devices(INA226_MASK_ENABLE_REG);

}

void INA226_Set_Current_Alert_Limit()

{

uint16_t alert_limit = 0x7D00; //0x1F40=20mA Alert Limit set,0x2710=25mA,0x1770=15mA,0x4E20=50mA ,0x5DC0=60mA ,0x9C40=100mA,0x6D60=70mA,0x7D00=80mA

Write_All_Devices(INA226_ALERT_LIMIT_REG , alert_limit);

}

  • Hello,

    It looks like your settings are correct. I recommend looking at the value in the shunt voltage register and comparing with that directly so that you can see if the level is being exceeded or not. It would also be good to measure the difference across the IN+ and IN- pins of the device directly to make sure the voltage is not getting changed before it reaches the INA. It's also important to note that the ALERT is active low, and will go high when not in an ALERT state (unless you change that in settings).

    There is one potential problem with your setup though. With a shunt resistor size of 1Ω, the maximum current you can measure is 81.92mA, not 100mA as used in your equations. This is fine if you don't need to measure above 81.92mA. 

    Regards,

    Mitch