high side current sensing/measurements is *difficult* to do with typical 'flea' market op amps say those floating on AliX etc.
1st high side measurements requires pretty much rail-to-rail op amps and more importantly those that can take a high common mode voltage as measurements across the sense resistor is very often higher than the limits for cmrr.
Hence, what is left is dedicated high side current sense amplifiers, they proved price competitive vs trying to make a discrete solution (e.g. using 'ordinary flea market' op amps).
As I'm using an stm32 which has rather decent ADCs, I started looking for *analog* high side amps.
I started looking at datasheets, an interesting one is INA139 (40v)/INA169(60v) INA139 is adequate for my purpose
https://www.ti.com/lit/ds/symlink/ina169.pdf
The nice thing about this is the gain setting resistor is external, hence, I'm thinking about multiplexing resistors for different gains. Probably, not a best solution. But it turns out they are rather pricy.
Next I looked at fixed gain current sense amps. e.g. INA180 (uni-direction)/INA181 (bi-direction)
https://www.ti.com/lit/ds/symlink/ina180.pdf
Gain options: – 20 V/V (A1 devices) – 50 V/V (A2 devices) – 100 V/V (A3 devices) – 200 V/V (A4 devices)
looks good. And these are 'cheap' and 'abundant', apparently, I'd guess these are the most used in 'real' devices.
How then to achieve, 'programmable' gain? I think through it a while, toyed with the notion to use the same shunt but say connect an A1 sensor and an A2 sensor in 'parallel'. It seemed quite feasible to do this, but I'd guess I'd need to calibrate the measurements to compensate for the different wire lengths to the shunt resistor and possibly errors.
Then I took a look at INA219
https://www.ti.com/lit/ds/symlink/ina219.pdf
This is a 'fully digital' current sense amplifier and provides the reading over i2c and has the PGA built-in.
Then it turns out, the completely assembled INA219 modules on the 'flea' markets
https://www.aliexpress.com/w/wholesale-ina219.html
cost less or equal to a single INA169 for the chip alone.
The true INA219 chip prices aren't really that much less.
I'd think a reason for this could be due to bulk purchases and mass production, which resulted in the lower cost per unit.
And I'd guess things like INA138/INA168 (unidirection), INA139/INA169 (bidirectional), but are simply analog looks rather costly as they are 'less frequently' used parts, say vs the INA180/181 and/or even the INA219.
There was reports of shortages of INA219 prior, but I'd guess it is somewhat relieved by now.
the grumble is that 'measuring currents' (especially on the high side) is anything but 'simple', what seemed 'simple' about measuring the small voltages across the shunt is naively 'simple', but that there is no 'easy way' to measure that on the high side.
1st high side measurements requires pretty much rail-to-rail op amps and more importantly those that can take a high common mode voltage as measurements across the sense resistor is very often higher than the limits for cmrr.
Hence, what is left is dedicated high side current sense amplifiers, they proved price competitive vs trying to make a discrete solution (e.g. using 'ordinary flea market' op amps).
As I'm using an stm32 which has rather decent ADCs, I started looking for *analog* high side amps.
I started looking at datasheets, an interesting one is INA139 (40v)/INA169(60v) INA139 is adequate for my purpose
https://www.ti.com/lit/ds/symlink/ina169.pdf
The nice thing about this is the gain setting resistor is external, hence, I'm thinking about multiplexing resistors for different gains. Probably, not a best solution. But it turns out they are rather pricy.
Next I looked at fixed gain current sense amps. e.g. INA180 (uni-direction)/INA181 (bi-direction)
https://www.ti.com/lit/ds/symlink/ina180.pdf
Gain options: – 20 V/V (A1 devices) – 50 V/V (A2 devices) – 100 V/V (A3 devices) – 200 V/V (A4 devices)
looks good. And these are 'cheap' and 'abundant', apparently, I'd guess these are the most used in 'real' devices.
How then to achieve, 'programmable' gain? I think through it a while, toyed with the notion to use the same shunt but say connect an A1 sensor and an A2 sensor in 'parallel'. It seemed quite feasible to do this, but I'd guess I'd need to calibrate the measurements to compensate for the different wire lengths to the shunt resistor and possibly errors.
Then I took a look at INA219
https://www.ti.com/lit/ds/symlink/ina219.pdf
This is a 'fully digital' current sense amplifier and provides the reading over i2c and has the PGA built-in.
Then it turns out, the completely assembled INA219 modules on the 'flea' markets
https://www.aliexpress.com/w/wholesale-ina219.html
cost less or equal to a single INA169 for the chip alone.
The true INA219 chip prices aren't really that much less.
I'd think a reason for this could be due to bulk purchases and mass production, which resulted in the lower cost per unit.
And I'd guess things like INA138/INA168 (unidirection), INA139/INA169 (bidirectional), but are simply analog looks rather costly as they are 'less frequently' used parts, say vs the INA180/181 and/or even the INA219.
There was reports of shortages of INA219 prior, but I'd guess it is somewhat relieved by now.
the grumble is that 'measuring currents' (especially on the high side) is anything but 'simple', what seemed 'simple' about measuring the small voltages across the shunt is naively 'simple', but that there is no 'easy way' to measure that on the high side.
Last edited: