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

How to Use INA226: Examples, Pinouts, and Specs

Image of INA226
Cirkit Designer LogoDesign with INA226 in Cirkit Designer

Introduction

The INA226 is a high-side current shunt monitor with an integrated I2C interface, designed to measure voltage, current, and power with high precision. It is widely used in applications requiring accurate power monitoring, such as battery management systems, server power monitoring, and industrial automation. The device supports a wide input voltage range and offers programmable calibration for enhanced flexibility.

Explore Projects Built with INA226

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 INA226 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
ESP32-Based Motor Control System with INA219 Current Sensor and ST7735S Display
Image of test1: A project utilizing INA226 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
Solar-Powered Environmental Monitoring System with ESP32-C3 and MPPT Charge Control
Image of Gen Shed Xiao ESP32C3 INA3221 AHT21 -1: A project utilizing INA226 in a practical application
This circuit is designed for solar energy management and monitoring. It includes a 12V AGM battery charged by solar panels through an MPPT charge controller, with voltage monitoring provided by an INA3221 sensor. Additionally, a 3.7V battery is connected to an ESP32-C3 microcontroller and an AHT21 sensor for environmental data collection, with power management handled by a Waveshare Solar Manager.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Emergency Alert System with NUCLEO-F072RB, SIM800L, and GPS NEO 6M
Image of women safety: A project utilizing INA226 in a practical application
This circuit is an emergency alert system that uses a NUCLEO-F072RB microcontroller to send SMS alerts and make calls via a SIM800L GSM module, while obtaining location data from a GPS NEO 6M module. The system is powered by a Li-ion battery and includes a TP4056 module for battery charging and protection, with a rocker switch to control power to the microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with INA226

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 INA226 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 test1: A project utilizing INA226 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 Gen Shed Xiao ESP32C3 INA3221 AHT21 -1: A project utilizing INA226 in a practical application
Solar-Powered Environmental Monitoring System with ESP32-C3 and MPPT Charge Control
This circuit is designed for solar energy management and monitoring. It includes a 12V AGM battery charged by solar panels through an MPPT charge controller, with voltage monitoring provided by an INA3221 sensor. Additionally, a 3.7V battery is connected to an ESP32-C3 microcontroller and an AHT21 sensor for environmental data collection, with power management handled by a Waveshare Solar Manager.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of women safety: A project utilizing INA226 in a practical application
Battery-Powered Emergency Alert System with NUCLEO-F072RB, SIM800L, and GPS NEO 6M
This circuit is an emergency alert system that uses a NUCLEO-F072RB microcontroller to send SMS alerts and make calls via a SIM800L GSM module, while obtaining location data from a GPS NEO 6M module. The system is powered by a Li-ion battery and includes a TP4056 module for battery charging and protection, with a rocker switch to control power to the microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications:

  • Battery management systems
  • Power supply monitoring
  • Energy metering
  • Industrial and automotive systems
  • Server and data center power management

Technical Specifications

Key Technical Details:

  • Supply Voltage (VCC): 2.7V to 5.5V
  • Input Voltage Range: 0V to 36V
  • Current Measurement Range: Determined by external shunt resistor
  • Communication Interface: I2C (up to 1 MHz)
  • Accuracy: ±0.1% (typical)
  • Operating Temperature Range: -40°C to +125°C
  • Power Consumption: 330 µA (typical)
  • Package: 10-pin VSSOP

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.
SCL 4 I2C clock line.
SDA 5 I2C data line.
ALERT 6 Alert output pin for programmable threshold-based alerts.
VCC 7 Power supply input (2.7V to 5.5V).
ADDR 8 I2C address selection pin.
NC 9, 10 No connection (leave unconnected).

Usage Instructions

How to Use the INA226 in a Circuit:

  1. Power Supply: Connect the VCC pin to a 3.3V or 5V power supply and the GND pin to the ground.
  2. Shunt Resistor: Place a precision shunt resistor between the VIN+ and VIN- pins to measure current. The value of the resistor determines the measurable current range.
  3. I2C Interface: Connect the SCL and SDA pins to the corresponding I2C lines of your microcontroller. Use pull-up resistors (typically 4.7 kΩ) on these lines.
  4. Address Configuration: Use the ADDR pin to set the I2C address of the INA226. This allows multiple devices to share the same I2C bus.
  5. Alert Pin (Optional): Connect the ALERT pin to a microcontroller GPIO if you want to use the alert functionality for overcurrent or voltage thresholds.

Important Considerations:

  • Ensure the shunt resistor is of high precision and low temperature coefficient for accurate measurements.
  • The INA226 requires proper calibration for accurate current and power readings. Use the calibration register to set the correct scaling factor based on the shunt resistor value.
  • Avoid exceeding the maximum input voltage (36V) to prevent damage to the device.

Example Code for Arduino UNO:

Below is an example of how to interface the INA226 with an Arduino UNO to measure current and voltage:

#include <Wire.h>

// INA226 I2C address (default is 0x40, adjust if ADDR pin is configured differently)
#define INA226_ADDRESS 0x40

// INA226 register addresses
#define REG_CALIBRATION 0x05
#define REG_CURRENT     0x04
#define REG_BUS_VOLTAGE 0x02

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

  // Configure INA226 calibration register
  Wire.beginTransmission(INA226_ADDRESS);
  Wire.write(REG_CALIBRATION); // Point to calibration register
  Wire.write(0x10); // Write high byte of calibration value
  Wire.write(0x00); // Write low byte of calibration value
  Wire.endTransmission();

  Serial.println("INA226 Initialized");
}

void loop() {
  float current = readCurrent(); // Read current in Amperes
  float voltage = readBusVoltage(); // Read bus voltage in Volts

  Serial.print("Current: ");
  Serial.print(current, 3); // Print current with 3 decimal places
  Serial.println(" A");

  Serial.print("Voltage: ");
  Serial.print(voltage, 3); // Print voltage with 3 decimal places
  Serial.println(" V");

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

float readCurrent() {
  int16_t rawCurrent = readRegister(REG_CURRENT); // Read raw current value
  return rawCurrent * 0.001; // Convert to Amperes (adjust scaling as needed)
}

float readBusVoltage() {
  int16_t rawVoltage = readRegister(REG_BUS_VOLTAGE); // Read raw voltage value
  return rawVoltage * 0.00125; // Convert to Volts (1.25 mV per LSB)
}

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 from the register
  int16_t value = (Wire.read() << 8) | Wire.read(); // Combine high and low bytes
  return value;
}

Notes:

  • Replace the calibration value in the code (0x1000) with the appropriate value based on your shunt resistor.
  • Ensure the I2C pull-up resistors are properly connected to avoid communication issues.

Troubleshooting and FAQs

Common Issues:

  1. No I2C Communication:

    • Ensure the SCL and SDA lines are connected correctly and have pull-up resistors.
    • Verify the I2C address of the INA226 matches the address in your code.
  2. Incorrect Current or Voltage Readings:

    • Check the calibration register value. It must match the shunt resistor's specifications.
    • Verify the shunt resistor's connections and ensure it is of high precision.
  3. Alert Pin Not Functioning:

    • Ensure the alert functionality is configured correctly in the INA226 registers.
    • Check the microcontroller GPIO pin configuration.

Tips for Troubleshooting:

  • Use an I2C scanner sketch to confirm the INA226 is detected on the I2C bus.
  • Double-check all connections, especially the shunt resistor and power supply.
  • Refer to the INA226 datasheet for detailed register descriptions and configuration options.