Step 1: Deep Dive – the Hardware Architecture
The Contenders (INA219 vs. INA226)
Both chips operate on the same principle: they measure the voltage drop across a small resistor (shunt) to calculate current (I = V/R) and measure the bus voltage to calculate power (P = V * I). However, they are built for different levels of precision.
INA219 (The Generalist)
The INA219 is the "workhorse" sensor. It is great for general-purpose monitoring where extreme precision isn't critical.
- Resolution: 12-bit ADC. 2^12 = 4096 steps.
- Bus Voltage: 0V to 26V.
- Shunt Voltage Range: ±320mV.
- Use Case: Perfect for general 5V or 12V hobby projects, motor monitoring, and general power tracking.
INA226 (The Precision King)
The INA226 is the "pro" version. It has 16 times better resolution and can handle higher voltages.
- Resolution: 16-bit ADC, 2^16 = 65,536 steps. (This is a massive jump; it is 16x more precise than the 219).
- Bus Voltage: 0V to 36V.
- Shunt Voltage Range: ±81.92mV (Note: It is more sensitive, so it handles less voltage drop across the shunt).
- Averaging Engine: The INA226 has a built-in "DSP" (Digital Signal Processor) that can average up to 1024 samples automatically before sending you the result. This smooths out noisy signals from PWM dimmers or motors.
- Alert Pin: Programmable! You can tell the chip, "If current goes over 2A, send a signal to this pin."
- Use Case: Battery capacity grading, ultra-low power sleep tracking, and 24V industrial systems.
Step 2: The Critical Physics of Shunt Resistors
This is the most critical concept to master. These chips do not actually measure current directly; they measure the voltage drop across a tiny resistor known as a Shunt.
Most breakout boards come with a generic R100 (0.1Ω) resistor. This is a "jack of all trades, master of none" value.
The Trade-Off
- High Resistance (1.0Ω): Great for small currents (uA/mA) because it creates a larger, easier-to-read voltage drop. Bad for high current (too much voltage loss).
- Low Resistance (0.001Ω): Great for massive currents (50A+) because it creates very little heat and voltage loss. Bad for small currents (the signal is too weak to read).
The "R100" Problem
Most generic modules come with a resistor labeled R100. This means $0.1\Omega$.
- For Low Current (100mA): V = 0.1A * 0.1Ω = 0.01V (10mV). The signal is strong; the sensor reads it easily.
- For High Current (10A): V = 10A * 0.1Ω = 1V drop.
- FAIL 1: The INA226 can only read up to ±0.081V. The chip will flatline (saturate).
- FAIL 2: Power dissipated is 10 Watts (P = I² × R = 10² × 0.1 = 10 W ). The resistor will physically burn up and desolder itself.


Step 3: Wiring (High-Side Vs. Low-Side)
The Golden Rule: Use High-Side Sensing
The INA modules are designed primarily for High-Side Sensing. This means you place the sensor on the positive wire (between the Battery Positive and the Load Positive).
Why not Low-Side? If you place the sensor on the Ground wire (Low-Side), the ground of your load will be slightly higher than the actual system ground (due to the resistor). This can cause communication errors or "ground loops" if you connect USB cables or other sensors.
Note on "Common Ground": Even though the sensor is on the "High Side," the GND pin of the INA module must still connect to the ground of the battery being measured and the Arduino.
Step 4: Limitations (Read Before You Build)
- Thermal Drift (The Heat Problem): Resistors change their value when they get hot. If you push 2A through the tiny onboard resistor, it will heat up, its resistance will change, and your readings will drift.
- Solution: Keep your continuous current under 2A for the stock modules, or use an external shunt that is rated for high wattage.
- Common Mode Voltage: The...
puneet1984
Torbjörn Lindholm
PN Labs
Jan