I am wondering if it is possible to measure the power being consumed by the CPU core (ARM chip) of a Raspberry Pi? Specifically, I want to monitor this power consumption for various applications that are running on this device. I understand it may be possible by some system line commands, however, I am wondering if there is a way (maybe even by using an external device) to get the power readings of the CPU cores, on a much smaller granularity, say every nanosecond or microsecond.

If not the power, Is there a way to do the above for voltage and current readings? That way also, the power can be calculated using V*I.

  • 3
    Does this answer your question? How do I measure the current power consumption?
    – Milliways
    Apr 8, 2022 at 0:02
  • Not fully. That post talks about the power consumption by the Pi itself. Whereas, I want to capture just the CPU Cores (mentioned clearly in my post). Also, I do not want to visualize this using a USB meter, I actually want to record these readings let's say every nanosecond. The concept would be similar to using an Oscilloscope, but I am wondering if there is anything else for Pi.
    – noobcoder
    Apr 8, 2022 at 15:11
  • @noobcoder Some USB meters have built-in bluetooth, and you can capture the data with a linux tool. However, There definately aren't any that will do it on the nanosecond scale. That's 1 million time a second.
    – cybernard
    Apr 8, 2022 at 19:33
  • @cybernard Actually a nanosecond is a billionth of a second. You'd need a sensor that fast, and an equally fast logging device.
    – NomadMaker
    Sep 7, 2022 at 22:11

1 Answer 1

  1. There are no ways to get the power consumption of CPU of RPi directly without modifying the hardware.
  2. 1 nanosecond intervals corresponds to 1 GHz sampling rate, so measuring anything at this rate is a challenge by itself. One would need a full system designed for few GHz bandwidth. High speed ADC are generally available, but one needs to integrate them. If you'll try to put together something yourself, suggestion would be to use audio ADC with 40kHz band or even 200kHz. Though, I doubt that someone wants to de-solder Pi's CPU from a board and add a current sensor... Using magnetic field sensor as a current sensor is very unlikely to work due to low fields and interference.
  3. An indirect way would be monitoring temperature of the CPU. One should be able to access it from operation system, quick search suggests using this shell command (presumably in Raspberry Pi OS) or use an external sensor (e.g. glued to the chip). As heat transfer is slow, one would not aim for high sampling rate. Guess, achieving 10 ms resolution would be a big luck already.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.