Gravity: I2C Digital Wattmeter SKU: SEN0291-DFRobot

Introduction

Gravity: I2C Digital Wattmeter is a high-resolution, high-precision, large-scale measurement module that can measure the voltage, current and power of various electronic modules and electrical equipment within 26V 8A, and the maximum relative error is less than ±0.2% (A simple manual calibration is required before usage). It can be used for power consumption or battery life evaluation of solar energy systems, battery, motors, controller or electronic modules.

The module adopts TI INA219 zero temperature drift current/power monitoring chip and 2W high power low temperature drift 10mΩ alloy sampling resistor. The voltage and current resolution can reach 4mV and 1mA respectively. Under the full scale measurement condition, the maximum relative error of voltage and current measurement is lower than ±0.2%. It provides also four I2C addresses that can be configured via the 2P DIP switch. The module accurately measures bi-directional high-side currents (current flowing through the power supply or battery positive), which is especially useful in solar or battery fuel gauge applications where the battery needs to be charged and discharged. This status can be simply determined by positive or negative current readings. In the motor applications, the current can be monitored in real time by monitoring whether the motor current is too large due to overload. In addition, you can use this module to measure the power consumption of various electronic modules or the entire project to evaluate battery life.

Features

Application

Specification

Board Overview


No. Label Description
1 VCC Power VCC(3.3~5.5V)
2 GND Power GND
3 SCL I2C clock signal
4 SDA I2C data signal
5 ADDR I2C address DIP switch
6 3P TERMINAL Voltage and current measurement terminal 3P

Arduino Tutorial

This tutorial presents a basic usage of the module with Arduino UNO.

Requirements

Connection Diagram


Calibration



Sample Code


/*!
   file getVoltageCurrentPower.ino
   SEN0291 Gravity: I2C Digital Wattmeter
   The module is connected in series between the power supply and the load to read the voltage, current and power
   The module has four I2C, these addresses are:
   INA219_I2C_ADDRESS1  0x40   A0 = 0  A1 = 0
   INA219_I2C_ADDRESS2  0x41   A0 = 1  A1 = 0
   INA219_I2C_ADDRESS3  0x44   A0 = 0  A1 = 1
   INA219_I2C_ADDRESS4  0x45   A0 = 1  A1 = 1

   Copyright    [DFRobot](https://www.dfrobot.com), 2016
   Copyright    GNU Lesser General Public License
   version  V0.1
   date  2019-2-27
*/

#include <Wire.h>
#include "DFRobot_INA219.h"

DFRobot_INA219_IIC     ina219(&Wire, INA219_I2C_ADDRESS4);

// Revise the following two paramters according to actula reading of the INA219 and the multimeter
// for linearly calibration
float ina219Reading_mA = 1000;
float extMeterReading_mA = 1000;

void setup(void) 
{
    Serial.begin(115200);
    while(!Serial);

    Serial.println();
    while(ina219.begin() != true) {
        Serial.println("INA219 begin faild");
        delay(2000);
    }
    ina219.linearCalibrate(ina219Reading_mA, extMeterReading_mA);
    Serial.println();
}

void loop(void)
{
    Serial.print("BusVoltage:   ");
    Serial.print(ina219.getBusVoltage_V(), 2);
    Serial.println("V");
    Serial.print("ShuntVoltage: ");
    Serial.print(ina219.getShuntVoltage_mV(), 3);
    Serial.println("mV");
    Serial.print("Current:      ");
    Serial.print(ina219.getCurrent_mA(), 1);
    Serial.println("mA");
    Serial.print("Power:        ");
    Serial.print(ina219.getPower_mW(), 1);
    Serial.println("mW");
    Serial.println("");
    delay(1000);
}

Results



Raspberry Pi Tutorial

This tutorial presents a basic usage of the module with Raspberry Pi.

Requirements

Connection Diagram


Installation

pi@raspberrypi: $ cd ~/DFRobot_INA219/RaspberryPi/Python/example
pi@raspberrypi:~/DFRobot_INA219/RaspberryPi/Python/example $ python getVoltageCurrentPower.py

Results



Applications



Note: Since most solar management modules have battery protection that disconnects GND from BAT-. If you connect BAT- to GND as shown in the above diagram to monitor the battery level, it will result in BAT- not being able to disconnect GND and disable the battery protection circuit of the solar management module.

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents

DFshopping_car1.png Get SEN0291 Gravity: I2C Digital Wattmeter from DFRobot Store or DFRobot Distributor.

Turn to the Top