INA219 - Current and voltage sensor (voltammeter) with I²C communication protocol

Ad Code

INA219 - Current and voltage sensor (voltammeter) with I²C communication protocol

 


INA219 - Current and voltage sensor (voltammeter) with I2C communication protocolINA219 DC Current Monitor is a digital sensor for measuring the consumed current, voltage and power based on the INA219B microcircuit. The output interface of the module is the I2C bus, which is very convenient when working with devices based on Arduino, Raspberry Pi, Orange PI, Banana Pi, etc.

The module has high accuracy in measuring current and voltage, zero drift, while having a compact size and does not require additional strapping. Also, an important advantage of the INA219 sensor is that the measuring shunt is installed in the "+" supply break, and not "-", since in this case there is no unwanted potential shift in electronics between the "ground" of several devices combined into a common circuit.

The I2C address of the INA219 microcircuit can be changed by sealing the A0 and A1 jumpers. Four different combinations of setting address jumpers are possible, respectively, up to 4 such modules can be connected to one I2C bus. To increase the measurement accuracy, a calibration register is provided. The voltage in the microcircuit is measured by an analog-to-digital converter (ADC) and can operate in 9, 10, 11, 12-bit modes. The operating mode of the microcircuit is configured by changing the configuration register.

The module can be used in systems that control the process of charging / discharging batteries, power supplies with voltage control and current consumption of the load.

INA219 specifications

  • Supply voltage : 3.0 to 5.5 V;
  • ADC capacity : 12 bits;
  • Output interface : I2C;
  • Interface speed : 3.4 MHz;
  • Measured voltage range : from 0 to 26 V;
  • Maximum measurable current : -3.2 A to 3.2 A;
  • Discreteness when measuring current : 0.8 mA;
  • Accuracy of current and voltage measurements : 1%;
  • Operating temperature range : -40 to +125 ° C;
  • Drive in the operating temperature range : 100 μV;
  • Calibration : calibration register;
  • Internal data : measured current and power;
  • Filtration : x128 samples.

Zero CJMCU-219 module based on INA219

Zero CJMCU-219 module is a complete module that can be connected to various devices, not only to the Arduino platform, but also to Raspberry Pi, Orange PI, Banana Pi, etc. The main element on the board is the INA219 microcircuit. Despite its small size and small pin count, the INA219 has great capabilities. The microcircuit measures the voltage drop across the shunt (a low-resistance resistor across Vin + and Vin-). A shunt with a resistance of 0.1 Ohm is installed on the board.

Zero CJMCU-219 / INA219 schematic diagram

The Zero CJMCU-219 module has a minimum set of components for proper operation of the INA219 sensor.

INA219 - CJMCU-219 schematic diagram

Zero CJMCU-219 / INA219 pinout

The board has 6 + 2 pins, 2 of 6 duplicate Vin + and Vin-.
INA219 - CJMCU-219 Pinout

ConclusionDescription
VccModule power supply from 3.0 to 5.5 V
GndLand
SclSerial CLock
SdaSerial Data Line
Wine-Output voltage from the power supply through a shunt. Voltage is measured from this pin to ground.
Wine +Voltage input from power supply
A0Selecting an I2C address
A1Selecting an I2C address

System for setting I2C address on INA219

If more than one INA219 board is used, each board must be assigned a unique address. This is done using address jumpers on the right edge of the board. The base I2C address for each board is 0x40. The binary address that you program with the address jumpers is added to the I2C base address.

A1A0Address (bin)Address (hex)
GNDGND10000000x40
GNDVS+10000010x41
GNDSDA10000100x42
GNDSCL10000110x43
VS+GND10001000x44
VS+VS+10001010x45
VS+SDA10001100x46
VS+SCL10001110x47
SDAGND10010000x48
SDAVS+10010010x49
SDASDA10010100x4A
SDASCL10010110x4B
SCLGND10011000x4C
SCLVS+10011010x4D
SCLSDA10011100x4E
SCLSCL10011110x4F

To change the address of the I2C bus of the INA219 chip board, you need to solder / unsolder the jumpers on A0 and A1. You can determine the current address using Arduino's I2cScanner .

System for setting I2C address on INA219 - jumpers

Description of registers INA219

The INA219 uses 5 registers to store configuration settings, measurement results, maximum / minimum limits and status information. The table below shows the INA219 registers.

The contents of the register are updated 4 µs after the completion of the write command. Therefore, a 4 µs delay is required between the completion of a write to the specified register and the subsequent reading of that register (without changing the pointer) when using SCL frequencies in excess of 1 MHz.

THE ADDRESSREGISTER NAMEFUNCTIONRESETA TYPE
HEXHEX
0x00ConfigurationsReset all registers, adjust bus voltage range, PGA gain, ADC resolution / averaging.0x399FR/W
0x01Shunt voltageShunt voltage measurement data.R
0x02Bus voltageBus voltage measurement data.R
0x03PowerPower measurement data.0x0000R
0x04CurrentContains the value of the current flowing through the shunt resistor.0x0000R
0x05CalibrationCalibration register. Complete system calibration.0x0000R/W

Block diagram of the INA219 chip

Block diagram of the INA219 chip

Materials (edit)

Download datasheet_ina219.pdf
adafruit_ina219-current-sensor-breakout.pdf
adafruit.com

Close Menu