The GRAVITY I2C WATTMETER (Part ID: WATTMETER) is a digital power meter designed to measure voltage, current, and power consumption in real-time. It utilizes the I2C communication protocol, making it easy to integrate into microcontroller-based systems. This component is ideal for applications such as energy monitoring, battery management, and power optimization in electronic devices.
The GRAVITY I2C WATTMETER is designed for precision and ease of use. Below are its key technical details:
Parameter | Value |
---|---|
Operating Voltage | 3.3V to 5V |
Measurement Voltage Range | 0V to 26V |
Measurement Current Range | 0A to 3.2A |
Communication Protocol | I2C |
I2C Address (Default) | 0x40 |
Power Consumption | < 10mA |
Measurement Accuracy | ±1% |
Operating Temperature | -40°C to 85°C |
Dimensions | 42mm x 32mm |
The GRAVITY I2C WATTMETER has a 4-pin interface for easy connection. Below is the pinout:
Pin Name | Description |
---|---|
VCC | Power supply input (3.3V to 5V) |
GND | Ground |
SDA | I2C data line |
SCL | I2C clock line |
The GRAVITY I2C WATTMETER is straightforward to use in a circuit. Follow the steps below to integrate it into your project:
VCC
pin to a 3.3V or 5V power source and the GND
pin to ground.SDA
pin to the I2C data line and the SCL
pin to the I2C clock line of your microcontroller.SDA
and SCL
lines if your microcontroller does not have internal pull-ups.Below is an example of how to use the GRAVITY I2C WATTMETER with an Arduino UNO to measure voltage, current, and power:
VCC
→ 5V on ArduinoGND
→ GND on ArduinoSDA
→ A4 on ArduinoSCL
→ A5 on Arduino#include <Wire.h>
// I2C address of the GRAVITY I2C WATTMETER
#define WATTMETER_ADDRESS 0x40
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Start serial communication for debugging
Serial.println("GRAVITY I2C WATTMETER Example");
}
void loop() {
Wire.beginTransmission(WATTMETER_ADDRESS);
Wire.write(0x00); // Command to request data (check datasheet for details)
Wire.endTransmission();
Wire.requestFrom(WATTMETER_ADDRESS, 6); // Request 6 bytes of data
if (Wire.available() == 6) {
uint16_t voltage = Wire.read() << 8 | Wire.read(); // Read voltage (2 bytes)
uint16_t current = Wire.read() << 8 | Wire.read(); // Read current (2 bytes)
uint16_t power = Wire.read() << 8 | Wire.read(); // Read power (2 bytes)
// Convert raw data to meaningful values
float voltageValue = voltage * 0.001; // Convert to volts
float currentValue = current * 0.001; // Convert to amps
float powerValue = power * 0.001; // Convert to watts
// Print the results
Serial.print("Voltage: ");
Serial.print(voltageValue);
Serial.println(" V");
Serial.print("Current: ");
Serial.print(currentValue);
Serial.println(" A");
Serial.print("Power: ");
Serial.print(powerValue);
Serial.println(" W");
}
delay(1000); // Wait 1 second before the next reading
}
No Data on Serial Monitor
Inaccurate Measurements
Device Not Detected
SDA
and SCL
lines.Q: Can the wattmeter measure negative current?
A: No, the GRAVITY I2C WATTMETER is designed for unidirectional current measurement only.
Q: Can I change the I2C address?
A: The default I2C address is 0x40. Refer to the datasheet for instructions on changing the address if supported.
Q: Is it compatible with 3.3V microcontrollers?
A: Yes, the wattmeter supports both 3.3V and 5V logic levels.
Q: How do I improve measurement accuracy?
A: Use a stable power supply, avoid noisy environments, and ensure proper calibration.
This concludes the documentation for the GRAVITY I2C WATTMETER. For further details, refer to the manufacturer's datasheet or support resources.