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

How to Use INA226 (đã gỡ điện trở shunt): Examples, Pinouts, and Specs

Image of INA226 (đã gỡ điện trở shunt)
Cirkit Designer LogoDesign with INA226 (đã gỡ điện trở shunt) in Cirkit Designer

Introduction

The INA226 is a high-side current shunt monitor designed to measure the voltage across a shunt resistor to determine the current flowing through it. It integrates a precision ADC (Analog-to-Digital Converter) and communicates via an I2C interface, making it highly versatile for power monitoring and management applications. The INA226 supports a wide supply voltage range and provides accurate measurements of both current and bus voltage, enabling real-time power calculations.

Explore Projects Built with INA226 (đã gỡ điện trở shunt)

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
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 (đã gỡ điện trở shunt) 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
Arduino Mega 2560 and INA219 Sensor for Current and Voltage Measurement
Image of INA219_Mega2560: A project utilizing INA226 (đã gỡ điện trở shunt) 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 Solar Power Monitoring System with MPPT and INA219
Image of lapmag: A project utilizing INA226 (đã gỡ điện trở shunt) in a practical application
This circuit is designed to monitor the voltage and current of a solar panel using an ESP32 Devkit V1 microcontroller and an INA219 current sensor. The ESP32 reads data from the INA219 via I2C communication (using pins D21 and D22 for SDA and SCL, respectively) and reports voltage, current, and power measurements over a serial connection. The solar panel is connected to an MPPT solar charge controller, which is in turn connected to the INA219 for monitoring its output.
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 (đã gỡ điện trở shunt) 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

Explore Projects Built with INA226 (đã gỡ điện trở shunt)

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 Gen Shed Xiao ESP32C3 INA3221 AHT21 -1: A project utilizing INA226 (đã gỡ điện trở shunt) 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 INA219_Mega2560: A project utilizing INA226 (đã gỡ điện trở shunt) 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 lapmag: A project utilizing INA226 (đã gỡ điện trở shunt) in a practical application
ESP32-Based Solar Power Monitoring System with MPPT and INA219
This circuit is designed to monitor the voltage and current of a solar panel using an ESP32 Devkit V1 microcontroller and an INA219 current sensor. The ESP32 reads data from the INA219 via I2C communication (using pins D21 and D22 for SDA and SCL, respectively) and reports voltage, current, and power measurements over a serial connection. The solar panel is connected to an MPPT solar charge controller, which is in turn connected to the INA219 for monitoring its output.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of test1: A project utilizing INA226 (đã gỡ điện trở shunt) 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

Common Applications

  • Power monitoring in servers, telecom equipment, and industrial systems
  • Battery management systems (BMS)
  • Solar inverters and energy storage systems
  • DC-DC converter efficiency monitoring
  • General-purpose current and voltage sensing in embedded systems

Technical Specifications

Key Technical Details

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

Pin Configuration and Descriptions

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

Usage Instructions

How to Use the INA226 in a Circuit

  1. Power Supply: Connect the VCC pin to a 2.7V to 5.5V power source and the GND pin to ground.
  2. Shunt Resistor: Connect a precision shunt resistor between the V+ and V- pins. The value of the resistor determines the measurable current range.
  3. I2C Communication: Connect the SDA and SCL pins to the corresponding I2C lines of your microcontroller. Use pull-up resistors (typically 4.7 kΩ) on both lines.
  4. Address Configuration: Set the I2C address by connecting the ADDR pin to GND, VCC, or leaving it floating, as per the datasheet.
  5. Alert Pin (Optional): Use the ALERT pin to monitor programmable thresholds for current, voltage, or power.

Important Considerations

  • Shunt Resistor Selection: Choose a resistor with low tolerance (e.g., 0.1% or better) to ensure accurate current measurements.
  • Voltage Range: Ensure the bus voltage does not exceed 36V to avoid damaging the device.
  • I2C Pull-Up Resistors: Properly size the pull-up resistors for the I2C lines based on the bus capacitance and speed.
  • PCB Layout: Minimize noise by keeping the traces between the shunt resistor and the INA226 as short as possible.

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: 0x40)
#define INA226_ADDRESS 0x40

// INA226 register addresses
#define REG_CONFIG 0x00
#define REG_SHUNT_VOLTAGE 0x01
#define REG_BUS_VOLTAGE 0x02

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

  // Configure the INA226 (default configuration)
  Wire.beginTransmission(INA226_ADDRESS);
  Wire.write(REG_CONFIG); // Point to the configuration register
  Wire.write(0x45);       // MSB of configuration (example value)
  Wire.write(0x27);       // LSB of configuration (example value)
  Wire.endTransmission();
}

void loop() {
  // Read bus voltage
  Wire.beginTransmission(INA226_ADDRESS);
  Wire.write(REG_BUS_VOLTAGE); // Point to the bus voltage register
  Wire.endTransmission();
  Wire.requestFrom(INA226_ADDRESS, 2); // Request 2 bytes
  uint16_t busVoltage = (Wire.read() << 8) | Wire.read();

  // Read shunt voltage
  Wire.beginTransmission(INA226_ADDRESS);
  Wire.write(REG_SHUNT_VOLTAGE); // Point to the shunt voltage register
  Wire.endTransmission();
  Wire.requestFrom(INA226_ADDRESS, 2); // Request 2 bytes
  uint16_t shuntVoltage = (Wire.read() << 8) | Wire.read();

  // Convert readings to meaningful values
  float busVoltage_V = busVoltage * 1.25 / 1000; // Convert to volts
  float shuntVoltage_mV = shuntVoltage * 2.5 / 1000; // Convert to millivolts

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

  Serial.print("Shunt Voltage: ");
  Serial.print(shuntVoltage_mV);
  Serial.println(" mV");

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

Troubleshooting and FAQs

Common Issues

  1. No I2C Communication:

    • Ensure the SDA and SCL lines are connected correctly.
    • Verify that pull-up resistors are present on the I2C lines.
    • Check the I2C address configuration (ADDR pin).
  2. Incorrect Current or Voltage Readings:

    • Verify the shunt resistor value and its connections.
    • Ensure the bus voltage does not exceed the specified range.
    • Check for noise or interference in the shunt resistor traces.
  3. Alert Pin Not Functioning:

    • Confirm that the alert thresholds are configured correctly in the INA226 registers.
    • Ensure the ALERT pin is connected to the microcontroller or monitoring circuit.

Tips for Troubleshooting

  • Use an oscilloscope or logic analyzer to monitor the I2C communication.
  • Double-check the wiring and connections against the datasheet.
  • Test the INA226 with a known current and voltage source to validate its accuracy.

By following this documentation, you can effectively integrate the INA226 into your project for precise current, voltage, and power monitoring.