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.

INA233: detecting current direction change

Part Number: INA233
Other Parts Discussed in Thread: INA236

I'm trying to use an INA233 to keep track of battery charge & discharge (i.e. fuel gauge, this is just one of several functions I'm using it for and I realize there are fuel-gauge ICs available). The main issue I'm facing is detecting the change between charging and discharging, i.e., when the current changes polarity. Is there a way to get an interrupt when this happens or is the only method to poll the current at an appropriate frequency?

  • Hi,

    With INA233, the closest solution I can think of is to utilize its ALERT pin as interrupt, which in turn is configured by setting registers IOUT_OC_WARN_LIMIT (4Ah) and MFR_ALERT_MASK (D2h). The rough idea is to set a current threshold that is a small positive or negative value depending on the direction for which you want the alert to be issued (positive -> negative, or the opposite).

    There are practical considerations, such as to avoid unwanted toggling. But at system level, this approach should be somewhat feasible.

    Regards, Guang 

  • Thanks for the suggestion. When I read the datasheet I thought that the over-current threshold is unsigned and is compared with the absolute value of the current. What you suggest would work if it is signed and, for example, if the threshold is -0.01A it would warn when the actual_current < threshold_current (signed). Can you confirm that the threshold is indeed signed and is compared to the signed actual current?

  • Hi,

    You have a good point – INA233 is probably not going to be the best for this reason.

    However INA236 is more flexible in its ALERT pin functionality. Besides signed values are being compared, over or under threshold is selectable, pin polarity is configurable. Please take a look if you can use it instead.

    Regards, Guang