Your cart is empty.
Your cart is empty.WWZMDiB INA219 Current Sensor Module Two -way current I2C IIC Interface Compatible with for Arduino Raspberry Pi
TS
Reviewed in the United States on September 30, 2023
I was able to use the INA219 module with ESP8266 NodeMCU & an OLED SSD1315 display to build an energy meter. Soldering the pins was easy. The included wires were useful.Note that the Serial address of this device is 0x40 which what the library assumes so you don't have to change it.This is part of the sketch I used to make this work. Hope others find it useful. Import the Adafruit INA219 library in the Arduino IDE. Plenty of other examples are available on the web.// add to declarations part of sketch#include #include #define I2C_SDA 4 /// ESP8266 NodeMCU SDA pin GPIO4 = D2#define I2C_SCL 5 /// ESP8266 NodeMCU SCL pin GPIO5Adafruit_INA219 ina219;float shuntvoltage = 0.00;float busvoltage = 0.00;float current = 0.00;float loadvoltage = 0.00;// Add to your set upWire.begin (I2C_SDA 4, I2C_SCL 5); // Use correct SDA and SCL pins for your microcontrollerSerial.begin(11520);// code to initialize ina219, loop forever if no chip found if (! ina219.begin()) {Serial.println("No INA219 chip"); while (1) { delay(10); }// code to get data from ina219 shuntvoltage = ina219.getShuntVoltage_mV(); busvoltage = ina219.getBusVoltage_V(); current = ina219.getCurrent_mA(); loadvoltage = busvoltage + (shuntvoltage / 1000);// there are other calibration commands ... you can easily find them on the web
Rich N
Reviewed in the United States on December 6, 2023
When using the Adafruit library this sensor was easy to use with an Arduino UNO. Also very accurate for small miliamp measurements.
Recommended Products