Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use INA 226: Examples, Pinouts, and Specs

Image of INA 226
Cirkit Designer LogoDesign with INA 226 in Cirkit Designer

Introduction

The INA226 is a precision current shunt monitor designed to measure the voltage across a shunt resistor, enabling accurate current measurement. It features a high common-mode voltage range (up to 36V) and integrates a 16-bit ADC for precise measurements. The INA226 communicates via an I2C interface, making it easy to integrate into digital systems for power monitoring and energy management.

Explore Projects Built with INA 226

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Battery-Powered Load Cell Amplifier with INA125 and LM324
Image of Test: A project utilizing INA 226 in a practical application
This circuit is a load cell signal conditioning and amplification system. It uses an INA125 instrumentation amplifier to amplify the differential signal from a load cell, with additional filtering and gain control provided by potentiometers and capacitors. The amplified signal is then monitored by a digital voltmeter, and the entire system is powered by a 12V battery with a step-up boost converter to provide stable voltage.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Mega 2560 and INA219 Sensor for Current and Voltage Measurement
Image of INA219_Mega2560: A project utilizing INA 226 in a practical application
This circuit connects an Arduino Mega 2560 to an INA219 sensor for current and voltage measurement. The INA219 sensor communicates with the Arduino via the I2C protocol, and the Arduino reads and prints the current, bus voltage, shunt voltage, and power values to the Serial Monitor.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Motor Control System with INA219 Current Sensor and ST7735S Display
Image of test1: A project utilizing INA 226 in a practical application
This circuit is a motor control system using an ESP32 microcontroller, an INA219 current sensor, and a BTS7960 motor driver. The ESP32 reads current data from the INA219 and controls the motor driver, while a display module shows relevant information. A pushbutton is included for user interaction.
Cirkit Designer LogoOpen Project in Cirkit Designer
Multi-Sensor Monitoring System with INA219, Hall Sensor, and OLED Display
Image of R8 Charger: A project utilizing INA 226 in a practical application
This circuit is designed for monitoring and displaying sensor data. It includes three INA219 current sensors, a GH1248 Hall sensor, and an SSD1306 OLED display, all interfaced with a Seeed Studio RP2350 microcontroller. The microcontroller reads data from the sensors and controls the display and three LEDs.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with INA 226

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Test: A project utilizing INA 226 in a practical application
Battery-Powered Load Cell Amplifier with INA125 and LM324
This circuit is a load cell signal conditioning and amplification system. It uses an INA125 instrumentation amplifier to amplify the differential signal from a load cell, with additional filtering and gain control provided by potentiometers and capacitors. The amplified signal is then monitored by a digital voltmeter, and the entire system is powered by a 12V battery with a step-up boost converter to provide stable voltage.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of INA219_Mega2560: A project utilizing INA 226 in a practical application
Arduino Mega 2560 and INA219 Sensor for Current and Voltage Measurement
This circuit connects an Arduino Mega 2560 to an INA219 sensor for current and voltage measurement. The INA219 sensor communicates with the Arduino via the I2C protocol, and the Arduino reads and prints the current, bus voltage, shunt voltage, and power values to the Serial Monitor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of test1: A project utilizing INA 226 in a practical application
ESP32-Based Motor Control System with INA219 Current Sensor and ST7735S Display
This circuit is a motor control system using an ESP32 microcontroller, an INA219 current sensor, and a BTS7960 motor driver. The ESP32 reads current data from the INA219 and controls the motor driver, while a display module shows relevant information. A pushbutton is included for user interaction.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of R8 Charger: A project utilizing INA 226 in a practical application
Multi-Sensor Monitoring System with INA219, Hall Sensor, and OLED Display
This circuit is designed for monitoring and displaying sensor data. It includes three INA219 current sensors, a GH1248 Hall sensor, and an SSD1306 OLED display, all interfaced with a Seeed Studio RP2350 microcontroller. The microcontroller reads data from the sensors and controls the display and three LEDs.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Power monitoring in embedded systems
  • Battery management systems
  • DC-DC converter efficiency analysis
  • Industrial automation and control
  • Solar power systems and energy metering

Technical Specifications

Key Technical Details

Parameter Value
Supply Voltage (VCC) 2.7V to 5.5V
Common-Mode Voltage Range 0V to 36V
Input Offset Voltage ±10 µV (typical)
Measurement Accuracy ±0.1% (typical)
ADC Resolution 16-bit
I2C Address Range Configurable (7-bit address)
Operating Temperature Range -40°C to +125°C

Pin Configuration and Descriptions

Pin Name Pin Number Description
VIN+ 1 Positive input for differential voltage measurement across the shunt resistor.
VIN- 2 Negative input for differential voltage measurement across the shunt resistor.
GND 3 Ground connection.
VCC 4 Power supply input (2.7V to 5.5V).
SCL 5 I2C clock line for communication.
SDA 6 I2C data line for communication.
ALERT 7 Alert output pin for programmable threshold monitoring.
ADDR 8 Address pin to configure the I2C address.

Usage Instructions

How to Use the INA226 in a Circuit

  1. Power Supply: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to the ground.
  2. Shunt Resistor: Place a precision shunt resistor in series with the load whose current you want to measure. Connect the VIN+ and VIN- pins across the shunt resistor.
  3. I2C Communication: Connect the SCL and SDA pins to the corresponding I2C lines of your microcontroller. Use pull-up resistors (typically 4.7kΩ) on these lines.
  4. Address Configuration: Set the I2C address by connecting the ADDR pin to GND, VCC, or leaving it floating (refer to the datasheet for address mapping).
  5. Alert Pin (Optional): Use the ALERT pin to monitor programmable thresholds for current, voltage, or power.

Best Practices

  • Use a low-resistance, high-precision shunt resistor to minimize power loss and ensure accurate measurements.
  • Keep the traces between the shunt resistor and the INA226 as short as possible to reduce noise.
  • Ensure proper decoupling by placing a 0.1µF capacitor close to the VCC pin.
  • Avoid exceeding the common-mode voltage range (0V to 36V) to prevent damage to the device.

Example Code for Arduino UNO

The following example demonstrates how to configure and read data from the INA226 using an Arduino UNO.

#include <Wire.h>

// INA226 I2C address (default: 0x40)
#define INA226_ADDRESS 0x40

// Register addresses
#define CONFIG_REGISTER 0x00
#define SHUNT_VOLTAGE_REGISTER 0x01
#define BUS_VOLTAGE_REGISTER 0x02

void setup() {
  Wire.begin(); // Initialize I2C communication
  Serial.begin(9600); // Initialize serial communication for debugging

  // Configure the INA226
  Wire.beginTransmission(INA226_ADDRESS);
  Wire.write(CONFIG_REGISTER); // Point to the configuration register
  Wire.write(0x45); // MSB: Set averaging, bus voltage conversion time, etc.
  Wire.write(0x27); // LSB: Set shunt voltage conversion time, mode
  Wire.endTransmission();
}

void loop() {
  int16_t shuntVoltage = readRegister(SHUNT_VOLTAGE_REGISTER);
  int16_t busVoltage = readRegister(BUS_VOLTAGE_REGISTER);

  // Convert raw values to meaningful units
  float shuntVoltage_mV = shuntVoltage * 0.0025; // 2.5µV per LSB
  float busVoltage_V = busVoltage * 0.00125; // 1.25mV per LSB

  // Print the results
  Serial.print("Shunt Voltage (mV): ");
  Serial.println(shuntVoltage_mV);
  Serial.print("Bus Voltage (V): ");
  Serial.println(busVoltage_V);

  delay(1000); // Wait 1 second before the next reading
}

int16_t readRegister(uint8_t reg) {
  Wire.beginTransmission(INA226_ADDRESS);
  Wire.write(reg); // Point to the desired register
  Wire.endTransmission();

  Wire.requestFrom(INA226_ADDRESS, 2); // Request 2 bytes
  while (Wire.available() < 2); // Wait for data

  int16_t value = (Wire.read() << 8) | Wire.read(); // Combine MSB and LSB
  return value;
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No I2C Communication:

    • Ensure the SCL and SDA lines have proper pull-up resistors (4.7kΩ recommended).
    • Verify the I2C address matches the configuration of the ADDR pin.
    • Check for loose or incorrect wiring.
  2. Incorrect Current or Voltage Readings:

    • Verify the shunt resistor value and ensure it matches the calculations in your code.
    • Minimize noise by keeping the shunt resistor traces short and using proper decoupling capacitors.
  3. Device Not Responding:

    • Confirm the power supply voltage is within the specified range (2.7V to 5.5V).
    • Check for shorts or incorrect connections on the PCB.

FAQs

Q: Can the INA226 measure negative currents?
A: Yes, the INA226 can measure bidirectional currents if configured appropriately. Refer to the datasheet for details on setting the calibration register.

Q: What is the maximum shunt voltage the INA226 can measure?
A: The INA226 can measure a maximum shunt voltage of ±81.92mV.

Q: How do I calculate the current from the shunt voltage?
A: Use Ohm's Law: Current (A) = Shunt Voltage (V) / Shunt Resistance (Ω). Ensure the shunt resistor value is known and precise.

Q: Can I use the INA226 with a 5V microcontroller?
A: Yes, the INA226 supports a supply voltage range of 2.7V to 5.5V, making it compatible with 5V systems.