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

How to Use Voltage & current sensor INA219 breakout: Examples, Pinouts, and Specs

Image of Voltage & current sensor INA219 breakout
Cirkit Designer LogoDesign with Voltage & current sensor INA219 breakout in Cirkit Designer

Introduction

The Voltage & Current Sensor INA219 Breakout by Soldered is a high-side current sensor designed to measure voltage, current, and power in a circuit. It features the INA219 chip, which provides precise measurements and communicates via the I2C protocol. This breakout board is ideal for applications requiring real-time power monitoring, such as battery-powered devices, solar power systems, and energy-efficient designs.

Explore Projects Built with Voltage & current sensor INA219 breakout

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Adjustable DC Power Supply with LM317 and 7-Segment Voltmeter
Image of DC variable Power  Supply: A project utilizing Voltage & current sensor INA219 breakout in a practical application
This circuit converts 220V AC to a regulated DC voltage using a power transformer, bridge rectifier, and LM317 voltage regulator. The output voltage can be adjusted using a potentiometer, and the voltage is displayed on a 7-segment panel voltmeter.
Cirkit Designer LogoOpen Project in Cirkit Designer
LM317 Voltage Regulator Circuit with Bridge Rectifier for Stable DC Output
Image of voltage regualator using LM317 IC: A project utilizing Voltage & current sensor INA219 breakout in a practical application
This circuit converts 220V AC to a regulated DC voltage using a bridge rectifier, smoothing capacitors, and an LM317 voltage regulator. The output voltage can be adjusted using a potentiometer connected to the LM317's adjustment pin.
Cirkit Designer LogoOpen Project in Cirkit Designer
AC to DC Power Supply with 7-Segment Voltage Display
Image of BEE PBL: A project utilizing Voltage & current sensor INA219 breakout in a practical application
This circuit is a regulated power supply that converts 220V AC to a lower, stable DC voltage. It includes a step-down transformer, bridge rectifier, voltage regulator, and filtering capacitors. A 7-segment display indicates the output voltage, which can be adjusted using a potentiometer.
Cirkit Designer LogoOpen Project in Cirkit Designer
LM317 Voltage Regulator Circuit for Adjustable Power Supply with Transformer and Diodes
Image of 12V BULB LIGHT DIMMER CIRCUIT: A project utilizing Voltage & current sensor INA219 breakout in a practical application
This circuit is a regulated power supply that converts AC voltage to a stable DC voltage. It uses a transformer to step down the AC voltage, diodes for rectification, an electrolytic capacitor for smoothing, and an LM317 voltage regulator to provide a stable output voltage, which is adjustable via a potentiometer. The output powers a bulb.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Voltage & current sensor INA219 breakout

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 DC variable Power  Supply: A project utilizing Voltage & current sensor INA219 breakout in a practical application
Adjustable DC Power Supply with LM317 and 7-Segment Voltmeter
This circuit converts 220V AC to a regulated DC voltage using a power transformer, bridge rectifier, and LM317 voltage regulator. The output voltage can be adjusted using a potentiometer, and the voltage is displayed on a 7-segment panel voltmeter.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of voltage regualator using LM317 IC: A project utilizing Voltage & current sensor INA219 breakout in a practical application
LM317 Voltage Regulator Circuit with Bridge Rectifier for Stable DC Output
This circuit converts 220V AC to a regulated DC voltage using a bridge rectifier, smoothing capacitors, and an LM317 voltage regulator. The output voltage can be adjusted using a potentiometer connected to the LM317's adjustment pin.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of BEE PBL: A project utilizing Voltage & current sensor INA219 breakout in a practical application
AC to DC Power Supply with 7-Segment Voltage Display
This circuit is a regulated power supply that converts 220V AC to a lower, stable DC voltage. It includes a step-down transformer, bridge rectifier, voltage regulator, and filtering capacitors. A 7-segment display indicates the output voltage, which can be adjusted using a potentiometer.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of 12V BULB LIGHT DIMMER CIRCUIT: A project utilizing Voltage & current sensor INA219 breakout in a practical application
LM317 Voltage Regulator Circuit for Adjustable Power Supply with Transformer and Diodes
This circuit is a regulated power supply that converts AC voltage to a stable DC voltage. It uses a transformer to step down the AC voltage, diodes for rectification, an electrolytic capacitor for smoothing, and an LM317 voltage regulator to provide a stable output voltage, which is adjustable via a potentiometer. The output powers a bulb.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Monitoring power consumption in IoT devices
  • Battery management systems
  • Solar panel performance tracking
  • Robotics and motor control systems
  • General-purpose current and voltage measurement in electronics projects

Technical Specifications

The following table outlines the key technical details of the INA219 breakout board:

Parameter Value
Operating Voltage 3.0V to 5.5V
Current Measurement Range ±3.2A (default shunt resistor)
Voltage Measurement Range 0V to 26V
Communication Interface I2C
Default I2C Address 0x40
Resolution 12-bit ADC
Shunt Resistor Value 0.1Ω (pre-installed)
Power Consumption ~1mA
Dimensions 20mm x 20mm

Pin Configuration

The INA219 breakout board has the following pin layout:

Pin Name Description
1 VIN+ Positive input for current measurement (connect to the high side of the load).
2 VIN- Negative input for current measurement (connect to the low side of the load).
3 GND Ground reference for the breakout board.
4 VCC Power supply input (3.0V to 5.5V).
5 SDA I2C data line for communication.
6 SCL I2C clock line for communication.

Usage Instructions

How to Use the INA219 Breakout in a Circuit

  1. Power the Board: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to the ground of your circuit.
  2. Connect the Load:
    • Attach the VIN+ pin to the positive side of the load.
    • Attach the VIN- pin to the negative side of the load.
  3. I2C Communication:
    • Connect the SDA pin to the I2C data line of your microcontroller.
    • Connect the SCL pin to the I2C clock line of your microcontroller.
  4. Install Required Libraries: If using an Arduino, install the Adafruit INA219 library from the Arduino Library Manager.
  5. Write Code: Use the library to initialize the sensor, read voltage, current, and power values, and display them.

Important Considerations

  • Ensure the load current does not exceed the maximum measurable range of ±3.2A (with the default 0.1Ω shunt resistor).
  • If higher currents need to be measured, replace the shunt resistor with a lower value and adjust the calculations in the code accordingly.
  • Keep I2C lines (SDA and SCL) as short as possible to avoid communication issues.
  • Use pull-up resistors on the I2C lines if your microcontroller does not have internal pull-ups enabled.

Example Arduino Code

Below is an example Arduino sketch to read voltage, current, and power using the INA219 breakout:

#include <Wire.h>
#include <Adafruit_INA219.h>

// Create an instance of the INA219 sensor
Adafruit_INA219 ina219;

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud
  while (!Serial) {
    delay(10); // Wait for the serial monitor to open
  }

  // Initialize the INA219 sensor
  if (!ina219.begin()) {
    Serial.println("Failed to find INA219 chip");
    while (1) {
      delay(10); // Halt execution if the sensor is not detected
    }
  }
  Serial.println("INA219 sensor initialized successfully!");
}

void loop() {
  float shuntVoltage = ina219.getShuntVoltage_mV(); // Read shunt voltage in mV
  float busVoltage = ina219.getBusVoltage_V();      // Read bus voltage in V
  float current_mA = ina219.getCurrent_mA();        // Read current in mA
  float power_mW = ina219.getPower_mW();            // Read power in mW

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

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

  Serial.print("Current: ");
  Serial.print(current_mA);
  Serial.println(" mA");

  Serial.print("Power: ");
  Serial.print(power_mW);
  Serial.println(" mW");

  Serial.println("-----------------------------------");
  delay(1000); // Wait 1 second before taking the next reading
}

Troubleshooting and FAQs

Common Issues

  1. No Communication with the Sensor:

    • Ensure the I2C address (default: 0x40) matches the address in your code.
    • Check the connections for SDA and SCL pins.
    • Verify that pull-up resistors are present on the I2C lines if required.
  2. Incorrect Readings:

    • Confirm that the load current is within the measurable range of the sensor.
    • Check for loose or incorrect connections on the VIN+ and VIN- pins.
    • Ensure the shunt resistor value matches the default or is correctly configured in the code.
  3. Sensor Not Detected:

    • Verify that the VCC and GND pins are properly connected to the power supply.
    • Use an I2C scanner sketch to confirm the sensor's address.

FAQs

Q: Can the INA219 measure negative currents?
A: Yes, the INA219 can measure bidirectional currents. However, you may need to configure the sensor for this mode in your code.

Q: How can I measure higher currents?
A: Replace the default 0.1Ω shunt resistor with a lower value (e.g., 0.01Ω) to increase the measurable current range. Update the calibration settings in your code accordingly.

Q: What is the maximum voltage the INA219 can measure?
A: The INA219 can measure up to 26V on the bus voltage line. Ensure the voltage does not exceed this limit to avoid damage.

Q: Can I use the INA219 with a 3.3V microcontroller?
A: Yes, the INA219 is compatible with both 3.3V and 5V systems. Ensure the VCC pin is connected to the appropriate voltage source.