Several INA series ICs have excellent Arduino support, with libraries provided by Adafruit and the community. The following table summarizes the most popular models and their technical specifications
| IC Model | ADC Res. | Max Bus Voltage | Shunt Voltage Range | PGA | Alert Pin | Communication | Arduino Library | Key Functionality |
|---|---|---|---|---|---|---|---|---|
| INA219 | 12-bit | 26V | ±40,±80, ±160,±320 mV | Yes (1, 2, 4, 8) | No | I²C/SMBus | Adafruit_INA219 | Basic current, voltage, and power monitoring. |
| INA226 | 16-bit | 36V | ±81.92 mV | No | Yes | I²C/SMBus | INA226 (Rob Tillaart) | High precision; monitors current, voltage, and power. |
| INA228 | 20-bit | 85V | ±163.84.92 mV | No | Yes | I²C/SMBus | INA228 (Rob Tillaart) | Ultra-high precision; includes energy and charge accumulation. |
| INA237 | 16-bit | 85V | ±163.84.92 mV | No | Yes | I²C/SMBus | Adafruit_INA237 | High voltage support (up to 85V) for current and power. |
| INA238 | 16-bit | 85V | ±163.84.92 mV | No | Yes | I²C/SMBus | - | High voltage support (up to 85V) for current and power. |
| INA260 | 16-bit | 36V | Integrated Shunt | No | Yes | I²C/SMBus | Adafruit_INA260 | Built-in 2m shunt; supports up to 15A continuous. |
| INA3221 | 13-bit | 26V | ±163.84.92 mV | No | Yes | I²C/SMBus | Adafruit_INA3221 | 3-Channel monitoring of voltage and current. |
The INA219 is a digital current, voltage, and power monitor with an I²C- or SMBUS-compatible interface. It is primarily used for high-side current sensing but can also be configured for low-side sensing.
| Pin | Name | Type | Description |
|---|---|---|---|
| 1 | VCC | Power | Supply Voltage: Powers the chip (3.0V to 5.5V). |
| 2 | GND | Power | Ground: Common ground for the sensor and logic. |
| 3 | SCL | Digital I/O | I²C Clock: Serial clock line for communication. |
| 4 | SDA | Digital I/O | I²C Data: Serial data line for communication. |
| 5 | V+ (IN+) | Analog Input | Positive Shunt: Connect to the power source side. |
| 6 | V- (IN-) | Analog Input | Negative Shunt: Connect to the load side. |
| 7 | A0 | Digital Input | Address 0: Connect to GND, VS, SDA, or SCL to set I²C address. |
| 8 | A1 | Digital Input | Address 1: Connect to GND, VS, SDA, or SCL to set I²C address. |
Important Considerations
Standard Breakout Board Address Table
The INA219 current sensor has a base I2C address of 0x40. Most breakout boards, like those from Adafruit, feature two address jumpers (A0 and A1) that allow you to set up to four unique addresses by bridging them with solder.
| Address | A1 Jumper | A0 Jumper | Description |
|---|---|---|---|
| 0x40 | Open | Open | Default address |
| 0x41 | Open | Closed | Bridge A0 |
| 0x44 | Closed | Open | Bridge A1 |
| 0x45 | Closed | Closed | Bridge A0 and A1 |
#include <Wire.h> #include <Adafruit_INA219.h> Adafruit_INA219 ina219; void setup(void) { Serial.begin(115200); if (!ina219.begin()) { Serial.println("Failed to find INA219 chip"); while (1); } // Optional: Set calibration for higher precision (e.g., 32V 1A) // ina219.setCalibration_32V_1A(); } void loop(void) { float shuntvoltage = 0; float busvoltage = 0; float current_mA = 0; float loadvoltage = 0; float power_mW = 0; shuntvoltage = ina219.getShuntVoltage_mV(); busvoltage = ina219.getBusVoltage_V(); current_mA = ina219.getCurrent_mA(); power_mW = ina219.getPower_mW(); loadvoltage = busvoltage + (shuntvoltage / 1000); Serial.print("Load Voltage: "); Serial.print(loadvoltage); Serial.println(" V"); Serial.print("Current: "); Serial.print(current_mA); Serial.println(" mA"); Serial.print("Power: "); Serial.print(power_mW); Serial.println(" mW"); Serial.println(""); delay(1000); }
36V, 16-bit, ultra-precise i²c output current/voltage/power monitor w/alert
The INA226 is a current shunt and power monitor with an I²C or SMBUS-compatible interface. It monitors both a shunt-voltage drop and the bus supply voltage. Programmable calibration values, conversion times, and averaging, combined with an internal multiplier, enable direct readouts of current in amperes and power in watts.
The INA226 is a current shunt and power monitor with an I²C or SMBUS-compatible interface. The device monitors both a shunt voltage drop and bus supply voltage. Programmable calibration value, conversion times, and averaging, combined with an internal multiplier, enable direct readouts of current in amperes and power in watts. The INA226 senses current on the common-mode bus, which can range from 0V to 36V, independent of the supply voltage. The device operates from a 2.7V to 5.5V supply, drawing a typical supply current of 330 μA. The device is specified for an operating temperature range of –40°C to 125°C and features up to 16 programmable addresses via an I2C-compatible interface.
The INA226 supports the fast mode (1 kHz to 400 kHz) and high-speed mode (1 kHz to 2.94 MHz) transmission protocols. All data bytes are transmitted in most significant byte-first order.
If you'd like to support the development of the site with the price of a coffee — or a few — please do so here.
Here's a handy tip: you can quickly save this page as a PDF by clicking “export to PDF” in the menu on the right side of the screen.
| Pin Name | Description |
|---|---|
| V+ / VS | Power Supply: 2.7V to 5.5V for the chip's own logic |
| GND | Ground: Reference point for power and I²C |
| SCL | I²C Clock: Connect to the microcontroller's SCL pin |
| SDA | I²C Data: Connect to the microcontroller's SDA pin |
| VBUS | Bus Voltage Input: Connect this to the high-side or load-side to measure the actual bus voltage (up to 36V) |
| IN+ | Shunt Positive: Connect to the supply side of the external shunt resistor |
| IN- | Shunt Negative: Connect to the load side of the external shunt resistor |
| A0 & A1 | Address Pins: Used to set the I²C address by tying them to GND, VS, SDA, or SCL |
| ALERT | Programmable Alert: Open-drain output that can trigger on over/under voltage or current thresholds |
Typical Wiring (High-Side Sensing)
The Texas Instruments INA226 supports up to 16 unique I²C addresses. The address is set by connecting the two address pins (A0 and A1) to one of four possible points: GND, VS (power supply), SDA, or SCL.
The default address is 0x40 (when both pins are connected to GND).
| A1 Pin | A0 Pin | Hex Address |
|---|---|---|
| GND | GND | 0x40 |
| GND | VS | 0x41 |
| GND | SDA | 0x42 |
| GND | SCL | 0x43 |
| VS | GND | 0x44 |
| VS | VS | 0x45 |
| VS | SDA | 0x46 |
| VS | SCL | 0x47 |
| SDA | GND | 0x48 |
| SDA | VS | 0x49 |
| SDA | SDA | 0x4A |
| SDA | SCL | 0x4B |
| SCL | GND | 0x4C |
| SCL | VS | 0x4D |
| SCL | SDA | 0x4E |
| SCL | SCL | 0x4F |
In the Arduino IDE, go to Tools > Manage Libraries, search for “INA226_WE”, and install the version by Wollewald.
This sketch initializes the sensor at the default address (0x40) and prints current, voltage, and power to the Serial Monitor.
#include <Wire.h> #include <INA226_WE.h> #define I2C_ADDRESS 0x40 INA226_WE ina226 = INA226_WE(I2C_ADDRESS); void setup() { Serial.begin(9600); Wire.begin(); // Initialize INA226 if (!ina226.init()) { Serial.println("Failed to find INA226 chip. Check wiring!"); while (1); } /* Optional: Calibrate for your shunt. The default is usually 0.1 Ohm. Parameters: (Shunt value in Ohms, Max expected current in Amps) */ ina226.waitUntilConversionCompleted(); Serial.println("INA226 Ready!"); } void loop() { float shuntVoltage_mV = 0.0; float loadVoltage_V = 0.0; float busVoltage_V = 0.0; float current_mA = 0.0; float power_mW = 0.0; // Read values ina226.readAndClearFlags(); shuntVoltage_mV = ina226.getShuntVoltage_mV(); busVoltage_V = ina226.getBusVoltage_V(); current_mA = ina226.getCurrent_mA(); power_mW = ina226.getBusPower_mW(); loadVoltage_V = busVoltage_V + (shuntVoltage_mV / 1000); // Print results Serial.print("Bus Voltage: "); Serial.print(busVoltage_V); Serial.println(" V"); Serial.print("Current: "); Serial.print(current_mA); Serial.println(" mA"); Serial.print("Power: "); Serial.print(power_mW); Serial.println(" mW"); Serial.println("---------------------------"); delay(2000); }
The INA228 is an ultra-precise, high-resolution digital power, energy, and charge monitor with an I²C interface. It is significantly more advanced than the INA219 or INA226, featuring a 20-bit ADC and a common-mode voltage range of –0.3V to +85V.
Key Specifications
| Pin No. | Name | Type | Description |
|---|---|---|---|
| 1 | A1 | Digital Input | Address Pin: Connect to GND, VS, SDA, or SCL to set the I²C address. |
| 2 | A0 | Digital Input | Address Pin: Works with A1 to configure one of 16 possible addresses. |
| 3 | Alert | Digital Output | Open-drain Alert: Triggers on over/under voltage, current, or power limits. |
| 4 | SDA | Digital I/O | Serial Data: Bidirectional I²C/SMBUS data line. |
| 5 | SCL | Digital I/O | Serial Clock: I²C/SMBUS clock input. |
| 6 | VS | Power | Supply Voltage: 2.7V to 5.5V to power the device. |
| 7 | GND | Analog | Ground: Common ground for the device. |
| 8 | VBUS | Analog Input | Bus Voltage Input: Monitors the 0V to 85V bus voltage. |
| 9 | IN– | Analog Input | Negative Shunt Input: Connect to the load side of the shunt resistor. |
| 10 | IN+ | Analog Input | Positive Shunt Input: Connect to the supply side of the shunt resistor. |
This sketch initializes the sensor and prints real-time power data to the Serial Monitor at 115200 baud.
#include <Adafruit_INA228.h> // Initialize with default I2C address 0x40 Adafruit_INA228 ina228 = Adafruit_INA228(); void setup() { Serial.begin(115200); if (!ina228.begin()) { Serial.println("Failed to find INA228 chip"); while (1) delay(10); } // Configure: Shunt Resistance = 0.015 Ohms, Max Expected Current = 10A ina228.setShunt(0.015, 10.0); } void loop() { Serial.print("Bus Voltage: "); Serial.print(ina228.getBusVoltage_V()); Serial.println(" V"); Serial.print("Current: "); Serial.print(ina228.getCurrent_mA()); Serial.println(" mA"); delay(1000); }
The INA237 is an ultra-precise, 16-bit digital power monitor designed for high-side or low-side current sensing in systems up to 85V. It is part of a modern family of sensors from Texas Instruments that includes the INA228 and INA238.
Key Specifications
The INA237 uses the same pinout as the INA228 and INA238, making them hardware-equivalent in many designs.
| Pin No. | Name | Type | Description |
|---|---|---|---|
| 1 | A1 | Digital Input | Address Pin: Sets the I2C address (connect to GND, VS, SDA, or SCL). |
| 2 | A0 | Digital Input | Address Pin: Used with A1 to select 1 of 16 addresses. |
| 3 | Alert | Digital Output | Alert Output: Open-drain pin for diagnostic reports or conversion-ready signals. |
| 4 | SDA | Digital I/O | Serial Data: Bidirectional data line for I2C communication. |
| 5 | SCL | Digital I/O | Serial Clock: Clock input for I2C communication. |
| 6 | VS | Power | Supply Voltage: Powers the device (2.7V to 5.5V). |
| 7 | GND | Power | Ground: Common ground for both power and logic. |
| 8 | VBUS | Analog Input | Bus Voltage: Sense input for monitoring the 0V to 85V bus voltage. |
| 9 | IN– | Analog Input | Negative Shunt Input: Connect to the load side of the shunt resistor. |
| 10 | IN+ | Analog Input | Positive Shunt Input: Connect to the supply side of the shunt resistor. |
This code initializes the sensor and prints the Bus Voltage, Current, and Power to the Serial Monitor.
#include <Adafruit_INA237.h> // Initialize sensor (Default address is 0x40) Adafruit_INA237 ina237 = Adafruit_INA237(); void setup() { Serial.begin(115200); while (!Serial) delay(10); // Wait for Serial Monitor Serial.println("Adafruit INA237 Test"); if (!ina237.begin()) { Serial.println("Failed to find INA237 chip. Check wiring!"); while (1) delay(10); } // --- CALIBRATION --- // setShunt(Shunt Resistance in Ohms, Max Expected Current in Amps) // Example: 0.1 Ohm resistor, 2 Amp max current ina237.setShunt(0.1, 2.0); Serial.println("INA237 Initialized."); } void loop() { // Read values from the sensor float voltage_V = ina237.getBusVoltage_V(); float current_mA = ina237.getCurrent_mA(); float power_mW = ina237.getPower_mW(); float temp_C = ina237.getDieTemperature_C(); // Print results Serial.print("Bus Voltage: "); Serial.print(voltage_V); Serial.println(" V"); Serial.print("Current: "); Serial.print(current_mA); Serial.println(" mA"); Serial.print("Power: "); Serial.print(power_mW); Serial.println(" mW"); Serial.print("Temperature: "); Serial.print(temp_C); Serial.println(" C"); Serial.println("---------------------------------"); delay(2000); // Wait 2 seconds between readings }
The INA238 is an ultra-precise digital power monitor featuring a 16-bit delta-sigma ADC designed for high-side or low-side current sensing in high-voltage systems up to 85V.
Key Specifications
| Pin No. | Name | Type | Description |
|---|---|---|---|
| 1 | A1 | Digital Input | Address Pin 1: Sets the I²C address by connecting to GND, VS, SDA, or SCL. |
| 2 | A0 | Digital Input | Address Pin 0: Used with A1 to select 1 of 16 possible I2C addresses. |
| 3 | Alert | Digital Output | Alert Output: Open-drain pin for over/under limit notifications or conversion-ready status. |
| 4 | SDA | Digital I/O | Serial Data: Bidirectional I²C/SMBUS data line. |
| 5 | SCL | Digital I/O | Serial Clock: I²C/SMBUS clock input. |
| 6 | VS | Power | Supply Voltage: 2.7V to 5.5V input to power the device. |
| 7 | GND | Power | Ground: Common ground for the device. |
| 8 | VBUS | Analog Input | Bus Voltage: Monitors the 0V to 85V bus voltage. |
| 9 | IN– | Analog Input | Negative Shunt Input: Connect to the load side of the shunt resistor. |
| 10 | IN+ | Analog Input | Positive Shunt Input: Connect to the supply side of the shunt resistor. |
The INA238 uses the same 16-bit register structure as the INA237, so the code is nearly identical. You can use the Adafruit INA238 library for a quick setup.
#include <Adafruit_INA238.h> // Create the sensor object (Default I2C address is 0x40) Adafruit_INA238 ina238 = Adafruit_INA238(); void setup() { Serial.begin(115200); while (!Serial) delay(10); // Wait for Serial Monitor Serial.println("INA238 Precision Power Monitor Test"); // Try to initialize the chip if (!ina238.begin()) { Serial.println("Failed to find INA238 chip. Check wiring!"); while (1) delay(10); } // --- CALIBRATION --- // setShunt(Shunt Resistance in Ohms, Max Expected Current in Amps) // Example: 0.1 Ohm resistor, 1.0 Amp max current ina238.setShunt(0.1, 1.0); Serial.println("INA238 Initialized successfully."); } void loop() { // Read sensor data float bus_v = ina238.getBusVoltage_V(); float current_ma = ina238.getCurrent_mA(); float power_mw = ina238.getPower_mW(); float die_temp = ina238.getDieTemperature_C(); // Print results to Serial Monitor Serial.print("Bus Voltage: "); Serial.print(bus_v); Serial.println(" V"); Serial.print("Current: "); Serial.print(current_ma); Serial.println(" mA"); Serial.print("Power: "); Serial.print(power_mw); Serial.println(" mW"); Serial.print("Die Temp: "); Serial.print(die_temp); Serial.println(" C"); Serial.println("------------------------------------"); delay(1000); // 1-second update rate }
Tips for the INA238
The INA260 is a high-precision digital power monitor that stands out for its integrated precision shunt resistor. This makes it a “one-stop” solution for measuring current, voltage, and power without an external sense resistor.
Key Specifications
Although the chip features 16 pins, many breakout boards simplify this layout. The original chip pinout includes several high-current pins, which help ensure low resistance and better heat dissipation.
| Pin No. | Name | Type | Description |
|---|---|---|---|
| 1, 2, 3 | IN+ | Analog Input | Positive Current Path: Connect to the supply for high-side sensing. |
| 4 | A1 | Digital Input | Address Pin: Connect to GND, VS, SDA, or SCL to set the I²C address. |
| 5 | A0 | Digital Input | Address Pin: Used with A1 to configure 1 of 16 addresses. |
| 6, 11 | GND | Power | Ground: Common ground for analog and digital circuits. |
| 7 | ALERT | Digital Output | Alert Pin: Open-drain output for over-limit or conversion-ready signals. |
| 8 | SDA | Digital I/O | Serial Data: Bidirectional I²C data line. |
| 9 | SCL | Digital I/O | Serial Clock: I²C clock input. |
| 10 | VS | Power | Supply Voltage: 2.7V to 5.5V to power the sensor logic. |
| 12 | VBUS | Analog Input | Bus Voltage Sense: Measures the actual voltage of the line (0V to 36V). |
| 14, 15, 16 | IN– | Analog Input | Negative Current Path: Connect to the load for high-side sensing. |
This sketch initializes the sensor and prints Voltage, Current, and Power to the Serial Monitor at 115200 baud
#include <Adafruit_INA260.h> // Create the sensor object Adafruit_INA260 ina260 = Adafruit_INA260(); void setup() { Serial.begin(115200); while (!Serial) delay(10); // Wait for Serial Monitor to open Serial.println("Adafruit INA260 Test"); // Default I2C address is 0x40 if (!ina260.begin()) { Serial.println("Couldn't find INA260 chip. Check wiring!"); while (1); } Serial.println("Found INA260!"); } void loop() { // Read and print Voltage (mV) Serial.print("Voltage: "); Serial.print(ina260.readBusVoltage()); Serial.println(" mV"); // Read and print Current (mA) Serial.print("Current: "); Serial.print(ina260.readCurrent()); Serial.println(" mA"); // Read and print Power (mW) Serial.print("Power: "); Serial.print(ina260.readPower()); Serial.println(" mW"); Serial.println(""); delay(1000); }
Pro Tips for INA260
The INA3221 is a high-side current and bus voltage monitor with three independent channels and an I²C-compatible interface. It is essentially a triple-channel version of the popular INA219, allowing you to monitor three separate power rails with a single chip.
Key Specifications
The INA3221 features several specialized alert pins not found on simpler monitors.
| Pin Name | Type | Description |
|---|---|---|
| IN+ [1, 2, 3] | Analog Input | Positive Shunt Input: Connect to the supply side of the shunt resistor for each channel. |
| IN- [1, 2, 3] | Analog Input | Negative Shunt Input: Connect to the load side. Bus voltage is also measured here. |
| VS | Power | Supply Voltage: 2.7V to 5.5V. |
| GND | Power | Ground: All loads and the supply must share this common ground. |
| SCL/SDA | Digital I/O | I²C Interface: Clock and data lines for communication. |
| A0 | Digital Input | Address Select: Tie to GND, VS, SDA, or SCL to set the I²C address. |
| Critical | Digital Output | Critical Alert: Triggers immediately when a programmed current limit is exceeded. |
| Warning | Digital Output | Warning Alert: Triggers based on an averaged current value to avoid false alarms. |
| PV (Power Valid) | Digital Output | Goes high once all enabled channels reach a predefined voltage (default 10V). |
| TC (Timing Control) | Digital Output | Monitors power-supply sequencing at power-up. |
Important Usage Notes
| A0 Pin Connection | Hex Address | Decimal |
|---|---|---|
| GND (Ground) | 0x40 | 64 |
| VS (VCC) | 0x41 | 65 |
| SDA | 0x42 | 66 |
| SCL | 0x43 | 67 |
Wiring Reminder
The INA3221 is primarily for high-side sensing. Connect your power source to IN+ and your load to IN- for each channel you wish to monitor.
To use the INA3221 with an Arduino, the Adafruit INA3221 Library is highly recommended for its ease of use and support for all three channels.
This sketch initializes the sensor and prints the voltage and current for all three channels to the Serial Monitor at 115200 baud.
#include <Adafruit_INA3221.h> // Initialize sensor (Default address 0x40) Adafruit_INA3221 ina3221; void setup() { Serial.begin(115200); while (!Serial) delay(10); // Wait for Serial Monitor Serial.println("Adafruit INA3221 Test"); if (!ina3221.begin()) { Serial.println("Failed to find INA3221 chip. Check wiring!"); while (1) delay(10); } // Set shunt resistance for all channels (Standard modules use 0.1 or 0.05 Ohms) // For 0.1 Ohm shunts: for (uint8_t i = 0; i < 3; i++) { ina3221.setShuntResistance(i, 0.1); } Serial.println("INA3221 Initialized."); } void loop() { for (uint8_t i = 0; i < 3; i++) { float voltage = ina3221.getBusVoltage(i); float current_mA = ina3221.getCurrentAmps(i) * 1000.0; // Convert to mA Serial.print("Channel "); Serial.print(i + 1); Serial.print(": "); Serial.print(voltage, 2); Serial.print(" V, "); Serial.print(current_mA, 2); Serial.println(" mA"); } Serial.println("---------------------------------"); delay(2000); // Update every 2 seconds }
Key Functions
This page has been accessed for: Today: 5, Until now: 42