When the number is wrong
Six ways a TK119 reading goes wrong, each with one thing to check. Most are in the wiring rather than the chip: SCL and SDA the wrong way round, the supply in the LOAD terminal, a screw on insulation. The rest are the sketch telling the chip the wrong resistance or the wrong range.
Find the symptom
Pick what you see, and the drawing shows where to look. The first check for each is below.
Not found at 0x40
SCL and SDA. This block prints GND, 3V3, SCL, SDA, the clock before the data. Swap the two wires, then check the red LED: if it is off, the problem is GND or 3V3. If a pad on the back is bridged, the address is 0x41, 0x44 or 0x45.
The current is negative
POWER and LOAD are swapped. Current is meant to flow the way the printed arrows point, POWER to LOAD. Swap both pairs of wires. Nothing is damaged.
The current reads zero
The rail is not going through the shunt. Either the supply is not in POWER, a screw has clamped insulation, or the load has another path back to the supply. The voltage reading still works, which is how to tell this from a wiring fault on the header.
The current is off by a ratio
The sketch has the wrong shunt or range. The voltages agree with a meter and the current is out by a steady factor: that is the calibration. Two measured, two worked out explains why.
The voltage is lower than the supply
That is correct. The bus voltage is read at LOAD +, after the shunt, so it is what the load gets. Add the shunt voltage back for the supply's.
The numbers jump about
Each reading is one 532 µs conversion. On a switching supply or a PWM load no two of them see the same current. Average: the chip can average up to 128 readings, or average in the sketch, and accept a slower number.
When it does not work
Something has moved. Check that the jumpers are still on the right pins, SCL third, and that the red LED is on. If another I²C device has been added to the bus, check it is not also at 0x40.
The chip was told the wrong shunt. The Adafruit calibrations assume 0.1 Ω, which is this board's. A calibration number or a library written for a 50 mΩ or 200 mΩ board scales the current by the ratio.
The shunt is warming. At 3 A it makes about 0.9 W, and a resistor's value moves a little with temperature. The chip's own error also grows from 0.5 % to 1 % over its temperature range. Give it a minute before trusting the last digit.
The bus voltage is measured from LOAD + to the block's ground, so the supply's negative has to reach that ground. If the supply's negative goes straight to the load and neither minus screw is used, the voltage has nothing to be measured against. Wire the supply's negative to POWER −.
The triple-channel board, and when one chip for three rails is the better answer.
Three rails at once: the INA3221 →Edit this page — content/books/ina219/when-the-number-is-wrong.mdx
Questions about this product
See what other owners have asked, and read their solutions.
TK119 INA219 Current and Voltage Monitor
Loading discussions…
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.