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, manufactured by Sensor, is a high-side current shunt monitor with an integrated I2C interface. It is designed to measure both current and voltage with high precision, thanks to its built-in analog-to-digital converter (ADC). The INA226 is widely used in power monitoring applications, offering a versatile solution for tracking energy consumption in electronic devices.

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

  • Power monitoring in servers, computers, and networking equipment
  • Battery management systems
  • Solar inverters and renewable energy systems
  • Industrial automation and motor control
  • Consumer electronics requiring precise power measurement

Technical Specifications

The INA226 is a robust and versatile component with the following key specifications:

Parameter Value
Supply Voltage (VCC) 2.7V to 5.5V
Input Voltage Range 0V to 36V
Current Measurement Range Configurable via external shunt
ADC Resolution 16-bit
Communication Interface I2C (up to 400 kHz)
Operating Temperature Range -40°C to +125°C
Power Consumption 330 µA (typical)

Pin Configuration and Descriptions

The INA226 is available in a small package with the following pinout:

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

Usage Instructions

The INA226 is straightforward to use in a circuit, but proper configuration and calibration are essential for accurate measurements.

Basic Circuit Connection

  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 between the load and the ground. Connect the VIN+ and VIN- pins across the shunt resistor.
  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: 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 threshold events, such as overcurrent or undervoltage conditions.

Arduino UNO Example Code

The INA226 can be easily interfaced with an Arduino UNO using the Wire library. Below is an example code snippet to read voltage and current:

#include <Wire.h>

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

// Register addresses
#define REG_BUS_VOLTAGE 0x02
#define REG_CURRENT     0x04

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

  // Configure INA226 (e.g., calibration, averaging, etc.)
  configureINA226();
}

void loop() {
  float busVoltage = readBusVoltage(); // Read bus voltage in volts
  float current = readCurrent();       // Read current in amps

  // Print the results to the serial monitor
  Serial.print("Bus Voltage: ");
  Serial.print(busVoltage);
  Serial.println(" V");

  Serial.print("Current: ");
  Serial.print(current);
  Serial.println(" A");

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

void configureINA226() {
  // Example: Write calibration value to the INA226
  Wire.beginTransmission(INA226_ADDRESS);
  Wire.write(0x05); // Calibration register address
  Wire.write(0x10); // High byte of calibration value
  Wire.write(0x00); // Low byte of calibration value
  Wire.endTransmission();
}

float readBusVoltage() {
  uint16_t rawValue = readRegister(REG_BUS_VOLTAGE);
  return rawValue * 0.00125; // Convert to volts (1.25 mV per LSB)
}

float readCurrent() {
  uint16_t rawValue = readRegister(REG_CURRENT);
  return rawValue * 0.001; // Convert to amps (example scaling factor)
}

uint16_t readRegister(uint8_t reg) {
  Wire.beginTransmission(INA226_ADDRESS);
  Wire.write(reg); // Specify the register to read
  Wire.endTransmission();

  Wire.requestFrom(INA226_ADDRESS, 2); // Request 2 bytes
  uint16_t value = (Wire.read() << 8) | Wire.read(); // Combine MSB and LSB
  return value;
}

Important Considerations

  • Shunt Resistor Selection: Choose a shunt resistor with a low temperature coefficient and appropriate resistance to ensure accurate current measurements.
  • Calibration: Properly calibrate the INA226 for your specific shunt resistor to achieve precise results.
  • I2C Pull-Up Resistors: Ensure the I2C lines have appropriate pull-up resistors to maintain reliable communication.
  • Voltage Range: Do not exceed the maximum input voltage of 36V to avoid damaging the device.

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 matches the configuration of the ADDR pin.
  2. Incorrect Voltage or Current Readings:

    • Check the shunt resistor value and ensure it matches the calibration settings.
    • Verify the connections to the VIN+ and VIN- pins.
  3. Alert Pin Not Functioning:

    • Confirm that the alert thresholds are correctly configured in the INA226 registers.
    • Check the connection to the ALERT pin.

Tips for Troubleshooting

  • Use an I2C scanner sketch to verify the INA226 is detected on the I2C bus.
  • Double-check all wiring and connections for loose or incorrect placements.
  • Refer to the INA226 datasheet for detailed register descriptions and configuration options.

By following this documentation, you can effectively integrate the INA226 into your projects for precise power monitoring and management.