Hi,
I am doing a design with INA236. I am trying to follow the datasheet for configuration, but the calculation and setting don't make much sense. Here it is:
Rsense = 0.1 Ohm
Imax - 0.2048A (I selected it for "easier" conversions).
Configuration register: set the bit ADCRANGE = 1, which sets the range to 20.48mV, resolution 0.625µV/LSB
CURRENT_LSB (min) = 0.2048A ÷ 215 = 0.00000625A=> 6.25µA
CURRENT_LSB = CURRENT_LSB (min)
Shunt calibration register:
SHUNT_CAL = 0.00512 ÷ (0.00000625A × 0.100Ohm) ÷ 4 = 2048.
Current [A] = CURRENT_LSB × CURRENT (from the CURRENT register).
Example:
If the current is 0.2A (about 4.8W of power), then:
The voltage on the shunt is 0.2A × 0.1 Ohm = 20mV (very close to the maximum of 20.48mV).
Shunt Voltage Register = 20mV ÷ 0.000625mV = 32000 (maximum is 32768).
Current Register = Shunt Voltage Register × Calibration Register = 32000 x 2048 = 65536000???
I expect to see the number that represents the current of 0.2A. but I get 65536000. Where is my error?
Thank you.