PDA

View Full Version : ina226 code for current with r100 resistor



raywmson
- 10th February 2025, 21:38
Can't get accurate current readings. VBUS voltage is correct but I can't figure out the code for current. All voltages will be <36 volts and current <0.8 amps. Any help would be greatly appreciated. Have tried for 4 weeks before I found this forum.

Ioannis
- 11th February 2025, 14:18
Post your code, your PIC, your setup, maybe a video too.

Ioannis

pedja089
- 11th February 2025, 19:31
ABS reading times 2.5uV divided by 100. Is current in uAmps.
ABS readings time 25 is current in nA. If I didn't make some mistake...
EDIT: max current is 0.84mA...
I think your resistor is too large, and leakage current will give you bad measurements.

raywmson
- 14th February 2025, 10:38
What value is appropriate for the CALIBRATION number in the settings?

Demon
- 21st February 2025, 05:53
I've never touched this device.

I assume you've read everything in here:

https://www.ti.com/lit/ds/symlink/ina226.pdf


Section 6.5 seems to be where the main action starts.


EDIT: when I get caught up with a mystery device, I go look at what they're doing on arduino. Sometimes you gets hints in the code, sometimes your eyes just glaze over. :D

But at least it's a start.