The CJMCU-219 is a breakout board featuring the INA219 IC, a zero-drift, bidirectional current and power monitor with an I²C interface.
Core Technical Specifications
Key Features
Safety & Limitations
These pins connect to your microcontroller (e.g., Arduino or Raspberry Pi) to power the sensor and transmit data.
Measurement (Load) Pins
These pins are placed in series with the positive side (high-side) of the circuit you want to monitor.
I²C addressing Pins (A0 & A1)
Some versions of the CJMCU-219 include solder pads labeled A0 and A1. By default, these are connected to GND, setting the I2C address to 0x40.
Bridging these pads to VCC allows you to set the address to any of 16 values (0x4F), enabling multiple sensors on the same I²C bus.
Caution: The maximum bus voltage the Vin pins can safely handle is 26V DC.
To begin using the CJMCU-219 with Arduino, the easiest approach is to use the Adafruit INA219 library.
This example code sets up the sensor and outputs voltage, current, and power readings to the Serial Monitor at 115200 baud.
A simple example with the Adafruit_INA219 library involves initializing the sensor and repeatedly reading and displaying bus voltage, shunt voltage, load voltage, current, and power. The complete code is available in the provided source document.
#include <Wire.h> #include <Adafruit_INA219.h> Adafruit_INA219 ina219; void setup(void) { Serial.begin(115200); while (!Serial) { delay(1); } // Wait for serial port to connect // Initialize the INA219 (default address 0x40) if (!ina219.begin()) { Serial.println("Failed to find INA219 chip"); while (1) { delay(10); } } // Optional: Set calibration for higher precision // Default is 32V, 2A. Alternatives: // ina219.setCalibration_32V_1A(); // ina219.setCalibration_16V_400mA(); Serial.println("Measuring voltage and current with INA219..."); } void loop(void) { float shuntvoltage = 0; float busvoltage = 0; float current_mA = 0; float loadvoltage = 0; float power_mW = 0; // Read data from sensor shuntvoltage = ina219.getShuntVoltage_mV(); busvoltage = ina219.getBusVoltage_V(); current_mA = ina219.getCurrent_mA(); power_mW = ina219.getPower_mW(); loadvoltage = busvoltage + (shuntvoltage / 1000); // Print results Serial.print("Bus Voltage: "); Serial.print(busvoltage); Serial.println(" V"); Serial.print("Shunt Voltage: "); Serial.print(shuntvoltage); Serial.println(" mV"); Serial.print("Load Voltage: "); Serial.print(loadvoltage); Serial.println(" V"); Serial.print("Current: "); Serial.print(current_mA); Serial.println(" mA"); Serial.print("Power: "); Serial.print(power_mW); Serial.println(" mW"); Serial.println(""); delay(2000); }Key Functions Explained
Calibration for Accuracy
The library includes built-in calibration modes to improve precision for specific ranges:
This page has been accessed for: Today: 3, Until now: 3