My Raspberry Pi2 is freezing. Some online forums mentioned that freezing is due to inefficient power supply (as minimum allowed voltage is 4.75 v). In order to test this, I want to have a running job that is able to report voltage input of the power supply. Can anyone advise how to have a script that can report power level of the supply.

  • Read the power level (voltage) from what? The Pi does not provide any information on the state of the 5V supply line (other than good/bad).
    – joan
    Apr 12 '16 at 8:01

The Pi cannot do this, as it has no analog capability. You could of course add suitable hardware.

The Pi (at least all since B+) does have a power monitor - the APX803 chip triggers if voltage falls below 4.63±0.07V. This drives the power LED and is connected to a pin on the chip (35 for B+ but it may have changed for P2) which could be monitored.

In fact the Pi will run at lower voltages as it requires 3.3V and has an on-board regulator. The lower voltage may impact peripherals.


Pi randomly freezing, probably due to insufficient power or an unstable power source.

My recommendation is at a minimum to use a high quality phone or tablet charger that can reliably output 1.2A at 5V. However, I strongly recommend using an official Raspberry Pi power supply.

In terms of measuring power consumption a multimeter is your best bet, although this website might interest you.

As stated on the website run this set of instructions in the LXTerminal.

git clone https://github.com/raspitv/pi2test/

cd pi2test

python Pi2test.py 

This will give you a program that should measure the current draw of your CPU.

However looking at the results, the most the Pi 2's CPU consumes is 420mA with all 4 cores under load. Once you account for USB devices, and other circuitry on the Pi, you can see where the 1.2A recommendation comes from.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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