Where the board goes
The shunt goes in the positive wire and the board's ground goes to your microcontroller's. Three of the four ways a beginner wires this are wrong, and one of them puts the load's return current through your USB cable.
In the way, not across
A resistor that measures current has to be in series — in the path, so that everything the load draws goes through it. A resistor across something is a different component doing a different job, and a resistor of a tenth of an ohm across a supply is very nearly a short circuit.
Both boards are laid out to make the right answer the obvious one. On the TK119 the supply goes into the red terminal marked POWER and the load comes out of the black one marked LOAD, with two arrows printed between them pointing the way. On the INA3221 each channel's + screw faces its supply and its − screw faces its load.
The ground is not optional, and not isolated
The fourth option in that figure is the one people are surprised by. The chip does not measure the bus voltage across the shunt — it measures it from the load side of the shunt down to its own ground pin. With no wire between that ground and the circuit you are measuring, the voltage reading has no reference.
On these boards that wire is already made for you: the two negative screws, the GND pin on the header, and the chip's own ground are all one copper net. Connect the supply's negative to a − screw and you have connected it to your microcontroller.
Which is convenient and is also the limit of what these boards can do. They are not isolated. The rail you are measuring must be allowed to share a ground with the board reading it. A battery pack, a bench supply, a USB power bank — all fine. Anything whose negative must stay separate from your computer's is not.
Why the shunt is in the positive wire
Putting it there is called high-side sensing, and the reason is exactly the ground above. If the shunt were in the return path, the load's negative would no longer be at the same potential as the board's ground — and since they are the same net on this board, the shunt would be shorted out and the load's current would find its way back through the header instead.
The INA219 chip can do low-side sensing perfectly well. A board wired for it looks different: its ground and its terminals are not one net. This one is not that board.
The four wires that do not carry the load
GND, the supply pin, SCL and SDA. None of them sees the current being measured, and none of them cares how big the rail is — the chip sits on the high side and talks to your board through its own 3 to 5.5 V supply. Measuring a 24 V rail with a 3.3 V ESP32 needs no level shifting and no isolation, only the shared ground.
Which pin is which is the next page, and it is the page with the trap in it.
When it does not work
There is no ground between the circuit you are measuring and the board. The chip measures the bus voltage from the load side of the shunt down to its own ground pin, so without that wire there is no reference and the number is noise. One wire from the supply's negative to your microcontroller's GND fixes it — and on these boards the negative screws are already that same net, so it is usually a loose screw rather than a missing wire.
The shunt is in the return path rather than the positive wire. Both − screws on the board are the same net as its GND pin and therefore as your microcontroller's ground, so a shunt in the negative wire connects the load's return straight to the USB shield through the board. Move the board into the positive wire. Nothing on the board is likely to be damaged; the port's protection did its job.
The shunt is probably across something rather than in series with it, or the load is being fed from somewhere other than the LOAD terminal. Unscrew the LOAD + wire with the supply on: the current should fall to zero. If it does not, the load has a second path to the supply that misses the board.
Its low-voltage output, yes, up to 26 V — that is the chip's absolute maximum on the terminals. Its mains side, no: nothing on either board is rated for it, there is no isolation of any kind, and the I²C header is a direct electrical connection to your computer. If the number on the label is over 26 V, these boards are the wrong tool.
Edit this page — content/books/inaset/where-the-board-goes.mdx
Questions about this product
See what other owners have asked, and read their solutions.
This page covers several products. Choose yours to see the right 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.