Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

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

Image of INA 226Design 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!
Image of Battery-Powered Load Cell Amplifier with INA125 and LM324: 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.

Open Project in Cirkit Designer

Common Applications

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

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.