[SOLVED] Measuring Current Consumption of I2C Memory

I'm using Arduino Uno and talking I2C with an SRAM without issues. I would like to measure how much current being consumed during write/read operations. What is a solution that doesn't need I2C line ?

Arduino Mega solutions are relevant too, I have both boards so I can switch if I need to.

Thanks !


I pretty much got my answer. Insignificance of consumption in this scenario is valid. Also figured out I2C communication. Thanks you all for your time.

Sounds like an X-Y problem to me. Tell us more about why read/write current consumption in this project is a concern - actually, tell us more about the project in general, and why current consumption of an SRAM factors into it.

1 Like

I think you are dealing with nanoampere levels. Datasheet could give you an idea.
If you really need to measure it, google nanoampere current meters

There is none.

Do you have an oscilloscope?

Use a supercapacitor

Measure the time from fully charged to lets say 1 V less, with

  1. nothing connected
  2. the SRAM connected
  3. connected and 100% r/w
1 Like
  1. sense resistor read by analog pin.
  2. SPI-based sesnor.

Good Luck, you will have to probe on a die level and inject a signal as the part will not do either read or write unless commanded to by a command on the I2C interface.

Do you know how to decap the IC? Do you have a layout of the die? Do you have the tools in your toolkit? If you answer no to either of these then just read the data sheet. That would be a transient and I doubt it is characterized.

I would think the datasheet for the SRAM would tell you that, for both reading and writing, and just sitting there. But I suspect far larger currents might be expended through the pullup resistors on the I2C lines when communicating with the SRAM.

Thanks for all the replies. I got a little confused as I progressed so doubling back to step 1. Here is what I have, UNO + daughter board for a memory that speaks I2C. I connected SDA, SDL, 5V, GND.

Then for ex. I'm trying to run example 'I2C Scanner' from Arduino Uno examples. But it gets stuck at Scanning level now...Not sure why its not recognizing right away, I connected everything needed no ?

For current sense I found sth called AC712 5A Module. Or I could probe VCC that's feeding the memory maybe ?

#include <Wire.h>

void setup() {
  Wire.begin();

  Serial.begin(9600);
  while (!Serial); // Leonardo: wait for Serial Monitor
  Serial.println("\nI2C Scanner");
}

void loop() {
  int nDevices = 0;

  Serial.println("Scanning...");

  for (byte address = 1; address < 127; ++address) {
    // The i2c_scanner uses the return value of
    // the Wire.endTransmission to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    byte error = Wire.endTransmission();

    if (error == 0) {
      Serial.print("I2C device found at address 0x");
      if (address < 16) {
        Serial.print("0");
      }
      Serial.print(address, HEX);
      Serial.println("  !");

      ++nDevices;
    } else if (error == 4) {
      Serial.print("Unknown error at address 0x");
      if (address < 16) {
        Serial.print("0");
      }
      Serial.println(address, HEX);
    }
  }
  if (nDevices == 0) {
    Serial.println("No I2C devices found\n");
  } else {
    Serial.println("done\n");
  }
  delay(5000); // Wait 5 seconds for next scan
}

Please explain what you are trying to accomplish? For sure 5A current sensor doesn't help you to sense nanoamp current draw...

1 Like

I'm mostly exploring running a memory application and measuring current while doing so.

That is like measuring the weight of a maple leaf using a truck scale. What do you intend to accomplish if you are successful?

That doesn't explain why you want to measure current draw of the memory. We are talking about current that is less than one amp divided by one million.

1 Like

How to measure current without using the I2C lines of the SRAM

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.